3 * Toyohashi Open Platform for Embedded Real-Time Systems/
4 * Just Standard Profile Kernel
6 * Copyright (C) 2000-2003 by Embedded and Real-Time Systems Laboratory
7 * Toyohashi Univ. of Technology, JAPAN
9 * 上記著作権者は,以下の (1)〜(4) の条件か,Free Software Foundation
10 * によって公表されている GNU General Public License の Version 2 に記
11 * 述されている条件を満たす場合に限り,本ソフトウェア(本ソフトウェア
12 * を改変したものを含む.以下同じ)を使用・複製・改変・再配布(以下,
14 * (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
15 * 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
17 * (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
18 * 用できる形で再配布する場合には,再配布に伴うドキュメント(利用
19 * 者マニュアルなど)に,上記の著作権表示,この利用条件および下記
21 * (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
22 * 用できない形で再配布する場合には,次のいずれかの条件を満たすこ
24 * (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著
25 * 作権表示,この利用条件および下記の無保証規定を掲載すること.
26 * (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに
28 * (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
29 * 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること.
31 * 本ソフトウェアは,無保証で提供されているものである.上記著作権者お
32 * よびTOPPERSプロジェクトは,本ソフトウェアに関して,その適用可能性も
33 * 含めて,いかなる保証も行わない.また,本ソフトウェアの利用により直
34 * 接的または間接的に生じたいかなる損害に関しても,その責任を負わない.
36 * @(#) $Id: jsp_check.cpp,v 1.1 2009/01/31 05:27:37 suikan Exp $
39 // $Header: /cvsroot/toppersjsp4bf/jsp/cfg/jsp/jsp_check.cpp,v 1.1 2009/01/31 05:27:37 suikan Exp $
41 #include "base/defs.h"
42 #include "jsp/jsp_defs.h"
43 #include "base/message.h"
44 #include "base/component.h"
45 #include "base/filecontainer.h"
50 class ConfigurationChecker : public Component
57 LAZY = 1, /* 致命的 (行き過ぎ改造防止用) */
58 STANDARD = 2, /* ITRON仕様の範囲 (改造を許容) */
59 TOPPERS = 4, /* TOPPERS/JSPの範囲内 */
60 RESTRICTED = 8, /* 片っ端から捕まえる */
66 enum tagCheckLevel current_level;
68 unsigned int error_count;
71 void set_banner(Directory &, Formatter , const char *, int);
72 void notify(enum tagCheckLevel, Formatter , bool = true);
74 bool check_taskblock(Directory &, FileContainer *);
75 bool check_semaphoreblock(Directory &, FileContainer *);
76 bool check_eventflagblock(Directory &, FileContainer *);
77 bool check_dataqueueblock(Directory &, FileContainer *);
78 bool check_mailboxblock(Directory &, FileContainer *);
79 bool check_fixed_memorypoolblock(Directory &, FileContainer *);
80 bool check_cyclic_handlerblock(Directory &, FileContainer *);
81 bool check_interrupt_handlerblock(Directory &, FileContainer *);
82 bool check_exception_handlerblock(Directory &, FileContainer *);
84 virtual void parseOption(Directory &);
85 virtual void body(Directory &);
88 ConfigurationChecker(void) throw();
89 ~ConfigurationChecker(void) throw() {}
92 //------------------------------------------------------
95 static ConfigurationChecker instance_of_ConfigurationChecker;
97 //------------------------------------------------------
98 //ターゲットの同名の型よりも大きな型の定義
99 // (注) 値比較, 演算が可能な型であること
102 typedef unsigned int DT_UINT;
103 typedef unsigned long DT_FP;
104 typedef unsigned long DT_VP_INT;
105 typedef unsigned long DT_VP;
106 typedef long DT_RELTIM;
108 //------------------------------------------------------
110 ConfigurationChecker::ConfigurationChecker(void) throw()
112 setBanner("--- TOPPERS/JSP Configuration Checker (ver 2.4) ---");
115 void ConfigurationChecker::set_banner(Directory & container, Formatter object, const char * type, int id)
120 banner = string(" ") + object.str() + " : ";
122 sprintf(buffer, "id = %d", id);
124 node = container.findChild(OBJECTTREE, type, NULL)->getFirstChild();
125 while(node != 0 && node->toInteger() != id)
126 node = node->getNext();
129 banner += node->getKey() + " (" + buffer + ") ";
131 node = node->findChild("position");
133 banner += string("at ") + node->toString();
138 if(VerboseMessage::getVerbose())
140 cout << banner << endl;
145 void ConfigurationChecker::notify(enum tagCheckLevel level, Formatter msg, bool error)
147 if((level & current_level) != 0)
152 cout << banner << endl;
160 cout << Message("[ Error ] ","[エラー] ");
163 cout << Message("[Warning] ","[ 警告 ] ");
172 bool ConfigurationChecker::check_taskblock(Directory & parameter, FileContainer * container)
177 unsigned int old_error_count = error_count;
179 TargetVariable<unsigned int> _kernel_tmax_tskid("_kernel_tmax_tskid");
181 Message object("Task","タスク");
183 if(!_kernel_tmax_tskid.isValid())
185 "Internal error: Unknown symbol (Probably, Symbol table was stripped)",
186 "内部エラー: 不正なシンボル名 (実行形式がシンボルテーブルを含んでない可能性があります)").throwException();
188 if(*_kernel_tmax_tskid < 1)
191 Message(" [Task] : No tasks created\n"," [タスク] : タスクオブジェクトがありません\n"));
195 TargetVariable<DT_UINT> tskatr("_kernel_tinib_table", "task_initialization_block::tskatr");
196 TargetVariable<DT_FP> task("_kernel_tinib_table", "task_initialization_block::task");
197 TargetVariable<DT_INT> ipriority("_kernel_tinib_table", "task_initialization_block::ipriority");
198 TargetVariable<DT_UINT> texatr("_kernel_tinib_table", "task_initialization_block::texatr");
199 TargetVariable<DT_UINT> stksz("_kernel_tinib_table", "task_initialization_block::stksz");
201 maxpri = container->getVariableInfo("TMAX_TPRI").value;
202 minpri = container->getVariableInfo("TMIN_TPRI").value;
204 VerboseMessage("% object : % items\n","%オブジェクト : % 個\n") << object << *_kernel_tmax_tskid;
205 for(id = 1; id <= *_kernel_tmax_tskid; id++)
207 set_banner(parameter, object, TASK, id);
213 // 属性値が TA_HLNG|TA_ASM|TA_ACT 以外の値をとっている
214 if((*tskatr & ~0x3) != 0)
216 Message("Illegal task attribute (It should be ((TA_HLNG||TA_ASM)|TA_ACT))",
217 "不正なタスク属性 ((TA_HLNG||TA_ASM)|TA_ACT)以外"));
219 // 属性値に TA_ASM が含まれている
220 if((*tskatr & 0x1) != 0)
222 Message("TA_ASM specified as task attribute takes no effect.",
223 "タスク属性にTA_ASMが指定されている"));
228 Message("The address of task routine is equal to zero.",
235 // 最大優先度と最小優先度の設定がおかしい
238 Message("Illegal Priority Settings found (TMAX_TPRI(%) < TMIN_TPRI).",
239 "初期優先度が最低優先度(%)を超えている") << minpri);
241 // 優先度の範囲が[最小優先度, 最大優先度]の範囲を超えている
242 if(*ipriority > (signed)(maxpri - minpri))
244 Message("Initial priority is greater than maximum priority (%).",
245 "初期優先度が最大優先度(%)を超えている") << maxpri);
248 Message("Initial priority is less than the minimum priority (%).",
249 "初期優先度が最低優先度(%)を下回る") << minpri);
255 // 属性値がTA_HLNG or TA_ASMでない
256 if((*texatr & ~0x3) != 0)
258 Message("Task exception routine has an illegal attribute specifier.",
259 "タスク例外に無効な属性(TA_HLNG,TA_ASM以外) が設定されています"));
261 // 属性値に TA_ASM が含まれている
262 if((*texatr & 0x1) != 0)
264 Message("TA_ASM, specified as texatr, does not always take effect.",
265 "タスク例外にTA_ASMが指定されています"));
274 Message("Stack size is equal to zero.",
275 "スタックサイズに0が設定されています"));
280 Message("The address of task stack is equal to zero.",
281 "スタック開始番地に0が設定されています"));
283 ++ tskatr, ++ task, ++ ipriority, ++ texatr, ++ stksz;
286 return old_error_count == error_count;
289 bool ConfigurationChecker::check_semaphoreblock(Directory & parameter, FileContainer * container)
292 unsigned int old_error_count = error_count;
294 Message object("Semaphore","セマフォ");
296 TargetVariable<DT_UINT> _kernel_tmax_semid("_kernel_tmax_semid");
297 if(*_kernel_tmax_semid < 1)
300 TargetVariable<DT_UINT> sematr("_kernel_seminib_table","semaphore_initialization_block::sematr");
301 TargetVariable<DT_UINT> maxsem("_kernel_seminib_table","semaphore_initialization_block::maxsem");
302 TargetVariable<DT_UINT> isemcnt("_kernel_seminib_table","semaphore_initialization_block::isemcnt");
304 VerboseMessage("% object : % items\n","%オブジェクト : % 個\n")
305 << object << *_kernel_tmax_semid;
307 for(id = 1; id <= *_kernel_tmax_semid; id++)
309 set_banner(parameter, object, SEMAPHORE, id);
311 //attribute validation check
312 if((*sematr & ~0x1) != 0)
314 Message("Illegal attribute (It should be (TA_TFIFO||TA_TPRI)).",
315 "(TA_TFIFO||TA_TPRI)以外の属性が指定されている"));
318 if(*maxsem < *isemcnt)
320 Message("Initial count[%] is greater than the maximum count[%] of this semaphore",
321 "初期値[%]が最大値[%]を超えている") << *isemcnt << *maxsem);
325 Message("Maximum count must be greater than zero.",
326 "セマフォの最大カウントは1以上でなければいけません"));
328 ++ sematr, ++ maxsem, ++ isemcnt;
331 return old_error_count == error_count;
335 bool ConfigurationChecker::check_eventflagblock(Directory & parameter, FileContainer * container)
338 unsigned int old_error_count = error_count;
340 Message object("Event flag","イベントフラグ");
342 TargetVariable<DT_UINT> _kernel_tmax_flgid("_kernel_tmax_flgid");
343 if(*_kernel_tmax_flgid < 1)
346 TargetVariable<DT_UINT> flgatr("_kernel_flginib_table","eventflag_initialization_block::flgatr");
348 VerboseMessage("% object : % items\n","%オブジェクト : % 個\n")
349 << object << *_kernel_tmax_flgid;
351 for(id = 1; id <= *_kernel_tmax_flgid; id++)
353 set_banner(parameter, object, EVENTFLAG, id);
355 //attribute validation check
356 if((*flgatr & ~0x7) != 0)
358 Message("Illegal attribute value [0x%]",
359 "おかしな属性値 [0x%]") << setbase(16) << (*flgatr & ~0x7));
361 if((*flgatr & 0x2) != 0)
362 notify(TOPPERS, //依存部で直らないのでRESTRICTEDにしない
363 Message("Attribute TA_WMUL is not supported in current version.",
369 return old_error_count == error_count;
373 bool ConfigurationChecker::check_dataqueueblock(Directory & parameter, FileContainer * container)
376 unsigned int old_error_count = error_count;
378 Message object("Data queue","データキュー");
380 TargetVariable<DT_UINT> _kernel_tmax_dtqid("_kernel_tmax_dtqid");
381 if(*_kernel_tmax_dtqid < 1)
384 TargetVariable<DT_UINT> dtqatr("_kernel_dtqinib_table", "dataqueue_initialization_block::dtqatr");
385 TargetVariable<DT_UINT> dtqcnt("_kernel_dtqinib_table", "dataqueue_initialization_block::dtqcnt");
386 TargetVariable<DT_VP_INT> dtq("_kernel_dtqinib_table", "dataqueue_initialization_block::dtq");
388 VerboseMessage("% object : % items\n","%オブジェクト : % 個\n")
389 << object << *_kernel_tmax_dtqid;
391 for(id = 1; id <= *_kernel_tmax_dtqid; id++)
393 set_banner(parameter, object, DATAQUEUE, id);
395 //attribute validation check
396 if((*dtqatr & ~0x1) != 0)
398 Message("Illegal attribute value [0x%]",
399 "おかしな属性値 [0x%]") << setbase(16) << (*dtqatr & ~0x1));
401 if(*dtqcnt != 0 && *dtq == 0)
403 Message("Dataqueue buffer should not be NULL", "データキューのバッファがNULL値"));
405 ++ dtqatr, ++ dtqcnt, ++ dtq;
408 return old_error_count == error_count;
412 bool ConfigurationChecker::check_mailboxblock(Directory & parameter, FileContainer * container)
415 unsigned int old_error_count = error_count;
417 Message object("Mailbox","メールボックス");
419 TargetVariable<DT_UINT> _kernel_tmax_mbxid("_kernel_tmax_mbxid");
420 if(*_kernel_tmax_mbxid < 1)
423 TargetVariable<DT_UINT> mbxatr("_kernel_mbxinib_table","mailbox_initialization_block::mbxatr");
424 TargetVariable<DT_INT> maxmpri("_kernel_mbxinib_table","mailbox_initialization_block::maxmpri");
426 DT_INT maxpri = container->getVariableInfo("TMAX_MPRI").value;
427 DT_INT minpri = container->getVariableInfo("TMIN_MPRI").value;
429 VerboseMessage("% object : % items\n","%オブジェクト : % 個\n") << object << *_kernel_tmax_mbxid;
430 for(id = 1; id <= *_kernel_tmax_mbxid; id++)
432 set_banner(parameter, object, MAILBOX, id);
434 //attribute validation check
435 if((*mbxatr & ~0x3) != 0)
437 Message("Illegal attribute value [0x%]",
438 "おかしな属性値 [0x%]") << setbase(16) << (*mbxatr & ~0x3));
440 //mailbox message priority check
443 Message("Priority must not be a negative number.","優先度が負値"));
445 if(*maxmpri < minpri)
447 Message("Message priority should be greater than or equal to %.",
448 "メッセージ優先度は%以上でなければいけません") << minpri);
450 if(*maxmpri > maxpri)
452 Message("Message priority should be less than or equal to %.",
453 "メッセージ優先度は%以下でなければいけません") << maxpri);
455 ++ mbxatr, ++ maxmpri;
458 return old_error_count == error_count;
461 bool ConfigurationChecker::check_fixed_memorypoolblock(Directory & parameter, FileContainer * container)
464 unsigned int old_error_count = error_count;
466 Message object("Fixed size memory pool","固定長メモリプール");
468 TargetVariable<DT_UINT> _kernel_tmax_mpfid("_kernel_tmax_mpfid");
469 if(*_kernel_tmax_mpfid < 1)
472 TargetVariable<DT_UINT> mpfatr("_kernel_mpfinib_table", "fixed_memorypool_initialization_block::mpfatr");
473 TargetVariable<DT_UINT> limit ("_kernel_mpfinib_table", "fixed_memorypool_initialization_block::limit");
474 TargetVariable<DT_VP> mpf ("_kernel_mpfinib_table", "fixed_memorypool_initialization_block::mpf");
475 TargetVariable<DT_UINT> blksz ("_kernel_mpfinib_table", "fixed_memorypool_initialization_block::blksz");
477 VerboseMessage("% object : % items\n","%オブジェクト : % 個\n") << object << *_kernel_tmax_mpfid;
478 for(id = 1; id <= *_kernel_tmax_mpfid; id++)
480 set_banner(parameter, object, FIXEDSIZEMEMORYPOOL, id);
482 //attribute validation check
483 if((*mpfatr & ~0x1) != 0)
485 Message("Illegal attribute value [0x%]","おかしな属性値 [0x%]") << (*mpfatr & ~0x1));
490 Message("blkcnt should be a non-zero value.","ブロック数が0です"));
495 Message("blksz should be a non-zero value.","ブロックサイズが0です"));
500 Message("buffer address is a NULL pointer.","バッファアドレスがNULLポインタになっています"));
502 ++ mpfatr, ++ limit, ++ mpf, ++ blksz;
505 return old_error_count == error_count;
509 bool ConfigurationChecker::check_cyclic_handlerblock(Directory & parameter, FileContainer * container)
512 unsigned int old_error_count = error_count;
514 Message object("Cyclic handler","周期ハンドラ");
516 TargetVariable<DT_UINT> _kernel_tmax_cycid("_kernel_tmax_cycid");
517 if(*_kernel_tmax_cycid < 1)
520 DT_RELTIM maxreltim = container->getVariableInfo("TMAX_RELTIM").value;
521 TargetVariable<DT_UINT> cycatr("_kernel_cycinib_table", "cyclic_handler_initialization_block::cycatr");
522 TargetVariable<DT_RELTIM> cyctim("_kernel_cycinib_table", "cyclic_handler_initialization_block::cyctim");
523 TargetVariable<DT_RELTIM> cycphs("_kernel_cycinib_table", "cyclic_handler_initialization_block::cycphs");
525 VerboseMessage("% object : % items\n","%オブジェクト : % 個\n") << object << *_kernel_tmax_cycid;
526 for(id = 1; id <= *_kernel_tmax_cycid; id++)
528 set_banner(parameter, object, CYCLICHANDLER, id);
530 //attribute validation check
531 if((*cycatr & ~0x7) != 0)
533 Message("Illegal attribute value [0x%]","おかしな属性値 [0x%]") << (*cycatr & ~0x1));
535 if((*cycatr & 0x4) != 0)
536 notify(TOPPERS, //非依存部なのでRESTRICTEDにしない
537 Message("TA_PHS is not supported in this kernel.","TA_PHSはサポート外"));
539 // 属性値に TA_ASM が含まれている
540 if((*cycatr & 0x1) != 0)
542 Message("TOPPERS/JSP Kernel never minds the flag 'TA_ASM'.",
543 "TOPPERS/JSPカーネルの全ての機種依存部でTA_ASMをサポートするとは限らない"));
545 //RELTIMでの表現範囲内にあるかどうかのチェック
546 if(*cyctim > maxreltim)
548 Message("The cyclic object has a period (%) that exceeds the maximum period (%)",
549 "起動周期(%)が表現可能な相対時間の範囲(%)を超えています") << *cyctim << maxreltim);
554 Message("The cyclic object has a ZERO period.",
557 if(*cycphs > maxreltim)
559 Message("The cyclic object has a initial delay (%) that exceeds the maximum period (%)",
560 "起動位相(%)が表現可能な相対時間の範囲(%)を超えています") << *cycphs << maxreltim);
562 ++ cycatr, ++ cyctim, ++ cycphs;
565 return old_error_count == error_count;
568 bool ConfigurationChecker::check_interrupt_handlerblock(Directory & parameter, FileContainer * container)
571 unsigned int old_error_count = error_count;
573 Message object("Interrupt handler","割込みハンドラ");
575 TargetVariable<DT_UINT> _kernel_tnum_inhno("_kernel_tnum_inhno");
576 if(*_kernel_tnum_inhno == 0)
579 TargetVariable<DT_UINT> inhatr("_kernel_inhinib_table", "interrupt_handler_initialization_block::inhatr");
580 TargetVariable<DT_FP> inthdr("_kernel_inhinib_table", "interrupt_handler_initialization_block::inthdr");
582 VerboseMessage("% object : % items\n","%オブジェクト : % 個\n") << object << *_kernel_tnum_inhno;
583 for(id = 0; id < *_kernel_tnum_inhno; id++)
585 set_banner(parameter, object, INTERRUPTHANDLER, id);
587 //attribute validation check
588 if((*inhatr & 0x1) != 0)
590 Message("The attribute can take only TA_HLNG|TA_ASM",
591 "TA_HLNG|TA_ASM以外の属性は設定できません"));
593 // 属性値に TA_ASM が含まれている
594 if((*inhatr & 0x1) != 0)
596 Message("TOPPERS/JSP Kernel never minds the flag 'TA_ASM'.",
602 Message("NULL pointer is specified as an inthdr address.",
603 "割込みハンドラの番地がNULLです"));
605 ++ inhatr, ++ inthdr;
608 return old_error_count == error_count;
611 bool ConfigurationChecker::check_exception_handlerblock(Directory & parameter, FileContainer * container)
614 unsigned int old_error_count = error_count;
616 Message object("Exception handler","例外ハンドラ");
618 TargetVariable<DT_UINT> _kernel_tnum_excno("_kernel_tnum_excno");
619 if(*_kernel_tnum_excno == 0)
622 TargetVariable<DT_UINT> excatr("_kernel_excinib_table", "cpu_exception_handler_initialization_block::excatr");
623 TargetVariable<DT_FP> exchdr("_kernel_excinib_table", "cpu_exception_handler_initialization_block::exchdr");
625 VerboseMessage("% object : % items\n","%オブジェクト : % 個\n") << object << *_kernel_tnum_excno;
626 for(id = 0; id < *_kernel_tnum_excno; id++)
628 set_banner(parameter, object, EXCEPTIONHANDLER, id);
630 //attribute validation check
631 if((*excatr & 0x1) != 0)
633 Message("The attribute can take only TA_HLNG|TA_ASM",
634 "TA_HLNG|TA_ASM以外の属性は設定できません"));
636 // 属性値に TA_ASM が含まれている
637 if((*excatr & 0x1) != 0)
639 Message("TOPPERS/JSP Kernel never minds the flag 'TA_ASM'.",
640 "TOPPERS/JSPカーネルの全ての機種依存部でTA_ASMをサポートするとは限らない"));
645 Message("NULL pointer is specified as an exchdr address.",
646 "例外ハンドラの番地がNULLです"));
648 ++ excatr, ++ exchdr;
651 return old_error_count == error_count;
654 //------------------------------------------------------
656 void ConfigurationChecker::parseOption(Directory & parameter)
661 if(findOption("h","help"))
663 cout << endl << Message(
664 "Configuration checker - option\n"
665 " -m, --module=filename : Specify the load module (essential option)\n"
666 " -cs, --script=filename : Specify the checker script file\n"
667 " -cl, --checklevel=level : Specify one of the check levels below \n"
668 " l(azy) : Minimum check will be performed.\n"
669 " s(tandard) : includes some ITRON Standard check items.\n"
670 " t(oppers) : checks whether it meets TOPPERS/JSP restrictions\n"
671 " r(estricted) : All of check items will be performed.\n",
672 "コンフィギュレーションチェッカ - オプション\n"
673 " -m, --module=ファイル名 : ロードモジュール名を指定します (必須項目)\n"
674 " -cs, --script=ファイル名 : チェッカスクリプトを指定します\n"
675 " -cl, --checklevel=level : Specify one of the check levels below \n"
676 " l(azy) : 最小限のチェックのみを行います\n"
677 " s(tandard) : ITRON仕様の範囲でチェックを行います\n"
678 " t(oppers) : TOPPERS/JSPカーネルの制限を満たすことを確認します\n"
679 " r(estricted) : 機種依存部を含め全てのチェック項目を実施します\n");
681 << Message("Supported architecture : ", "対応アーキテクチャ : ")
682 << FileContainer::getInstance()->getArchitecture()
687 if(findOption("m","module",&loadmodule) || findOption(DEFAULT_PARAMETER,NULL,&loadmodule))
689 if(findOption("s","source"))
690 ExceptionMessage("Configuration checker can not execute while Configurator executes","コンフィギュレータとチェッカは同時に起動できません").throwException();
692 parameter["/file/loadmodule"] = loadmodule;
696 if(!findOption("cs","script",&work))
697 work = loadmodule.substr(0,loadmodule.find_last_of('.')) + ".chk";
698 parameter["/file/checkerscript"] = work;
701 if(findOption("obj","load-object",&work))
704 work.assign("kernel_obj.dat");
706 fstream f(work.c_str(), ios::in|ios::binary);
709 parameter["/object"].Load(&f);
712 ExceptionMessage(" Failed to open the file '%' for storing object definitions"," オブジェクト情報を格納するためのファイル(%)が開けません") << work << throwException;
715 if(findOption("cl","checklevel",&work))
717 current_level = UNKNOWN;
719 if(work.compare("lazy") == 0 || work[0] == 'l')
720 current_level = LAZY;
721 if(work.compare("standard") == 0 || work[0] == 's')
722 current_level = STANDARD;
723 if(work.compare("toppers") == 0 || work[0] == 't')
724 current_level = TOPPERS;
725 if(work.compare("restricted") == 0 || work[0] == 'r')
726 current_level = RESTRICTED;
728 if(current_level == UNKNOWN)
729 ExceptionMessage(" Unknown check level [%] specified"," 無効なチェックレベル指定 [%]") << work << throwException;
731 current_level = NORMAL;
733 checkOption("cpu", "cpu");
734 checkOption("system", "system");
737 void ConfigurationChecker::body(Directory & parameter)
739 FileContainer * container;
742 /* より優先度の高いエラーも対象に */
743 current_level = static_cast<enum tagCheckLevel>(static_cast<int>(current_level) * 2 - 1);
745 container = FileContainer::getInstance();
746 container->attachInfo(parameter["/file/checkerscript"].toString());
747 container->attachModule(parameter["/file/loadmodule"].toString());
749 if(VerboseMessage::getVerbose())
751 cout << Message(" Target architecture : "," ターゲットアーキテクチャ : ")
752 << container->getArchitecture() << endl;
756 result &= check_taskblock(parameter,container);
757 result &= check_semaphoreblock(parameter,container);
758 result &= check_eventflagblock(parameter,container);
759 result &= check_dataqueueblock(parameter,container);
760 result &= check_mailboxblock(parameter,container);
761 result &= check_fixed_memorypoolblock(parameter,container);
762 result &= check_cyclic_handlerblock(parameter,container);
763 result &= check_interrupt_handlerblock(parameter,container);
764 result &= check_exception_handlerblock(parameter,container);
767 ExceptionMessage("Total % errors found in current configuration.\n","全部で%個のエラーが検出されました\n") << error_count << throwException;
769 VerboseMessage("No error found in current configuration\n","構成に異常はありませんでした\n");