annotate bin/cerium @ 329:d3ea1d049230 draft

add task/config/tasks.xml lib/tasks.xml
author aaa
date Fri, 12 Jun 2009 15:29:27 +0900
parents 54725883131b
children 786d0bc9766a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
297
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #!/usr/bin/perl -w
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3 use strict;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4
329
d3ea1d049230 add task/config/tasks.xml lib/tasks.xml
aaa
parents: 297
diff changeset
5 use XML::LibXML;
d3ea1d049230 add task/config/tasks.xml lib/tasks.xml
aaa
parents: 297
diff changeset
6
297
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 my $command = shift;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 my $main = "main.cc";
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 my $task_config = "tasks.xml";
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11 if ($command =~ /init/) {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 &init;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 } elsif ($command =~ /make/) {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 &make;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 } elsif ($command =~ /help/) {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 &help;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 } else {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 &help;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 exit 0;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 sub help {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 print "$0 init ... initialize cerium application\n";
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26 sub init {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 # setup initial cerium configuration
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 mkdir "Task";
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 if (! -e $main ) &make_main;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 if (! -e $task_config ) &make_task_config;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 sub make_main {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 open(F,">$main") or die("Can't write $main\n");
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 print F <<"EOFEOF";
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 #include <stdio.h>
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 #include <stdlib.h>
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 #include <string.h>
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 #include "TaskManager.h"
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 #include "Func.h"
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 extern void task_init(void);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 const char *usr_help_str = "Usage: ./main [-cpu spe_num] [-count N]\n\
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 -cpu Number of SPE (default 1) \n\";
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47 int
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 init(int argc, char **argv)
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 for (int i = 1; argv[i]; ++i) {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 if (strcmp(argv[i], "-count") == 0) {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 count = atoi(argv[++i]);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 return 0;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 void
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 hello_init(void)
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 HTask *hello;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 for (int i = 0; i < count; i++) {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 /**
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 * Create Task
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 * create_task(Task ID);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 */
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 hello = manager->create_task(HELLO_TASK);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72 /**
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 * Select CPU
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 * SPE_0, SPE_1, SPE_2, SPE_3, SPE_4, SPE_5, SPE_ANY
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
75 * if you do not call this, execute PPE.
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 */
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 hello->set_cpu(SPE_ANY);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
78
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 /**
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 * Set 32bits parameter
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 * add_param(32bit parameter);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 */
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 hello->add_param(i);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
84
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
85 hello->spawn();
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
88
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 int
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
90 TMmain(int argc, char *argv[])
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
92 if (init(argc, argv) < 0) {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
93 return -1;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
94 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
95 task_init();
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
96 init();
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
97
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
98 return 0;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
99 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
100 EOFEOF
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
101 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
102 } else {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
103 &help;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
104 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
105 exit 0;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
106
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
107 sub help {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
108 print "$0 init ... initialize cerium application\n";
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
109 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
110
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
111 sub init {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
112 # setup initial cerium configuration
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
113 mkdir "Task";
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
114 if (! -e $main ) &make_main;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
115 if (! -e $task_config ) &make_task_config;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
116 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
117
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
118 sub make_main {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 open(F,">$main") or die("Can't write $main\n");
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 print F <<"EOFEOF";
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
121 #include <stdio.h>
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
122 #include <stdlib.h>
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
123 #include <string.h>
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
124 #include "TaskManager.h"
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 #include "Func.h"
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
126
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
127 extern void task_init(void);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
128
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
129 const char *usr_help_str = "Usage: ./main [-cpu spe_num] [-count N]\n\
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
130 -cpu Number of SPE (default 1) \n\";
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
131
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
132 int
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
133 init(int argc, char **argv)
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
134 {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
135 for (int i = 1; argv[i]; ++i) {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
136 if (strcmp(argv[i], "-count") == 0) {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
137 count = atoi(argv[++i]);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
138 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
139
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
140 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
141
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
142 return 0;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
143 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
144
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
145 void
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
146 hello_init(void)
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
147 {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
148 HTask *hello;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
149
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
150 for (int i = 0; i < count; i++) {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
151 /**
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
152 * Create Task
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
153 * create_task(Task ID);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
154 */
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
155 hello = manager->create_task(HELLO_TASK);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
156
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
157 /**
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
158 * Select CPU
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
159 * SPE_0, SPE_1, SPE_2, SPE_3, SPE_4, SPE_5, SPE_ANY
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
160 * if you do not call this, execute PPE.
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
161 */
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
162 hello->set_cpu(SPE_ANY);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
163
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
164 /**
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
165 * Set 32bits parameter
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
166 * add_param(32bit parameter);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
167 */
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
168 hello->add_param(i);
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
169
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
170 hello->spawn();
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
171 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
172 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
173
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
174 int
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
175 TMmain(int argc, char *argv[])
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
176 {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
177 if (init(argc, argv) < 0) {
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
178 return -1;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
179 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
180 task_init();
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
181 init();
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
182
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
183 return 0;
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
184 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
185 EOFEOF
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
186 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
187
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
188 sub make {
329
d3ea1d049230 add task/config/tasks.xml lib/tasks.xml
aaa
parents: 297
diff changeset
189
d3ea1d049230 add task/config/tasks.xml lib/tasks.xml
aaa
parents: 297
diff changeset
190 return if ( ! -e $task_config );
d3ea1d049230 add task/config/tasks.xml lib/tasks.xml
aaa
parents: 297
diff changeset
191 my $xml = XML::LibXML->new();
d3ea1d049230 add task/config/tasks.xml lib/tasks.xml
aaa
parents: 297
diff changeset
192 my @nodes = $doc->findnodes('//surface');
297
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
193 }
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
194
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
195 __END__
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
196
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
197 =head1 NAME
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
198
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
199 cerium -- Cerium task manager configuration manager
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
200
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
201 =head1 SYNOPSIS
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
202
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
203 cerium init
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
204 cerium make
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
205 cerium help
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
206
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
207 =head1 DESCRIPTION
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
208
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
209 cerium init
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
210
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
211 =cut
54725883131b start task config
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
diff changeset
212