/** * com1553 - MIL-1553 Communication Library for Herschel - Module Variable Definition * * Filename : \file ivar1553.h * * Purposes : \brief [DONE] com1553 - MIL-1553 Communication Library for Herschel - ModuleVariable Definition * * Logical Task : in Spire - TMTC * : in Pacs - TOTH * : in HIFI - TMTC * : \ingroup group_COM1553 * * Author : Scige * * Last Developer : $Author: lorenzo $ * * Revision : $Revision: 1.12 $ * * Checkout Tag : $Name: $ * * Last Modification : $Date: 2009/01/15 13:56:54 $ * * Location : $RCSfile: ivar1553.h,v $ * * \version : $Header: /home/local/cvsrep/OBS_FM/1553_Lib/ivar1553.h,v 1.12 2009/01/15 13:56:54 lorenzo Exp $ */ /** * Commitments History : * As reported in Main cvs Documentation * ( https://www.cvshome.org/docs/manual/cvs-1.11.18/cvs_12.html#SEC102 ) * The Modification Log has been posted at End Of File. */ //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// #ifndef __IVAR_1553_H__ #define __IVAR_1553_H__ #include "MilDef.h" //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// /// Remote Terminal Configuration Holder - General Configuration MilConf_p MilRTConf; /// Remote Terminal Configuration Holder - TeleMetry Data SubAddress Configuration RTBlkHandle Tx_data_han[16];//Sub address 11 to 16 /// Remote Terminal Configuration Holder - TeleMetry Descriptor SubAddress Configuration. RT <- BC RTBlkHandle Rx_data_han10; //Sub address 10 Reception /// Remote Terminal Configuration Holder - TeleMetry Descriptor SubAddress Configuration. RT -> BC RTBlkHandle Tx_data_han10; //Sub address 10 Transmission /// Remote Terminal Configuration Holder - TeleCommand Data SubAddress Configuration RTBlkHandle Rx_data_han[4]; //Sub address 11 to 14 /// Remote Terminal Configuration Holder - TeleCommand Descriptor SubAddress Configuration. RT -> BC RTBlkHandle Tx_data_han27; //Sub address 27 /// Remote Terminal Configuration Holder - TeleCommand Descriptor SubAddress Configuration. RT <- BC RTBlkHandle Rx_data_han27; //Sub address 27 /// Remote Terminal Configuration Holder - RT Status - Low Level Control. RTBlkHandle Tx_data_han1; //Sub address 1 /// Remote Terminal Configuration Holder - Timing Confirmation RT -> BC RTBlkHandle Tx_data_han8; //Sub address 8 /// Remote Terminal Configuration Holder - Timing Update RT <- BC RTBlkHandle Rx_data_han8; //Sub address 8 /// Remote Terminal Configuration Holder - Circular Loop RTBlkHandle TRx_data_han30; //Sub address 30 /// Remote Terminal Configuration Holder - BroadCast Commanding - Unused RTBlkHandle Bcst_data_han; //Unused //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// /// Remote Terminal Configuration Holder - DualPortRam Memory Management - Base Configuration. Simple 32 Word (16bit) Slot SubAddrCtrlWrd sa_conf; /// Remote Terminal Configuration Holder - DualPortRam Memory Management - Circular Buffer for SA11-16 TX SubAddrCtrlWrd circ_sa_conf; /// Remote Terminal Configuration Holder - DualPortRam Memory Management - For SA30 SubAddrCtrlWrd wrap_around_sa_conf; //----------------------------------------------------------------------------// /// com1553 - Counter of free telemetry packet in the circular buffer in the DDC1553 Memory int FreePackDPRAM; /// com1553 - Counter of free telecommand packet in the buffer in the DDC1553 Memory int FreeCmndDPRAM; //----------------------------------------------------------------------------// /// com1553 - Interchange Variable pointing actual Low Level DDC1553 Transaction int Ghost_1553_StackPointer; unsigned int com1553_isr_counter = 0xFFFFFF00; /// com1553 - Pointer to the next writing location in the Telemetry Packet Transfer Request Circular queue. \ref TM_PACK . struct TM_request * TmWriter; /// com1553 - Pointer to the next reading location in the Telemetry Packet Transfer Request Circular queue. \ref TM_PACK . struct TM_request * TmReader; /// com1553 - Telemetry Packet Transfer Request Circular queue size. See \ref TM_PACK . #define TM_PACK_REQUEST_NUM 0x00000010 /// com1553 - Telemetry Packet Transfer Request Circular queue from the \ref tmtc to the \ref isr1553 . struct TM_request TM_PACK[ TM_PACK_REQUEST_NUM ]; #if OBSCODE != HIFI_CODE int Waiting_TM_packet; #endif /// com1553 - DPU Remote Terminal. int RTAddress; //for Esa enhanced directive use only /// com1553 - For Esa enhanced directive use only. Internal High resolution time. int Current_time; /// com1553 - For Esa enhanced directive use only. SubFrame Counter int SubFrame_Counter; /// com1553 - For Esa enhanced directive use only. Current Subframe Number. int Current_SubFrame; /// com1553 - For Esa enhanced directive use only. The Remote Terminal able to transfer telemetry. int RT_TMEnable; /// com1553 - For Esa enhanced directive use only. The Remote Terminal able to transfer telemetry ath the previous SubFrame. int RT_TMEnable_prev; /// com1553 - Burst Mode Activation Flag volatile unsigned int Burst_active = 0; /// com1553 - Reflection of the ISR_1553_EVENT int Isr_1553_event = ISR_1553_EVENT; /// com1553 - Telemetry Packet Counter used in the Telemetry Packet Transfer Request. int TM_pkt_ctr; //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// /// com1553 - Low Level Diagnostic Statistic Offset in SubAddress 1 - Part 1 #define TM_STATUS_OFFSET 0 /// com1553 - Low Level Diagnostic Statistic Offset in SubAddress 1 - Part 2 #define TMREQ_REPLY_OFFSET 2 /// com1553 - Low Level Diagnostic Statistic Offset in SubAddress 1 - Part 3 #define TCPTD_REPLY_OFFSET 4 //----------------------------------------------------------------------------// /// com1553 - Low Level Diagnostic Statistic Offset in SubAddress 1 - Part 4 - Temporary buffer to write into SA1 int tmreq_reply[3]; //----------------------------------------------------------------------------// #if OBSCODE == HIFI_CODE #elif OBSCODE == SPIRE_CODE /// com1553 - Telecommand Packet Counter - at the previous telecommand received. int TC_pkt_ctr_prev; // Packet received from 1553 /// com1553 - Telecommand Packet Counter . int TC_pkt_ctr; // Packet received from 1553 /// com1553 - Accumulator for unsend Semaphor signal to \ref tmtc . volatile int TC_READY_sema_delay_buffers = 0 ; /// com1553 - Internal representation of the universal time. unsigned int Dpu_time [4] = {0,0x8000,0,0}; #elif OBSCODE == PACS_CODE unsigned int Dpu_time [4] = {0,0x8000,0,0}; /* DPU Time in standard format (3 words of 16 bits) */ #endif //----------------------------------------------------------------------------// //----------------------------------------------------------------------------// #endif//__IVAR_1553_H__ /** * Commitments History : * $Log: ivar1553.h,v $ * Revision 1.12 2009/01/15 13:56:54 lorenzo * interrupt counters handling revised * * Revision 1.11 2009/01/15 12:17:09 annadg * interrupt counter added in isr2, counter flag check added in res_check * * Revision 1.10 2006/10/20 09:22:15 lorenzo * 1553 library updated * * Revision 1.8 2006/10/16 14:19:53 scige * Some More Comments * * Revision 1.7 2006/06/07 11:44:56 scige * Some More Comment * by Scige John Liu IFSI * * Revision 1.6 2006/02/15 14:34:03 scige * Some more comments restored * * Revision 1.3 2005/09/16 13:09:40 scige * *** empty log message *** * * Revision 1.1 2005/08/10 12:53:40 scige * Communication Library: 1553 * com1553 * Base Common Version of Spire/Pacs OBS * * */