public class SimpleIPSettings extends SimpleIP
© Devmel SDK (java) ©
Constructor and Description |
---|
SimpleIPSettings(SimpleIPLocator locator)
Constructs an SimpleIPSettings object.
|
Modifier and Type | Method and Description |
---|---|
static int |
buildConfig(boolean ipv4,
boolean dhcpv4,
boolean registration)
Builds the configuration
|
int |
readConfig()
Reads the configuration (ipv4, dhcpv4, registration, ping)
|
String |
readHostname()
Reads the device host name
|
byte[] |
readIPv4Address()
Reads the raw IPv4 address
|
byte[] |
readIPv4GatewayAddress()
Reads the Gateway raw IPv4 address
|
int |
readIPv4Mask()
Reads the IPv4 address mask
|
boolean |
writeConfig(int config)
Writes the configuration
|
boolean |
writeHostname(String hostname)
Writes the device host name
|
boolean |
writeIPv4(byte[] ipaddress,
int mask,
byte[] gateway)
Writes the IPv4 configuration
|
boolean |
writePassword(byte[] password)
Writes the new device password
|
close, finalize, getDataSizeLimit, getExceptions, getLastException, getLock, getTimeout, getVersion, isLocalConnected, isOpen, setExceptions, setLock, setTimeout
public SimpleIPSettings(SimpleIPLocator locator)
locator
- a resource locator of AirSend devicepublic static int buildConfig(boolean ipv4, boolean dhcpv4, boolean registration)
ipv4
- true to enable IPv4 stackdhcpv4
- true to enable IPv4 DHCP clientregistration
- true to enable IPv4 registration clientpublic int readConfig() throws SimpleIPException
SimpleIPException
- if an I/O exception occurs and exceptions are not disabledpublic String readHostname() throws SimpleIPException
SimpleIPException
- if an I/O exception occurs and exceptions are not disabledpublic byte[] readIPv4Address() throws SimpleIPException
SimpleIPException
- if an I/O exception occurs and exceptions are not disabledpublic byte[] readIPv4GatewayAddress() throws SimpleIPException
SimpleIPException
- if an I/O exception occurs and exceptions are not disabledpublic int readIPv4Mask() throws SimpleIPException
SimpleIPException
- if an I/O exception occurs and exceptions are not disabledpublic boolean writeConfig(int config) throws SimpleIPException
config
- an Integer that represents the configurationSimpleIPException
- if an I/O exception occurs and exceptions are not disabledpublic boolean writeHostname(String hostname) throws SimpleIPException
hostname
- The device host nameSimpleIPException
- if an I/O exception occurs and exceptions are not disabledpublic boolean writeIPv4(byte[] ipaddress, int mask, byte[] gateway) throws SimpleIPException
ipaddress
- an IPv4 addressmask
- an IPv4 mask (default : /24)gateway
- the IPv4 address of the gatewaySimpleIPException
- if an I/O exception occurs and exceptions are not disabledpublic boolean writePassword(byte[] password) throws SimpleIPException
password
- The device passwordSimpleIPException
- if an I/O exception occurs and exceptions are not disabled