|
virtual void | addStaticIpAddress (long deviceID, int *errorCode, unsigned char ifNum, unsigned char *ipAddress, int ipAddressLength, unsigned int netmask) |
|
virtual void | deleteStaticIpAddress (long deviceID, int *errorCode, unsigned char ifNum, unsigned char addressIndex) |
|
virtual void | getDefaultGatewayIpAddress (long deviceID, int *errorCode, unsigned char ifNum, unsigned char *outIpAddress, int ipAddressLength) |
|
virtual int | getNumberOfIpAddresses (long deviceID, int *errorCode, unsigned char ifNum) |
|
virtual bool | isDHCPEnabled (long deviceID, int *errorCode, unsigned char ifNum) |
|
virtual void | readIpAddress (long deviceID, int *errorCode, unsigned char ifNum, unsigned char addressIndex, unsigned char *ipAddress, int ipAddressLength, unsigned int *netmask) |
|
virtual void | setDefaultGatewayIpAddress (long deviceID, int *errorCode, unsigned char ifNum, unsigned char *ipAddress, int ipAddressLength) |
|
virtual void | setDHCPEnable (long deviceID, int *errorCode, unsigned char ifNum, unsigned char enabled) |
|
◆ addStaticIpAddress()
virtual void oceandirect::api::Ipv4AddressAPI::addStaticIpAddress |
( |
long |
deviceID, |
|
|
int * |
errorCode, |
|
|
unsigned char |
ifNum, |
|
|
unsigned char * |
ipAddress, |
|
|
int |
ipAddressLength, |
|
|
unsigned int |
netmask |
|
) |
| |
|
virtual |
Add a static IP address to the specified interface. The IP address is specified as 4 bytes in an array. The leading part of the IP address must contain the first element of the array, followed by the remaining parts in order to the last part of the IP address in the fourth element of the array.
- See also
- deleteStaticIpAddress()
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1 or the ipAddress array size is less than 4. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
ipAddress | the static IP address to be added. |
netmask | the netmask specifying the subnet of the network the device is on. |
◆ deleteStaticIpAddress()
virtual void oceandirect::api::Ipv4AddressAPI::deleteStaticIpAddress |
( |
long |
deviceID, |
|
|
int * |
errorCode, |
|
|
unsigned char |
ifNum, |
|
|
unsigned char |
addressIndex |
|
) |
| |
|
virtual |
Delete a static IP address on the specified interface.
- See also
- addStaticIpAddress()
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
addressIndex | the index of the address to be deleted. |
◆ getDefaultGatewayIpAddress()
virtual void oceandirect::api::Ipv4AddressAPI::getDefaultGatewayIpAddress |
( |
long |
deviceID, |
|
|
int * |
errorCode, |
|
|
unsigned char |
ifNum, |
|
|
unsigned char * |
outIpAddress, |
|
|
int |
ipAddressLength |
|
) |
| |
|
virtual |
Get the gateway ip address for the device on the specified interface.
- See also
- setDefaultGatewayIpAddress()
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1 or the ipAddress array size is less than 4. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
outIpAddress | the output buffer for gateway IP address. |
ipAddressLength | the output buffer length. |
◆ getNumberOfIpAddresses()
virtual int oceandirect::api::Ipv4AddressAPI::getNumberOfIpAddresses |
( |
long |
deviceID, |
|
|
int * |
errorCode, |
|
|
unsigned char |
ifNum |
|
) |
| |
|
virtual |
Get the number of IP addresses available on the specified interface. If DHCP is enabled on the specified interface then index 0 represents the DHCP address and the following addresses will be any static IP addresses.
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
- Returns
- the number of IP addresses on the specified interface.
◆ isDHCPEnabled()
virtual bool oceandirect::api::Ipv4AddressAPI::isDHCPEnabled |
( |
long |
deviceID, |
|
|
int * |
errorCode, |
|
|
unsigned char |
ifNum |
|
) |
| |
|
virtual |
Check to see if DHCP (client) is enabled on the specified interface. If DHCP is enabled then the device will be able to receive and IP address from a DHCP server in the network it is connected to.
- See also
- setDHCPEnable()
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
- Returns
- true if DHCP is enabled on the specified interface, false otherwise.
◆ readIpAddress()
virtual void oceandirect::api::Ipv4AddressAPI::readIpAddress |
( |
long |
deviceID, |
|
|
int * |
errorCode, |
|
|
unsigned char |
ifNum, |
|
|
unsigned char |
addressIndex, |
|
|
unsigned char * |
ipAddress, |
|
|
int |
ipAddressLength, |
|
|
unsigned int * |
netmask |
|
) |
| |
|
virtual |
Retrieve the IP address and netmask on the specified interface. If DHCP is enabled on the specified interface then index 0 represents the DHCP address and the following addresses will be any static IP addresses. The IP address is returned as 4 bytes into a user supplied array. The leading part of the IP address will be in the first element of the array, followed by the remaining parts in order to the last part of the IP address in the fourth element of the array.
- See also
- getNumberOfIpAddresses()
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1 or the ipAddress array size is less than 4. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
addressIndex | the index of the address to be retrieved. |
ipAddress | a pointer to the array that will receive the IP address. |
ipAddressLength | the size of the array ipAddress. |
netmask | a pointer to the netmask specifying the subnet of the network the device is on. |
◆ setDefaultGatewayIpAddress()
virtual void oceandirect::api::Ipv4AddressAPI::setDefaultGatewayIpAddress |
( |
long |
deviceID, |
|
|
int * |
errorCode, |
|
|
unsigned char |
ifNum, |
|
|
unsigned char * |
ipAddress, |
|
|
int |
ipAddressLength |
|
) |
| |
|
virtual |
Set the gateway ip address for the device on the specified interface.
- See also
- getDefaultGatewayIpAddress()
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1 or the ipAddress array size is less than 4. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
ipAddress | the gateway IP address. |
ipAddressLength | the gateway IP address length. |
◆ setDHCPEnable()
virtual void oceandirect::api::Ipv4AddressAPI::setDHCPEnable |
( |
long |
deviceID, |
|
|
int * |
errorCode, |
|
|
unsigned char |
ifNum, |
|
|
unsigned char |
enabled |
|
) |
| |
|
virtual |
Turn the DHCP client on or off for the device on the specified interface.
- See also
- isDHCPEnabled()
- Parameters
-
deviceID | the ID of the device returned by getDeviceIDs. |
errorCode | a code indicating the result of the operation: ERROR_SUCCESS on success; ERROR_NO_DEVICE if the device does not exist; ERROR_FEATURE_NOT_FOUND the feature is not enabled on the specified device; ERROR_TRANSFER_ERROR the device protocol for the feature could not be found; ERROR_CODE_INVALID_ARGUMENT the interface number is not 0 or 1. |
ifNum | the interface number: 0 for Ethernet, 1 for wi-fi. |
enabled | a value of 0 turns the DHCP client off, a value greater than 0 turns the DHCP client on. |
The documentation for this class was generated from the following file: