Last change
on this file since 361 was 34, checked in by okuma-top, 12 years ago |
totally brush up
|
-
Property svn:executable
set to
*
|
File size:
1.6 KB
|
Line | |
---|
1 | /* #[<PREAMBLE>]#
|
---|
2 | * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
|
---|
3 | * tecsmerge によるマージに使用されます
|
---|
4 | *
|
---|
5 | * このファイルは tecsgen によりテンプレートとして自動生成されました
|
---|
6 | * このファイルを編集して使用することが意図されていますが
|
---|
7 | * tecsgen の再実行により上書きされてしまうため、通常
|
---|
8 | * gen/tSimpleServer_template.c => src/tSimpleServer.c
|
---|
9 | * のように名前, フォルダを変更してから修正します
|
---|
10 | *
|
---|
11 | * #[</PREAMBLE>]# */
|
---|
12 |
|
---|
13 | #include <stdio.h>
|
---|
14 | #include <string.h>
|
---|
15 | #include "tSample_tecsgen.h"
|
---|
16 |
|
---|
17 | #ifndef E_OK
|
---|
18 | #define E_OK 0 /* 正常終了 */
|
---|
19 | #define E_ID (-18) /* 不正ID番号 */
|
---|
20 | #endif
|
---|
21 |
|
---|
22 |
|
---|
23 | /* 受け口関数 #_TEPF_# */
|
---|
24 | /* #[<ENTRY_PORT>]# eEnt
|
---|
25 | * entry port: eEnt
|
---|
26 | * signature: sSample
|
---|
27 | * context: task
|
---|
28 | * params:
|
---|
29 | * #[</ENTRY_PORT>]# */
|
---|
30 |
|
---|
31 | /* #[<ENTRY_FUNC>]# eEnt_sayHello
|
---|
32 | * name: eEnt_sayHello
|
---|
33 | * global_name: tSample_eEnt_sayHello
|
---|
34 | * oneway:
|
---|
35 | * #[/ENTRY_FUNC>]# */
|
---|
36 | ER
|
---|
37 | eEnt_sayHello(CELLIDX idx, int32_t times)
|
---|
38 | {
|
---|
39 | ER ercd = E_OK;
|
---|
40 | CELLCB *p_cellcb;
|
---|
41 | if (VALID_IDX(idx)) {
|
---|
42 | p_cellcb = GET_CELLCB(idx);
|
---|
43 | }
|
---|
44 | else {
|
---|
45 | return(E_ID);
|
---|
46 | }
|
---|
47 |
|
---|
48 | /* ここに処理本体を記述します */
|
---|
49 | printf( "Sample: " );
|
---|
50 | while( times-- > 0 )
|
---|
51 | printf( "hello " );
|
---|
52 | printf( "\n" );
|
---|
53 |
|
---|
54 | return(ercd);
|
---|
55 | }
|
---|
56 |
|
---|
57 | /* #[<ENTRY_FUNC>]# eEnt_howAreYou
|
---|
58 | * name: eEnt_howAreYou
|
---|
59 | * global_name: tSample_eEnt_howAreYou
|
---|
60 | * oneway:
|
---|
61 | * #[/ENTRY_FUNC>]# */
|
---|
62 | ER
|
---|
63 | eEnt_howAreYou(CELLIDX idx, char_t* buf, int32_t len)
|
---|
64 | {
|
---|
65 | ER ercd = E_OK;
|
---|
66 | CELLCB *p_cellcb;
|
---|
67 | if (VALID_IDX(idx)) {
|
---|
68 | p_cellcb = GET_CELLCB(idx);
|
---|
69 | }
|
---|
70 | else {
|
---|
71 | return(E_ID);
|
---|
72 | }
|
---|
73 |
|
---|
74 | /* ここに処理本体を記述します */
|
---|
75 | strncpy( buf, "Sample: I'm fine!", len );
|
---|
76 |
|
---|
77 | return(ercd);
|
---|
78 | }
|
---|
79 |
|
---|
80 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.