OpenEL 3.0.0

openEL_0000000080000001.c
Go to the documentation of this file.
1
12 /*
13
14 Copyright (c) 2017,2018 Japan Embedded Systems Technology Association(JASA)
15 All rights reserved.
16
17 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
18
19 Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
20 Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
21 Neither the name of the Association nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
22
23 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26 #ifdef __cplusplus
27 namespace el {
28 extern "C" {
29 #endif /* __cplusplus */
30
31 //#define OPENEL_SW_SURFACE_FRIEND 0
32 #include "openEL.h"
33 #include "openEL_0000000080000001.h"
34 #include <stdio.h>
35 #include <time.h>
36
37 enum ReturnCode Init_0000000080000001(){
38 printf("Init_0000000080000001\n");
39 return HAL_OK;
40 }
41
42 enum ReturnCode ReInit_0000000080000001(){
43 printf("ReInit_0000000080000001\n");
44 return HAL_OK;
45 }
46
47 enum ReturnCode Finalize_0000000080000001(){
48 printf("Finalize_0000000080000001\n");
49 return HAL_OK;
50 }
51
52 enum ReturnCode AddObserver_0000000080000001(HALOBSERVER_T halObserver){
53 printf("AddObserver_0000000080000001\n");
54 return HAL_OK;
55 };
56
57 enum ReturnCode RemoveObserver_0000000080000001(HALOBSERVER_T halObserver){
58 printf("RemoveObserver_0000000080000001\n");
59 return HAL_OK;
60 };
61
62 enum ReturnCode GetProperty_0000000080000001(){
63 printf("GetProperty_0000000080000001\n");
64 return HAL_OK;
65 };
66
67 enum ReturnCode GetTime_0000000080000001(){
68 printf("GetTime_0000000080000001\n");
69 return HAL_OK;
70 };
71
72 halfloat value=0;
73
74 enum ReturnCode GetValue_0000000080000001(HALCOMPONENT_T **halComponent, halfloat **list){
75 printf("GetValue_0000000080000001\n");
76 value = 11.0;
77 *list = &value;
78 return HAL_OK;
79 }
80
81 enum ReturnCode GetTimedValue_0000000080000001(HALCOMPONENT_T **halComponent, halfloat **list, int32_t **timer){
82 printf("GetTimedValue_0000000080000001\n");
83 time_t t = time(&t);
84 int32_t tt;
85 printf("%ld\n", t);
86 tt = (int32_t)t;
87 *timer = &tt;
88 value = 12.0;
89 *list = &value;
90 return HAL_OK;
91 }
92
93 enum ReturnCode SetUnit_0000000080000001(char units){
94 printf("SetUnit_0000000080000001\n");
95 return HAL_OK;
96 }
97
98 enum ReturnCode GetUnit_0000000080000001(char *units){
99 printf("GetUnit_0000000080000001\n");
100 return HAL_OK;
101 }
102
103 enum ReturnCode SetReset_0000000080000001(){
104 printf("SetReset_0000000080000001\n");
105 return HAL_OK;
106 }
107
108 enum ReturnCode Start_0000000080000001(){
109 printf("Start_0000000080000001\n");
110 // eventTimerid.Start();
111 return HAL_OK;
112 }
113
114 enum ReturnCode Stop_0000000080000001(){
115 printf("Stop_0000000080000001\n");
116 // eventTimerid.Stop();
117 return HAL_OK;
118 }
119
120 /* Constant Table (Global scope) */
121 /*---------------------------------------------------------------------------*/
122 static const EL_SENSOR_FNC_TBL_T sensorFncTbl_0000000080000001 = {
123 /* 0x00 */ Init_0000000080000001,
124 /* 0x01 */ ReInit_0000000080000001,
125 /* 0x02 */ Finalize_0000000080000001,
126 /* 0x03 */ AddObserver_0000000080000001,
127 /* 0x04 */ RemoveObserver_0000000080000001,
128 /* 0x05 */ GetProperty_0000000080000001,
129 /* 0x06 */ GetTime_0000000080000001,
130 /* 0x07 */ Dummy,
132 /* 0x08 */ Dummy,
133 /* 0x09 */ Dummy,
134 /* 0x0A */ Dummy,
135 /* 0x0B */ Dummy,
136 /* 0x0C */ Dummy,
137 /* 0x0D */ Dummy,
138 /* 0x0E */ Dummy,
139 /* 0x0F */ Dummy,
141 /* 0x10 */ GetValue_0000000080000001,
142 /* 0x11 */ GetTimedValue_0000000080000001,
143 /* 0x12 */ SetUnit_0000000080000001,
144 /* 0x13 */ GetUnit_0000000080000001,
145 /* 0x14 */ Dummy,
146 /* 0x15 */ Dummy,
147 /* 0x16 */ Dummy,
148 /* 0x17 */ Dummy,
150 /* 0x18 */ SetReset_0000000080000001,
151 /* 0x19 */ Start_0000000080000001,
152 /* 0x1A */ Stop_0000000080000001,
153 /* 0x1B */ Dummy,
154 /* 0x1C */ Dummy,
155 /* 0x1D */ Dummy,
156 /* 0x1E */ Dummy,
157 /* 0x1F */ Dummy,
158 };
159
160 const EL_CMN_FNC_TBL_T component_0000000080000001 = {(void *)(&sensorFncTbl_0000000080000001)};
161
162 #ifdef __cplusplus
163 } /* extern "C" */
164 } /* namespace el */
165 #endif /* __cplusplus */
value
halfloat value
Definition: openEL_0000000080000001.c:72
Start_0000000080000001
enum ReturnCode Start_0000000080000001()
Definition: openEL_0000000080000001.c:108
openEL.h
OpenEL Common Header File 3.0.0.
SetUnit_0000000080000001
enum ReturnCode SetUnit_0000000080000001(char units)
Definition: openEL_0000000080000001.c:93
HALObserver
Definition: openEL.h:73
elCommonFncTbl
Definition: openEL.h:214
ReturnCode
ReturnCode
Definition: openEL.h:44
component_0000000080000001
const EL_CMN_FNC_TBL_T component_0000000080000001
Definition: openEL_0000000080000001.c:160
openEL_0000000080000001.h
OpenEL Torque Sensor Header File 3.0.0.
Dummy
enum ReturnCode Dummy()
Definition: openEL_0000000012345678.c:82
halfloat
float32_t halfloat
Definition: openEL.h:53
elSensorFncTblSt
Definition: openEL_sensor.h:32
GetTimedValue_0000000080000001
enum ReturnCode GetTimedValue_0000000080000001(HALCOMPONENT_T **halComponent, halfloat **list, int32_t **timer)
Definition: openEL_0000000080000001.c:81
HalComponent
Definition: openEL.h:162
RemoveObserver_0000000080000001
enum ReturnCode RemoveObserver_0000000080000001(HALOBSERVER_T halObserver)
Definition: openEL_0000000080000001.c:57
AddObserver_0000000080000001
enum ReturnCode AddObserver_0000000080000001(HALOBSERVER_T halObserver)
Definition: openEL_0000000080000001.c:52
ReInit_0000000080000001
enum ReturnCode ReInit_0000000080000001()
Definition: openEL_0000000080000001.c:42
GetProperty_0000000080000001
enum ReturnCode GetProperty_0000000080000001()
Definition: openEL_0000000080000001.c:62
HAL_OK
Definition: openEL.h:45
GetUnit_0000000080000001
enum ReturnCode GetUnit_0000000080000001(char *units)
Definition: openEL_0000000080000001.c:98
GetValue_0000000080000001
enum ReturnCode GetValue_0000000080000001(HALCOMPONENT_T **halComponent, halfloat **list)
Definition: openEL_0000000080000001.c:74
Finalize_0000000080000001
enum ReturnCode Finalize_0000000080000001()
Definition: openEL_0000000080000001.c:47
Stop_0000000080000001
enum ReturnCode Stop_0000000080000001()
Definition: openEL_0000000080000001.c:114
Init_0000000080000001
enum ReturnCode Init_0000000080000001()
Definition: openEL_0000000080000001.c:37
SetReset_0000000080000001
enum ReturnCode SetReset_0000000080000001()
Definition: openEL_0000000080000001.c:103
GetTime_0000000080000001
enum ReturnCode GetTime_0000000080000001()
Definition: openEL_0000000080000001.c:67