NetOceanDirectLighthouse 3.1.3
OceanDirect Lighthouse .NET API
NetLighthouseFlash.h
Go to the documentation of this file.
1#pragma once
2#include "stdafx.h"
3#include "ManagedObject.h"
4
5using oceandirect::api::LHFlashAPI;
6using NetOceanDirect::ManagedObject;
7using NetOceanDirect::MemoryCleanup;
8
9namespace 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() {};
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:
83
84 };
85}
Definition NetLighthouseFlash.h:14
static NetLighthouseFlash flash
Definition NetLighthouseFlash.h:82
NetLighthouseFlash()
Definition NetLighthouseFlash.cpp:7
virtual ~NetLighthouseFlash()
Definition NetLighthouseFlash.h:18
virtual void setFlashSlotData(unsigned int deviceID, int% errorCode, unsigned int slotNumber, array< unsigned char >^% data)
Definition NetLighthouseFlash.cpp:43
virtual array< unsigned char > getFlashSlotData(unsigned int deviceID, int %errorCode, unsigned int slotNumber)
Definition NetLighthouseFlash.cpp:30
virtual void setI2CData(unsigned int deviceID, int %errorCode, unsigned int i2cBusIndex, unsigned int i2cTargetAddress, array< unsigned char >^% data)
Definition NetLighthouseFlash.cpp:18
static NetLighthouseFlash getInstance()
Definition NetLighthouseFlash.cpp:11
virtual bool getAccessoryBoardAvailable(unsigned int deviceID, int %errorCode)
Definition NetLighthouseFlash.cpp:25
Definition NetLighthouse.h:21
ManagedObject< LHFlashAPI, MemoryCleanup::noDeletion > FlashBase
Definition NetLighthouseFlash.h:11