Line | |
---|
1 | /*
|
---|
2 | * Simple な Sample
|
---|
3 | *
|
---|
4 | * +-------------+ +-------------+ +-------------+
|
---|
5 | * | | | | | |
|
---|
6 | * | tTask | sTaskBody | tSimple | sSample | tSample |
|
---|
7 | * | Task |-----------|> Simple |==========|> Sample |
|
---|
8 | * | |cTask eBody| |cCall eEnt| |
|
---|
9 | * | |Body | | | |
|
---|
10 | * +-------------+ +-------------+ +-------------+
|
---|
11 | *
|
---|
12 | * * SimpleSample/SimpleSample.cdl を参照
|
---|
13 | * * この例では Trace プラグインが指定される。以下の※を参照
|
---|
14 | * * Trace プラグインのため tSysLog, tKernel を用いる
|
---|
15 | */
|
---|
16 |
|
---|
17 | // cygwin 用の簡易な型定義
|
---|
18 | import( <cygwin_kernel.cdl> );
|
---|
19 | // TECS 対応 TOPPERS/ASP ならば import( <kernel.cdl> ); に相当する
|
---|
20 |
|
---|
21 | // tSysLog の定義 (Trace の出力先)
|
---|
22 | import( <tSysLog.cdl> );
|
---|
23 |
|
---|
24 | // セル SysLog (Trace の出力先)
|
---|
25 | cell tSysLog SysLog {
|
---|
26 | };
|
---|
27 | // セル Kernel (Trace の時刻を得る)
|
---|
28 | cell tKernel Kernel {
|
---|
29 | };
|
---|
30 |
|
---|
31 | // シグニチャ sSample
|
---|
32 | signature sSample {
|
---|
33 | ER sayHello( [in]int32_t times );
|
---|
34 | ER howAreYou( [out,string(len)]char_t *buf, [in]int32_t len );
|
---|
35 | };
|
---|
36 |
|
---|
37 | // セルタイプ tSample
|
---|
38 | celltype tSample {
|
---|
39 | entry sSample eEnt;
|
---|
40 | };
|
---|
41 |
|
---|
42 | // セルタイプ tSimple
|
---|
43 | celltype tSimple {
|
---|
44 | call sSample cCall;
|
---|
45 | entry sTaskBody eBody;
|
---|
46 | };
|
---|
47 |
|
---|
48 | // セル Sample
|
---|
49 | cell tSample Sample {
|
---|
50 | };
|
---|
51 |
|
---|
52 | // セル Simple
|
---|
53 | cell tSimple Simple {
|
---|
54 | [through(TracePlugin,"")] // <<< ※ この行を挿入
|
---|
55 | cCall = Sample.eEnt;
|
---|
56 | };
|
---|
57 |
|
---|
58 | // セル Task
|
---|
59 | cell tTask Task {
|
---|
60 | cBody = Simple.eBody;
|
---|
61 | priority = 11;
|
---|
62 | stackSize = 1024;
|
---|
63 | taskAttribute = C_EXP( "TA_ACT" );
|
---|
64 | };
|
---|
65 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.