OceanDirectLighthouseC++  3.1.1
OceanDirect Lighthouse C++/C API
Ipv4AddressAPI.h
1 #ifndef IPV4ADDRESSAPI_H
2 #define IPV4ADDRESSAPI_H
3 /*****************************************************
4  * @file Ipv4AddressAPI.h
5  * @date March 2021
6  * @author Ocean Insight, Inc.
7  *
8  * This is an interface to OceanDirect that allows
9  * the user to query and set IPv4 address parameters
10  */
11  /************************************************************************
12  *
13  * OCEAN INSIGHT CONFIDENTIAL
14  * __________________
15  *
16  * [2018] - [2020] Ocean Insight Incorporated
17  * All Rights Reserved.
18  *
19  * NOTICE: All information contained herein is, and remains
20  * the property of Ocean Insight Incorporated and its suppliers,
21  * if any. The intellectual and technical concepts contained
22  * herein are proprietary to Ocean Insight Incorporated
23  * and its suppliers and may be covered by U.S. and Foreign Patents,
24  * patents in process, and are protected by trade secret or copyright law.
25  * Dissemination of this information or reproduction of this material
26  * is strictly forbidden unless prior written permission is obtained
27  * from Ocean Insight Incorporated.
28  *
29  **************************************************************************/
30 
31 
32 #include "api/DllDecl.h"
33 
38 namespace oceandirect {
39  namespace api {
40 
41  class DLL_DECL Ipv4AddressAPI {
42  public:
43  virtual ~Ipv4AddressAPI();
44  static Ipv4AddressAPI *getInstance();
45 
46  static void shutdown();
47 
63  virtual bool isDHCPEnabled(long deviceID, int *errorCode, unsigned char ifNum);
64 
78  virtual void setDHCPEnable(long deviceID, int *errorCode, unsigned char ifNum, unsigned char enabled);
79 
95  virtual int getNumberOfIpAddresses(long deviceID, int *errorCode, unsigned char ifNum);
96 
119  virtual void readIpAddress(long deviceID, int *errorCode, unsigned char ifNum, unsigned char addressIndex,
120  unsigned char *ipAddress, int ipAddressLength, unsigned int *netmask);
121 
140  virtual void addStaticIpAddress(long deviceID, int* errorCode, unsigned char ifNum,
141  unsigned char *ipAddress, int ipAddressLength, unsigned int netmask);
142 
156  virtual void deleteStaticIpAddress(long deviceID, int* errorCode, unsigned char ifNum, unsigned char addressIndex);
157 
158 
159  /*
160  TODO: Add the following functions
161  -get/set ipv4 default gateway
162  */
178  virtual void setDefaultGatewayIpAddress(long deviceID, int* errorCode, unsigned char ifNum, unsigned char* ipAddress, int ipAddressLength);
179 
195  virtual void getDefaultGatewayIpAddress(long deviceID, int* errorCode, unsigned char ifNum, unsigned char* outIpAddress, int ipAddressLength);
196 
197  protected:
198  Ipv4AddressAPI();
199  static Ipv4AddressAPI *instance;
200  };
201  }
202 }
203 #endif /* IPV4ADDRESSAPI_H */
Definition: Ipv4AddressAPI.h:41
virtual void deleteStaticIpAddress(long deviceID, int *errorCode, unsigned char ifNum, unsigned char addressIndex)
virtual void setDHCPEnable(long deviceID, int *errorCode, unsigned char ifNum, unsigned char enabled)
virtual void addStaticIpAddress(long deviceID, int *errorCode, unsigned char ifNum, unsigned char *ipAddress, int ipAddressLength, unsigned int netmask)
virtual int getNumberOfIpAddresses(long deviceID, int *errorCode, unsigned char ifNum)
virtual void getDefaultGatewayIpAddress(long deviceID, int *errorCode, unsigned char ifNum, unsigned char *outIpAddress, int ipAddressLength)
virtual void readIpAddress(long deviceID, int *errorCode, unsigned char ifNum, unsigned char addressIndex, unsigned char *ipAddress, int ipAddressLength, unsigned int *netmask)
virtual bool isDHCPEnabled(long deviceID, int *errorCode, unsigned char ifNum)
virtual void setDefaultGatewayIpAddress(long deviceID, int *errorCode, unsigned char ifNum, unsigned char *ipAddress, int ipAddressLength)
This is an interface to OceanDirect that allows the user to connect to devices over USB and other bus...
Definition: OceanDirectAPI.h:147