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"
35 #include <stdio.h>
36 
38  printf("Init_0000000012345678\n");
39  // インスタンスを覚えておく。HALComponentのアドレス(インスタンス)を箱に控えておく。
40  return HAL_OK;
41 }
42 
44  printf("ReInit_0000000012345678\n");
45  return HAL_OK;
46 }
47 
49  printf("Finalize_0000000012345678\n");
50  return HAL_OK;
51 }
52 
54  // インスタンスを覚えておく。HALComponentのアドレス(インスタンス)を箱に控えておく。
55  return HAL_OK;
56 };
57 
59  return HAL_OK;
60 };
61 
63  return HAL_OK;
64 };
65 
67  return HAL_OK;
68 };
69 
71  printf("SetPosition_0000000012345678, position=%f\n", position);
72  (*halComponent)->positionControlActuator.actualPosition = position;
73  return HAL_OK;
74 }
75 
77  printf("GetPosition_0000000012345678\n");
78  *position = &(*halComponent)->positionControlActuator.actualPosition;
79  return HAL_OK;
80 }
81 
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,
94  /* 0x05 */ GetProperty_0000000012345678,
95  /* 0x06 */ GetTime_0000000012345678,
96  /* 0x07 */ Dummy,
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 */
enum ReturnCode GetTime_0000000012345678()
OpenEL Common Header File 3.0.0.
OpenEL Actuator Header File 3.0.0.
ReturnCode
Definition: openEL.h:44
float32_t halfloat
Definition: openEL.h:53
const EL_CMN_FNC_TBL_T component_0000000012345678
enum ReturnCode AddObserver_0000000012345678(HALOBSERVER_T halObserver)
enum ReturnCode GetProperty_0000000012345678()
Definition: openEL.h:45
enum ReturnCode ReInit_0000000012345678()
enum ReturnCode SetPosition_0000000012345678(HALCOMPONENT_T **halComponent, halfloat position)
enum ReturnCode RemoveObserver_0000000012345678(HALOBSERVER_T halObserver)
enum ReturnCode Dummy()
enum ReturnCode Finalize_0000000012345678()
enum ReturnCode GetPosition_0000000012345678(HALCOMPONENT_T **halComponent, halfloat **position)
enum ReturnCode Init_0000000012345678()