TEMU  4.4
The Terma Emulator
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_Mil1553BusIdleInfo
 
struct  temu_Mil1553DevIface
 
struct  temu_Mil1553BusIface
 
struct  temu_Mil1553Stats
 

Macros

#define TEMU_1553_MSG_FLAG_INHIBIT_A   0x1
 
#define TEMU_1553_MSG_FLAG_INHIBIT_B   0x2
 
#define TEMU_1553_NS_PER_WORD   20000
 
#define TEMU_1553_BITS_PER_WORD   20
 
#define TEMU_MIL1553_DEV_IFACE_TYPE   "Mil1553DevIface"
 
#define TEMU_MIL1553_BUS_IFACE_TYPE   "Mil1553BusIface"
 
#define TEMU_1553_TR_BIT   0x20
 
#define TEMU_1553_DYN_BUS_CTRL   0x00
 
#define TEMU_1553_SYNC_NO_DATA   0x01
 
#define TEMU_1553_TRANSMIT_STATUS_WORD   0x02
 
#define TEMU_1553_INITIATE_SELF_TEST   0x03
 
#define TEMU_1553_TRANSMITTER_SHUTDOWN   0x04
 
#define TEMU_1553_OVERRIDE_TRANSMITTER   0x05
 
#define TEMU_1553_INHIBIT_TERM_FLAG_BIT   0x06
 
#define TEMU_1553_OVERRIDE_INHIBIT_TERM_FLAG_BIT   0x07
 
#define TEMU_1553_RESET_RT   0x08
 
#define TEMU_1553_TRANSMIT_VECTOR_WORD   0x10
 
#define TEMU_1553_SYNC_WITH_DATA   0x11
 
#define TEMU_1553_TRANSMIT_LAST_CMD   0x12
 
#define TEMU_1553_TRANSMIT_BIT_WORD   0x13
 
#define TEMU_1553_SELECTED_TRANSMITTER   0x14
 
#define TEMU_1553_OVERRIDE_SELECTED_TRANSMITTER   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
 
typedef enum temu_Mil1553BusResetType temu_Mil1553BusResetType
 

Enumerations

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

Functions

 TEMU_IFACE_REFERENCE_TYPE (temu_Mil1553Dev)
 
 TEMU_IFACE_REFERENCE_TYPE (temu_Mil1553Bus)
 

Macro Definition Documentation

◆ TEMU_1553_BITS_PER_WORD

#define TEMU_1553_BITS_PER_WORD   20

◆ TEMU_1553_DYN_BUS_CTRL

#define TEMU_1553_DYN_BUS_CTRL   0x00

◆ TEMU_1553_INHIBIT_TERM_FLAG_BIT

#define TEMU_1553_INHIBIT_TERM_FLAG_BIT   0x06

◆ TEMU_1553_INITIATE_SELF_TEST

#define TEMU_1553_INITIATE_SELF_TEST   0x03

◆ TEMU_1553_MSG_FLAG_INHIBIT_A

#define TEMU_1553_MSG_FLAG_INHIBIT_A   0x1

◆ TEMU_1553_MSG_FLAG_INHIBIT_B

#define TEMU_1553_MSG_FLAG_INHIBIT_B   0x2

◆ TEMU_1553_NS_PER_WORD

#define TEMU_1553_NS_PER_WORD   20000

◆ TEMU_1553_OVERRIDE_INHIBIT_TERM_FLAG_BIT

#define TEMU_1553_OVERRIDE_INHIBIT_TERM_FLAG_BIT   0x07

◆ TEMU_1553_OVERRIDE_SELECTED_TRANSMITTER

#define TEMU_1553_OVERRIDE_SELECTED_TRANSMITTER   0x15

◆ TEMU_1553_OVERRIDE_TRANSMITTER

#define TEMU_1553_OVERRIDE_TRANSMITTER   0x05

◆ TEMU_1553_RESET_RT

#define TEMU_1553_RESET_RT   0x08

◆ TEMU_1553_SELECTED_TRANSMITTER

#define TEMU_1553_SELECTED_TRANSMITTER   0x14

◆ TEMU_1553_SYNC_NO_DATA

#define TEMU_1553_SYNC_NO_DATA   0x01

◆ TEMU_1553_SYNC_WITH_DATA

#define TEMU_1553_SYNC_WITH_DATA   0x11

◆ TEMU_1553_TR_BIT

#define TEMU_1553_TR_BIT   0x20

◆ TEMU_1553_TRANSMIT_BIT_WORD

#define TEMU_1553_TRANSMIT_BIT_WORD   0x13

◆ TEMU_1553_TRANSMIT_LAST_CMD

#define TEMU_1553_TRANSMIT_LAST_CMD   0x12

◆ TEMU_1553_TRANSMIT_STATUS_WORD

#define TEMU_1553_TRANSMIT_STATUS_WORD   0x02

◆ TEMU_1553_TRANSMIT_VECTOR_WORD

#define TEMU_1553_TRANSMIT_VECTOR_WORD   0x10

◆ TEMU_1553_TRANSMITTER_SHUTDOWN

#define TEMU_1553_TRANSMITTER_SHUTDOWN   0x04

◆ TEMU_MIL1553_BUS_IFACE_TYPE

#define TEMU_MIL1553_BUS_IFACE_TYPE   "Mil1553BusIface"

◆ TEMU_MIL1553_DEV_IFACE_TYPE

#define TEMU_MIL1553_DEV_IFACE_TYPE   "Mil1553DevIface"

Typedef Documentation

◆ temu_Mil1553BusIface

◆ temu_Mil1553BusResetType

◆ temu_Mil1553DevIface

◆ temu_Mil1553Error

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 1553 bus is modeled on a phased message approach, this stem from the capability of supporting RT->RT transfers. Without the phases, each RT would need to have special logic to decode whether data is from the BC or an RT (i.e. is the first word a command or a status word).

◆ temu_Mil1553Msg

◆ temu_Mil1553MsgType

Enumeration Type Documentation

◆ temu_Mil1553BusResetType

Enumerator
teMBR_Nominal 

◆ temu_Mil1553Error

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 1553 bus is modeled on a phased message approach, this stem from the capability of supporting RT->RT transfers. Without the phases, each RT would need to have special logic to decode whether data is from the BC or an RT (i.e. is the first word a command or a status word).

Enumerator
teME_NoError 
teME_ParityError 
teME_SyncError 

◆ temu_Mil1553MsgType

Enumerator
teMT_Cmd 
teMT_Data 
teMT_Stat 

Function Documentation

◆ TEMU_IFACE_REFERENCE_TYPE() [1/2]

TEMU_IFACE_REFERENCE_TYPE ( temu_Mil1553Bus  )

◆ TEMU_IFACE_REFERENCE_TYPE() [2/2]

TEMU_IFACE_REFERENCE_TYPE ( temu_Mil1553Dev  )