Renesas M3T-MR100 Network Card User Manual


 
- 192 -
[
[
[
[
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 Short data queue indicated by vdtqid and stores the received data in the area pointed
to by p_data. If data is present in the target Short 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 Short data queue area, so that a task enqueued in a transmission waiting queue is
released from WAITING state, and starts sending data to the Short data queue area.
If no data exist in the Short data queue and there is any task waiting to send data (i.e., data bytes in the Short 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 vrcv_dtq or vtrcv_dtq is issued for the Short 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 vprcv_dtq and viprcv_dtq service calls, the task returns
immediately and responds to the call with the error code E_TMOUT.
For the vtrcv_dtq service call, specify a wait time for tmout in ms units. The values specified for tmout must be within
0x7FFFFFFF. 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
vprcv_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 vrcv_dtq.
The task placed into a wait state by execution of the vrcv_dtq or vtrcv_dtq service call is released from the wait state in the
following cases:
When the vrcv_dtq, vtrcv_dtq, vprcv_dtq, or viprcv_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 vrcv_dtq,vtrcv_dtq,vprcv_dtq; if issued from non-task context, use
viprcv_dtq.