- 189 -
[
[
[
[
E
E
r
r
r
r
o
o
r
r
c
c
o
o
d
d
e
e
]
]
]
]
E_RLWAI
Forced release from waiting
E_TMOUT
Polling failure or timeout or timed out
E_ILUSE
Service call improperly used (vfsnd_dtq or vifsnd_dtq is issued for a Short data
queue whose dtqcnt = 0)
EV_RST
Released from a wait state by clearing of the Short data queue area
[
[
[
[
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 sends the signed 2-byte data indicated by data to the Short data queue indicated by vdtqid. If any task is
kept waiting for reception in the target Short data queue, the data is not stored in the Short data queue and instead sent to
the task at the top of the reception waiting queue, with which the task is released from the reception wait state.
On the other hand, if vsnd_dtq or vtsnd_dtq is issued for a Short data queue that is full of data, the task that issued the ser-
vice call goes from RUNNING state to a data transmission wait state, and is enqueued in a transmission waiting queue,
kept waiting for the Short data queue to become available. In that case, if the attribute of the specified Short data queue is
TA_TFIFO, the task is enqueued in order of FIFO; if TA_TPRI, the task is enqueued in order of priority. For vpsnd_dtq and
vipsnd_dtq, the task returns immediately and responds to the call with the error code E_TMOUT.
For the vtsnd_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 vpsnd_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 vsnd_dtq.
If there are no tasks waiting for reception, nor is the Short data queue area filled, the transmitted data is stored in the Short
data queue.
The task placed into a wait state by execution of the vsnd_dtq or vtsnd_dtq service call is released from WAITING 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.
When the target Short data queue being waited for is initialized by the vrst_vdtq service call is-
sued from another task
The error code returned in this case is EV_RST.
For vfsnd_dtq and vifsnd_dtq, the data at the top of the Short data queue or the oldest data is removed, and the transmitted
data is stored at the tail of the Short data queue. If the Short data queue area is not filled with data, vfsnd_dtq and
vifsnd_dtq operate the same way as vsnd_dtq. If dtqcnt = 0 ,there is no task in the wait queue and vfsnd_dtq or vifsnd_dtq
service call is issued, error code E_ILUSE will be returned.
If this service call is to be issued from task context, use vsnd_dtq,vtsnd_dtq,vpsnd_dtq,vfsnd_dtq; if issued from non-task
context, use vipsnd_dtq,vifsnd_dtq.