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"
34 #include <stdio.h>
35 #include <time.h>
36 
38  printf("Init_0000000080000001\n");
39  return HAL_OK;
40 }
41 
43  printf("ReInit_0000000080000001\n");
44  return HAL_OK;
45 }
46 
48  printf("Finalize_0000000080000001\n");
49  return HAL_OK;
50 }
51 
53  printf("AddObserver_0000000080000001\n");
54  return HAL_OK;
55 };
56 
58  printf("RemoveObserver_0000000080000001\n");
59  return HAL_OK;
60 };
61 
63  printf("GetProperty_0000000080000001\n");
64  return HAL_OK;
65 };
66 
68  printf("GetTime_0000000080000001\n");
69  return HAL_OK;
70 };
71 
73 
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 
94  printf("SetUnit_0000000080000001\n");
95  return HAL_OK;
96 }
97 
99  printf("GetUnit_0000000080000001\n");
100  return HAL_OK;
101 }
102 
104  printf("SetReset_0000000080000001\n");
105  return HAL_OK;
106 }
107 
109  printf("Start_0000000080000001\n");
110 // eventTimerid.Start();
111  return HAL_OK;
112 }
113 
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,
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,
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 */
halfloat value
enum ReturnCode Start_0000000080000001()
OpenEL Common Header File 3.0.0.
enum ReturnCode SetUnit_0000000080000001(char units)
ReturnCode
Definition: openEL.h:44
const EL_CMN_FNC_TBL_T component_0000000080000001
OpenEL Torque Sensor Header File 3.0.0.
enum ReturnCode Dummy()
float32_t halfloat
Definition: openEL.h:53
enum ReturnCode GetTimedValue_0000000080000001(HALCOMPONENT_T **halComponent, halfloat **list, int32_t **timer)
enum ReturnCode RemoveObserver_0000000080000001(HALOBSERVER_T halObserver)
enum ReturnCode AddObserver_0000000080000001(HALOBSERVER_T halObserver)
enum ReturnCode ReInit_0000000080000001()
enum ReturnCode GetProperty_0000000080000001()
Definition: openEL.h:45
enum ReturnCode GetUnit_0000000080000001(char *units)
enum ReturnCode GetValue_0000000080000001(HALCOMPONENT_T **halComponent, halfloat **list)
enum ReturnCode Finalize_0000000080000001()
enum ReturnCode Stop_0000000080000001()
enum ReturnCode Init_0000000080000001()
enum ReturnCode SetReset_0000000080000001()
enum ReturnCode GetTime_0000000080000001()