OceanDirectLighthouseC++ 3.1.3
OceanDirect Lighthouse C++/C API
|
#include <NetworkConfigurationAPI.h>
Public Member Functions | |
NetworkConfigurationAPI ()=default | |
virtual | ~NetworkConfigurationAPI ()=default |
virtual bool | getEthernetAddOnAvailable (long deviceID, int *errorCode) |
virtual bool | getEthernetLoopBackTest (long deviceID, int *errorCode) |
virtual void | getEthernetMACAddress (long deviceID, int *errorCode, std::uint8_t *outMACAddress, std::uint32_t outMACAddressSize) |
virtual bool | getIPAddressAssignedMode (long deviceID, int *errorCode) |
virtual 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) |
virtual 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) |
virtual std::uint32_t | getNetworkInterfaceCount (long deviceID, int *errorCode) |
virtual bool | getNetworkInterfaceStatus (long deviceID, int *errorCode, std::uint32_t interfaceIndex) |
virtual std::uint32_t | getNetworkInterfaceType (long deviceID, int *errorCode, std::uint32_t interfaceIndex) |
virtual void | saveNetworkInterfaceSetting (long deviceID, int *errorCode, std::uint32_t interfaceIndex) |
virtual void | setEthernetMACAddress (long deviceID, int *errorCode, const std::uint8_t *macAddress, std::uint32_t macAddressSize) |
virtual void | setIPAddressAssignedMode (long deviceID, int *errorCode, bool useDHCP) |
virtual 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) |
virtual void | setNetworkInterfaceStatus (long deviceID, int *errorCode, std::uint32_t interfaceIndex, bool enable) |
Static Public Member Functions | |
static NetworkConfigurationAPI * | getInstance () |
static void | shutdown () |
Static Protected Attributes | |
static NetworkConfigurationAPI * | instance |
|
default |
|
virtualdefault |
|
virtual |
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. |
|
virtual |
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. |
|
virtual |
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. |
|
static |
|
virtual |
Read the ip address assignment mode 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. |
|
virtual |
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. This function only applies to HDX/FX devices.
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. |
|
virtual |
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 DHCP IP address otherwise it's False (static 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. |
|
virtual |
Read the number of supported communication 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. |
|
virtual |
Return true if the interface is enabled otherwise it's false. 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. |
interfaceIndex | The interface to look at. |
|
virtual |
Return the interface type of the given interface index. 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. |
interfaceIndex | The interface to look at. |
|
virtual |
Save the network interface settings to the device. 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. |
interfaceIndex | The interface to save to. |
|
virtual |
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. |
|
virtual |
Set the ip address assignment mode to 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. |
useDHCP | True if it's DHCP IP address otherwise it's False (static IP). |
|
virtual |
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. This function only applies to HDX/FX devices.
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. |
|
virtual |
Enable or disable the 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. |
interfaceIndex | The interface to look at. |
enable | True will enable the interface. False will disable it. |
|
static |
|
staticprotected |