NetOceanDirectLighthouse  3.1.1
OceanDirect Lighthouse .NET API
NetLighthouseFlash.h
1 #pragma once
2 #include "stdafx.h"
3 #include "ManagedObject.h"
4 
5 using oceandirect::api::LHFlashAPI;
6 using NetOceanDirect::ManagedObject;
7 using NetOceanDirect::MemoryCleanup;
8 
9 namespace NetLighthouse {
10  // force the instantiation here...otherwise we get build errors
11  typedef ManagedObject<LHFlashAPI, MemoryCleanup::noDeletion> FlashBase;
12 
13  public ref class NetLighthouseFlash :
14  public FlashBase {
15  protected:
17  public:
18  virtual ~NetLighthouseFlash() {};
19  static NetLighthouseFlash^ getInstance();
20 
21  /* @anchor doc.setI2CData
22  * Set I2C data.
23  *
24  * @param deviceID the identifier of the device as returned by getDeviceIDs.
25  * @param errorCode a code indicating the result of the operation:
26  * ERROR_SUCCESS on success;
27  * ERROR_NO_DEVICE if the device does not exist;
28  * ERROR_TRANSFER_ERROR if a communication error occurred;
29  * ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device.
30  * @param i2cBusIndex
31  * @param i2cTargetAddress
32  * @param data
33  */
34  virtual void setI2CData(unsigned int deviceID, int %errorCode, unsigned int i2cBusIndex,
35  unsigned int i2cTargetAddress, array<unsigned char>^% data);
36 
37  /* @anchor doc.getAccessoryBoardAvailable
38  * Determine if the accessory board is present.
39  *
40  * @param deviceID the identifier of the device as returned by getDeviceIDs.
41  * @param errorCode a code indicating the result of the operation:
42  * ERROR_SUCCESS on success;
43  * ERROR_NO_DEVICE if the device does not exist;
44  * ERROR_TRANSFER_ERROR if a communication error occurred;
45  * ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device.
46  * @return true if the board is present, false otherwise or false on error.
47  */
48  virtual bool getAccessoryBoardAvailable(unsigned int deviceID, int %errorCode);
49 
50  /* @anchor doc.setFlashSlotData
51  * Set the flash slot data.
52  * @see getFlashSlotData()
53  * @param deviceID the identifier of the device as returned by getDeviceIDs.
54  * @param errorCode a code indicating the result of the operation:
55  * ERROR_SUCCESS on success;
56  * ERROR_NO_DEVICE if the device does not exist;
57  * ERROR_TRANSFER_ERROR if a communication error occurred;
58  * ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device.
59  * @param slotNumber
60  * @param data
61  */
62  virtual void setFlashSlotData(unsigned int deviceID, int% errorCode, unsigned int slotNumber,
63  array<unsigned char>^% data);
64 
65  /* @anchor doc.getFlashSlotData
66  * Get the flash slot data.
67  * @see setFlashSlotData()
68  * @param deviceID the identifier of the device as returned by getDeviceIDs.
69  * @param errorCode a code indicating the result of the operation:
70  * ERROR_SUCCESS on success;
71  * ERROR_NO_DEVICE if the device does not exist;
72  * ERROR_TRANSFER_ERROR if a communication error occurred;
73  * ERROR_BAD_USER_BUFFER if a null pointer is supplied for the array data;
74  * ERROR_NOT_ENOUGH_BUFFER_SPACE the value of dataSize is zero (0);
75  * ERROR_COMMAND_NOT_SUPPORTED this command is not supported by the device.
76  * @param slotNumber
77  * @return the flash slot data.
78  */
79  virtual array<unsigned char>^ getFlashSlotData(unsigned int deviceID, int %errorCode, unsigned int slotNumber);
80 
81  protected:
82  static NetLighthouseFlash^ flash;
83 
84  };
85 }
Definition: NetLighthouseFlash.h:14