1 | /*
|
---|
2 | * Copyright (C) 2008-2017 by TOPPERS Project
|
---|
3 | *
|
---|
4 | * 上記著作権者は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
|
---|
5 | * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改
|
---|
6 | * 変・再配布(以下,利用と呼ぶ)することを無償で許諾する.
|
---|
7 | * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
|
---|
8 | * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
|
---|
9 | * スコード中に含まれていること.
|
---|
10 | * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
|
---|
11 | * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用
|
---|
12 | * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記
|
---|
13 | * の無保証規定を掲載すること.
|
---|
14 | * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
|
---|
15 | * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ
|
---|
16 | * と.
|
---|
17 | * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著
|
---|
18 | * 作権表示,この利用条件および下記の無保証規定を掲載すること.
|
---|
19 | * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに
|
---|
20 | * 報告すること.
|
---|
21 | * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
|
---|
22 | * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること.
|
---|
23 | * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理
|
---|
24 | * 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを
|
---|
25 | * 免責すること.
|
---|
26 | *
|
---|
27 | * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お
|
---|
28 | * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的
|
---|
29 | * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ
|
---|
30 | * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ
|
---|
31 | * の責任を負わない.
|
---|
32 | *
|
---|
33 | * @(#) $Id$
|
---|
34 | */
|
---|
35 |
|
---|
36 | /* #[<PREAMBLE>]#
|
---|
37 | * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
|
---|
38 | * tecsmerge によるマージに使用されます
|
---|
39 | *
|
---|
40 | * 属性アクセスマクロ #_CAAM_#
|
---|
41 | * name char* ATTR_name
|
---|
42 | *
|
---|
43 | * 呼び口関数 #_TCPF_#
|
---|
44 | * call port: cSignatureInfo signature: nTECSInfo_sSignatureInfo context:task optional:true
|
---|
45 | * bool_t is_cSignatureInfo_joined(int subscript) check if joined
|
---|
46 | * ER cSignatureInfo_getName( subscript, char_t* name, int_t max_len );
|
---|
47 | * uint16_t cSignatureInfo_getNameLength( subscript );
|
---|
48 | * uint32_t cSignatureInfo_getNFunction( subscript );
|
---|
49 | * ER cSignatureInfo_getFunctionInfo( subscript, uint32_t ith, Descriptor( nTECSInfo_sFunctionInfo )* desc );
|
---|
50 | * subscript: 0...(NCP_cSignatureInfo-1)
|
---|
51 | * [ref_desc]
|
---|
52 | * Descriptor( nTECSInfo_sSignatureInfo ) cSignatureInfo_refer_to_descriptor( int_t subscript );
|
---|
53 | * Descriptor( nTECSInfo_sSignatureInfo ) cSignatureInfo_ref_desc( int_t subscript ) (same as above; abbreviated version);
|
---|
54 | * call port: cCelltypeInfo signature: nTECSInfo_sCelltypeInfo context:task optional:true
|
---|
55 | * bool_t is_cCelltypeInfo_joined(int subscript) check if joined
|
---|
56 | * ER cCelltypeInfo_getName( subscript, char_t* name, int_t max_len );
|
---|
57 | * uint16_t cCelltypeInfo_getNameLength( subscript );
|
---|
58 | * uint32_t cCelltypeInfo_getNAttr( subscript );
|
---|
59 | * ER cCelltypeInfo_getAttrInfo( subscript, uint32_t ith, Descriptor( nTECSInfo_sVarDeclInfo )* desc );
|
---|
60 | * uint32_t cCelltypeInfo_getNVar( subscript );
|
---|
61 | * ER cCelltypeInfo_getVarInfo( subscript, uint32_t ith, Descriptor( nTECSInfo_sVarDeclInfo )* desc );
|
---|
62 | * uint32_t cCelltypeInfo_getNCall( subscript );
|
---|
63 | * ER cCelltypeInfo_getCallInfo( subscript, uint32_t ith, Descriptor( nTECSInfo_sCallInfo )* desc );
|
---|
64 | * uint32_t cCelltypeInfo_getNEntry( subscript );
|
---|
65 | * ER cCelltypeInfo_getEntryInfo( subscript, uint32_t ith, Descriptor( nTECSInfo_sEntryInfo )* desc );
|
---|
66 | * bool_t cCelltypeInfo_isSingleton( subscript );
|
---|
67 | * bool_t cCelltypeInfo_isIDX_is_ID( subscript );
|
---|
68 | * uint32_t cCelltypeInfo_sizeOfCB( subscript );
|
---|
69 | * uint32_t cCelltypeInfo_sizeOfINIB( subscript );
|
---|
70 | * subscript: 0...(NCP_cCelltypeInfo-1)
|
---|
71 | * [ref_desc]
|
---|
72 | * Descriptor( nTECSInfo_sCelltypeInfo ) cCelltypeInfo_refer_to_descriptor( int_t subscript );
|
---|
73 | * Descriptor( nTECSInfo_sCelltypeInfo ) cCelltypeInfo_ref_desc( int_t subscript ) (same as above; abbreviated version);
|
---|
74 | * call port: cNamespaceInfo signature: nTECSInfo_sNamespaceInfo context:task optional:true
|
---|
75 | * bool_t is_cNamespaceInfo_joined(int subscript) check if joined
|
---|
76 | * ER cNamespaceInfo_getName( subscript, char_t* name, int_t max_len );
|
---|
77 | * uint16_t cNamespaceInfo_getNameLength( subscript );
|
---|
78 | * uint32_t cNamespaceInfo_getNNamespace( subscript );
|
---|
79 | * ER cNamespaceInfo_getNamespaceInfo( subscript, uint32_t ith, Descriptor( nTECSInfo_sNamespaceInfo )* des );
|
---|
80 | * uint32_t cNamespaceInfo_getNSignature( subscript );
|
---|
81 | * ER cNamespaceInfo_getSignatureInfo( subscript, uint32_t ith, Descriptor( nTECSInfo_sSignatureInfo )* des );
|
---|
82 | * uint32_t cNamespaceInfo_getNCelltype( subscript );
|
---|
83 | * ER cNamespaceInfo_getCelltypeInfo( subscript, uint32_t ith, Descriptor( nTECSInfo_sCelltypeInfo )* des );
|
---|
84 | * subscript: 0...(NCP_cNamespaceInfo-1)
|
---|
85 | * [ref_desc]
|
---|
86 | * Descriptor( nTECSInfo_sNamespaceInfo ) cNamespaceInfo_refer_to_descriptor( int_t subscript );
|
---|
87 | * Descriptor( nTECSInfo_sNamespaceInfo ) cNamespaceInfo_ref_desc( int_t subscript ) (same as above; abbreviated version);
|
---|
88 | *
|
---|
89 | * #[</PREAMBLE>]# */
|
---|
90 |
|
---|
91 | /* Put prototype declaration and/or variale definition here #_PAC_# */
|
---|
92 | #include <string.h>
|
---|
93 | #include "nTECSInfo_tNamespaceInfo_tecsgen.h"
|
---|
94 |
|
---|
95 | #ifndef E_OK
|
---|
96 | #define E_OK 0 /* success */
|
---|
97 | #define E_ID (-18) /* illegal ID */
|
---|
98 | #endif
|
---|
99 |
|
---|
100 | /* entry port function #_TEPF_# */
|
---|
101 | /* #[<ENTRY_PORT>]# eNamespaceInfo
|
---|
102 | * entry port: eNamespaceInfo
|
---|
103 | * signature: nTECSInfo_sNamespaceInfo
|
---|
104 | * context: task
|
---|
105 | * #[</ENTRY_PORT>]# */
|
---|
106 |
|
---|
107 | /* #[<ENTRY_FUNC>]# eNamespaceInfo_getName
|
---|
108 | * name: eNamespaceInfo_getName
|
---|
109 | * global_name: nTECSInfo_tNamespaceInfo_eNamespaceInfo_getName
|
---|
110 | * oneway: false
|
---|
111 | * #[</ENTRY_FUNC>]# */
|
---|
112 | ER
|
---|
113 | eNamespaceInfo_getName(CELLIDX idx, char_t* name, int_t max_len)
|
---|
114 | {
|
---|
115 | ER ercd = E_OK;
|
---|
116 | CELLCB *p_cellcb;
|
---|
117 | if (VALID_IDX(idx)) {
|
---|
118 | p_cellcb = GET_CELLCB(idx);
|
---|
119 | }
|
---|
120 | else {
|
---|
121 | return(E_ID);
|
---|
122 | } /* end if VALID_IDX(idx) */
|
---|
123 |
|
---|
124 | /* Put statements here #_TEFB_# */
|
---|
125 | name[ max_len - 1 ] = '\0';
|
---|
126 | strncpy( name, ATTR_name, max_len );
|
---|
127 | if( name[ max_len - 1 ] ){
|
---|
128 | name[ max_len - 1 ] = '\0';
|
---|
129 | ercd = E_NOMEM;
|
---|
130 | }
|
---|
131 |
|
---|
132 | return(ercd);
|
---|
133 | }
|
---|
134 |
|
---|
135 | /* #[<ENTRY_FUNC>]# eNamespaceInfo_getNameLength
|
---|
136 | * name: eNamespaceInfo_getNameLength
|
---|
137 | * global_name: nTECSInfo_tNamespaceInfo_eNamespaceInfo_getNameLength
|
---|
138 | * oneway: false
|
---|
139 | * #[</ENTRY_FUNC>]# */
|
---|
140 | uint16_t
|
---|
141 | eNamespaceInfo_getNameLength(CELLIDX idx)
|
---|
142 | {
|
---|
143 | CELLCB *p_cellcb;
|
---|
144 | if (VALID_IDX(idx)) {
|
---|
145 | p_cellcb = GET_CELLCB(idx);
|
---|
146 | }
|
---|
147 | else {
|
---|
148 | /* Write error processing code here */
|
---|
149 | } /* end if VALID_IDX(idx) */
|
---|
150 |
|
---|
151 | /* Put statements here #_TEFB_# */
|
---|
152 | return strlen( ATTR_name ) + 1;
|
---|
153 | }
|
---|
154 |
|
---|
155 | /* #[<ENTRY_FUNC>]# eNamespaceInfo_getNNamespace
|
---|
156 | * name: eNamespaceInfo_getNNamespace
|
---|
157 | * global_name: nTECSInfo_tNamespaceInfo_eNamespaceInfo_getNNamespace
|
---|
158 | * oneway: false
|
---|
159 | * #[</ENTRY_FUNC>]# */
|
---|
160 | uint32_t
|
---|
161 | eNamespaceInfo_getNNamespace(CELLIDX idx)
|
---|
162 | {
|
---|
163 | CELLCB *p_cellcb;
|
---|
164 | if (VALID_IDX(idx)) {
|
---|
165 | p_cellcb = GET_CELLCB(idx);
|
---|
166 | }
|
---|
167 | else {
|
---|
168 | /* Write error processing code here */
|
---|
169 | } /* end if VALID_IDX(idx) */
|
---|
170 |
|
---|
171 | /* Put statements here #_TEFB_# */
|
---|
172 | return NCP_cNamespaceInfo;
|
---|
173 | }
|
---|
174 |
|
---|
175 | /* #[<ENTRY_FUNC>]# eNamespaceInfo_getNamespaceInfo
|
---|
176 | * name: eNamespaceInfo_getNamespaceInfo
|
---|
177 | * global_name: nTECSInfo_tNamespaceInfo_eNamespaceInfo_getNamespaceInfo
|
---|
178 | * oneway: false
|
---|
179 | * #[</ENTRY_FUNC>]# */
|
---|
180 | ER
|
---|
181 | eNamespaceInfo_getNamespaceInfo(CELLIDX idx, uint32_t ith, Descriptor( nTECSInfo_sNamespaceInfo )* des)
|
---|
182 | {
|
---|
183 | CELLCB *p_cellcb;
|
---|
184 | if (VALID_IDX(idx)) {
|
---|
185 | p_cellcb = GET_CELLCB(idx);
|
---|
186 | }
|
---|
187 | else {
|
---|
188 | /* Write error processing code here */
|
---|
189 | } /* end if VALID_IDX(idx) */
|
---|
190 |
|
---|
191 | /* Put statements here #_TEFB_# */
|
---|
192 | *des = cNamespaceInfo_refer_to_descriptor( ith );
|
---|
193 | }
|
---|
194 |
|
---|
195 | /* #[<ENTRY_FUNC>]# eNamespaceInfo_getNSignature
|
---|
196 | * name: eNamespaceInfo_getNSignature
|
---|
197 | * global_name: nTECSInfo_tNamespaceInfo_eNamespaceInfo_getNSignature
|
---|
198 | * oneway: false
|
---|
199 | * #[</ENTRY_FUNC>]# */
|
---|
200 | uint32_t
|
---|
201 | eNamespaceInfo_getNSignature(CELLIDX idx)
|
---|
202 | {
|
---|
203 | CELLCB *p_cellcb;
|
---|
204 | if (VALID_IDX(idx)) {
|
---|
205 | p_cellcb = GET_CELLCB(idx);
|
---|
206 | }
|
---|
207 | else {
|
---|
208 | /* Write error processing code here */
|
---|
209 | } /* end if VALID_IDX(idx) */
|
---|
210 |
|
---|
211 | /* Put statements here #_TEFB_# */
|
---|
212 | return NCP_cSignatureInfo;
|
---|
213 | }
|
---|
214 |
|
---|
215 | /* #[<ENTRY_FUNC>]# eNamespaceInfo_getSignatureInfo
|
---|
216 | * name: eNamespaceInfo_getSignatureInfo
|
---|
217 | * global_name: nTECSInfo_tNamespaceInfo_eNamespaceInfo_getSignatureInfo
|
---|
218 | * oneway: false
|
---|
219 | * #[</ENTRY_FUNC>]# */
|
---|
220 | ER
|
---|
221 | eNamespaceInfo_getSignatureInfo(CELLIDX idx, uint32_t ith, Descriptor( nTECSInfo_sSignatureInfo )* des)
|
---|
222 | {
|
---|
223 | CELLCB *p_cellcb;
|
---|
224 | if (VALID_IDX(idx)) {
|
---|
225 | p_cellcb = GET_CELLCB(idx);
|
---|
226 | }
|
---|
227 | else {
|
---|
228 | /* Write error processing code here */
|
---|
229 | } /* end if VALID_IDX(idx) */
|
---|
230 |
|
---|
231 | /* Put statements here #_TEFB_# */
|
---|
232 | *des = cSignatureInfo_refer_to_descriptor( ith );
|
---|
233 | }
|
---|
234 |
|
---|
235 | /* #[<ENTRY_FUNC>]# eNamespaceInfo_getNCelltype
|
---|
236 | * name: eNamespaceInfo_getNCelltype
|
---|
237 | * global_name: nTECSInfo_tNamespaceInfo_eNamespaceInfo_getNCelltype
|
---|
238 | * oneway: false
|
---|
239 | * #[</ENTRY_FUNC>]# */
|
---|
240 | uint32_t
|
---|
241 | eNamespaceInfo_getNCelltype(CELLIDX idx)
|
---|
242 | {
|
---|
243 | CELLCB *p_cellcb;
|
---|
244 | if (VALID_IDX(idx)) {
|
---|
245 | p_cellcb = GET_CELLCB(idx);
|
---|
246 | }
|
---|
247 | else {
|
---|
248 | /* Write error processing code here */
|
---|
249 | } /* end if VALID_IDX(idx) */
|
---|
250 |
|
---|
251 | /* Put statements here #_TEFB_# */
|
---|
252 | return NCP_cCelltypeInfo;
|
---|
253 | }
|
---|
254 |
|
---|
255 | /* #[<ENTRY_FUNC>]# eNamespaceInfo_getCelltypeInfo
|
---|
256 | * name: eNamespaceInfo_getCelltypeInfo
|
---|
257 | * global_name: nTECSInfo_tNamespaceInfo_eNamespaceInfo_getCelltypeInfo
|
---|
258 | * oneway: false
|
---|
259 | * #[</ENTRY_FUNC>]# */
|
---|
260 | ER
|
---|
261 | eNamespaceInfo_getCelltypeInfo(CELLIDX idx, uint32_t ith, Descriptor( nTECSInfo_sCelltypeInfo )* des)
|
---|
262 | {
|
---|
263 | CELLCB *p_cellcb;
|
---|
264 | if (VALID_IDX(idx)) {
|
---|
265 | p_cellcb = GET_CELLCB(idx);
|
---|
266 | }
|
---|
267 | else {
|
---|
268 | /* Write error processing code here */
|
---|
269 | } /* end if VALID_IDX(idx) */
|
---|
270 |
|
---|
271 | /* Put statements here #_TEFB_# */
|
---|
272 | *des = cCelltypeInfo_refer_to_descriptor( ith );
|
---|
273 | }
|
---|
274 |
|
---|
275 | /* #[<POSTAMBLE>]#
|
---|
276 | * これより下に非受け口関数を書きます
|
---|
277 | * #[</POSTAMBLE>]#*/
|
---|