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

#include <NetworkConfiguration.h>

Inherits NetOceanDirect::ManagedObject< NetworkConfigurationAPI >.

Public Member Functions

 NetworkConfiguration (NetworkConfigurationAPI *instance)
 
virtual ~NetworkConfiguration ()
 
bool getIPAddressAssignedMode (long deviceID, int% errorCode)
 
void getManualNetworkConfiguration (long deviceID, int% errorCode, array< unsigned char >^% outIpv4Address, array< unsigned char >^% outSubnetMask, array< unsigned char >^% outDefaultGateway, array< unsigned char >^% outDNSServer)
 
bool getMulticastGroupEnabled (long deviceID, int% errorCode)
 
bool getMulticastGroupEnabled (long deviceID, int% errorCode, std::uint32_t interfaceIndex)
 
void getNetworkConfiguration (long deviceID, int% errorCode, bool% outManualAssignment, array< unsigned char >^% outIpv4Address, array< unsigned char >^% outSubnetMask, array< unsigned char >^% outDefaultGateway, array< unsigned char >^% outDNSServer)
 
std::uint32_t getNetworkInterfaceCount (long deviceID, int% errorCode)
 
bool getNetworkInterfaceStatus (long deviceID, int% errorCode)
 
bool getNetworkInterfaceStatus (long deviceID, int% errorCode, std::uint32_t interfaceIndex)
 
std::uint32_t getNetworkInterfaceType (long deviceID, int% errorCode)
 
std::uint32_t getNetworkInterfaceType (long deviceID, int% errorCode, std::uint32_t interfaceIndex)
 
void saveNetworkInterfaceSetting (long deviceID, int% errorCode)
 
void saveNetworkInterfaceSetting (long deviceID, int% errorCode, std::uint32_t interfaceIndex)
 
void setIPAddressAssignedMode (long deviceID, int% errorCode, bool useDHCP)
 
void setManualNetworkConfiguration (long deviceID, int% errorCode, array< unsigned char >^% ipv4Address, array< unsigned char >^% subnetMask, array< unsigned char >^% defaultGateway, array< unsigned char >^% dnsServer)
 
void setMulticastGroupEnabled (long deviceID, int% errorCode, bool enable)
 
void setMulticastGroupEnabled (long deviceID, int% errorCode, std::uint32_t interfaceIndex, bool enable)
 
void setNetworkInterfaceStatus (long deviceID, int% errorCode, bool enable)
 
void setNetworkInterfaceStatus (long deviceID, int% errorCode, std::uint32_t interfaceIndex, bool enable)
 
- Public Member Functions inherited from NetOceanDirect::ManagedObject< NetworkConfigurationAPI >
 ManagedObject (NetworkConfigurationAPI *instance)
 
 !ManagedObject ()
 
virtual ~ManagedObject ()
 
NetworkConfigurationAPI * GetInstance ()
 

Static Public Member Functions

static NetworkConfiguration getInstance ()
 

Protected Member Functions

 NetworkConfiguration ()
 

Static Protected Attributes

static NetworkConfiguration networkConfig
 

Additional Inherited Members

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

Constructor & Destructor Documentation

◆ NetworkConfiguration() [1/2]

NetworkConfiguration::NetworkConfiguration ( )
protected

◆ NetworkConfiguration() [2/2]

NetworkConfiguration::NetworkConfiguration ( NetworkConfigurationAPI * instance)

◆ ~NetworkConfiguration()

virtual NetOceanDirect::NetworkConfiguration::~NetworkConfiguration ( )
inlinevirtual

Member Function Documentation

◆ getInstance()

NetworkConfiguration NetworkConfiguration::getInstance ( )
static

◆ getIPAddressAssignedMode()

bool NetworkConfiguration::getIPAddressAssignedMode ( long deviceID,
int% errorCode )

Read the IP address mode from the OBP2 device.

See also
setIPAddressAssignedMode()
Parameters
errorCode[out]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.
Returns
True if the ip address was generated via DHCP. False if the ip address was statically assigned.

◆ getManualNetworkConfiguration()

void NetworkConfiguration::getManualNetworkConfiguration ( long deviceID,
int% errorCode,
array< unsigned char >^% outIpv4Address,
array< unsigned char >^% outSubnetMask,
array< unsigned char >^% outDefaultGateway,
array< unsigned char >^% outDNSServer )

Read the network configuration parameters (static ip address) from an OBP2 enabled device.

See also
setManualNetworkConfiguration()
Parameters
deviceID[in]the ID of the device returned by getDeviceIDs.
errorCode[out]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.
outIpv4Address[out]The static IP address.
outSubnetMask[out]The subnet mask.
outDefaultGateway[out]The default gateway IP address.
outDNSServer[out]The DNS server IP address.

◆ getMulticastGroupEnabled() [1/2]

bool NetworkConfiguration::getMulticastGroupEnabled ( long deviceID,
int% errorCode )

◆ getMulticastGroupEnabled() [2/2]

bool NetworkConfiguration::getMulticastGroupEnabled ( long deviceID,
int% errorCode,
std::uint32_t interfaceIndex )

Return true if the multicast group message is enabled otherwise it's false. This function only applies to HDX/FX devices.

See also
setMulticastGroupEnabled()
Parameters
deviceID[in]the ID of the device returned by getDeviceIDs.
errorCode[out]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.
interfaceIndex[in]The interface to look at.
Returns
True if it's enabled otherwise it's False.

◆ getNetworkConfiguration()

void NetworkConfiguration::getNetworkConfiguration ( long deviceID,
int% errorCode,
bool% outManualAssignment,
array< unsigned char >^% outIpv4Address,
array< unsigned char >^% outSubnetMask,
array< unsigned char >^% outDefaultGateway,
array< unsigned char >^% outDNSServer )

Read the current network configuration parameters from an OBP2 enabled device.

Parameters
deviceID[in]the ID of the device returned by getDeviceIDs.
errorCode[out]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.
outManualAssignment[out]An output argument that contains the IP Address mode. True if it's DHCP generated IP address otherwise it's False (static IP).
ipv4Address[out]An output argument for the static IP address.
subnetMask[out]An output argument for the subnet mask.
defaultGateway[out]An output argument for the default gateway IP address.
dnsServer[out]An output argument for the DNS server IP address.

◆ getNetworkInterfaceCount()

std::uint32_t NetworkConfiguration::getNetworkInterfaceCount ( long deviceID,
int% errorCode )

Read the number of supported communication interface. This function only applies to HDX/FX devices.

Parameters
deviceID[in]the ID of the device returned by getDeviceIDs.
errorCode[out]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.
Returns
The number of interface.

◆ getNetworkInterfaceStatus() [1/2]

bool NetworkConfiguration::getNetworkInterfaceStatus ( long deviceID,
int% errorCode )

◆ getNetworkInterfaceStatus() [2/2]

bool NetworkConfiguration::getNetworkInterfaceStatus ( long deviceID,
int% errorCode,
std::uint32_t interfaceIndex )

Return true if the interface is enabled otherwise it's false. This function only applies to HDX/FX devices.

See also
setNetworkInterfaceStatus()
Parameters
deviceID[in]the ID of the device returned by getDeviceIDs.
errorCode[out]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.
interfaceIndex[in]The interface to look at.
Returns
True if the interface if enabled otherwise it's False.

◆ getNetworkInterfaceType() [1/2]

std::uint32_t NetworkConfiguration::getNetworkInterfaceType ( long deviceID,
int% errorCode )

◆ getNetworkInterfaceType() [2/2]

std::uint32_t NetworkConfiguration::getNetworkInterfaceType ( long deviceID,
int% errorCode,
std::uint32_t interfaceIndex )

Return the interface type of the given interface index. This function only applies to HDX/FX devices.

Parameters
deviceID[in]the ID of the device returned by getDeviceIDs.
errorCode[out]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.
interfaceIndex[in]The interface to look at.
Returns
The interface type which could be one 0(Loopback), 1(wired ethernet), 2 (WIFI), and 3 (USB - CDC Ethernet).

◆ saveNetworkInterfaceSetting() [1/2]

void NetworkConfiguration::saveNetworkInterfaceSetting ( long deviceID,
int% errorCode )

◆ saveNetworkInterfaceSetting() [2/2]

void NetworkConfiguration::saveNetworkInterfaceSetting ( long deviceID,
int% errorCode,
std::uint32_t interfaceIndex )

Save the network interface settings to the device. This function only applies to HDX/FX devices.

Parameters
deviceID[in]the ID of the device returned by getDeviceIDs.
errorCode[out]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.
interfaceIndex[in]The interface to save to.

◆ setIPAddressAssignedMode()

void NetworkConfiguration::setIPAddressAssignedMode ( long deviceID,
int% errorCode,
bool useDHCP )

Set the IP address mode to the OBP2 device.

See also
getIPAddressAssignedMode()
Parameters
deviceIDthe ID of the device returned by getDeviceIDs.
errorCode[out]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.
useStaticIP[in]True will use DHCP server for ip assignment. False will use statically assigned IP address.

◆ setManualNetworkConfiguration()

void NetworkConfiguration::setManualNetworkConfiguration ( long deviceID,
int% errorCode,
array< unsigned char >^% ipv4Address,
array< unsigned char >^% subnetMask,
array< unsigned char >^% defaultGateway,
array< unsigned char >^% dnsServer )

Write the network configuration parameters (static ip address) on OBP2 enabled device.

See also
getManualNetworkConfiguration()
Parameters
deviceID[in]the ID of the device returned by getDeviceIDs.
errorCode[out]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.
ipv4Address[in]The static IP address.
subnetMask[in]The subnet mask.
defaultGateway[in]The default gateway IP address.
dnsServer[in]The DNS server IP address.

◆ setMulticastGroupEnabled() [1/2]

void NetworkConfiguration::setMulticastGroupEnabled ( long deviceID,
int% errorCode,
bool enable )

◆ setMulticastGroupEnabled() [2/2]

void NetworkConfiguration::setMulticastGroupEnabled ( long deviceID,
int% errorCode,
std::uint32_t interfaceIndex,
bool enable )

Enable or disable the multicast message group. This function only applies to HDX/FX devices.

See also
getMulticastGroupEnabled()
Parameters
deviceID[in]the ID of the device returned by getDeviceIDs.
errorCode[out]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.
interfaceIndex[in]The interface to look at.
enable[in]True will enable the multicast group message. False will disable it.

◆ setNetworkInterfaceStatus() [1/2]

void NetworkConfiguration::setNetworkInterfaceStatus ( long deviceID,
int% errorCode,
bool enable )

◆ setNetworkInterfaceStatus() [2/2]

void NetworkConfiguration::setNetworkInterfaceStatus ( long deviceID,
int% errorCode,
std::uint32_t interfaceIndex,
bool enable )

Enable or disable the interface. This function only applies to HDX/FX devices.

See also
getNetworkInterfaceStatus()
Parameters
deviceID[in]the ID of the device returned by getDeviceIDs.
errorCode[out]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.
interfaceIndex[in]The interface to look at.
enable[in]True will enable the interface. False will disable it.

Member Data Documentation

◆ networkConfig

NetworkConfiguration NetOceanDirect::NetworkConfiguration::networkConfig
staticprotected

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