NetOceanDirect 3.1.3
OceanDirect .NET API
|
#include <Ipv4Address.h>
Inherits NetOceanDirect::ManagedObject< Ipv4AddressAPI >.
Public Member Functions | |
Ipv4Address (Ipv4AddressAPI *instance) | |
virtual | ~Ipv4Address () |
void | addStaticIpAddress (long deviceID, int% errorCode, array< unsigned char >^% ipAddress, unsigned int netmask) |
void | addStaticIpAddress (long deviceID, int% errorCode, unsigned char ifNum, array< unsigned char >^% ipAddress, unsigned int netmask) |
void | deleteStaticIpAddress (long deviceID, int% errorCode, unsigned char addressIndex) |
void | deleteStaticIpAddress (long deviceID, int% errorCode, unsigned char ifNum, unsigned char addressIndex) |
array< unsigned char > | getDefaultGatewayIpAddress (long deviceID, int% errorCode) |
array< unsigned char > | getDefaultGatewayIpAddress (long deviceID, int% errorCode, unsigned char ifNum) |
int | getNumberOfIpAddresses (long deviceID, int% errorCode) |
int | getNumberOfIpAddresses (long deviceID, int% errorCode, unsigned char ifNum) |
bool | isDHCPEnabled (long deviceID, int% errorCode) |
bool | isDHCPEnabled (long deviceID, int% errorCode, unsigned char ifNum) |
array< unsigned char > | readIpAddress (long deviceID, int% errorCode, unsigned char addressIndex, unsigned int% netmask) |
array< unsigned char > | readIpAddress (long deviceID, int% errorCode, unsigned char ifNum, unsigned char addressIndex, unsigned int% netmask) |
void | setDefaultGatewayIpAddress (long deviceID, int% errorCode, array< unsigned char >^% ipAddress) |
void | setDefaultGatewayIpAddress (long deviceID, int% errorCode, unsigned char ifNum, array< unsigned char >^% ipAddress) |
void | setDHCPEnable (long deviceID, int %errorCode, unsigned char ifNum, bool enabled) |
void | setDHCPEnable (long deviceID, int% errorCode, bool enabled) |
![]() | |
ManagedObject (Ipv4AddressAPI *instance) | |
!ManagedObject () | |
virtual | ~ManagedObject () |
Ipv4AddressAPI * | GetInstance () |
Static Public Member Functions | |
static Ipv4Address | getInstance () |
Protected Member Functions | |
Ipv4Address () | |
Static Protected Attributes | |
static Ipv4Address | ipv4Address |
Additional Inherited Members | |
![]() | |
Ipv4AddressAPI * | m_Instance |
|
protected |
Ipv4Address::Ipv4Address | ( | Ipv4AddressAPI * | instance | ) |
|
inlinevirtual |
void Ipv4Address::addStaticIpAddress | ( | long | deviceID, |
int% | errorCode, | ||
array< unsigned char >^% | ipAddress, | ||
unsigned int | netmask ) |
void Ipv4Address::addStaticIpAddress | ( | long | deviceID, |
int% | errorCode, | ||
unsigned char | ifNum, | ||
array< unsigned char >^% | ipAddress, | ||
unsigned int | netmask ) |
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. This function only applies to HDX/FX devices.
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 stored as an array of 4 bytes beginning with the leading part of the IP address. |
netmask | the netmask specifying the subnet of the network the device is on. |
void Ipv4Address::deleteStaticIpAddress | ( | long | deviceID, |
int% | errorCode, | ||
unsigned char | addressIndex ) |
void Ipv4Address::deleteStaticIpAddress | ( | long | deviceID, |
int% | errorCode, | ||
unsigned char | ifNum, | ||
unsigned char | addressIndex ) |
Delete a static IP address on the specified interface. This function only applies to HDX/FX devices.
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. |
array< unsigned char > Ipv4Address::getDefaultGatewayIpAddress | ( | long | deviceID, |
int% | errorCode ) |
array< unsigned char > Ipv4Address::getDefaultGatewayIpAddress | ( | long | deviceID, |
int% | errorCode, | ||
unsigned char | ifNum ) |
Get the default gateway IP address of 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. This function only applies to HDX/FX devices.
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 stored as an array of 4 bytes beginning with the leading part of the IP address. |
|
static |
int Ipv4Address::getNumberOfIpAddresses | ( | long | deviceID, |
int% | errorCode ) |
int Ipv4Address::getNumberOfIpAddresses | ( | long | deviceID, |
int% | errorCode, | ||
unsigned char | ifNum ) |
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. This function only applies to HDX/FX devices.
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. |
bool Ipv4Address::isDHCPEnabled | ( | long | deviceID, |
int% | errorCode ) |
bool Ipv4Address::isDHCPEnabled | ( | long | deviceID, |
int% | errorCode, | ||
unsigned char | ifNum ) |
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. This function only applies to HDX/FX devices.
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. |
array< unsigned char > Ipv4Address::readIpAddress | ( | long | deviceID, |
int% | errorCode, | ||
unsigned char | addressIndex, | ||
unsigned int% | netmask ) |
array< unsigned char > Ipv4Address::readIpAddress | ( | long | deviceID, |
int% | errorCode, | ||
unsigned char | ifNum, | ||
unsigned char | addressIndex, | ||
unsigned int% | netmask ) |
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. This function only applies to HDX/FX devices.
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. |
netmask | a reference to the netmask specifying the subnet of the network the device is on. |
void Ipv4Address::setDefaultGatewayIpAddress | ( | long | deviceID, |
int% | errorCode, | ||
array< unsigned char >^% | ipAddress ) |
void Ipv4Address::setDefaultGatewayIpAddress | ( | long | deviceID, |
int% | errorCode, | ||
unsigned char | ifNum, | ||
array< unsigned char >^% | ipAddress ) |
Set the default gateway 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. This function only applies to HDX/FX devices.
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 stored as an array of 4 bytes beginning with the leading part of the IP address. |
void NetOceanDirect::Ipv4Address::setDHCPEnable | ( | long | deviceID, |
int % | errorCode, | ||
unsigned char | ifNum, | ||
bool | enabled ) |
Turn the DHCP client on or off for the device on the specified interface. This function only applies to HDX/FX devices.
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. |
void Ipv4Address::setDHCPEnable | ( | long | deviceID, |
int% | errorCode, | ||
bool | enabled ) |
|
staticprotected |