クラス toppers::itron::jsp::kernel_chk"kernel_chk.c"出力クラス
[詳細]
#include "toppers/itron/jsp/kernel_chk.hpp"
toppers::itron::jsp::kernel_chkに対する継承グラフ
[凡例]toppers::itron::jsp::kernel_chkのコラボレーション図
[凡例]すべてのメンバ一覧
|
Public 型 |
enum | {
magic_number,
TKERNEL_PRID,
sizeof_ID,
sizeof_UINT,
sizeof_SIZE,
sizeof_ATR,
sizeof_PRI,
sizeof_RELTIM,
sizeof_VP,
sizeof_VP_INT,
sizeof_FP,
countof_TSKID,
sizeof_TINIB,
offsetof_TINIB_tskatr,
offsetof_TINIB_exinf,
offsetof_TINIB_task,
offsetof_TINIB_ipriority,
offsetof_TINIB_stksz,
offsetof_TINIB_stk,
offsetof_TINIB_texatr,
offsetof_TINIB_texrtn,
countof_SEMID,
sizeof_SEMINIB,
offsetof_SEMINIB_sematr,
offsetof_SEMINIB_isemcnt,
offsetof_SEMINIB_maxsem,
countof_FLGID,
sizeof_FLGPTN,
sizeof_FLGINIB,
offsetof_FLGINIB_flgatr,
offsetof_FLGINIB_iflgptn,
countof_DTQID,
sizeof_DTQINIB,
offsetof_DTQINIB_dtqatr,
offsetof_DTQINIB_dtqcnt,
offsetof_DTQINIB_dtq,
countof_MBXID,
sizeof_MBXINIB,
offsetof_MBXINIB_mbxatr,
offsetof_MBXINIB_maxmpri,
countof_MPFID,
sizeof_MPFINIB,
offsetof_MPFINIB_mpfatr,
offsetof_MPFINIB_blksz,
offsetof_MPFINIB_mpf,
offsetof_MPFINIB_limit,
countof_CYCID,
sizeof_CYCINIB,
offsetof_CYCINIB_cycatr,
offsetof_CYCINIB_exinf,
offsetof_CYCINIB_cychdr,
offsetof_CYCINIB_cyctim,
offsetof_CYCINIB_cycphs,
countof_INHNO,
sizeof_INHNO,
sizeof_INHINIB,
offsetof_INHINIB_inhno,
offsetof_INHINIB_inhatr,
offsetof_INHINIB_inthdr,
countof_EXCNO,
sizeof_EXCNO,
sizeof_EXCINIB,
offsetof_EXCINIB_excno,
offsetof_EXCINIB_excatr,
offsetof_EXCINIB_exchdr,
table_size
} |
Public メソッド |
| kernel_chk (const std::string &file) |
virtual | ~kernel_chk () |
Protected メソッド |
virtual void | do_body (std::ostream &ostr) const |
| ファイル出力内容の主要部分の規定
|
virtual bool | do_load (const s_record &srec, unsigned long address) |
| load 関数の実体
|
説明
"kernel_chk.c"出力クラス
kernel_chk.hpp の 57 行で定義されています。
関数
void toppers::itron::jsp::kernel_chk::do_body |
( |
std::ostream & |
ostr |
) |
const [protected, virtual] |
|
|
ファイル出力内容の主要部分の規定
- 引数:
-
toppers::cfg_baseを実装しています。
kernel_chk.cpp の 54 行で定義されています。
参照先 toppers::itron::kernel_chk::countof(). 00055 {
00056 ostr << "#include \"kernel_cfg.h\"\n"
00057 "#include <stddef.h>\n"
00058 "\n";
00059
00060 ostr << "const UW kernel_chk[] = {\n";
00061
00062 std::string table[table_size];
00063
00064 table[magic_number] = "0x12345678";
00065 table[TKERNEL_PRID] = boost::lexical_cast<std::string>( (int)kernel_policy::prid_ ) + "\t/* TKERNEL_PRID */";
00066
00067 table[sizeof_ID] = "sizeof(ID)";
00068 table[sizeof_UINT] = "sizeof(UINT)";
00069 table[sizeof_SIZE] = "sizeof(SIZE)";
00070 table[sizeof_ATR] = "sizeof(ATR)";
00071 table[sizeof_PRI] = "sizeof(PRI)";
00072 table[sizeof_RELTIM] = "sizeof(RELTIM)";
00073 table[sizeof_VP] = "sizeof(VP)";
00074 table[sizeof_VP_INT] = "sizeof(VP_INT)";
00075 table[sizeof_FP] = "sizeof(FP)";
00076
00077 table[countof_TSKID] = boost::lexical_cast<std::string>( countof( "task" ) ) + "\t/* TNUM_TSKID */";
00078 table[sizeof_TINIB] = "sizeof(TINIB)";
00079 table[offsetof_TINIB_tskatr] = "offsetof(TINIB, tskatr)";
00080 table[offsetof_TINIB_exinf] = "offsetof(TINIB, exinf)";
00081 table[offsetof_TINIB_task] = "offsetof(TINIB, task)";
00082 table[offsetof_TINIB_ipriority] = "offsetof(TINIB, ipriority)";
00083 table[offsetof_TINIB_stksz] = "offsetof(TINIB, stksz)";
00084 table[offsetof_TINIB_stk] = "offsetof(TINIB, stk)";
00085 table[offsetof_TINIB_texatr] = "offsetof(TINIB, texatr)";
00086 table[offsetof_TINIB_texrtn] = "offsetof(TINIB, texrtn)";
00087
00088 table[countof_SEMID] = boost::lexical_cast<std::string>( countof( "semaphore" ) ) + "\t/* TNUM_SEMID */";
00089 table[sizeof_SEMINIB] = "sizeof(SEMINIB)";
00090 table[offsetof_SEMINIB_sematr] = "offsetof(SEMINIB, sematr)";
00091 table[offsetof_SEMINIB_isemcnt] = "offsetof(SEMINIB, isemcnt)";
00092 table[offsetof_SEMINIB_maxsem] = "offsetof(SEMINIB, maxsem)";
00093
00094 table[countof_FLGID] = boost::lexical_cast<std::string>( countof( "eventflag" ) ) + "\t/* TNUM_FLGID */";
00095 table[sizeof_FLGPTN] = "sizeof(FLGPTN)";
00096 table[sizeof_FLGINIB] = "sizeof(FLGINIB)";
00097 table[offsetof_FLGINIB_flgatr] = "offsetof(FLGINIB, flgatr)";
00098 table[offsetof_FLGINIB_iflgptn] = "offsetof(FLGINIB, iflgptn)";
00099
00100 table[countof_DTQID] = boost::lexical_cast<std::string>( countof( "dataqueue" ) ) + "\t/* TNUM_DTQID */";
00101 table[sizeof_DTQINIB] = "sizeof(DTQINIB)";
00102 table[offsetof_DTQINIB_dtqatr] = "offsetof(DTQINIB, dtqatr)";
00103 table[offsetof_DTQINIB_dtqcnt] = "offsetof(DTQINIB, dtqcnt)";
00104 table[offsetof_DTQINIB_dtq] = "offsetof(DTQINIB, dtq)";
00105
00106 table[countof_MBXID] = boost::lexical_cast<std::string>( countof( "mailbox" ) ) + "\t/* TNUM_MBXID */";
00107 table[sizeof_MBXINIB] = "sizeof(MBXINIB)";
00108 table[offsetof_MBXINIB_mbxatr] = "offsetof(MBXINIB, mbxatr)";
00109 table[offsetof_MBXINIB_maxmpri] = "offsetof(MBXINIB, maxmpri)";
00110
00111 table[countof_MPFID] = boost::lexical_cast<std::string>( countof( "mempfix" ) ) + "\t/* TNUM_MPFID */";
00112 table[sizeof_MPFINIB] = "sizeof(MPFINIB)";
00113 table[offsetof_MPFINIB_mpfatr] = "offsetof(MPFINIB, mpfatr)";
00114 table[offsetof_MPFINIB_blksz] = "offsetof(MPFINIB, blksz)";
00115 table[offsetof_MPFINIB_mpf] = "offsetof(MPFINIB, mpf)";
00116 table[offsetof_MPFINIB_limit] = "offsetof(MPFINIB, limit)";
00117
00118 table[countof_CYCID] = boost::lexical_cast<std::string>( countof( "cyclic" ) ) + "\t/* TNUM_CYCID */";
00119 table[sizeof_CYCINIB] = "sizeof(CYCINIB)";
00120 table[offsetof_CYCINIB_cycatr] = "offsetof(CYCINIB, cycatr)";
00121 table[offsetof_CYCINIB_exinf] = "offsetof(CYCINIB, exinf)";
00122 table[offsetof_CYCINIB_cychdr] = "offsetof(CYCINIB, cychdr)";
00123 table[offsetof_CYCINIB_cyctim] = "offsetof(CYCINIB, cyctim)";
00124 table[offsetof_CYCINIB_cycphs] = "offsetof(CYCINIB, cycphs)";
00125
00126 table[countof_INHNO] = boost::lexical_cast<std::string>( countof( "interrupt" ) ) + "\t/* TNUM_INHNO */";
00127 table[sizeof_INHNO] = "sizeof(INHNO)";
00128 table[sizeof_INHINIB] = "sizeof(INHINIB)";
00129 table[offsetof_INHINIB_inhno] = "offsetof(INHINIB, inhno)";
00130 table[offsetof_INHINIB_inhatr] = "offsetof(INHINIB, inhatr)";
00131 table[offsetof_INHINIB_inthdr] = "offsetof(INHINIB, inthdr)";
00132
00133 table[countof_EXCNO] = boost::lexical_cast<std::string>( countof( "exception" ) ) + "\t/* TNUM_EXCNO */";
00134 table[sizeof_EXCNO] = "sizeof(EXCNO)";
00135 table[sizeof_EXCINIB] = "sizeof(EXCINIB)";
00136 table[offsetof_EXCINIB_excno] = "offsetof(EXCINIB, excno)";
00137 table[offsetof_EXCINIB_excatr] = "offsetof(EXCINIB, excatr)";
00138 table[offsetof_EXCINIB_exchdr] = "offsetof(EXCINIB, exchdr)";
00139
00140 for ( int i = 0; i < table_size; i++ )
00141 {
00142 ostr << '\t' << table[i] << ",\n";
00143 }
00144
00145 ostr << "};\n";
00146 }
関数の呼び出しグラフ:
|
bool toppers::itron::jsp::kernel_chk::do_load |
( |
const s_record & |
srec, |
|
|
unsigned long |
address |
|
) |
[protected, virtual] |
|
|
load 関数の実体
- 引数:
-
| srec | "kernel_chk.srec"の内容 |
| address | 読み込み開始番地 |
- 戻り値:
- 読み込みに成功した場合はtrueを返す
toppers::itron::kernel_chkを実装しています。
kernel_chk.cpp の 148 行で定義されています。
参照先 toppers::itron::kernel_chk::set(). 00149 {
00150 bool result = true;
00151 set( table_size-1, 0 );
00152
00153 for ( int i = 0; i < table_size; i++ )
00154 {
00155 unsigned long value = 0;
00156 for ( int j = 0; j < 4; j++ )
00157 {
00158 value = value << 8 | srec[address + i*4 + j];
00159 }
00160 set( i, value );
00161 }
00162
00163 switch ( get( magic_number ) )
00164 {
00165 case 0x12345678:
00166 byteorder( big_endian );
00167 break;
00168 case 0x78563412:
00169 byteorder( little_endian );
00170 for ( int i = 0; i < table_size; i++ )
00171 {
00172 unsigned long value = 0;
00173 unsigned long t = get( i );
00174 for ( int j = 0; j < 4; j++ )
00175 {
00176 value = value << 8 | ( t & 0xff );
00177 t >>= 8;
00178 }
00179 set( i, value );
00180 }
00181 break;
00182 default:
00183 result = false;
00184 break;
00185 }
00186 return result;
00187 }
関数の呼び出しグラフ:
|
このクラスの説明は次のファイルから生成されました:
Copyright © 2006 by TAKAGI Nobuhisa.
このページは Wed Apr 12 16:32:08 2006 に Doxygen によって生成されました。
|
|