[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
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package org.contikios.cooja.interfaces;
|
||||
|
||||
import java.util.Collection;
|
||||
|
@ -53,6 +52,7 @@ import org.contikios.cooja.mote.memory.VarMemory;
|
|||
*/
|
||||
@ClassDescription("IP Address")
|
||||
public class IPAddress extends MoteInterface {
|
||||
|
||||
private static Logger logger = Logger.getLogger(IPAddress.class);
|
||||
private final VarMemory moteMem;
|
||||
|
||||
|
@ -134,7 +134,8 @@ public class IPAddress extends MoteInterface {
|
|||
}
|
||||
|
||||
/* 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);
|
||||
|
||||
ipv6AddressIndex = -1;
|
||||
|
@ -196,10 +197,9 @@ public class IPAddress extends MoteInterface {
|
|||
* @return True if mote has an IPv6 address
|
||||
*/
|
||||
public boolean isVersion6() {
|
||||
return
|
||||
moteMem.variableExists("uip_ds6_netif_addr_list_offset") &&
|
||||
moteMem.variableExists("uip_ds6_addr_size") &&
|
||||
moteMem.variableExists("uip_ds6_if");
|
||||
return moteMem.variableExists("uip_ds6_netif_addr_list_offset")
|
||||
&& moteMem.variableExists("uip_ds6_addr_size")
|
||||
&& moteMem.variableExists("uip_ds6_if");
|
||||
}
|
||||
|
||||
public void removed() {
|
||||
|
@ -225,8 +225,8 @@ public class IPAddress extends MoteInterface {
|
|||
if (isVersion4()) {
|
||||
ipLabel.setText("IPv4 address: " + getIPString());
|
||||
} else if (isVersion6()) {
|
||||
ipLabel.setText((ipv6IsGlobal?"Global":"Local") +
|
||||
" IPv6 address(#" + ipv6AddressIndex + "): " + getIPString());
|
||||
ipLabel.setText((ipv6IsGlobal ? "Global" : "Local")
|
||||
+ " IPv6 address(#" + ipv6AddressIndex + "): " + getIPString());
|
||||
} else {
|
||||
ipLabel.setText("Unknown IP");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue