Renesas M3T-MR100 Network Card User Manual


 
- 123 -
[
[
[
[
F
F
u
u
n
n
c
c
t
t
i
i
o
o
n
n
a
a
l
l
d
d
e
e
s
s
c
c
r
r
i
i
p
p
t
t
i
i
o
o
n
n
]
]
]
]
This service call receives data from the data queue indicated by dtqid and stores the received data in the area pointed to by
p_data. If data is present in the target data queue, the data at the top of the queue or the oldest data is received. This results
in creating a free space in the data queue area, so that a task enqueued in a transmission waiting queue is released from
WAITING state, and starts sending data to the data queue area.
If no data exist in the data queue and there is any task waiting to send data (i.e., data bytes in the data queue area = 0), data
for the task at the top of the data transmission waiting queue is received. As a result, the task kept waiting to send that data
is released from WAITING state.
On the other hand, if rcv_dtq or trcv_dtq is issued for the data queue which has no data stored in it, the task that issued the
service call goes from RUNNING state to a data reception wait state, and is enqueued in a data reception waiting queue. At
this time, the task is enqueued in order of FIFO. For the prcv_dtq and iprcv_dtq service calls, the task returns immediately
and responds to the call with the error code E_TMOUT.
For the trcv_dtq service call, specify a wait time for tmout in ms units. The values specified for tmout must be within
(0x7FFFFFFF-time tick value). If any value exceeding this limit is specified, the service call may not operate correctly. If
TMO_POL=0 is specified for tmout, it means specifying 0 as a timeout value, in which case the service call operates the
same way as prcv_dtq. Furthermore, if specified as tmout=TMO_FEVR(–1), it means specifying an infinite wait, in which
case the service call operates the same way as rcv_dtq.
The task placed into a wait state by execution of the rcv_dtq or trcv_dtq service call is released from the wait state in the
following cases:
When the rcv_dtq, trcv_dtq, prcv_dtq, or iprcv_dtq service call is issued before the tmout time
elapses, with task-awaking conditions thereby satisfied
The error code returned in this case is E_OK.
When the first time tick occurred after tmout elapsed while task-awaking conditions remain un-
satisfied
The error code returned in this case is E_TMOUT.
When the task is forcibly released from WAITING state by the rel_wai or irel_wai service call is-
sued from another task or a handler
The error code returned in this case is E_RLWAI.
If this service call is to be issued from task context, use rcv_dtq,trcv_dtq,prcv_dtq; if issued from non-task context, use
iprcv_dtq.