Everything

ref_dtq

iref_dtq

Outline
Reference data queue state.
C format
 ER      ref_dtq (ID dtqid, T_RDTQ *pk_rdtq);
 ER      iref_dtq (ID dtqid, T_RDTQ *pk_rdtq);
Parameter(s)
I/O
Parameter
Description
I
 ID      dtqid;
ID number of the data queue to be referenced.
O
 T_RDTQ  *pk_rdtq;
Pointer to the packet returning the data queue state.

[Data queue state packet: T_RDTQ]
 typedef struct  t_rdtq {
     ID      stskid;         /*Existence of tasks waiting for data transmission*/
     ID      rtskid;         /*Existence of tasks waiting for data reception*/
     UINT    sdtqcnt;        /*Number of data elements in data queue*/
     ATR     dtqatr;         /*Attribute*/
     UINT    dtqcnt;         /*Data count*/
     ID      memid;          /*Reserved for future use*/
 } T_RDTQ;

Explanation
These service calls store the detailed information of the data queue (existence of waiting tasks, number of data elements in the data queue, etc.) specified by parameter dtqid into the area specified by parameter pk_rdtq.
Note For details about the data queue state packet, refer to "15.2.5 Data queue state packet".
Return value
Macro
Value
Description
E_OK
0
Normal completion.
E_ID
-18
Invalid ID number.
- dtqid < 0x0
- dtqid > Maximum ID number
E_CTX
-25
Context error.
- This service call was issued in the CPU locked state.
E_NOEXS
-42
Non-existent object.
- Specified data queue is not registered.