Download RI850MP Real-Time Operating System User`s Manual: Coding
Transcript
RI850MP Ver.1.00.00 CHAPTER 13 SERVICE CALLS tsnd_dtq [Overview] Send to data queue (with timeout). [Syntax] ER tsnd_dtq(ID dtqid, VP_INT data, TMO tmout); [Parameters] I/O Parameter Description I ID dtqid; ID of data queue I VP_INT data; Data element to be sent I TMO tmout; Specified timeout (in milliseconds) TMO_FEVR : Wait forever TMO_POL : Polling Numerical value : Wait time [Function] This sends the data specified by data to the data queue specified by dtqid. Note that when this service call is issued, if the amount of data written to the target data queue's buffer area is the same as the value specified by Maximum data count dtqcnt, then the data-send operation is not performed. Instead, the data is queued to the data wait queue for the current task, and the state changes from execution state to wait to sending WAITING state. The Sending WAITING state for a data queue is cancelled in the following cases, and then the state transitions to the READY state. Cancellation of Sending WAITING State for a data queue Available space was secured in the buffer area of the target data queue as a result of issuing Return Value E_OK rcv_dtq. Available space was secured in the buffer area of the target data queue as a result of issuing E_OK prcv_dtq/iprcv_dtq. Available space was secured in the buffer area of the target data queue as a result of issuing E_OK trcv_dtq. Forced release from Sending WAITING state for a data queue as a result of issuing rel_wai/ E_RLWAI irel_wai. Time specified by tmout has elapsed (timeout) E_TMOUT If a task has been queued to the reception wait queue of the target data queue when this service call is issued, this service call does not send data but transfers the data to the task (first task in wait queue). This removes the target task from the wait queue, and changes its status from Receiving WAITING state for a data queue to READY state, or from WAITING-SUSPENDED state to SUSPENDED state. R20UT0519EJ0100 Rev.1.00 Apr 01, 2011 Page 111 of 218