source: asp3_tinet_ecnl_arm/trunk/asp3_dcre/tecsgen/tecs/TECSInfo/nTECSInfo_tCelltypeInfo.c@ 374

Last change on this file since 374 was 374, checked in by coas-nagasima, 5 years ago

mbed関連を更新
シリアルドライバをmbedのHALを使うよう変更
ファイルディスクリプタの処理を更新

  • Property charset set to UTF-8
  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc
File size: 15.4 KB
Line 
1/*
2 * Copyright (C) 2008-2017 by TOPPERS Project
3 *
4 * 上記著作権者
5は,以下の(1)~(4)の条件を満たす場合に限り,本ソフトウェ
6 * ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改
7 * 変・再é…
8å¸ƒï¼ˆä»¥ä¸‹ï¼Œåˆ©ç”¨ã¨å‘¼ã¶ï¼‰ã™ã‚‹ã“とを無償で許諾する.
9 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
10 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
11 * スコード中に含まれていること.
12 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
13 * 用できる形で再é…
14å¸ƒã™ã‚‹å ´åˆã«ã¯ï¼Œå†é…
15å¸ƒã«ä¼´ã†ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆï¼ˆåˆ©ç”¨
16 * 者
17マニュアルなど)に,上記の著作権表示,この利用条件および下記
18 * の無保証規定を掲載すること.
19 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
20 * 用できない形で再é…
21å¸ƒã™ã‚‹å ´åˆã«ã¯ï¼Œæ¬¡ã®ã„ずれかの条件を満たすこ
22 * と.
23 * (a) 再é…
24å¸ƒã«ä¼´ã†ãƒ‰ã‚­ãƒ¥ãƒ¡ãƒ³ãƒˆï¼ˆåˆ©ç”¨è€…
25マニュアルなど)に,上記の著
26 * 作権表示,この利用条件および下記の無保証規定を掲載すること.
27 * (b) 再é…
28å¸ƒã®å½¢æ…
29‹ã‚’,別に定める方法によって,TOPPERSプロジェクトに
30 * 報告すること.
31 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
32 * 害からも,上記著作権者
33およびTOPPERSプロジェクトをå…
34è²¬ã™ã‚‹ã“と.
35 * また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理
36 * 由に基づく請求からも,上記著作権者
37およびTOPPERSプロジェクトを
38 * å…
39è²¬ã™ã‚‹ã“と.
40 *
41 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者
42お
43 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的
44 * に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ
45 * アの利用により直接的または間接的に生じたいかなる損害に関しても,そ
46 * の責任を負わない.
47 *
48 * @(#) $Id$
49 */
50
51/* #[<PREAMBLE>]#
52 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
53 * tecsmerge によるマージに使用されます
54 *
55 * 属性アクセスマクロ #_CAAM_#
56 * name char_t* ATTR_name
57 * b_singleton bool_t ATTR_b_singleton
58 * b_IDX_is_ID_act bool_t ATTR_b_IDX_is_ID_act
59 * sizeOfCB uint32_t ATTR_sizeOfCB
60 * sizeOfINIB uint32_t ATTR_sizeOfINIB
61 * n_cellInLinkUnit uint32_t ATTR_n_cellInLinkUnit
62 * n_cellInSystem uint32_t ATTR_n_cellInSystem
63 *
64 * 呼び口関数 #_TCPF_#
65 * call port: cEntryInfo signature: nTECSInfo_sEntryInfo context:task optional:true
66 * bool_t is_cEntryInfo_joined(int subscript) check if joined
67 * ER cEntryInfo_getName( subscript, char_t* name, int_t max_len );
68 * uint16_t cEntryInfo_getNameLength( subscript );
69 * void cEntryInfo_getSignatureInfo( subscript, Descriptor( nTECSInfo_sSignatureInfo )* desc );
70 * uint32_t cEntryInfo_getArraySize( subscript );
71 * bool_t cEntryInfo_isInline( subscript );
72 * subscript: 0...(NCP_cEntryInfo-1)
73 * [ref_desc]
74 * Descriptor( nTECSInfo_sEntryInfo ) cEntryInfo_refer_to_descriptor( int_t subscript );
75 * Descriptor( nTECSInfo_sEntryInfo ) cEntryInfo_ref_desc( int_t subscript ) (same as above; abbreviated version);
76 * call port: cCallInfo signature: nTECSInfo_sCallInfo context:task optional:true
77 * bool_t is_cCallInfo_joined(int subscript) check if joined
78 * ER cCallInfo_getName( subscript, char_t* name, int_t max_len );
79 * uint16_t cCallInfo_getNameLength( subscript );
80 * void cCallInfo_getSignatureInfo( subscript, Descriptor( nTECSInfo_sSignatureInfo )* desc );
81 * uint32_t cCallInfo_getArraySize( subscript );
82 * void cCallInfo_getSpecifierInfo( subscript, bool_t* b_optional, bool_t* b_dynamic, bool_t* b_ref_desc, bool_t* b_omit );
83 * void cCallInfo_getInternalInfo( subscript, bool_t* b_allocator_port, bool_t* b_require_port );
84 * void cCallInfo_getLocationInfo( subscript, uint32_t* offset, int8_t* place );
85 * void cCallInfo_getOptimizeInfo( subscript, bool_t* b_VMT_useless, bool_t* b_skelton_useless, bool_t* b_cell_unique );
86 * subscript: 0...(NCP_cCallInfo-1)
87 * [ref_desc]
88 * Descriptor( nTECSInfo_sCallInfo ) cCallInfo_refer_to_descriptor( int_t subscript );
89 * Descriptor( nTECSInfo_sCallInfo ) cCallInfo_ref_desc( int_t subscript ) (same as above; abbreviated version);
90 * call port: cAttrInfo signature: nTECSInfo_sVarDeclInfo context:task optional:true
91 * bool_t is_cAttrInfo_joined(int subscript) check if joined
92 * ER cAttrInfo_getName( subscript, char_t* name, int_t max_len );
93 * uint16_t cAttrInfo_getNameLength( subscript );
94 * uint32_t cAttrInfo_getOffset( subscript );
95 * void cAttrInfo_getTypeInfo( subscript, Descriptor( nTECSInfo_sTypeInfo )* desc );
96 * void cAttrInfo_getSizeIsExpr( subscript, char_t* expr_str, int32_t max_len );
97 * ER cAttrInfo_getSizeIs( subscript, uint32_t* size, const void* p_cb );
98 * subscript: 0...(NCP_cAttrInfo-1)
99 * [ref_desc]
100 * Descriptor( nTECSInfo_sVarDeclInfo ) cAttrInfo_refer_to_descriptor( int_t subscript );
101 * Descriptor( nTECSInfo_sVarDeclInfo ) cAttrInfo_ref_desc( int_t subscript ) (same as above; abbreviated version);
102 * call port: cVarInfo signature: nTECSInfo_sVarDeclInfo context:task optional:true
103 * bool_t is_cVarInfo_joined(int subscript) check if joined
104 * ER cVarInfo_getName( subscript, char_t* name, int_t max_len );
105 * uint16_t cVarInfo_getNameLength( subscript );
106 * uint32_t cVarInfo_getOffset( subscript );
107 * void cVarInfo_getTypeInfo( subscript, Descriptor( nTECSInfo_sTypeInfo )* desc );
108 * void cVarInfo_getSizeIsExpr( subscript, char_t* expr_str, int32_t max_len );
109 * ER cVarInfo_getSizeIs( subscript, uint32_t* size, const void* p_cb );
110 * subscript: 0...(NCP_cVarInfo-1)
111 * [ref_desc]
112 * Descriptor( nTECSInfo_sVarDeclInfo ) cVarInfo_refer_to_descriptor( int_t subscript );
113 * Descriptor( nTECSInfo_sVarDeclInfo ) cVarInfo_ref_desc( int_t subscript ) (same as above; abbreviated version);
114 *
115 * #[</PREAMBLE>]# */
116
117/* Put prototype declaration and/or variale definition here #_PAC_# */
118#include <string.h>
119#include "nTECSInfo_tCelltypeInfo_tecsgen.h"
120
121#ifndef E_OK
122#define E_OK 0 /* success */
123#define E_ID (-18) /* illegal ID */
124#endif
125
126/* entry port function #_TEPF_# */
127/* #[<ENTRY_PORT>]# eCelltypeInfo
128 * entry port: eCelltypeInfo
129 * signature: nTECSInfo_sCelltypeInfo
130 * context: task
131 * #[</ENTRY_PORT>]# */
132
133/* #[<ENTRY_FUNC>]# eCelltypeInfo_getName
134 * name: eCelltypeInfo_getName
135 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_getName
136 * oneway: false
137 * #[</ENTRY_FUNC>]# */
138ER
139eCelltypeInfo_getName(CELLIDX idx, char_t* name, int_t max_len)
140{
141 ER ercd = E_OK;
142 CELLCB *p_cellcb;
143 if (VALID_IDX(idx)) {
144 p_cellcb = GET_CELLCB(idx);
145 }
146 else {
147 return(E_ID);
148 } /* end if VALID_IDX(idx) */
149
150 /* Put statements here #_TEFB_# */
151 name[ max_len - 1 ] = '\0';
152 strncpy( name, ATTR_name, max_len );
153 if( name[ max_len - 1 ] ){
154 name[ max_len - 1 ] = '\0';
155 ercd = E_NOMEM;
156 }
157
158 return(ercd);
159}
160
161/* #[<ENTRY_FUNC>]# eCelltypeInfo_getNameLength
162 * name: eCelltypeInfo_getNameLength
163 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_getNameLength
164 * oneway: false
165 * #[</ENTRY_FUNC>]# */
166uint16_t
167eCelltypeInfo_getNameLength(CELLIDX idx)
168{
169 CELLCB *p_cellcb;
170 if (VALID_IDX(idx)) {
171 p_cellcb = GET_CELLCB(idx);
172 }
173 else {
174 /* Write error processing code here */
175 } /* end if VALID_IDX(idx) */
176
177 /* Put statements here #_TEFB_# */
178 return strlen( ATTR_name ) + 1;
179}
180
181/* #[<ENTRY_FUNC>]# eCelltypeInfo_getNAttr
182 * name: eCelltypeInfo_getNAttr
183 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_getNAttr
184 * oneway: false
185 * #[</ENTRY_FUNC>]# */
186uint32_t
187eCelltypeInfo_getNAttr(CELLIDX idx)
188{
189 CELLCB *p_cellcb;
190 if (VALID_IDX(idx)) {
191 p_cellcb = GET_CELLCB(idx);
192 }
193 else {
194 /* Write error processing code here */
195 } /* end if VALID_IDX(idx) */
196
197 /* Put statements here #_TEFB_# */
198 return NCP_cAttrInfo;
199}
200
201/* #[<ENTRY_FUNC>]# eCelltypeInfo_getAttrInfo
202 * name: eCelltypeInfo_getAttrInfo
203 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_getAttrInfo
204 * oneway: false
205 * #[</ENTRY_FUNC>]# */
206ER
207eCelltypeInfo_getAttrInfo(CELLIDX idx, uint32_t ith, Descriptor( nTECSInfo_sVarDeclInfo )* desc)
208{
209 CELLCB *p_cellcb;
210 ER ercd = E_OK;
211 if (VALID_IDX(idx)) {
212 p_cellcb = GET_CELLCB(idx);
213 }
214 else {
215 /* Write error processing code here */
216 } /* end if VALID_IDX(idx) */
217
218 /* Put statements here #_TEFB_# */
219 if( 0 <= ith && ith < NCP_cAttrInfo ){
220 if( is_cAttrInfo_joined( ith ) )
221 *desc = cAttrInfo_refer_to_descriptor( ith );
222 else
223 ercd = E_NOEXS;
224 }
225 else
226 ercd = E_ID;
227 return ercd;
228}
229
230/* #[<ENTRY_FUNC>]# eCelltypeInfo_getNVar
231 * name: eCelltypeInfo_getNVar
232 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_getNVar
233 * oneway: false
234 * #[</ENTRY_FUNC>]# */
235uint32_t
236eCelltypeInfo_getNVar(CELLIDX idx)
237{
238 CELLCB *p_cellcb;
239 if (VALID_IDX(idx)) {
240 p_cellcb = GET_CELLCB(idx);
241 }
242 else {
243 /* Write error processing code here */
244 } /* end if VALID_IDX(idx) */
245
246 /* Put statements here #_TEFB_# */
247 return NCP_cVarInfo;
248}
249
250/* #[<ENTRY_FUNC>]# eCelltypeInfo_getVarInfo
251 * name: eCelltypeInfo_getVarInfo
252 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_getVarInfo
253 * oneway: false
254 * #[</ENTRY_FUNC>]# */
255ER
256eCelltypeInfo_getVarInfo(CELLIDX idx, uint32_t ith, Descriptor( nTECSInfo_sVarDeclInfo )* desc)
257{
258 CELLCB *p_cellcb;
259 ER ercd = E_OK;
260 if (VALID_IDX(idx)) {
261 p_cellcb = GET_CELLCB(idx);
262 }
263 else {
264 /* Write error processing code here */
265 } /* end if VALID_IDX(idx) */
266
267 /* Put statements here #_TEFB_# */
268 if( 0 <= ith && ith < NCP_cVarInfo ){
269 if( is_cVarInfo_joined( ith ) )
270 *desc = cVarInfo_refer_to_descriptor( ith );
271 else
272 ercd = E_NOEXS;
273 }
274 else
275 ercd = E_ID;
276 return ercd;
277}
278
279/* #[<ENTRY_FUNC>]# eCelltypeInfo_getNCall
280 * name: eCelltypeInfo_getNCall
281 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_getNCall
282 * oneway: false
283 * #[</ENTRY_FUNC>]# */
284uint32_t
285eCelltypeInfo_getNCall(CELLIDX idx)
286{
287 CELLCB *p_cellcb;
288 if (VALID_IDX(idx)) {
289 p_cellcb = GET_CELLCB(idx);
290 }
291 else {
292 /* Write error processing code here */
293 } /* end if VALID_IDX(idx) */
294
295 /* Put statements here #_TEFB_# */
296 return NCP_cCallInfo;
297}
298
299/* #[<ENTRY_FUNC>]# eCelltypeInfo_getCallInfo
300 * name: eCelltypeInfo_getCallInfo
301 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_getCallInfo
302 * oneway: false
303 * #[</ENTRY_FUNC>]# */
304ER
305eCelltypeInfo_getCallInfo(CELLIDX idx, uint32_t ith, Descriptor( nTECSInfo_sCallInfo )* desc)
306{
307 CELLCB *p_cellcb;
308 ER ercd = E_OK;
309 if (VALID_IDX(idx)) {
310 p_cellcb = GET_CELLCB(idx);
311 }
312 else {
313 /* Write error processing code here */
314 } /* end if VALID_IDX(idx) */
315
316 /* Put statements here #_TEFB_# */
317 if( 0 <= ith && ith < NCP_cCallInfo ){
318 if( is_cCallInfo_joined( ith ) )
319 *desc = cCallInfo_refer_to_descriptor( ith );
320 else
321 ercd = E_NOEXS;
322 }
323 else
324 ercd = E_ID;
325
326 return ercd;
327}
328
329/* #[<ENTRY_FUNC>]# eCelltypeInfo_getNEntry
330 * name: eCelltypeInfo_getNEntry
331 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_getNEntry
332 * oneway: false
333 * #[</ENTRY_FUNC>]# */
334uint32_t
335eCelltypeInfo_getNEntry(CELLIDX idx)
336{
337 CELLCB *p_cellcb;
338 if (VALID_IDX(idx)) {
339 p_cellcb = GET_CELLCB(idx);
340 }
341 else {
342 /* Write error processing code here */
343 } /* end if VALID_IDX(idx) */
344
345 /* Put statements here #_TEFB_# */
346 return NCP_cEntryInfo;
347}
348
349/* #[<ENTRY_FUNC>]# eCelltypeInfo_getEntryInfo
350 * name: eCelltypeInfo_getEntryInfo
351 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_getEntryInfo
352 * oneway: false
353 * #[</ENTRY_FUNC>]# */
354ER
355eCelltypeInfo_getEntryInfo(CELLIDX idx, uint32_t ith, Descriptor( nTECSInfo_sEntryInfo )* desc)
356{
357 CELLCB *p_cellcb;
358 ER ercd = E_OK;
359 if (VALID_IDX(idx)) {
360 p_cellcb = GET_CELLCB(idx);
361 }
362 else {
363 /* Write error processing code here */
364 } /* end if VALID_IDX(idx) */
365
366 /* Put statements here #_TEFB_# */
367 if( 0 <= ith && ith < NCP_cEntryInfo ){
368 if( is_cEntryInfo_joined( ith ) )
369 *desc = cEntryInfo_refer_to_descriptor( ith );
370 else
371 ercd = E_NOEXS;
372 }
373 else
374 ercd = E_ID;
375
376 return ercd;
377}
378
379/* #[<ENTRY_FUNC>]# eCelltypeInfo_isSingleton
380 * name: eCelltypeInfo_isSingleton
381 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_isSingleton
382 * oneway: false
383 * #[</ENTRY_FUNC>]# */
384bool_t
385eCelltypeInfo_isSingleton(CELLIDX idx)
386{
387 CELLCB *p_cellcb;
388 if (VALID_IDX(idx)) {
389 p_cellcb = GET_CELLCB(idx);
390 }
391 else {
392 /* Write error processing code here */
393 } /* end if VALID_IDX(idx) */
394
395 /* Put statements here #_TEFB_# */
396 return ATTR_b_singleton;
397}
398
399/* #[<ENTRY_FUNC>]# eCelltypeInfo_isIDX_is_ID
400 * name: eCelltypeInfo_isIDX_is_ID
401 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_isIDX_is_ID
402 * oneway: false
403 * #[</ENTRY_FUNC>]# */
404bool_t
405eCelltypeInfo_isIDX_is_ID(CELLIDX idx)
406{
407 CELLCB *p_cellcb;
408 if (VALID_IDX(idx)) {
409 p_cellcb = GET_CELLCB(idx);
410 }
411 else {
412 /* Write error processing code here */
413 } /* end if VALID_IDX(idx) */
414
415 /* Put statements here #_TEFB_# */
416 return ATTR_b_IDX_is_ID_act;
417}
418
419/* #[<ENTRY_FUNC>]# eCelltypeInfo_sizeOfCB
420 * name: eCelltypeInfo_sizeOfCB
421 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_sizeOfCB
422 * oneway: false
423 * #[</ENTRY_FUNC>]# */
424uint32_t
425eCelltypeInfo_sizeOfCB(CELLIDX idx)
426{
427 CELLCB *p_cellcb;
428 if (VALID_IDX(idx)) {
429 p_cellcb = GET_CELLCB(idx);
430 }
431 else {
432 /* エラー処理コードをここに記述します */
433 } /* end if VALID_IDX(idx) */
434
435 /* ここに処理本体を記述します #_TEFB_# */
436 return ATTR_sizeOfCB;
437}
438
439/* #[<ENTRY_FUNC>]# eCelltypeInfo_sizeOfINIB
440 * name: eCelltypeInfo_sizeOfINIB
441 * global_name: nTECSInfo_tCelltypeInfo_eCelltypeInfo_sizeOfINIB
442 * oneway: false
443 * #[</ENTRY_FUNC>]# */
444uint32_t
445eCelltypeInfo_sizeOfINIB(CELLIDX idx)
446{
447 CELLCB *p_cellcb;
448 if (VALID_IDX(idx)) {
449 p_cellcb = GET_CELLCB(idx);
450 }
451 else {
452 /* エラー処理コードをここに記述します */
453 } /* end if VALID_IDX(idx) */
454
455 /* ここに処理本体を記述します #_TEFB_# */
456 return ATTR_sizeOfINIB;
457}
458
459/* #[<POSTAMBLE>]#
460 * これより下に非受け口関数を書きます
461 * #[</POSTAMBLE>]#*/
Note: See TracBrowser for help on using the repository browser.