[cooja] interfaces/IPAddress: Indention cleanup
This commit is contained in:
parent
e5653ac150
commit
d5c5198171
1 changed files with 57 additions and 57 deletions
|
@ -26,7 +26,6 @@
|
||||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.contikios.cooja.interfaces;
|
package org.contikios.cooja.interfaces;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
@ -53,6 +52,7 @@ import org.contikios.cooja.mote.memory.VarMemory;
|
||||||
*/
|
*/
|
||||||
@ClassDescription("IP Address")
|
@ClassDescription("IP Address")
|
||||||
public class IPAddress extends MoteInterface {
|
public class IPAddress extends MoteInterface {
|
||||||
|
|
||||||
private static Logger logger = Logger.getLogger(IPAddress.class);
|
private static Logger logger = Logger.getLogger(IPAddress.class);
|
||||||
private final VarMemory moteMem;
|
private final VarMemory moteMem;
|
||||||
|
|
||||||
|
@ -134,7 +134,8 @@ public class IPAddress extends MoteInterface {
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO No need to copy the entire array! */
|
/* TODO No need to copy the entire array! */
|
||||||
byte[] structData = moteMem.getByteArray("uip_ds6_if",
|
byte[] structData = moteMem.getByteArray(
|
||||||
|
"uip_ds6_if",
|
||||||
ipv6NetworkInterfaceAddressOffset + IPv6_MAX_ADDRESSES * ipv6AddressStructSize);
|
ipv6NetworkInterfaceAddressOffset + IPv6_MAX_ADDRESSES * ipv6AddressStructSize);
|
||||||
|
|
||||||
ipv6AddressIndex = -1;
|
ipv6AddressIndex = -1;
|
||||||
|
@ -196,10 +197,9 @@ public class IPAddress extends MoteInterface {
|
||||||
* @return True if mote has an IPv6 address
|
* @return True if mote has an IPv6 address
|
||||||
*/
|
*/
|
||||||
public boolean isVersion6() {
|
public boolean isVersion6() {
|
||||||
return
|
return moteMem.variableExists("uip_ds6_netif_addr_list_offset")
|
||||||
moteMem.variableExists("uip_ds6_netif_addr_list_offset") &&
|
&& moteMem.variableExists("uip_ds6_addr_size")
|
||||||
moteMem.variableExists("uip_ds6_addr_size") &&
|
&& moteMem.variableExists("uip_ds6_if");
|
||||||
moteMem.variableExists("uip_ds6_if");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void removed() {
|
public void removed() {
|
||||||
|
@ -225,8 +225,8 @@ public class IPAddress extends MoteInterface {
|
||||||
if (isVersion4()) {
|
if (isVersion4()) {
|
||||||
ipLabel.setText("IPv4 address: " + getIPString());
|
ipLabel.setText("IPv4 address: " + getIPString());
|
||||||
} else if (isVersion6()) {
|
} else if (isVersion6()) {
|
||||||
ipLabel.setText((ipv6IsGlobal?"Global":"Local") +
|
ipLabel.setText((ipv6IsGlobal ? "Global" : "Local")
|
||||||
" IPv6 address(#" + ipv6AddressIndex + "): " + getIPString());
|
+ " IPv6 address(#" + ipv6AddressIndex + "): " + getIPString());
|
||||||
} else {
|
} else {
|
||||||
ipLabel.setText("Unknown IP");
|
ipLabel.setText("Unknown IP");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue