source: SimpleSample/trunk/SimpleSampleTrace/src/tSimple.c@ 34

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

totally brush up

  • Property svn:executable set to *
File size: 1.3 KB
Line 
1/* #[<PREAMBLE>]#
2 * #[<...>]# から #[</...>]# で囲まれたコメントは編集しないでください
3 * tecsmerge によるマージに使用されます
4 *
5 * 呼び口関数 #_TCPF_#
6 * call port : cCall signature: sSample context: task
7 * ER cCall_sayHello( int32_t times );
8 * ER cCall_howAreYou( char_t* buf, int32_t len );
9 *
10 * #[</PREAMBLE>]# */
11
12#include <stdio.h>
13#include "tSimple_tecsgen.h"
14
15#ifndef E_OK
16#define E_OK 0 /* 正常終了 */
17#define E_ID (-18) /* 不正ID番号 */
18#endif
19
20/* #[<ENTRY_PORT>]# eBody
21 * entry port: eBody
22 * signature: sTaskBody
23 * context: task
24 * #[</ENTRY_PORT>]# */
25
26/* #[<ENTRY_FUNC>]# eBody_main
27 * name: eBody_main
28 * global_name: tSimple_eBody_main
29 * oneway: false
30 * #[</ENTRY_FUNC>]# */
31void
32eBody_main(CELLIDX idx)
33{
34 CELLCB *p_cellcb;
35 char buf[256];
36 if (VALID_IDX(idx)) {
37 p_cellcb = GET_CELLCB(idx);
38 }
39 else {
40 /* エラー処理コードをここに記述します */
41 } /* end if VALID_IDX(idx) */
42
43#define N_HELLO 3
44 printf( "Simple: Say hello %d times.\n", N_HELLO );
45 cCall_sayHello( N_HELLO ); /* 呼び口 cCall の sayHello を呼び出す */
46
47 printf( "Simple: How are you?\n" );
48 cCall_howAreYou( buf, sizeof buf ); /* 呼び口 cCall の howAreYou を呼び出す */
49 puts( buf );
50}
51
52/* #[<POSTAMBLE>]#
53 * これより下に非受け口関数を書きます
54 * #[</POSTAMBLE>]#*/
Note: See TracBrowser for help on using the repository browser.