OpenEL 3.0.0

openEL_0000000012345678.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 */
33 #include "openEL.h"
34 #include "openEL_0000000012345678.h"
35 #include <stdio.h>
36
37 enum ReturnCode Init_0000000012345678(){
38 printf("Init_0000000012345678\n");
39 // インスタンスを覚えておく。HALComponentのアドレス（インスタンス）を箱に控えておく。
40 return HAL_OK;
41 }
42
43 enum ReturnCode ReInit_0000000012345678(){
44 printf("ReInit_0000000012345678\n");
45 return HAL_OK;
46 }
47
48 enum ReturnCode Finalize_0000000012345678(){
49 printf("Finalize_0000000012345678\n");
50 return HAL_OK;
51 }
52
53 enum ReturnCode AddObserver_0000000012345678(HALOBSERVER_T halObserver){
54 // インスタンスを覚えておく。HALComponentのアドレス（インスタンス）を箱に控えておく。
55 return HAL_OK;
56 };
57
58 enum ReturnCode RemoveObserver_0000000012345678(HALOBSERVER_T halObserver){
59 return HAL_OK;
60 };
61
62 enum ReturnCode GetProperty_0000000012345678(){
63 return HAL_OK;
64 };
65
66 enum ReturnCode GetTime_0000000012345678(){
67 return HAL_OK;
68 };
69
70 enum ReturnCode SetPosition_0000000012345678(HALCOMPONENT_T **halComponent, halfloat position){
71 printf("SetPosition_0000000012345678, position=%f\n", position);
72 (*halComponent)->positionControlActuator.actualPosition = position;
73 return HAL_OK;
74 }
75
76 enum ReturnCode GetPosition_0000000012345678(HALCOMPONENT_T **halComponent, halfloat **position){
77 printf("GetPosition_0000000012345678\n");
78 *position = &(*halComponent)->positionControlActuator.actualPosition;
79 return HAL_OK;
80 }
81
82 enum ReturnCode Dummy(){
83 return HAL_OK;
84 };
85
86 /* Constant Table (Global scope) */
87 /*---------------------------------------------------------------------------*/
88 static const ELMOTOR_FNC_TBL_T motorFncTbl_0000000012345678 = {
89 /* 0x00 */ Init_0000000012345678,
90 /* 0x01 */ ReInit_0000000012345678,
91 /* 0x02 */ Finalize_0000000012345678,
92 /* 0x03 */ AddObserver_0000000012345678,
93 /* 0x04 */ RemoveObserver_0000000012345678,
94 /* 0x05 */ GetProperty_0000000012345678,
95 /* 0x06 */ GetTime_0000000012345678,
96 /* 0x07 */ Dummy,
98 /* 0x08 */ SetPosition_0000000012345678,
99 /* 0x09 */ GetPosition_0000000012345678,
100 /* 0x0A */ Dummy,
101 /* 0x0B */ Dummy,
102 /* 0x0C */ Dummy,
103 /* 0x0D */ Dummy,
104 /* 0x0E */ Dummy,
105 /* 0x0F */ Dummy,
107 /* 0x10 */ Dummy,
108 /* 0x11 */ Dummy,
109 /* 0x12 */ Dummy,
110 /* 0x13 */ Dummy,
111 /* 0x14 */ Dummy,
112 /* 0x15 */ Dummy,
113 /* 0x16 */ Dummy,
114 /* 0x17 */ Dummy,
116 /* 0x18 */ Dummy,
117 /* 0x19 */ Dummy,
118 /* 0x1A */ Dummy,
119 /* 0x1B */ Dummy,
120 /* 0x1C */ Dummy,
121 /* 0x1D */ Dummy,
122 /* 0x1E */ Dummy,
123 /* 0x1F */ Dummy,
124 };
125
126 const EL_CMN_FNC_TBL_T component_0000000012345678 = {(void *)(&motorFncTbl_0000000012345678)};
127
128 #ifdef __cplusplus
129 } /* extern "C" */
130 } /* namespace el */
131 #endif /* __cplusplus */
GetTime_0000000012345678
enum ReturnCode GetTime_0000000012345678()
Definition: openEL_0000000012345678.c:66
openEL.h
OpenEL Common Header File 3.0.0.
HALObserver
Definition: openEL.h:73
elCommonFncTbl
Definition: openEL.h:214
openEL_0000000012345678.h
OpenEL Actuator Header File 3.0.0.
ReturnCode
ReturnCode
Definition: openEL.h:44
elMotorFncTblSt
Definition: openEL_motor.h:112
halfloat
float32_t halfloat
Definition: openEL.h:53
component_0000000012345678
const EL_CMN_FNC_TBL_T component_0000000012345678
Definition: openEL_0000000012345678.c:126
HalComponent
Definition: openEL.h:162
AddObserver_0000000012345678
enum ReturnCode AddObserver_0000000012345678(HALOBSERVER_T halObserver)
Definition: openEL_0000000012345678.c:53
GetProperty_0000000012345678
enum ReturnCode GetProperty_0000000012345678()
Definition: openEL_0000000012345678.c:62
HAL_OK
Definition: openEL.h:45
ReInit_0000000012345678
enum ReturnCode ReInit_0000000012345678()
Definition: openEL_0000000012345678.c:43
SetPosition_0000000012345678
enum ReturnCode SetPosition_0000000012345678(HALCOMPONENT_T **halComponent, halfloat position)
Definition: openEL_0000000012345678.c:70
RemoveObserver_0000000012345678
enum ReturnCode RemoveObserver_0000000012345678(HALOBSERVER_T halObserver)
Definition: openEL_0000000012345678.c:58
Dummy
enum ReturnCode Dummy()
Definition: openEL_0000000012345678.c:82
Finalize_0000000012345678
enum ReturnCode Finalize_0000000012345678()
Definition: openEL_0000000012345678.c:48
GetPosition_0000000012345678
enum ReturnCode GetPosition_0000000012345678(HALCOMPONENT_T **halComponent, halfloat **position)
Definition: openEL_0000000012345678.c:76
Init_0000000012345678
enum ReturnCode Init_0000000012345678()
Definition: openEL_0000000012345678.c:37