CCAux  2.20.0.0
CCAux API reference
Smart.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) 2023 CrossControl AB
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; with
8  * version 2.1 of the License.
9  */
10 /*
11  * File description: Get S.M.A.R.T. data and information from the
12  * secondary storage device (CF/SD/HDD) where the OS is installed.
13  *
14  ************************************************/
15 
16 #ifndef CC_SMART_H_
17 #define CC_SMART_H_
18 
19 #include "CCAuxErrors.h"
20 #include "CCPlatform.h"
21 #include <time.h>
22 
23 #ifdef __cplusplus
24 namespace CrossControl
25 {
26 #endif
27 
28 typedef void *SMARTHANDLE;
29 
49 EXTERN_C
50 CCAUXDLL_API
52 CCAUXDLL_CALLING_CONV
53 GetSmart(void);
54 
65 EXTERN_C
66 CCAUXDLL_API
67 void CCAUXDLL_CALLING_CONV Smart_release(SMARTHANDLE);
68 
81 EXTERN_C
82 CCAUXDLL_API
83 eErr CCAUXDLL_CALLING_CONV Smart_getRemainingLifeTime(SMARTHANDLE, uint8_t *lifetimepercent);
84 
99 EXTERN_C
100 CCAUXDLL_API
101 eErr CCAUXDLL_CALLING_CONV Smart_getRemainingLifeTime2(SMARTHANDLE, uint8_t *lifetimepercent);
102 
118 EXTERN_C
119 CCAUXDLL_API
120 eErr CCAUXDLL_CALLING_CONV Smart_getDeviceSerial(SMARTHANDLE, char_t *buff, int32_t len);
121 
139 EXTERN_C
140 CCAUXDLL_API
141 eErr CCAUXDLL_CALLING_CONV Smart_getDeviceSerial2(SMARTHANDLE, char_t *buff, int32_t len);
142 
159 EXTERN_C
160 CCAUXDLL_API
161 eErr CCAUXDLL_CALLING_CONV Smart_getInitialTime(SMARTHANDLE, time_t *time);
162 
182 EXTERN_C
183 CCAUXDLL_API
184 eErr CCAUXDLL_CALLING_CONV Smart_getInitialTime2(SMARTHANDLE, time_t *time);
185 
187 #ifdef __cplusplus
188 }
189 #endif
190 
191 #endif /* CC_SMART_H_ */
char char_t
Definition: CCAuxTypes.h:17
signed int int32_t
Definition: CCAuxTypes.h:36
unsigned char uint8_t
Definition: CCAuxTypes.h:37
EXTERN_C CCAUXDLL_API SMARTHANDLE CCAUXDLL_CALLING_CONV GetSmart(void)
EXTERN_C CCAUXDLL_API void CCAUXDLL_CALLING_CONV Smart_release(SMARTHANDLE)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Smart_getDeviceSerial(SMARTHANDLE, char_t *buff, int32_t len)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Smart_getInitialTime(SMARTHANDLE, time_t *time)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Smart_getDeviceSerial2(SMARTHANDLE, char_t *buff, int32_t len)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Smart_getRemainingLifeTime(SMARTHANDLE, uint8_t *lifetimepercent)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Smart_getInitialTime2(SMARTHANDLE, time_t *time)
EXTERN_C CCAUXDLL_API eErr CCAUXDLL_CALLING_CONV Smart_getRemainingLifeTime2(SMARTHANDLE, uint8_t *lifetimepercent)
Definition: About.h:30
void * SMARTHANDLE
Definition: Smart.h:28
eErr
Definition: CCAuxTypes.h:162