Changeset 429 for EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.cdl
- Timestamp:
- Jul 3, 2020, 7:19:17 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.cdl
r321 r429 4 4 * $Id$ 5 5 */ 6 6 7 /* 7 8 * カーネルオブジェクトの定義 8 9 */ 9 import( "kernel.cdl");10 import(<kernel.cdl>); 10 11 11 12 /* … … 14 15 import("syssvc/tSerialPort.cdl"); 15 16 import("syssvc/tSysLog.cdl"); 17 import("syssvc/tSysLogAdapter.cdl"); 16 18 import("syssvc/tLogTask.cdl"); 17 19 import("syssvc/tBanner.cdl"); … … 23 25 24 26 /* 27 * サンプルプログラムのC言語ヘッダファイルの取り込み 28 */ 29 import_C("tSample2.h"); 30 31 /* 25 32 * 「セルの組上げ記述」とは,"cell"で始まる行から,それに対応する"};" 26 33 * の行までのことを言う. … … 28 35 29 36 /* 30 * システムログ機能の組上げ記述 37 * システムログ機能のアダプタの組上げ記述 38 * 39 * システムログ機能のアダプタは,C言語で記述されたコードから,TECSベー 40 * スのシステムログ機能を呼び出すためのセルである.システムログ機能の 41 * サービスコール(syslog,syslog_0~syslog_5,t_perrorを含む)を呼び 42 * 出さない場合には,以下のセルの組上げ記述を削除してよい. 43 */ 44 cell tSysLogAdapter SysLogAdapter { 45 cSysLog = SysLog.eSysLog; 46 }; 47 48 /* 49 * システムログ機能の組上げ記述 31 50 * 32 51 * システムログ機能を外す場合には,以下のセルの組上げ記述を削除し,コ … … 42 61 initLowMask = C_EXP("LOG_UPTO(LOG_EMERG)"); 43 62 /* 低レベル出力すべき重要度 */ 44 45 63 /* 低レベル出力との結合 */ 46 64 cPutLog = PutLogTarget.ePutLog; … … 48 66 49 67 /* 50 * 68 * シリアルインタフェースドライバの組上げ記述 51 69 * 52 70 * シリアルインタフェースドライバを外す場合には,以下のセルの組上げ記 … … 65 83 66 84 /* 67 * 85 * システムログタスクの組上げ記述 68 86 * 69 87 * システムログタスクを外す場合には,以下のセルの組上げ記述を削除すれ … … 86 104 87 105 /* 88 * 106 * カーネル起動メッセージ出力の組上げ記述 89 107 * 90 108 * カーネル起動メッセージの出力を外す場合には,以下のセルの組上げ記述 … … 98 116 99 117 /* 100 * サンプルプログラムの定義118 * サンプルプログラムのセルタイプの定義 101 119 */ 102 120 [singleton] … … 111 129 call sAlarm cAlarm; 112 130 113 [optional] call sSerialPort cSerialPort;/* シリアルドライバとの接続 */131 call sSerialPort cSerialPort; /* シリアルドライバとの接続 */ 114 132 call sSysLog cSysLog; /* システムログ機能との接続 */ 115 133 … … 118 136 entry sTaskBody eExceptionTask; /* 例外処理タスク */ 119 137 120 entry siHandlerBody eiCyclicHandler;/* 周期ハンドラ*/ 121 entry siHandlerBody eiAlarmHandler; /* アラームハンドラ */ 122 }; 123 124 /* 125 * 組み上げ記述 126 */ 127 128 /* Sample2のプロトタイプ宣言 */ 129 cell tSample2 Sample2; 130 131 cell tKernel ASPKernel{ 138 entry siHandlerBody eiCyclicHandler; /* 周期ハンドラ*/ 139 entry siHandlerBody eiAlarmHandler; /* アラームハンドラ */ 140 141 entry siHandlerBody eiISR; /* 割込みサービスルーチン */ 142 143 entry siCpuExceptionHandlerBody eiCpuExceptionHandler; 144 /* CPU例外ハンドラ */ 145 }; 146 147 /* 148 * 組み上げ記述 149 */ 150 151 cell tKernel ASPKernel { 132 152 }; 133 153 … … 181 201 182 202 cell tAlarmHandler AlarmHandler { 203 /* 呼び口の結合 */ 183 204 ciHandlerBody = Sample2.eiAlarmHandler; 184 205 }; 185 206 207 cell tInterruptRequest InterruptRequest { 208 /* 属性の設定 */ 209 interruptNumber = C_EXP("INTNO1"); 210 attribute = C_EXP("INTNO1_INTATR"); 211 interruptPriority = C_EXP("INTNO1_INTPRI"); 212 }; 213 214 cell tISR InterruptServiceRoutine { 215 /* 呼び口の結合 */ 216 ciISRBody = Sample2.eiISR; 217 /* 属性の設定 */ 218 attribute = C_EXP("TA_NULL"); 219 interruptNumber = C_EXP("INTNO1"); 220 }; 221 222 cell tCpuExceptionHandler CpuExceptionHandler { 223 /* 呼び口の結合 */ 224 ciCpuExceptionHandlerBody = Sample2.eiCpuExceptionHandler; 225 /* 属性の設定 */ 226 cpuExceptionHandlerNumber = C_EXP("CPUEXC1"); 227 }; 228 186 229 cell tSample2 Sample2 { 187 230 /* 呼び口の結合 */ 188 cTask[ 0] = MainTask.eTask;189 cTask[ 1] = Task1.eTask;190 cTask[ 2] = Task2.eTask;191 cTask[ 3] = Task3.eTask;231 cTask[0] = MainTask.eTask; 232 cTask[1] = Task1.eTask; 233 cTask[2] = Task2.eTask; 234 cTask[3] = Task3.eTask; 192 235 193 236 cExceptionTask = ExceptionTask.eTask;
Note:
See TracChangeset
for help on using the changeset viewer.