LowpanIdentity
public
class
LowpanIdentity
extends Object
java.lang.Object | |
↳ | com.google.android.things.lowpan.LowpanIdentity |
Describes an instance of a LoWPAN network.
See also:
Summary
Nested classes | |
---|---|
class |
LowpanIdentity.Builder
Builder class for constructing instances of LowpanIdentity. |
Constants | |
---|---|
int |
UNSPECIFIED_CHANNEL
Value returned from |
int |
UNSPECIFIED_PANID
Value returned from |
Public methods | |
---|---|
boolean
|
equals(Object rhs)
|
int
|
getChannel()
Returns the channel index for this LowpanIdentity. |
String
|
getName()
Returns the name of the network. |
int
|
getPanid()
Returns the PANID for this LowpanIdentity. |
byte[]
|
getRawName()
Returns the raw bytes for the network name. |
byte[]
|
getXpanid()
Returns the XPANID for this LowpanIdentity. |
int
|
hashCode()
|
boolean
|
isNameValid()
Indicates if the raw network name is a valid and normalized UTF8 encoding. |
String
|
toString()
|
Inherited methods | |
---|---|
![]()
java.lang.Object
|
Constants
UNSPECIFIED_CHANNEL
int UNSPECIFIED_CHANNEL
Value returned from getChannel()
when no channel was specified.
Constant Value: -1 (0xffffffff)
UNSPECIFIED_PANID
int UNSPECIFIED_PANID
Value returned from getPanid()
when no PANID was specified.
Constant Value: -1 (0xffffffff)
Public methods
equals
boolean equals (Object rhs)
Parameters | |
---|---|
rhs |
Object |
Returns | |
---|---|
boolean |
getChannel
int getChannel ()
Returns the channel index for this LowpanIdentity.
If not set, will return UNSPECIFIED_CHANNEL
.
Returns | |
---|---|
int |
See also:
getName
String getName ()
Returns the name of the network.
Note that if the name of this network is not considered normal or ambiguous, the returned
string will be escaped into a non-ambigous form. To get the actual byte values for the
network name, use getRawName()
.
Returns | |
---|---|
String |
See also:
getPanid
int getPanid ()
Returns the PANID for this LowpanIdentity.
If not set, will return UNSPECIFIED_PANID
.
Returns | |
---|---|
int |
See also:
getRawName
byte[] getRawName ()
Returns the raw bytes for the network name.
These bytes may differ from the UTF8 encoding of the result from getName()
if the
network name is not considered normal or ambiguous.
Returns | |
---|---|
byte[] |
See also:
getXpanid
byte[] getXpanid ()
Returns the XPANID for this LowpanIdentity.
If not set, will return an empty array.
Returns | |
---|---|
byte[] |
hashCode
int hashCode ()
Returns | |
---|---|
int |
isNameValid
boolean isNameValid ()
Indicates if the raw network name is a valid and normalized UTF8 encoding.
Returns | |
---|---|
boolean |
true if the network name is valid and normalized UTF8. false
otherwise. |
See also:
toString
String toString ()
Returns | |
---|---|
String |
Classes
Exceptions