T-EMU  2
The Terma Emulator
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Data Structures | Macros | Typedefs | Enumerations | Functions
MilStd1553.h File Reference
#include "temu-c/Support/Objsys.h"
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
Include dependency graph for MilStd1553.h:

Go to the source code of this file.

Data Structures

struct  temu_Mil1553Msg
 
struct  temu_Mil1553DevIface
 
struct  temu_Mil1553Stats
 
struct  temu_Mil1553BusIface
 

Macros

#define TEMU_1553_NS_PER_WORD   20000
 
#define TEMU_1553_BITS_PER_WORD   20
 
#define TEMU_1553_TR_BIT   0x20
 
#define teM1553MC_DynamicBusControl   (TEMU_1553_TR_BIT|0x00)
 
#define teM1553MC_Synchronize   (TEMU_1553_TR_BIT|0x01)
 
#define teM1553MC_TransmitStatusWord   (TEMU_1553_TR_BIT|0x02)
 
#define teM1553MC_InitiateSelfTest   (TEMU_1553_TR_BIT|0x03)
 
#define teM1553MC_TransmitterShutdown   (TEMU_1553_TR_BIT|0x04)
 
#define teM1553MC_OverrideTransmitter   (TEMU_1553_TR_BIT|0x05)
 
#define teM1553MC_InhibitTerminalFlagBit   (TEMU_1553_TR_BIT|0x06)
 
#define teM1553MC_OverrideInhibitTerminalFlagBit   (TEMU_1553_TR_BIT|0x07)
 
#define teM1553MC_ResetRT   (TEMU_1553_TR_BIT|0x08)
 
#define teM1553MC_TransmitVectorWord   (TEMU_1553_TR_BIT|0x10)
 
#define teM1553MC_SynchronizeWithData   (0x11)
 
#define teM1553MC_TransmitLastCommand   (TEMU_1553_TR_BIT|0x12)
 
#define teM1553MC_TransmitBITWord   (TEMU_1553_TR_BIT|0x13)
 
#define teM1553MC_SelectedTransmitter   (0x14)
 
#define teM1553MC_OverrideSelectedTransmitter   (0x15)
 

Typedefs

typedef enum temu_Mil1553Error temu_Mil1553Error
 
typedef enum temu_Mil1553MsgType temu_Mil1553MsgType
 
typedef struct temu_Mil1553Msg temu_Mil1553Msg
 
typedef struct temu_Mil1553DevIface temu_Mil1553DevIface
 
typedef struct temu_Mil1553BusIface temu_Mil1553BusIface
 

Enumerations

enum  temu_Mil1553Error { teME_NoError = 0, teME_ParityError = 1, teME_SyncError = 1 << 1 }
 
enum  temu_Mil1553MsgType { teMT_Cmd, teMT_Data, teMT_Stat, teMT_Mode }
 

Functions

 TEMU_IFACE_REFERENCE_TYPE (temu_Mil1553Dev)
 
 TEMU_IFACE_REFERENCE_TYPE (temu_Mil1553Bus)
 

Macro Definition Documentation

#define teM1553MC_DynamicBusControl   (TEMU_1553_TR_BIT|0x00)

Definition at line 254 of file MilStd1553.h.

#define teM1553MC_InhibitTerminalFlagBit   (TEMU_1553_TR_BIT|0x06)

Definition at line 260 of file MilStd1553.h.

#define teM1553MC_InitiateSelfTest   (TEMU_1553_TR_BIT|0x03)

Definition at line 257 of file MilStd1553.h.

#define teM1553MC_OverrideInhibitTerminalFlagBit   (TEMU_1553_TR_BIT|0x07)

Definition at line 261 of file MilStd1553.h.

#define teM1553MC_OverrideSelectedTransmitter   (0x15)

Definition at line 268 of file MilStd1553.h.

#define teM1553MC_OverrideTransmitter   (TEMU_1553_TR_BIT|0x05)

Definition at line 259 of file MilStd1553.h.

#define teM1553MC_ResetRT   (TEMU_1553_TR_BIT|0x08)

Definition at line 262 of file MilStd1553.h.

#define teM1553MC_SelectedTransmitter   (0x14)

Definition at line 267 of file MilStd1553.h.

#define teM1553MC_Synchronize   (TEMU_1553_TR_BIT|0x01)

Definition at line 255 of file MilStd1553.h.

#define teM1553MC_SynchronizeWithData   (0x11)

Definition at line 264 of file MilStd1553.h.

#define teM1553MC_TransmitBITWord   (TEMU_1553_TR_BIT|0x13)

Definition at line 266 of file MilStd1553.h.

#define teM1553MC_TransmitLastCommand   (TEMU_1553_TR_BIT|0x12)

Definition at line 265 of file MilStd1553.h.

#define teM1553MC_TransmitStatusWord   (TEMU_1553_TR_BIT|0x02)

Definition at line 256 of file MilStd1553.h.

#define teM1553MC_TransmitterShutdown   (TEMU_1553_TR_BIT|0x04)

Definition at line 258 of file MilStd1553.h.

#define teM1553MC_TransmitVectorWord   (TEMU_1553_TR_BIT|0x10)

Definition at line 263 of file MilStd1553.h.

#define TEMU_1553_BITS_PER_WORD   20

Definition at line 136 of file MilStd1553.h.

#define TEMU_1553_NS_PER_WORD   20000

Definition at line 128 of file MilStd1553.h.

#define TEMU_1553_TR_BIT   0x20

Definition at line 252 of file MilStd1553.h.

Typedef Documentation

This is the 1553 device modelling API. It provides an interface to be used for implementing bus controllers and remote terminals.

The 1553 device interface is EXPERIMENTAL and UNSTABLE at the moment.

One limitation at the moment is that we do not support a specific bus monitor interface. However, it is possible to get reports via the "temu.mil1553send" event, this way you can sort of insert a virtual bus monitor. It does not let you configure a terminal as a bus monitor however. These events take an temu_Mil1553Msg pointer as the event info argument.

The bus is modelled on a two message approach: The first transaciton sends a command word, this allows the receiving RTs to take action on the first word. The second message is the actual data, this should be sent at the relevant time.

Normally, we distinguish the start and end message by the end message having a data pointer set and the begin message not having it set.

Controller to RT transfer:

  • Controller sends one message with a receive command and data
  • RT sends status word RT to controller transfer:
  • Controller sends transmitt command
  • RT sends status word and data. RT-to-RT:
  • Controller sends transmitt and receive command.
  • RT sends data in one message MODE-command without data
  • Controller sends mode command
  • RT sends status word MODE-command with data:
  • Controller sends mode command
  • RT sends status word and data word MODE-command with data word (receive):
  • Controller sends mode command and data word
  • RT sends status word Controller to RT broadcast:
  • Controller sends one messeage (no responses) RT to RT broadcast:
  • Controller sends receive and transmitt command
  • RT sends status and data (in broadcast) Mode command without data word broadcast:
  • Controller sends mode command (no responses) Mode command with data word receive
  • Controller sends mode command and data word (no response)

Enumeration Type Documentation

This is the 1553 device modelling API. It provides an interface to be used for implementing bus controllers and remote terminals.

The 1553 device interface is EXPERIMENTAL and UNSTABLE at the moment.

One limitation at the moment is that we do not support a specific bus monitor interface. However, it is possible to get reports via the "temu.mil1553send" event, this way you can sort of insert a virtual bus monitor. It does not let you configure a terminal as a bus monitor however. These events take an temu_Mil1553Msg pointer as the event info argument.

The bus is modelled on a two message approach: The first transaciton sends a command word, this allows the receiving RTs to take action on the first word. The second message is the actual data, this should be sent at the relevant time.

Normally, we distinguish the start and end message by the end message having a data pointer set and the begin message not having it set.

Controller to RT transfer:

  • Controller sends one message with a receive command and data
  • RT sends status word RT to controller transfer:
  • Controller sends transmitt command
  • RT sends status word and data. RT-to-RT:
  • Controller sends transmitt and receive command.
  • RT sends data in one message MODE-command without data
  • Controller sends mode command
  • RT sends status word MODE-command with data:
  • Controller sends mode command
  • RT sends status word and data word MODE-command with data word (receive):
  • Controller sends mode command and data word
  • RT sends status word Controller to RT broadcast:
  • Controller sends one messeage (no responses) RT to RT broadcast:
  • Controller sends receive and transmitt command
  • RT sends status and data (in broadcast) Mode command without data word broadcast:
  • Controller sends mode command (no responses) Mode command with data word receive
  • Controller sends mode command and data word (no response)
Enumerator
teME_NoError 
teME_ParityError 
teME_SyncError 

Definition at line 74 of file MilStd1553.h.

Enumerator
teMT_Cmd 
teMT_Data 
teMT_Stat 
teMT_Mode 

Definition at line 80 of file MilStd1553.h.

Function Documentation

TEMU_IFACE_REFERENCE_TYPE ( temu_Mil1553Dev  )
TEMU_IFACE_REFERENCE_TYPE ( temu_Mil1553Bus  )