Configuration
The bus model is configured using the Mil1553BusIface. The main work is to call the connect function to insert a remote terminal at the given subaddress.
SetBusController should be called to set the current bus controller (note, this can be done at runtime).
The construction of a network with 1553 devices are simplified by using the following commands in the command line interface:
-
mil-std-1553-connect bus=b rt=rt addr=1
-
mil-std-1553-disconnect bus=b addr=1
-
mil-std-1553-setbc bus=b bc=bc
Attributes
Properties
Name | Type | Description |
---|---|---|
bc |
iref / <unknown> |
|
devices |
[32 x iref / <unknown>] |
|
inhibitChA |
uint8_t |
|
inhibitChB |
uint8_t |
|
lastCmd |
uint16_t |
|
object.timeSource |
object |
Time source object (a cpu or machine object) |
receiverRT |
int8_t |
|
stats.lastReportSentWords |
uint64_t |
|
stats.sentWords |
uint64_t |
|
transmitterRT |
int8_t |
Notifications
The default TEMU milbus model issues the following notifications:
Name | Description | Param Type |
---|---|---|
temu.mil1553Stat |
Statistics notification. |
temu_Mil1553Stats* |
temu.mil1553Send |
Valid message in transit. |
temu_Mil1553Msg* |
The statistics notification is issued when calling the reportStats function in the bus interface. The user can call this function from a timed event handler if needed. Another interesting calling point is to force statistics reporting at a PPS tick, i.e. a PPS device issues the call to the milbus object to report the statistics, and can attempt to post other events at minor cycle intervals for example. This way the stat event can be used to monitor whether the system keeps the milbus budget.
The send notification receives a pointer with the actual message in transit, but before it has been delivered to the remote terminal (but after the bus object has rejected any messages transmitted illegally). The notification handler is free to modify the message, for example it is possible to set the Err field in the message struct to inject a transfer error, the RT can then set the message error bit in the status word.