OceanDirect
2.4.0
OceanDirect C++/C API
|
Public Member Functions | |
bool | getEthernetAddOnAvailable (long deviceID, int *errorCode) |
bool | getEthernetLoopBackTest (long deviceID, int *errorCode) |
void | getEthernetMACAddress (long deviceID, int *errorCode, std::uint8_t *outMACAddress, std::uint32_t outMACAddressSize) |
bool | getIPAddressAssignedMode (long deviceID, int *errorCode) |
void | getManualNetworkConfiguration (long deviceID, int *errorCode, std::uint8_t *outIpv4Address, std::uint32_t ipv4AddressSize, std::uint8_t *outSubnetMask, std::uint32_t subnetMaskSize, std::uint8_t *outDefaultGateway, std::uint32_t defaultGatewaySize, std::uint8_t *outDNSServer, std::uint32_t dnsServerSize) |
bool | getMulticastGroupEnabled (long deviceID, int *errorCode, std::uint32_t interfaceIndex) |
void | getNetworkConfiguration (long deviceID, int *errorCode, bool &outManualAssignment, std::uint8_t *outIpv4Address, std::uint32_t ipv4AddressSize, std::uint8_t *outSubnetMask, std::uint32_t subnetMaskSize, std::uint8_t *outDefaultGateway, std::uint32_t defaultGatewaySize, std::uint8_t *outDNSServer, std::uint32_t dnsServerSize) |
std::uint32_t | getNetworkInterfaceCount (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 interfaceIndex) |
void | saveNetworkInterfaceSetting (long deviceID, int *errorCode, std::uint32_t interfaceIndex) |
void | setEthernetMACAddress (long deviceID, int *errorCode, const std::uint8_t *macAddress, std::uint32_t macAddressSize) |
void | setIPAddressAssignedMode (long deviceID, int *errorCode, bool useStaticIP) |
void | setManualNetworkConfiguration (long deviceID, int *errorCode, const std::uint8_t *ipv4Address, std::uint32_t ipv4AddressSize, const std::uint8_t *subnetMask, std::uint32_t subnetMaskSize, const std::uint8_t *defaultGateway, std::uint32_t defaultGatewaySize, const std::uint8_t *dnsServer, std::uint32_t dnsServerSize) |
void | setMulticastGroupEnabled (long deviceID, int *errorCode, std::uint32_t interfaceIndex, bool enabled) |
void | setNetworkInterfaceStatus (long deviceID, int *errorCode, std::uint32_t interfaceIndex, bool enable) |
Static Public Member Functions | |
static NetworkConfigurationAPI * | getInstance () |
static void | shutdown () |
bool oceandirect::api::NetworkConfigurationAPI::getEthernetAddOnAvailable | ( | long | deviceID, |
int * | errorCode | ||
) |
Return True or False on whether an ethernet add-on package is available in the 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. |
bool oceandirect::api::NetworkConfigurationAPI::getEthernetLoopBackTest | ( | long | deviceID, |
int * | errorCode | ||
) |
Run a loop back and return true if it's successful.
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. |
void oceandirect::api::NetworkConfigurationAPI::getEthernetMACAddress | ( | long | deviceID, |
int * | errorCode, | ||
std::uint8_t * | outMACAddress, | ||
std::uint32_t | outMACAddressSize | ||
) |
Read the ethernet 6-byte mac 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. |
outMACAddress[in] | The output buffer for mac address. |
outMACAddressSize[in] | The output buffer size which must be at least 6 bytes long. |
void oceandirect::api::NetworkConfigurationAPI::getManualNetworkConfiguration | ( | long | deviceID, |
int * | errorCode, | ||
std::uint8_t * | outIpv4Address, | ||
std::uint32_t | ipv4AddressSize, | ||
std::uint8_t * | outSubnetMask, | ||
std::uint32_t | subnetMaskSize, | ||
std::uint8_t * | outDefaultGateway, | ||
std::uint32_t | defaultGatewaySize, | ||
std::uint8_t * | outDNSServer, | ||
std::uint32_t | dnsServerSize | ||
) |
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] | Output buffer for the static IP address. |
ipv4AddressSize[in] | The static IP address buffer length. |
outSubnetMask[out] | Output buffer for the subnet mask. |
subnetMaskSize[in] | The subnet mask buffer length. |
outDefaultGateway[out] | Output buffer for the default gateway IP address. |
defaultGatewaySize[in] | The default gateway buffer length. |
outDNSServer[out] | Output buffer for the DNS server IP address. |
dnsServerSize[in] | The DNS server buffer length. |
bool oceandirect::api::NetworkConfigurationAPI::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 oceandirect::api::NetworkConfigurationAPI::getNetworkConfiguration | ( | long | deviceID, |
int * | errorCode, | ||
bool & | outManualAssignment, | ||
std::uint8_t * | outIpv4Address, | ||
std::uint32_t | ipv4AddressSize, | ||
std::uint8_t * | outSubnetMask, | ||
std::uint32_t | subnetMaskSize, | ||
std::uint8_t * | outDefaultGateway, | ||
std::uint32_t | defaultGatewaySize, | ||
std::uint8_t * | outDNSServer, | ||
std::uint32_t | dnsServerSize | ||
) |
Read the 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 static IP address otherwise it's False (dynamic IP). |
outIpv4Address[out] | Output buffer for the static IP address. |
ipv4AddressSize[in] | The static IP address buffer size. |
outSubnetMask[out] | Output buffer for the subnet mask. |
subnetMaskSize[in] | The subnet mask buffer size. |
outDefaultGateway[out] | Output buffer for the default gateway IP address. |
defaultGatewaySize[in] | The default gateway buffer size. |
outDNSServer[out] | Output buffer for the DNS server IP address. |
dnsServerSize[in] | The DNS server buffer size. |
std::uint32_t oceandirect::api::NetworkConfigurationAPI::getNetworkInterfaceCount | ( | long | deviceID, |
int * | errorCode | ||
) |
Read the number of supported communication interface.
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. |
bool oceandirect::api::NetworkConfigurationAPI::getNetworkInterfaceStatus | ( | long | deviceID, |
int * | errorCode, | ||
std::uint32_t | interfaceIndex | ||
) |
Return true if the interface is enabled otherwise it's false.
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. |
interfaceIndex | The interface to look at. |
std::uint32_t oceandirect::api::NetworkConfigurationAPI::getNetworkInterfaceType | ( | long | deviceID, |
int * | errorCode, | ||
std::uint32_t | interfaceIndex | ||
) |
Return the interface type of the given interface index.
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. |
interfaceIndex | The interface to look at. |
void oceandirect::api::NetworkConfigurationAPI::saveNetworkInterfaceSetting | ( | long | deviceID, |
int * | errorCode, | ||
std::uint32_t | interfaceIndex | ||
) |
Save the network interface settings to the device.
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. |
interfaceIndex | The interface to save to. |
void oceandirect::api::NetworkConfigurationAPI::setEthernetMACAddress | ( | long | deviceID, |
int * | errorCode, | ||
const std::uint8_t * | macAddress, | ||
std::uint32_t | macAddressSize | ||
) |
Writes a new ethernet 6-byte mac address into 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. |
macAddress[in] | The new mac address. |
macAddress[in] | The new mac address buffer size which is 6-byte long. |
void oceandirect::api::NetworkConfigurationAPI::setManualNetworkConfiguration | ( | long | deviceID, |
int * | errorCode, | ||
const std::uint8_t * | ipv4Address, | ||
std::uint32_t | ipv4AddressSize, | ||
const std::uint8_t * | subnetMask, | ||
std::uint32_t | subnetMaskSize, | ||
const std::uint8_t * | defaultGateway, | ||
std::uint32_t | defaultGatewaySize, | ||
const std::uint8_t * | dnsServer, | ||
std::uint32_t | dnsServerSize | ||
) |
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. |
ipv4AddressSize[in] | The static IP address buffer length. |
subnetMask[in] | The subnet mask. |
subnetMaskSize[in] | The subnet mask buffer length. |
defaultGateway[in] | The default gateway IP address. |
defaultGatewaySize[in] | The default gateway buffer length. |
dnsServer[in] | The DNS server IP address. |
dnsServerSize[in] | The DNS server buffer length. |
void oceandirect::api::NetworkConfigurationAPI::setMulticastGroupEnabled | ( | long | deviceID, |
int * | errorCode, | ||
std::uint32_t | interfaceIndex, | ||
bool | enabled | ||
) |
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 oceandirect::api::NetworkConfigurationAPI::setNetworkInterfaceStatus | ( | long | deviceID, |
int * | errorCode, | ||
std::uint32_t | interfaceIndex, | ||
bool | enable | ||
) |
Enable or disable the interface.
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. |
interfaceIndex | The interface to look at. |
enable | True will enable the interface. False will disable it. |