le_adc_common.h

Go to the documentation of this file.
1 
2 /*
3  * ====================== WARNING ======================
4  *
5  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
6  * DO NOT MODIFY IN ANY WAY.
7  *
8  * ====================== WARNING ======================
9  */
10 /**
11  * @file le_adc_common.h
12  *
13  * Type definitions for le_adc.
14  *
15  */
16 #ifndef LE_ADC_COMMON_H_INCLUDE_GUARD
17 #define LE_ADC_COMMON_H_INCLUDE_GUARD
18 
19 
20 #include "legato.h"
21 
22 #define IFGEN_LE_ADC_PROTOCOL_ID "cca082d3d4d6b9c7c11466ab2ea74e4f"
23 #define IFGEN_LE_ADC_MSG_SIZE 42
24 /** @addtogroup le_adc
25  * @{ **/
26 
27 
28 //--------------------------------------------------------------------------------------------------
29 /**
30  * Maximum ADC's name string length.
31  */
32 //--------------------------------------------------------------------------------------------------
33 #define LE_ADC_ADC_NAME_MAX_LEN 30
34 
35 //--------------------------------------------------------------------------------------------------
36 /**
37  * Maximum ADC's name string length.
38  * One extra byte is added for the null character.
39  */
40 //--------------------------------------------------------------------------------------------------
41 #define LE_ADC_ADC_NAME_MAX_BYTES 31
42 
43 
44 //--------------------------------------------------------------------------------------------------
45 /**
46  * Get if this client bound locally.
47  */
48 //--------------------------------------------------------------------------------------------------
49 LE_SHARED bool ifgen_le_adc_HasLocalBinding
50 (
51  void
52 );
53 
54 
55 //--------------------------------------------------------------------------------------------------
56 /**
57  * Init data that is common across all threads
58  */
59 //--------------------------------------------------------------------------------------------------
60 LE_SHARED void ifgen_le_adc_InitCommonData
61 (
62  void
63 );
64 
65 
66 //--------------------------------------------------------------------------------------------------
67 /**
68  * Perform common initialization and open a session
69  */
70 //--------------------------------------------------------------------------------------------------
71 LE_SHARED le_result_t ifgen_le_adc_OpenSession
72 (
73  le_msg_SessionRef_t _ifgen_sessionRef,
74  bool isBlocking
75 );
76 
77 //--------------------------------------------------------------------------------------------------
78 /**
79  * Get the value of an ADC input
80  *
81  * @return
82  * - LE_OK The function succeeded.
83  * - LE_FAULT The function failed.
84  */
85 //--------------------------------------------------------------------------------------------------
86 LE_SHARED le_result_t ifgen_le_adc_ReadValue
87 (
88  le_msg_SessionRef_t _ifgen_sessionRef,
89  const char* LE_NONNULL adcName,
90  ///< [IN] Name of the ADC to read.
91  int32_t* adcValuePtr
92  ///< [OUT] The adc value
93 );
94 /** @} **/
95 #endif // LE_ADC_COMMON_H_INCLUDE_GUARD
#define LE_SHARED
Definition: le_basics.h:300
le_result_t
Definition: le_basics.h:46
struct le_msg_Session * le_msg_SessionRef_t
Definition: le_messaging.h:860