MIL-STD-1553 Reference Manual
Chapter 9 – Bus Monitor Functions
9.1.31 ApiCmdQueueRead
Prototype:
AiInt16 ApiCmdQueueRead ( AiUInt32 ul_ModuleHandle, AiUInt8 biu,
TY_API_QUEUE_BUF *qmesg );
Driver Command:
none
Purpose:
This function is used to read a single 1553 message structure
(TY_API_QUEUE_BUF structure) from the head of the BM Monitor Buffer queue. If
the queue is empty the function returns API_ERR_QUEUE_EMPTY. If the queue
has overflowed the function returns API_ERR_QUEUE_OVERFLOW. After an
overflow has I the queueing system must be stopped and restarted again with the
ApiCmdQueueHalt and ApiCmdQueueIni / ApiCmdQueueFlush functions. The
internal queue pointer is incremented automatically such that subsequent
ApiCmdQueueRead function calls can be made
ehavior
on thereafter.
I
I
n
n
p
p
u
u
t
t
n
n
o
o
n
n
e
e
O
O
u
u
t
t
p
p
u
u
t
t
T
T
Y
Y
_
_
A
A
P
P
I
I
_
_
Q
Q
U
U
E
E
U
U
E
E
_
_
B
B
U
U
F
F
*
*
q
q
m
m
e
e
s
s
g
g
Pointer to the TY_API_QUEUE_BUF structure
typedef struct ty_api_queue_buf
{
AiUInt8 rt_addr;
AiUInt8 sa_mc;
AiUInt8 sa_type;
AiUInt8 rt_addr2;
AiUInt8 sa_mc2;
AiUInt8 sa_type2;
AiUInt8 word_cnt;
AiUInt8 rbf_trw;
AiUInt16 msg_trw;
AiUInt16 status_word1;
AiUInt16 status_word2;
AiUInt16 buffer[32];
AiUInt32 ttag;
} TY_API_QUEUE_BUF;
A
A
i
i
U
U
I
I
n
n
t
t
8
8
r
r
t
t
_
_
a
a
d
d
d
d
r
r
Remote Terminal Address
(Receive RT for RT-RT transfers)
A
A
i
i
U
U
I
I
n
n
t
t
8
8
s
s
a
a
_
_
m
m
c
c
RT Subaddress
(SA of Receive RT in RT-RT transfers)
Mode code
(MC of Receive RT in RT-RT transfers)