TEMU  2
The Terma Emulator
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
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_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

#define TEMU_1553_BITS_PER_WORD   20

Definition at line 79 of file MilStd1553.h.

#define TEMU_1553_DYN_BUS_CTRL   0x00

Definition at line 447 of file MilStd1553.h.

#define TEMU_1553_INHIBIT_TERM_FLAG_BIT   0x06

Definition at line 453 of file MilStd1553.h.

#define TEMU_1553_INITIATE_SELF_TEST   0x03

Definition at line 450 of file MilStd1553.h.

#define TEMU_1553_NS_PER_WORD   20000

Definition at line 71 of file MilStd1553.h.

#define TEMU_1553_OVERRIDE_INHIBIT_TERM_FLAG_BIT   0x07

Definition at line 454 of file MilStd1553.h.

#define TEMU_1553_OVERRIDE_SELECTED_TRANSMITTER   0x15

Definition at line 461 of file MilStd1553.h.

#define TEMU_1553_OVERRIDE_TRANSMITTER   0x05

Definition at line 452 of file MilStd1553.h.

#define TEMU_1553_RESET_RT   0x08

Definition at line 455 of file MilStd1553.h.

#define TEMU_1553_SELECTED_TRANSMITTER   0x14

Definition at line 460 of file MilStd1553.h.

#define TEMU_1553_SYNC_NO_DATA   0x01

Definition at line 448 of file MilStd1553.h.

#define TEMU_1553_SYNC_WITH_DATA   0x11

Definition at line 457 of file MilStd1553.h.

#define TEMU_1553_TR_BIT   0x20

Definition at line 445 of file MilStd1553.h.

#define TEMU_1553_TRANSMIT_BIT_WORD   0x13

Definition at line 459 of file MilStd1553.h.

#define TEMU_1553_TRANSMIT_LAST_CMD   0x12

Definition at line 458 of file MilStd1553.h.

#define TEMU_1553_TRANSMIT_STATUS_WORD   0x02

Definition at line 449 of file MilStd1553.h.

#define TEMU_1553_TRANSMIT_VECTOR_WORD   0x10

Definition at line 456 of file MilStd1553.h.

#define TEMU_1553_TRANSMITTER_SHUTDOWN   0x04

Definition at line 451 of file MilStd1553.h.

#define TEMU_MIL1553_BUS_IFACE_TYPE   "Mil1553BusIface"

Definition at line 282 of file MilStd1553.h.

#define TEMU_MIL1553_DEV_IFACE_TYPE   "Mil1553DevIface"

Definition at line 269 of file MilStd1553.h.

Typedef Documentation

Definition at line 243 of file MilStd1553.h.

Definition at line 242 of file MilStd1553.h.

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).

Enumeration Type Documentation

Enumerator
teMBR_Nominal 

Definition at line 247 of file MilStd1553.h.

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 

Definition at line 42 of file MilStd1553.h.

Enumerator
teMT_Cmd 
teMT_Data 
teMT_Stat 

Definition at line 50 of file MilStd1553.h.

Function Documentation

TEMU_IFACE_REFERENCE_TYPE ( temu_Mil1553Dev  )
TEMU_IFACE_REFERENCE_TYPE ( temu_Mil1553Bus  )