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