CCAux  2.8.3.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.8.3.0, 2016-04-06
8 *
9 * (c) maximatecc 2013
10 *
11 
12  * File description:
13  * External battery status and settings (Only available on specific models)
14  *
15  * Use the function GetBattery() to get a handle to pass on to the other functions.
16  * Use the method Battery_release(BATTERYHANDLE) to return the handle.
17  *
18  * Example Usage:
19  * @include battery_example.cpp
20  *
21  ************************************************/
22 
23 #ifndef CC_BATTERY_H_
24 #define CC_BATTERY_H_
25 
26 #include "CCAuxErrors.h"
27 #include "CCPlatform.h"
28 
29 #ifdef __cplusplus
30 namespace CrossControl {
31 #endif
32 
33  /*
34  * Diagnostic timer data
35  */
37  {
38  unsigned long TotRunTimeMain;
39  unsigned long TotRunTimeBattery;
40  unsigned long RunTime_m20;
41  unsigned long RunTime_m20_0;
42  unsigned long RunTime_0_40;
43  unsigned long RunTime_40_60;
44  unsigned long RunTime_60_70;
45  unsigned long RunTime_70_80;
46  unsigned long RunTime_Above80;
47  };
48 
52  typedef enum
53  {
61 
65  typedef enum
66  {
69  } PowerSource;
70 
74  typedef enum
75  {
82  } ErrorStatus;
83 
84  typedef void* BATTERYHANDLE;
85 
99  EXTERN_C
100  CCAUXDLL_API
102  CCAUXDLL_CALLING_CONV
103  GetBattery(void);
104 
115  EXTERN_C
116  CCAUXDLL_API
117  void
118  CCAUXDLL_CALLING_CONV
120 
133  EXTERN_C
134  CCAUXDLL_API
135  eErr
136  CCAUXDLL_CALLING_CONV
137  Battery_isBatteryPresent (BATTERYHANDLE, bool* batteryIsPresent);
138 
151  EXTERN_C
152  CCAUXDLL_API
153  eErr
154  CCAUXDLL_CALLING_CONV
155  Battery_getBatteryVoltageStatus (BATTERYHANDLE, unsigned char* batteryVoltagePercent);
156 
169  EXTERN_C
170  CCAUXDLL_API
171  eErr
172  CCAUXDLL_CALLING_CONV
174 
187  EXTERN_C
188  CCAUXDLL_API
189  eErr
190  CCAUXDLL_CALLING_CONV
192 
205  EXTERN_C
206  CCAUXDLL_API
207  eErr
208  CCAUXDLL_CALLING_CONV
209  Battery_getBatteryTemp (BATTERYHANDLE, signed short* temperature);
210 
224  EXTERN_C
225  CCAUXDLL_API
226  eErr
227  CCAUXDLL_CALLING_CONV
229 
242  EXTERN_C
243  CCAUXDLL_API
244  eErr
245  CCAUXDLL_CALLING_CONV
247 
261  EXTERN_C
262  CCAUXDLL_API
263  eErr
264  CCAUXDLL_CALLING_CONV
265  Battery_getMinMaxTemp (BATTERYHANDLE, signed short* minTemp, signed short* maxTemp);
266 
281  EXTERN_C
282  CCAUXDLL_API
283  eErr
284  CCAUXDLL_CALLING_CONV
285  Battery_getBatteryHWversion (BATTERYHANDLE, char* buff, int len);
286 
302  EXTERN_C
303  CCAUXDLL_API
304  eErr
305  CCAUXDLL_CALLING_CONV
307  BATTERYHANDLE,
308  unsigned short* major,
309  unsigned short* minor,
310  unsigned short* release,
311  unsigned short* build);
312 
328  EXTERN_C
329  CCAUXDLL_API
330  eErr
331  CCAUXDLL_CALLING_CONV
332  Battery_getBatterySerial (BATTERYHANDLE, char* buff, int len);
333 
334 #ifdef __cplusplus
335 } /* namespace CrossControl */
336 #endif
337 
338 #endif /* CC_BATTERY_H_ */
339 
340