prcv_dtq

iprcv_dtq

Outline

Receive from data queue (polling).

C format

 ER      prcv_dtq (ID dtqid, VP_INT *p_data);
 ER      iprcv_dtq (ID dtqid, VP_INT *p_data);
Parameter(s)

I/O

Parameter

Description

I

 ID      dtqid;
ID number of the data queue from which a data element is received.

O

 VP_INT  *p_data;
Data element received from the data queue.



Explanation(s)

These service calls read data in the data queue area of the data queue specified by parameter dtqid and stores it to the area specified by parameter p_data.

If no data could be read from the data queue area of the target data queue (no data has been written to the data queue area) when either of these service calls is issued, the service call does not read data but E_TMOUT is returned.

Note If no data could be read from the data queue area of the target data queue (no data has been written to the data queue area) when either of these service calls is issued, the contents in the area specified by parameter p_data become undefined.

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.

E_TMOUT

-50

Polling failure.

- No data exists in the target data queue.