NetOceanDirect
3.1.1
OceanDirect .NET API
|
Inherits NetOceanDirect::ManagedObject< NetworkConfigurationAPI >.
Public Member Functions | |
NetworkConfiguration (NetworkConfigurationAPI *instance) | |
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) |
![]() | |
ManagedObject (NetworkConfigurationAPI *instance) | |
NetworkConfigurationAPI * | GetInstance () |
Static Public Member Functions | |
static NetworkConfiguration | getInstance () |
Static Protected Attributes | |
static NetworkConfiguration | networkConfig |
Additional Inherited Members | |
![]() | |
NetworkConfigurationAPI * | m_Instance |
bool NetworkConfiguration::getIPAddressAssignedMode | ( | long | deviceID, |
int% | errorCode | ||
) |
Read the IP address mode from the OBP2 device.
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. |
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.
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. |
bool NetworkConfiguration::getMulticastGroupEnabled | ( | long | deviceID, |
int% | errorCode, | ||
std::uint32_t | interfaceIndex | ||
) |
Return true if the multicast group message is enabled otherwise it's false.
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. |
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.
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. |
std::uint32_t NetworkConfiguration::getNetworkInterfaceCount | ( | long | deviceID, |
int% | errorCode | ||
) |
Read the number of supported communication interface.
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. |
bool NetworkConfiguration::getNetworkInterfaceStatus | ( | long | deviceID, |
int% | errorCode, | ||
std::uint32_t | interfaceIndex | ||
) |
Return true if the interface is enabled otherwise it's false.
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. |
std::uint32_t NetworkConfiguration::getNetworkInterfaceType | ( | long | deviceID, |
int% | errorCode, | ||
std::uint32_t | interfaceIndex | ||
) |
Return the interface type of the given interface index.
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. |
void NetworkConfiguration::saveNetworkInterfaceSetting | ( | long | deviceID, |
int% | errorCode, | ||
std::uint32_t | interfaceIndex | ||
) |
Save the network interface settings to the device.
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. |
void NetworkConfiguration::setIPAddressAssignedMode | ( | long | deviceID, |
int% | errorCode, | ||
bool | useDHCP | ||
) |
Set the IP address mode to the OBP2 device.
deviceID | 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. |
useStaticIP[in] | True will use DHCP server for ip assignment. False will use statically assigned IP address. |
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.
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. |
void NetworkConfiguration::setMulticastGroupEnabled | ( | long | deviceID, |
int% | errorCode, | ||
std::uint32_t | interfaceIndex, | ||
bool | enable | ||
) |
Enable or disable the multicast message group.
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. |
void NetworkConfiguration::setNetworkInterfaceStatus | ( | long | deviceID, |
int% | errorCode, | ||
std::uint32_t | interfaceIndex, | ||
bool | enable | ||
) |
Enable or disable the interface.
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. |