NetOceanDirect 3.1.3
OceanDirect .NET API
NetOceanDirect::Ipv4Address Class Reference

#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)
 
- Public Member Functions inherited from NetOceanDirect::ManagedObject< Ipv4AddressAPI >
 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

- Protected Attributes inherited from NetOceanDirect::ManagedObject< Ipv4AddressAPI >
Ipv4AddressAPI * m_Instance
 

Constructor & Destructor Documentation

◆ Ipv4Address() [1/2]

Ipv4Address::Ipv4Address ( )
protected

◆ Ipv4Address() [2/2]

Ipv4Address::Ipv4Address ( Ipv4AddressAPI * instance)

◆ ~Ipv4Address()

virtual NetOceanDirect::Ipv4Address::~Ipv4Address ( )
inlinevirtual

Member Function Documentation

◆ addStaticIpAddress() [1/2]

void Ipv4Address::addStaticIpAddress ( long deviceID,
int% errorCode,
array< unsigned char >^% ipAddress,
unsigned int netmask )

◆ addStaticIpAddress() [2/2]

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.

See also
deleteStaticIpAddress()
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea 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.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
ipAddressthe static IP address to be added stored as an array of 4 bytes beginning with the leading part of the IP address.
netmaskthe netmask specifying the subnet of the network the device is on.

◆ deleteStaticIpAddress() [1/2]

void Ipv4Address::deleteStaticIpAddress ( long deviceID,
int% errorCode,
unsigned char addressIndex )

◆ deleteStaticIpAddress() [2/2]

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.

See also
addStaticIpAddress()
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea 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.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
addressIndexthe index of the address to be deleted.

◆ getDefaultGatewayIpAddress() [1/2]

array< unsigned char > Ipv4Address::getDefaultGatewayIpAddress ( long deviceID,
int% errorCode )

◆ getDefaultGatewayIpAddress() [2/2]

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.

See also
setDefaultGatewayIpAddress()
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea 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.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
ipAddressthe static IP address to be added stored as an array of 4 bytes beginning with the leading part of the IP address.

◆ getInstance()

Ipv4Address Ipv4Address::getInstance ( )
static

◆ getNumberOfIpAddresses() [1/2]

int Ipv4Address::getNumberOfIpAddresses ( long deviceID,
int% errorCode )

◆ getNumberOfIpAddresses() [2/2]

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.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea 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.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
Returns
the number of IP addresses on the specified interface.

◆ isDHCPEnabled() [1/2]

bool Ipv4Address::isDHCPEnabled ( long deviceID,
int% errorCode )

◆ isDHCPEnabled() [2/2]

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.

See also
setDHCPEnable()
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea 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.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
Returns
true if DHCP is enabled on the specified interface, false otherwise.

◆ readIpAddress() [1/2]

array< unsigned char > Ipv4Address::readIpAddress ( long deviceID,
int% errorCode,
unsigned char addressIndex,
unsigned int% netmask )

◆ readIpAddress() [2/2]

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.

Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea 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.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
addressIndexthe index of the address to be retrieved.
netmaska reference to the netmask specifying the subnet of the network the device is on.
Returns
the IP address as an array of 4 bytes starting with the leading part of the IP address.

◆ setDefaultGatewayIpAddress() [1/2]

void Ipv4Address::setDefaultGatewayIpAddress ( long deviceID,
int% errorCode,
array< unsigned char >^% ipAddress )

◆ setDefaultGatewayIpAddress() [2/2]

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.

See also
getDefaultGatewayIpAddress()
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea 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.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
ipAddressthe static IP address to be added stored as an array of 4 bytes beginning with the leading part of the IP address.

◆ setDHCPEnable() [1/2]

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.

See also
isDHCPEnabled()
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCodea 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.
ifNumthe interface number: 0 for Ethernet, 1 for wi-fi.
enableda value of 0 turns the DHCP client off, a value greater than 0 turns the DHCP client on.

◆ setDHCPEnable() [2/2]

void Ipv4Address::setDHCPEnable ( long deviceID,
int% errorCode,
bool enabled )

Member Data Documentation

◆ ipv4Address

Ipv4Address NetOceanDirect::Ipv4Address::ipv4Address
staticprotected

The documentation for this class was generated from the following files: