構造体 toppers::itron::jsp::cyclic_policy

周期ハンドラのためのポリシークラス [詳細]

#include "toppers/itron/jsp/cyclic.hpp"

toppers::itron::jsp::cyclic_policyに対する継承グラフ

Inheritance graph
[凡例]
toppers::itron::jsp::cyclic_policyのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

Static Public メソッド

static void generate_assertions (const kernel_cfg &cfg, std::ostream &ostr)
 パラメータチェックコード の生成
static bool check (const itron::kernel_chk &chk, const s_record &srec, const nm_symbol &syms)
 リンク後のパラメータチェック

Static Public 変数

static const char name_ [] = "cyclic"
static const char symbol_ [] = "cyc"
static const char *const apis_ [] = { "CRE_CYC", 0 }
static const char *const params_ [] = { "$cycid { #cycatr exinf cychdr cyctim cycphs }", 0 }
static const char init_format_ [] = "\t{ @#cycatr, @exinf, (FP)(@cychdr), @cyctim, @cycphs }"

説明

周期ハンドラのためのポリシークラス

このクラスで実現される静的API

  CRE_CYC( ID cycid, { ATR cycatr, VP_INT exinf, FP cychdr, RELTIM cyctim, RELTIM cycphs } );

cyclic.hpp79 行で定義されています。


関数

bool toppers::itron::jsp::cyclic_policy::check const itron::kernel_chk chk,
const s_record srec,
const nm_symbol syms
[static]
 

リンク後のパラメータチェック

引数:
chk チェック情報
srec ロードモジュールのダンプ情報
syms シンボルテーブル

toppers::itron::kernel_object_policy_baseを再定義しています。

cyclic.cpp80 行で定義されています。

参照先 toppers::nm_symbol::entry::addresstoppers::nm_symbol::find()toppers::itron::kernel_chk::get()toppers::nm_symbol::entry::type.

00081       {
00082         nm_symbol::entry entry = syms.find( "_kernel_cycinib_table" );
00083         if ( entry.type < 0 )
00084         {
00085           return false;
00086         }
00087         long tnum_cycid = chk.get( kernel_chk::countof_CYCID );
00088         long sizeof_FP = chk.get( kernel_chk::sizeof_FP );
00089         long sizeof_CYCINIB = chk.get( kernel_chk::sizeof_CYCINIB );
00090         long offsetof_CYCINIB_cychdr = chk.get( kernel_chk::offsetof_CYCINIB_cychdr );
00091 
00092         for ( int i = 0; i < tnum_cycid; i++ )
00093         {
00094           unsigned long value = 0;
00095           for ( int j = 0; j < sizeof_FP; j++ )
00096           {
00097             int t = srec[entry.address + sizeof_CYCINIB*i + offsetof_CYCINIB_cychdr + j];
00098             if ( t < 0 )
00099             {
00100               return false;
00101             }
00102             value = ( value << 8 ) | ( t & 0xff );
00103           }
00104           if ( value == 0 )
00105           {
00106             error( _( "start address of cyclic %1% handler is null" ) % ( i + 1 ) );
00107           }
00108         }
00109         return true;
00110       }

関数の呼び出しグラフ:

void toppers::itron::jsp::cyclic_policy::generate_assertions const kernel_cfg cfg,
std::ostream &  ostr
[static]
 

パラメータチェックコード の生成

引数:
cfg kernel_cfg.c 生成情報
ostr 出力ストリーム

toppers::itron::kernel_object_policy_baseを再定義しています。

cyclic.cpp58 行で定義されています。

参照先 toppers::kernel_cfg::get_inib_array()name_.

00059       {
00060         const kernel_cfg::inib_array* pinibs = cfg.get_inib_array( name_ );
00061         static const char pattern[] = 
00062           "#if ((@#cycatr) & (TA_HLNG|TA_ASM)) != TA_HLNG\n"
00063           "#error \"`cycatr\' of cyclic handler `@name\' is not TA_HLNG\"\n"
00064           "#endif\n"
00065           "__CFG_ASSERT(((@#cycatr) & (TA_HLNG|TA_ASM)) == TA_HLNG);\n"
00066           "#if ((@#cycatr) & 0x04u) != 0x00u\n"
00067           "#error \"`cycatr\' of cyclic handler `@name\' is specified TA_PHS\"\n"
00068           "#endif\n"
00069           "__CFG_ASSERT(((@#cycatr) & 0x04u) == 0x00u);\n"
00070           "\n";
00071         std::transform( pinibs->begin(), pinibs->end(), std::ostream_iterator<std::string>( ostr ), generator( pattern ) );
00072       }

関数の呼び出しグラフ:


この構造体の説明は次のファイルから生成されました:
Copyright © 2006 by TAKAGI Nobuhisa.
このページは Wed Apr 12 16:32:07 2006 に Doxygen によって生成されました。