OceanDirect  2.4.0
OceanDirect C++/C API
DataBufferAPI.h
1 /*****************************************************
2  * @file DataBufferAPI.h
3  * @date January 2022
4  * @author Ocean Optics, Inc.
5  *
6  * This is an interface to OceanDirect that allows
7  * the user to connect to devices over USB and other buses.
8  * This is intended as a usable and extensible API.
9  */
10  /************************************************************************
11  *
12  * OCEAN INSIGHT CONFIDENTIAL
13  * __________________
14  *
15  * [2018] - [2022] Ocean Insight Incorporated
16  * All Rights Reserved.
17  *
18  * NOTICE: All information contained herein is, and remains
19  * the property of Ocean Insight Incorporated and its suppliers,
20  * if any. The intellectual and technical concepts contained
21  * herein are proprietary to Ocean Insight Incorporated
22  * and its suppliers and may be covered by U.S. and Foreign Patents,
23  * patents in process, and are protected by trade secret or copyright law.
24  * Dissemination of this information or reproduction of this material
25  * is strictly forbidden unless prior written permission is obtained
26  * from Ocean Insight Incorporated.
27  *
28  **************************************************************************/
29 
30 #ifndef DATA_BUFFER_API_H
31 #define DATA_BUFFER_API_H
32 
33 #include "api/DllDecl.h"
34 
41 namespace oceandirect {
42  namespace api {
43 
44  class DLL_DECL DataBufferAPI {
45  public:
46  DataBufferAPI();
47  virtual ~DataBufferAPI() = default;
48  static DataBufferAPI *getInstance();
49 
50  static void shutdown();
51 
62  void clearBuffer(long deviceID, int *errorCode);
63 
74  unsigned long getNumberOfElements(long deviceID, int *errorCode);
75 
87  unsigned long getBufferCapacity(long deviceID, int *errorCode);
88 
100  unsigned long getBufferCapacityMaximum(long deviceID, int *errorCode);
101 
113  unsigned long getBufferCapacityMinimum(long deviceID, int *errorCode);
114 
126  void setBufferCapacity(long deviceID, int *errorCode, unsigned long capacity);
127 
139  void setBufferEnabled(long deviceID, int *errorCode, bool enabled);
140 
152  bool getBufferEnabled(long deviceID, int *errorCode);
153 
154  private:
155  static DataBufferAPI *instance;
156  };
157  }
158 }
159 #endif /* DATA_BUFFER_API_H */
Definition: DataBufferAPI.h:44
void clearBuffer(long deviceID, int *errorCode)
unsigned long getNumberOfElements(long deviceID, int *errorCode)
void setBufferCapacity(long deviceID, int *errorCode, unsigned long capacity)
unsigned long getBufferCapacity(long deviceID, int *errorCode)
unsigned long getBufferCapacityMinimum(long deviceID, int *errorCode)
bool getBufferEnabled(long deviceID, int *errorCode)
unsigned long getBufferCapacityMaximum(long deviceID, int *errorCode)
void setBufferEnabled(long deviceID, int *errorCode, bool enabled)
This is an interface to OceanDirect that allows the user to connect to devices over USB and other bus...
Definition: OceanDirectAPI.h:144