annotate example/README @ 339:be8f785a82e9

change api setSceneDate
author e065725@yutaka.st.ie.u-ryukyu.ac.jp
date Sat, 27 Jun 2009 20:42:51 +0900
parents 60a4449d6575
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 /**
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 * 現在開発中なので、仕様やここに書いてる事も
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3 * すごい頻度で変わる可能性があります。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4 * なので、定期的に cvs update をしたり
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
5 * Game_project/Cerium/TaskManager/Changelog を見たり
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
6 * http://www.cr.ie.u-ryukyu.ac.jp/~game/pukiwiki/ を見てください。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
7 */
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
8
116
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 115
diff changeset
9
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10 Cerium の例題っぽいのを置いてあります。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 ここにある書き方を参考に他にいろいろ作ってみてください。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
12
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
13 例題の概要は、各ディレクトリの README に書いてあります。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
14 使用方法や実行例も同じです。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
16 -----------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
17 最近の更新
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
18 -----------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
19
115
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
20 2008/11/13
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
21
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
22 Makefile.macosx において、
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
23 `sdl-config --libs` を追加してあります。
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
24 例題の中で SDL を使うことはなくても書かれているのは、
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
25 ライブラリ側に main() を置いたためです。
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
26
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
27 http://d.hatena.ne.jp/hiratara/20080719/1216481600
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
28
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
29 上を見てもらえばわかると思いますが、
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
30 SDL では、ユーザが描いた main を SDL_main に置き換え、
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
31 libSDL の中の main() を起動時のエントリに使ってます。
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
32 なので、TaskManager/kernel/main.cc では #include <SDL.h> とか
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
33 やってますが、そのせいで、ユーザ側でも sdl-config --libs をしないと
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
34 「main() がないぞ」ってなリンカエラーが出るわけです。
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
35 これは、MacOSX だけの問題で、Linux や PS3 上では問題ないので
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
36 Makefile.macosx だけに記述しています。
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
37
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
38 なので、MacOSX 上で例題を動かす場合、一瞬 SDL のウインドウが
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
39 起動する系の動作をすると思いますが、無視してください。それ以外は動きますので。
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
40
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
41 いずれはちゃんと切り分けたいところですが、今のところこんな感じで。
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
42
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
43
44e3bf914155 fix Makefile
gongo@charles.cr.ie.u-ryukyu.ac.jp
parents: 109
diff changeset
44
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
45 2008/11/01
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
46
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
47 main 関数はライブラリに閉じました。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
48 というわけで、ユーザ側の main() は
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
49
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
50 int cerium_main(int argc, char *argv[]);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
51
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
52 となります。引数は通常の main と同じものが渡されます
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
53 cerium_main で ( < 0 ) を返す (例えば -1) と
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
54 プログラムが終了するようにしています。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
55 cerium_main を正常に抜けると、ライブラリ側で
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
56 main loop が回り、全タスク終了と共にプログラムが終了します。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
57
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
58 あと、Cerium の標準オプションとして
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
59
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
60 -chelp Print this message
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
61 -cpu Number of CPU (default 1)
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
62
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
63 を実装しました。近々増やしていく予定です。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
64
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
65 TaskManager へのアクセスですが、今までは
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
66
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
67 TaskManager *manager = new TaskManager(CPU_NUM);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
68
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
69 とかやってたはずですが、現在はライブラリ側で生成しているので、
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
70 TaskManager.h を include すると、中で
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
71
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
72 extern TaskManager *manager;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
73
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
74 とかしてるので、そのまま manager->create_task とかして使えます。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
75
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
76
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
77
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
78 -----------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
79 修正場所
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
80 -----------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
81
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
82 今のところ、configure とかそういうのは無いので、
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
83 ライブラリのパスは手動で書き直さないといけないです。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
84 各例題の Makefile.def ってところに、
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
85
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
86 TARGET = 例題の実行ファイル名
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
87 CERIUM = Cerium のパス
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
88
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
89 を書くところがあるので、自分の環境にあう感じで書いてください。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
90
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
91 -----------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
92 コンパイル方法
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
93 -----------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
94 MacOSX
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
95 % make macosx
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
96
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
97 Linux
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
98 % make linux
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
99
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
100 PS3 (spe/ 以下もコンパイルされます)
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
101 % make ps3
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
102
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
103
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
104 clean するときは普通に
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
105
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
106 % make clean でいいです。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
107
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
108
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
110 --------------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
111 プログラムの書き方
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
112 --------------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
113
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
114 まだちゃんと仕様書みたいなものをは書いてないので、
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
115 ここで記述必須の所を書いておきます。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
116
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
117 1. タスクの作り方
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
118 2. タスクの登録 (ID との対応付け)
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
119 3. 最後に
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
120
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
121 -------------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
122 1. タスクの作り方
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
123 -------------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
124
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
125 タスクは、一つのクラスとして扱います。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
126 クラスの宣言 (.h) はこんな感じです。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
127
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
128 ++++++++++++++++++++++++++++++++++
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
129 #ifndef INCLUDED_SCHED_TASK
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
130 # include "SchedTask.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
131 #endif
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
132
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
133 class Hello : public SchedTask {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
134 public:
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
135 SchedConstructor(Hello);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
136
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
137 int run(void *r, void *w);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
138 };
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
139 ++++++++++++++++++++++++++++++++++
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
140
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
141 以上の記述は必須です。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
142 クラス名と、SchedConstructor() の中身は一緒にしてください。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
143 run() がこのクラスの Task としての実装となります。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
144 クラス変数、関数を加えるのはOKです。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
145
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
146
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
147 次に実装 (.cc) です。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
148
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
149 ++++++++++++++++++++++++++++++++++
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
150 #include "Hello.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
151
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
152 /* これは必須 */
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
153 SchedDefineTask(Hello);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
154
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
155 int
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
156 Hello::run(void *rbuf, void *wbuf)
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
157 {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
158 printf("Hello, World!!\n");
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
159
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
160 return 0;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
161 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
162 ++++++++++++++++++++++++++++++++++
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
163
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
164 SchedDefineTask にもクラス名を入れてください。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
165 rbuf, wbuf とかの使い方は 各例題を見ればわかります(basic とか)。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
166
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
167
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
168
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
169 -------------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
170 2 タスクの登録
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
171 -------------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
172
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
173 タスクは ID で管理するようにしています。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
174 ppe で動くタスクは ppe/ 以下の task_init.cc で書きます。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
175
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
176 ++++++++++++++++++++++++
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
177 #include "Func.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
178 #include "Scheduler.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
179
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
180 /* 必ずこの位置に書いて */
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
181 SchedExternTask(Hello);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
182
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
183 void
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
184 task_init(void)
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
185 {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
186 SchedRegisterTask(HELLO_TASK, Hello);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
187 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
188 ++++++++++++++++++++++++
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
189
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
190 SchedExternTask と SchedRegisterTask は必須です。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
191 RegisterTask では、クラス名の他に、対応する ID を入れてください。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
192 ID は 整数で、現在は 0〜31 まで設定できます。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
193 上の場合は、Func.h で HELLO_TASK を enum でやってます。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
194
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
195 SPE で動かすタスクも、spe/spe-main.cc に書いてください。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
196 書き方は ppe と同じです。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
197
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
198
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
199 -------------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
200 3. 最後に
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
201 -------------------
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
202 「もう書く事ねーのかよ」って意見もあるかもしれない。すまん。
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
203 一番上にあるように、まだまだ開発の初期っつーかなんつーか、なので
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
204 これからどんどん追加していきますので。