- Timestamp:
- Jun 24, 2012, 7:42:09 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
SimpleSample/trunk/SimpleSampleTransparentRPC/src/tSample.c
r30 r34 1 /*2 * このファイルは tecsgen によりテンプレートとして自動生成されました3 * このファイルを編集して使用することが意図されていますが4 * tecsgen の再実行により上書きされてしまうため、通常5 * gen/tSample_template.c => src/tSample.c6 * のように名前, フォルダを変更してから修正します7 */8 1 /* #[<PREAMBLE>]# 9 2 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください 10 3 * tecsmerge によるマージに使用されます 11 4 * 5 * このファイルは tecsgen によりテンプレートとして自動生成されました 6 * このファイルを編集して使用することが意図されていますが 7 * tecsgen の再実行により上書きされてしまうため、通常 8 * gen/tSimpleServer_template.c => src/tSimpleServer.c 9 * のように名前, フォルダを変更してから修正します 10 * 12 11 * #[</PREAMBLE>]# */ 13 12 14 /* プロトタイプ宣言や変数の定義をここに書きます #_PAC_# */ 13 #include <stdio.h> 14 #include <string.h> 15 15 #include "tSample_tecsgen.h" 16 #include <stdio.h>17 16 18 17 #ifndef E_OK 19 #define E_OK 0 /* success*/20 #define E_ID (-18) /* illegal ID*/18 #define E_OK 0 /* 正常終了 */ 19 #define E_ID (-18) /* 不正ID番号 */ 21 20 #endif 21 22 22 23 23 /* 受け口関数 #_TEPF_# */ … … 26 26 * signature: sSample 27 27 * context: task 28 * params: 28 29 * #[</ENTRY_PORT>]# */ 29 30 … … 31 32 * name: eEnt_sayHello 32 33 * global_name: tSample_eEnt_sayHello 33 * oneway: false34 * #[ </ENTRY_FUNC>]# */34 * oneway: 35 * #[/ENTRY_FUNC>]# */ 35 36 ER 36 37 eEnt_sayHello(CELLIDX idx, int32_t times) … … 43 44 else { 44 45 return(E_ID); 45 } /* end if VALID_IDX(idx) */46 } 46 47 47 /* ここに処理本体を記述します #_TEFB_# */ 48 /* ここに処理本体を記述します */ 49 printf( "Sample: " ); 48 50 while( times-- > 0 ) 49 printf( " Hello!" );50 p uts( "" );51 printf( "hello " ); 52 printf( "\n" ); 51 53 52 54 return(ercd); … … 56 58 * name: eEnt_howAreYou 57 59 * global_name: tSample_eEnt_howAreYou 58 * oneway: false59 * #[ </ENTRY_FUNC>]# */60 * oneway: 61 * #[/ENTRY_FUNC>]# */ 60 62 ER 61 63 eEnt_howAreYou(CELLIDX idx, char_t* buf, int32_t len) … … 68 70 else { 69 71 return(E_ID); 70 } /* end if VALID_IDX(idx) */72 } 71 73 72 /* ここに処理本体を記述します #_TEFB_#*/73 strncpy( buf, " I'm fine thank you.", len );74 /* ここに処理本体を記述します */ 75 strncpy( buf, "Sample: I'm fine!", len ); 74 76 75 77 return(ercd); 76 78 } 77 79 78 /* #[<POSTAMBLE>]# 79 * これより下に非受け口関数を書きます 80 * #[</POSTAMBLE>]#*/ 80
Note:
See TracChangeset
for help on using the changeset viewer.