/* * Simple な Sample * * +-------------+ +-------------+ +-------------+ * | | | | | | * | tTask | sTaskBody | tSimple | sSample | tSample | * | Task |-----------|> Simple |==========|> Sample | * | |cTask eBody| |cCall eEnt| | * | |Body | | | | * +-------------+ +-------------+ +-------------+ * * * SimpleSample/SimpleSample.cdl を参照 * * この例では Trace プラグインが指定される。以下の※を参照 * * Trace プラグインのため tSysLog, tKernel を用いる */ // cygwin 用の簡易な型定義 import( ); // TECS 対応 TOPPERS/ASP ならば import( ); に相当する // tSysLog の定義 (Trace の出力先) import( ); // セル SysLog (Trace の出力先) cell tSysLog SysLog { }; // セル Kernel (Trace の時刻を得る) cell tKernel Kernel { }; // シグニチャ sSample signature sSample { ER sayHello( [in]int32_t times ); ER howAreYou( [out,string(len)]char_t *buf, [in]int32_t len ); }; // セルタイプ tSample celltype tSample { entry sSample eEnt; }; // セルタイプ tSimple celltype tSimple { call sSample cCall; entry sTaskBody eBody; }; // セル Sample cell tSample Sample { }; // セル Simple cell tSimple Simple { [through(TracePlugin,"")] // <<< ※ この行を挿入 cCall = Sample.eEnt; }; // セル Task cell tTask Task { cBody = Simple.eBody; priority = 11; stackSize = 1024; taskAttribute = C_EXP( "TA_ACT" ); };