/******************************************************************************* * モジュール名称 :アプリケーション04 - Mission TLM Production (2) * * モジュールラベル :dpu_app04 * * タスク区分 :アプリケーションタスク * * 機能 : * * コーリングシーケンス:void dpu_app04(int mode) * * 引数 :int mode 冗長機能ON/OFF (0:OFF/1:ON) * * 戻り値 :void * * 使用上の注意 :なし * * エラー処理 :なし * * 作成日・作成者 :2013/3/12 Y. Kasaba * *******************************************************************************/ #include "dpu_api.h" #include "dpu_api_proto.h" #include "app_core.h" void dpu_app04(int mode) { int i_flag; unsigned int ui_load; // msec M_T_TIME_INFO t_timeInfo; // unsigned int ui_currentTime; :衛星時刻(1LSB=1.953ms) // // unsigned int ui_currentTime2; :衛星時刻(1LSB=31.25ms) unsigned int ui_load2; // **TMP** // ************************************* // *** STOP @ DPU2 in non-redundancy *** // ************************************* if (Guc_dpuNo==1 && Guc_dpuRdn==0) { // DPU2 in non-Redundancy dpu_WDTEna(0); // WDT: DIS dpu_appStop(); // *** End *** } // ************ // *** MAIN *** // ************ dpu_waitProcessingSlot(32); for (;;) { // *** WAIT *** app_WhoWhere( 4, Gd_N_COM, 0x01 ); dpu_waitSunpulse(1); // ************* // *** START *** // ************* app_WhoWhere( 4, Gd_N_COM, 0x02 ); app_START( 4, &ui_load ); // *** CMD-buffer clear (for BroadCast) *** app_WhoWhere( 4, Gd_N_COM, 0x03 ); dpu_getCommand( Guc_cmdDummy, &i_flag); if ( Guc_TLMm_enadis ) { // ***************** // *** TLM: DPU1 *** // ***************** if (Guc_dpuNo==0 || Guc_dpuRdn==2) { // *** RDN: OK i_flag = app_MONITOR( 2, 0, ui_load2, & ui_load2 ); // **TMP** i_flag = dpu_getTime( &t_timeInfo ); app_WhoWhere( 4, Gd_N_ENA , 0x00 ); app04_ENA ( Gui_hkApp_counter[4], t_timeInfo.ui_sunpulseTime ); i_flag = app_MONITOR( 2, Gd_N_ENA, ui_load2, & ui_load2 ); } } // *** APP STATUS *** app_WhoWhere( 4, Gd_N_COM, 0x0F ); app_END( 4, &ui_load ); } dpu_WDTEna(0); // WDT: DIS dpu_appStop(); // *** End *** }