CCAux  2.7.2.0
CCAux API reference
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator
Battery.h
Go to the documentation of this file.
1 /************************************************
2 *
3 * CROSSCONTROL AUX API
4 *
5 * Battery.h
6 *
7 * Version 2.7.2.0, 2014-08-25
8 *
9 * (c) maximatecc 2013
10 *
11 * File description:
12 * External battery status and settings (Only available on specific models)
13 *
14 * Use the function GetBattery() to get a handle to pass on to the other functions.
15 * Use the method Battery_release(BATTERYHANDLE) to return the handle.
16 *
17 * Example Usage:
18 * @include battery_example.cpp
19 *
20 ************************************************/
21 
22 #ifndef CC_BATTERY_H_
23 #define CC_BATTERY_H_
24 
25 #include "CCAuxErrors.h"
26 #include "CCPlatform.h"
27 
28 #ifdef __cplusplus
29 namespace CrossControl {
30 #endif
31 
32  /*
33  * Diagnostic timer data
34  */
36  {
37  unsigned long TotRunTimeMain;
38  unsigned long TotRunTimeBattery;
39  unsigned long RunTime_m20;
40  unsigned long RunTime_m20_0;
41  unsigned long RunTime_0_40;
42  unsigned long RunTime_40_60;
43  unsigned long RunTime_60_70;
44  unsigned long RunTime_70_80;
45  unsigned long RunTime_Above80;
46  };
47 
51  typedef enum
52  {
60 
64  typedef enum
65  {
68  } PowerSource;
69 
70  typedef enum
71  {
78  } ErrorStatus;
79 
80  typedef void* BATTERYHANDLE;
81 
95  EXTERN_C
96  CCAUXDLL_API
98  CCAUXDLL_CALLING_CONV
99  GetBattery(void);
100 
111  EXTERN_C
112  CCAUXDLL_API
113  void
114  CCAUXDLL_CALLING_CONV
116 
129  EXTERN_C
130  CCAUXDLL_API
131  eErr
132  CCAUXDLL_CALLING_CONV
133  Battery_isBatteryPresent (BATTERYHANDLE, bool* batteryIsPresent);
134 
147  EXTERN_C
148  CCAUXDLL_API
149  eErr
150  CCAUXDLL_CALLING_CONV
151  Battery_getBatteryVoltageStatus (BATTERYHANDLE, unsigned char* batteryVoltagePercent);
152 
165  EXTERN_C
166  CCAUXDLL_API
167  eErr
168  CCAUXDLL_CALLING_CONV
170 
183  EXTERN_C
184  CCAUXDLL_API
185  eErr
186  CCAUXDLL_CALLING_CONV
188 
201  EXTERN_C
202  CCAUXDLL_API
203  eErr
204  CCAUXDLL_CALLING_CONV
205  Battery_getBatteryTemp (BATTERYHANDLE, signed short* temperature);
206 
220  EXTERN_C
221  CCAUXDLL_API
222  eErr
223  CCAUXDLL_CALLING_CONV
225 
238  EXTERN_C
239  CCAUXDLL_API
240  eErr
241  CCAUXDLL_CALLING_CONV
243 
257  EXTERN_C
258  CCAUXDLL_API
259  eErr
260  CCAUXDLL_CALLING_CONV
261  Battery_getMinMaxTemp (BATTERYHANDLE, signed short* minTemp, signed short* maxTemp);
262 
277  EXTERN_C
278  CCAUXDLL_API
279  eErr
280  CCAUXDLL_CALLING_CONV
281  Battery_getBatteryHWversion (BATTERYHANDLE, char* buff, int len);
282 
298  EXTERN_C
299  CCAUXDLL_API
300  eErr
301  CCAUXDLL_CALLING_CONV
303  BATTERYHANDLE,
304  unsigned short* major,
305  unsigned short* minor,
306  unsigned short* release,
307  unsigned short* build);
308 
324  EXTERN_C
325  CCAUXDLL_API
326  eErr
327  CCAUXDLL_CALLING_CONV
328  Battery_getBatterySerial (BATTERYHANDLE, char* buff, int len);
329 
330 
331 #ifdef __cplusplus
332 } /* namespace CrossControl */
333 #endif
334 
335 #endif /* CC_BATTERY_H_ */
336 
337