[388] | 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_t* ATTR_name
|
---|
| 42 | * typeKind int8_t ATTR_typeKind
|
---|
| 43 | * bitSize int32_t ATTR_bitSize
|
---|
| 44 | * b_const bool_t ATTR_b_const
|
---|
| 45 | * b_volatile bool_t ATTR_b_volatile
|
---|
| 46 | *
|
---|
| 47 | * 呼び口関数 #_TCPF_#
|
---|
| 48 | * call port: cTypeInfo signature: nTECSInfo_sTypeInfo context:task optional:true
|
---|
| 49 | * bool_t is_cTypeInfo_joined() check if joined
|
---|
| 50 | * ER cTypeInfo_getName( char_t* name, int_t max_len );
|
---|
| 51 | * void cTypeInfo_getNameLength( uint16_t* len );
|
---|
| 52 | * void cTypeInfo_getSize( uint32_t* size );
|
---|
| 53 | * void cTypeInfo_getKind( int8_t* kind );
|
---|
| 54 | * void cTypeInfo_getNType( int32_t* num );
|
---|
| 55 | * void cTypeInfo_getTypeInfo( int32_t ith, Descriptor( nTECSInfo_sTypeInfo )* desc );
|
---|
| 56 | * [ref_desc]
|
---|
| 57 | * Descriptor( nTECSInfo_sTypeInfo ) cTypeInfo_refer_to_descriptor();
|
---|
| 58 | * Descriptor( nTECSInfo_sTypeInfo ) cTypeInfo_ref_desc() (same as above; abbreviated version);
|
---|
| 59 | *
|
---|
| 60 | * #[</PREAMBLE>]# */
|
---|
| 61 |
|
---|
| 62 | /* Put prototype declaration and/or variale definition here #_PAC_# */
|
---|
| 63 | #include <string.h>
|
---|
| 64 | #include "nTECSInfo_tTypeInfo_tecsgen.h"
|
---|
| 65 |
|
---|
| 66 | #ifndef E_OK
|
---|
| 67 | #define E_OK 0 /* success */
|
---|
| 68 | #define E_ID (-18) /* illegal ID */
|
---|
| 69 | #endif
|
---|
| 70 |
|
---|
| 71 | /* entry port function #_TEPF_# */
|
---|
| 72 | /* #[<ENTRY_PORT>]# eTypeInfo
|
---|
| 73 | * entry port: eTypeInfo
|
---|
| 74 | * signature: nTECSInfo_sTypeInfo
|
---|
| 75 | * context: task
|
---|
| 76 | * #[</ENTRY_PORT>]# */
|
---|
| 77 |
|
---|
| 78 | /* #[<ENTRY_FUNC>]# eTypeInfo_getName
|
---|
| 79 | * name: eTypeInfo_getName
|
---|
| 80 | * global_name: nTECSInfo_tTypeInfo_eTypeInfo_getName
|
---|
| 81 | * oneway: false
|
---|
| 82 | * #[</ENTRY_FUNC>]# */
|
---|
| 83 | ER
|
---|
| 84 | eTypeInfo_getName(CELLIDX idx, char_t* name, int_t max_len)
|
---|
| 85 | {
|
---|
| 86 | ER ercd = E_OK;
|
---|
| 87 | CELLCB *p_cellcb;
|
---|
| 88 | if (VALID_IDX(idx)) {
|
---|
| 89 | p_cellcb = GET_CELLCB(idx);
|
---|
| 90 | }
|
---|
| 91 | else {
|
---|
| 92 | return(E_ID);
|
---|
| 93 | } /* end if VALID_IDX(idx) */
|
---|
| 94 |
|
---|
| 95 | /* Put statements here #_TEFB_# */
|
---|
| 96 |
|
---|
| 97 | return(ercd);
|
---|
| 98 | }
|
---|
| 99 |
|
---|
| 100 | /* #[<ENTRY_FUNC>]# eTypeInfo_getNameLength
|
---|
| 101 | * name: eTypeInfo_getNameLength
|
---|
| 102 | * global_name: nTECSInfo_tTypeInfo_eTypeInfo_getNameLength
|
---|
| 103 | * oneway: false
|
---|
| 104 | * #[</ENTRY_FUNC>]# */
|
---|
| 105 | void
|
---|
| 106 | eTypeInfo_getNameLength(CELLIDX idx, uint16_t* len)
|
---|
| 107 | {
|
---|
| 108 | CELLCB *p_cellcb;
|
---|
| 109 | if (VALID_IDX(idx)) {
|
---|
| 110 | p_cellcb = GET_CELLCB(idx);
|
---|
| 111 | }
|
---|
| 112 | else {
|
---|
| 113 | /* Write error processing code here */
|
---|
| 114 | } /* end if VALID_IDX(idx) */
|
---|
| 115 |
|
---|
| 116 | /* Put statements here #_TEFB_# */
|
---|
| 117 |
|
---|
| 118 | }
|
---|
| 119 |
|
---|
| 120 | /* #[<ENTRY_FUNC>]# eTypeInfo_getSize
|
---|
| 121 | * name: eTypeInfo_getSize
|
---|
| 122 | * global_name: nTECSInfo_tTypeInfo_eTypeInfo_getSize
|
---|
| 123 | * oneway: false
|
---|
| 124 | * #[</ENTRY_FUNC>]# */
|
---|
| 125 | void
|
---|
| 126 | eTypeInfo_getSize(CELLIDX idx, uint32_t* size)
|
---|
| 127 | {
|
---|
| 128 | CELLCB *p_cellcb;
|
---|
| 129 | if (VALID_IDX(idx)) {
|
---|
| 130 | p_cellcb = GET_CELLCB(idx);
|
---|
| 131 | }
|
---|
| 132 | else {
|
---|
| 133 | /* Write error processing code here */
|
---|
| 134 | } /* end if VALID_IDX(idx) */
|
---|
| 135 |
|
---|
| 136 | /* Put statements here #_TEFB_# */
|
---|
| 137 |
|
---|
| 138 | }
|
---|
| 139 |
|
---|
| 140 | /* #[<ENTRY_FUNC>]# eTypeInfo_getKind
|
---|
| 141 | * name: eTypeInfo_getKind
|
---|
| 142 | * global_name: nTECSInfo_tTypeInfo_eTypeInfo_getKind
|
---|
| 143 | * oneway: false
|
---|
| 144 | * #[</ENTRY_FUNC>]# */
|
---|
| 145 | void
|
---|
| 146 | eTypeInfo_getKind(CELLIDX idx, int8_t* kind)
|
---|
| 147 | {
|
---|
| 148 | CELLCB *p_cellcb;
|
---|
| 149 | if (VALID_IDX(idx)) {
|
---|
| 150 | p_cellcb = GET_CELLCB(idx);
|
---|
| 151 | }
|
---|
| 152 | else {
|
---|
| 153 | /* Write error processing code here */
|
---|
| 154 | } /* end if VALID_IDX(idx) */
|
---|
| 155 |
|
---|
| 156 | /* Put statements here #_TEFB_# */
|
---|
| 157 |
|
---|
| 158 | }
|
---|
| 159 |
|
---|
| 160 | /* #[<ENTRY_FUNC>]# eTypeInfo_getNType
|
---|
| 161 | * name: eTypeInfo_getNType
|
---|
| 162 | * global_name: nTECSInfo_tTypeInfo_eTypeInfo_getNType
|
---|
| 163 | * oneway: false
|
---|
| 164 | * #[</ENTRY_FUNC>]# */
|
---|
| 165 | void
|
---|
| 166 | eTypeInfo_getNType(CELLIDX idx, int32_t* num)
|
---|
| 167 | {
|
---|
| 168 | CELLCB *p_cellcb;
|
---|
| 169 | if (VALID_IDX(idx)) {
|
---|
| 170 | p_cellcb = GET_CELLCB(idx);
|
---|
| 171 | }
|
---|
| 172 | else {
|
---|
| 173 | /* Write error processing code here */
|
---|
| 174 | } /* end if VALID_IDX(idx) */
|
---|
| 175 |
|
---|
| 176 | /* Put statements here #_TEFB_# */
|
---|
| 177 |
|
---|
| 178 | }
|
---|
| 179 |
|
---|
| 180 | /* #[<ENTRY_FUNC>]# eTypeInfo_getTypeInfo
|
---|
| 181 | * name: eTypeInfo_getTypeInfo
|
---|
| 182 | * global_name: nTECSInfo_tTypeInfo_eTypeInfo_getTypeInfo
|
---|
| 183 | * oneway: false
|
---|
| 184 | * #[</ENTRY_FUNC>]# */
|
---|
| 185 | void
|
---|
| 186 | eTypeInfo_getTypeInfo(CELLIDX idx, int32_t ith, Descriptor( nTECSInfo_sTypeInfo )* desc)
|
---|
| 187 | {
|
---|
| 188 | CELLCB *p_cellcb;
|
---|
| 189 | if (VALID_IDX(idx)) {
|
---|
| 190 | p_cellcb = GET_CELLCB(idx);
|
---|
| 191 | }
|
---|
| 192 | else {
|
---|
| 193 | /* Write error processing code here */
|
---|
| 194 | } /* end if VALID_IDX(idx) */
|
---|
| 195 |
|
---|
| 196 | /* Put statements here #_TEFB_# */
|
---|
| 197 |
|
---|
| 198 | }
|
---|
| 199 |
|
---|
| 200 | /* #[<POSTAMBLE>]#
|
---|
| 201 | * これより下に非受け口関数を書きます
|
---|
| 202 | * #[</POSTAMBLE>]#*/
|
---|