Ignore:
Timestamp:
Jul 3, 2020, 7:19:17 PM (4 years ago)
Author:
coas-nagasima
Message:

ASP3, TINET, mbed を更新

File:
1 edited

Legend:

Unmodified
Added
Removed
  • EcnlProtoTool/trunk/asp3_dcre/sample/tSample2.cdl

    r321 r429  
    44 *  $Id$
    55 */
     6
    67/*
    78 *  カーネルオブジェクトの定義
    89 */
    9 import("kernel.cdl");
     10import(<kernel.cdl>);
    1011
    1112/*
     
    1415import("syssvc/tSerialPort.cdl");
    1516import("syssvc/tSysLog.cdl");
     17import("syssvc/tSysLogAdapter.cdl");
    1618import("syssvc/tLogTask.cdl");
    1719import("syssvc/tBanner.cdl");
     
    2325
    2426/*
     27 *  サンプルプログラムのC言語ヘッダファイルの取り込み
     28 */
     29import_C("tSample2.h");
     30
     31/*
    2532 *  「セルの組上げ記述」とは,"cell"で始まる行から,それに対応する"};"
    2633 *  の行までのことを言う.
     
    2835
    2936/*
    30  *  システムログ機能の組上げ記述
     37 *              システムログ機能のアダプタの組上げ記述
     38 *
     39 *  システムログ機能のアダプタは,C言語で記述されたコードから,TECSベー
     40 *  スのシステムログ機能を呼び出すためのセルである.システムログ機能の
     41 *  サービスコール(syslog,syslog_0~syslog_5,t_perrorを含む)を呼び
     42 *  出さない場合には,以下のセルの組上げ記述を削除してよい.
     43 */
     44cell tSysLogAdapter SysLogAdapter {
     45        cSysLog = SysLog.eSysLog;
     46};
     47
     48/*
     49 *              システムログ機能の組上げ記述
    3150 *
    3251 *  システムログ機能を外す場合には,以下のセルの組上げ記述を削除し,コ
     
    4261        initLowMask = C_EXP("LOG_UPTO(LOG_EMERG)");
    4362                                                                                /* 低レベル出力すべき重要度 */
    44 
    4563        /* 低レベル出力との結合 */
    4664        cPutLog = PutLogTarget.ePutLog;
     
    4866
    4967/*
    50  *  シリアルインタフェースドライバの組上げ記述
     68 *              シリアルインタフェースドライバの組上げ記述
    5169 *
    5270 *  シリアルインタフェースドライバを外す場合には,以下のセルの組上げ記
     
    6583
    6684/*
    67  *  システムログタスクの組上げ記述
     85 *              システムログタスクの組上げ記述
    6886 *
    6987 *  システムログタスクを外す場合には,以下のセルの組上げ記述を削除すれ
     
    86104
    87105/*
    88  *  カーネル起動メッセージ出力の組上げ記述
     106 *              カーネル起動メッセージ出力の組上げ記述
    89107 *
    90108 *  カーネル起動メッセージの出力を外す場合には,以下のセルの組上げ記述
     
    98116
    99117/*
    100  *  サンプルプログラムの定義
     118 *              サンプルプログラムのセルタイプの定義
    101119 */
    102120[singleton]
     
    111129        call sAlarm         cAlarm;
    112130
    113         [optional] call sSerialPort     cSerialPort;/* シリアルドライバとの接続 */
     131        call sSerialPort        cSerialPort;    /* シリアルドライバとの接続 */
    114132        call sSysLog            cSysLog;                /* システムログ機能との接続 */
    115133       
     
    118136        entry sTaskBody         eExceptionTask; /* 例外処理タスク */
    119137       
    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
     151cell tKernel ASPKernel {
    132152};
    133153
     
    181201
    182202cell tAlarmHandler AlarmHandler {
     203        /* 呼び口の結合 */
    183204        ciHandlerBody = Sample2.eiAlarmHandler;
    184205};
    185206
     207cell tInterruptRequest InterruptRequest {
     208        /* 属性の設定 */
     209        interruptNumber = C_EXP("INTNO1");
     210        attribute = C_EXP("INTNO1_INTATR");
     211        interruptPriority = C_EXP("INTNO1_INTPRI");
     212};
     213
     214cell tISR InterruptServiceRoutine {
     215        /* 呼び口の結合 */
     216        ciISRBody = Sample2.eiISR;
     217        /* 属性の設定 */
     218        attribute = C_EXP("TA_NULL");
     219        interruptNumber = C_EXP("INTNO1");
     220};
     221
     222cell tCpuExceptionHandler CpuExceptionHandler {
     223        /* 呼び口の結合 */
     224        ciCpuExceptionHandlerBody = Sample2.eiCpuExceptionHandler;
     225        /* 属性の設定 */
     226        cpuExceptionHandlerNumber = C_EXP("CPUEXC1");
     227};
     228
    186229cell tSample2 Sample2 {
    187230        /* 呼び口の結合 */
    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;
    192235
    193236        cExceptionTask = ExceptionTask.eTask;
Note: See TracChangeset for help on using the changeset viewer.