source: SimpleSample/trunk/SimpleSampleOpaqueRPC/SimpleSample.cdl@ 30

Last change on this file since 30 was 30, checked in by okuma-top, 11 years ago

TECS Simple Sample

File size: 2.1 KB
Line 
1/*
2 * Simple な Sample (OpaqueRPC 版)
3 * sSocketClientOpener
4 * +---------------------------------------+
5 * |cOpener |eOpener
6 * +-------------+ +-------------+ +-------------+ | +-------------+
7 * | | | | | | V | |
8 * | tTask | sTaskBody | tTaskMain | sTaskBody | tSimple | sSample | tSample |
9 * | Task |-----------| TaskMain |-----------|> Simple |==========|> Sample |
10 * | |cTask eBody| |cBody eBody| |cCall eEnt| |
11 * | |Body | | | | | |
12 * +-------------+ +-------------+ +-------------+ +-------------+
13 */
14
15
16// cygwin 用の簡易な型定義
17import( <cygwin_kernel.cdl> );
18 // TECS 対応 TOPPERS/ASP ならば import( <kernel.cdl> ); でよい
19
20import( <tSysLog.cdl> );
21import( <rpc.cdl> );
22import( <tSocketChannel.cdl> );
23
24signature sSample {
25 ER sayHello( [in]int32_t times );
26 ER howAreYou( [out,string(len)]char_t *buf, [in]int32_t len );
27};
28
29celltype tSample {
30 entry sSample eEnt;
31};
32
33[singleton,active]
34celltype tSimple {
35 call sSample cCall;
36 entry sTaskBody eBody;
37};
38
39celltype tTaskMain {
40 entry sTaskBody eBody;
41 call sTaskBody cBody;
42 call sSocketClientOpener cOpener;
43};
44
45[linkunit]
46region rSample {
47 cell tSysLog SysLog {
48 };
49 cell tKernel Kernel {
50 };
51 cell tSample Sample {
52 };
53};
54
55[linkunit,
56 to_through( rSample, OpaqueRPCPlugin,
57 "PPAllocatorSize=1024,"
58 "clientChannelCell= 'ClientChannel', " // クライアント側チャンネルセル名
59)]
60region rSimple {
61 cell tSysLog SysLog {
62 };
63 cell tSimple Simple {
64 cCall = rSample::Sample.eEnt;
65 };
66 cell tTaskMain TaskMain {
67 cBody = Simple.eBody;
68 cOpener = ClientChannel.eOpener;
69 };
70
71 cell tTask Task {
72 cBody = TaskMain.eBody;
73 priority = 11;
74 stackSize = 1024;
75 taskAttribute = C_EXP( "TA_ACT" );
76 };
77};
Note: See TracBrowser for help on using the repository browser.