...
Anchor |
---|
1080089 | 1080089 | Message Queues Anchor |
---|
1080090 | 1080090 | Table C-12 This table shows the difference in API for message-queue management.
anchor...
HTML Table |
---|
summary |
---|
class | Plain_Table |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
Anchor |
---|
1091598 | 1091598 | |
Table Cell (td) |
---|
Anchor |
---|
| 1091600 | 1091600 Table Cell (td) |
---|
Anchor |
---|
1091602 | 1091602 Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1091604 | 1091604 * Anchor |
---|
1091605 | 1091605 | OSQAccept( Anchor |
---|
1091606 | 1091606 | *
OSQAccept(
OS_EVENT *pevent, |
Anchor |
---|
1091607 | 1091607 | INT8U Table Cell (td) |
---|
|
Anchor |
---|
1091609 | 1091609 | Table Cell (td) |
---|
|
anchor1091611 | 1091611 | Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1091631 | 1091631 | * Anchor |
---|
1091632 | 1091632 | OSQCreate( Anchor |
---|
1091633 | 1091633 | void **start, Anchor |
---|
1091634 | 1091634 | INT16U size); Table Cell (td) |
---|
|
Anchor |
---|
1091636 | 1091636 | void Anchor |
---|
1091637 | 1091637 | OSQCreate( Anchor |
---|
1091638 | 1091638 | OS_Q *p_q, Anchor |
---|
1091639 | 1091639 | CPU_CHAR *p_name, Anchor |
---|
1091640 | 1091640 | OS_MSG_QTY max_qty, Anchor |
---|
1091641 | 1091641 | OS_ERR *p_err); Table Cell (td) |
---|
|
Anchor |
---|
1091643 | 1091643 | (2) Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1091663 | 1091663 | OS_EVENT * Anchor |
---|
1091664 | 1091664 | OSQDel( Anchor |
---|
1091665 | 1091665 | OS_EVENT *pevent, Anchor |
---|
1091666 | 1091666 | INT8U opt, Anchor |
---|
1091667 | 1091667 | INT8U *perr); Table Cell (td) |
---|
|
Anchor |
---|
1091669 | 1091669 | OS_OBJ_QTY, Anchor |
---|
1091670 | 1091670 | OSQDel( Anchor |
---|
1091671 | 1091671 | OS_Q *p_q, Anchor |
---|
1091672 | 1091672 | OS_OPT opt, Anchor |
---|
1091673 | 1091673 | OS_ERR *p_err); Table Cell (td) |
---|
|
Anchor |
---|
1091675 | 1091675 | Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1091701 | 1091701 | INT8U Anchor |
---|
1091702 | 1091702 | OSQFlush( Anchor |
---|
1091703 | 1091703 | OS_EVENT *pevent); Table Cell (td) |
---|
|
Anchor |
---|
1091705 | 1091705 | OS_MSG_QTY Anchor |
---|
1091706 | 1091706 | OSQFlush( Anchor |
---|
1091707 | 1091707 | OS_Q *p_q, Anchor |
---|
1091708 | 1091708 | OS_ERR *p_err); Table Cell (td) |
---|
|
Anchor |
---|
1091710 | 1091710 | Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1091748 | 1091748 | void * Anchor |
---|
1091749 | 1091749 | OSQPend( Anchor |
---|
1091750 | 1091750 | OS_EVENT *pevent, Anchor |
---|
1091751 | 1091751 | INT32U timeout, Anchor |
---|
1091752 | 1091752 | INT8U *perr); Table Cell (td) |
---|
|
Anchor |
---|
1091754 | 1091754 | void * Anchor |
---|
1091755 | 1091755 | OSQPend( Anchor |
---|
1091756 | 1091756 | OS_Q *p_q, Anchor |
---|
1091757 | 1091757 | OS_MSG_SIZE *p_msg_size, Anchor |
---|
1091758 | 1091758 | OS_TICK timeout, Anchor |
---|
1091759 | 1091759 | OS_OPT opt, Anchor |
---|
1091760 | 1091760 | CPU_TS *p_ts, Anchor |
---|
1091761 | 1091761 | OS_ERR *p_err); Table Cell (td) |
---|
|
Anchor |
---|
1091763 | 1091763 | (3) Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1091807 | 1091807 | INT8U Anchor |
---|
1091808 | 1091808 | OSQPendAbort( Anchor |
---|
1091809 | 1091809 | OS_EVENT *pevent, Anchor |
---|
1091810 | 1091810 | INT8U opt, Anchor |
---|
1091811 | 1091811 | INT8U *perr); Table Cell (td) |
---|
|
Anchor |
---|
1091813 | 1091813 | OS_OBJ_QTY Anchor |
---|
1091814 | 1091814 | OSQPendAbort( Anchor |
---|
1091815 | 1091815 | OS_Q *p_q, Anchor |
---|
1091816 | 1091816 | OS_OPT opt, Anchor |
---|
1091817 | 1091817 | OS_ERR *p_err); Table Cell (td) |
---|
|
Anchor |
---|
1091819 | 1091819 | Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1091887 | 1091887 | INT8U Anchor |
---|
1091888 | 1091888 | OSQPost( Anchor |
---|
1091889 | 1091889 | OS_EVENT *pevent, Anchor |
---|
1091890 | 1091890 | void *pmsg); Table Cell (td) |
---|
|
Anchor |
---|
1091892 | 1091892 | void Anchor |
---|
1091893 | 1091893 | OSQPost( Anchor |
---|
1091894 | 1091894 | OS_Q *p_q, Anchor |
---|
1091895 | 1091895 | void *p_void, Anchor |
---|
1091896 | 1091896 | OS_MSG_SIZE msg_size, Anchor |
---|
1091897 | 1091897 | OS_OPT opt, Anchor |
---|
1091898 | 1091898 | OS_ERR *p_err); Table Cell (td) |
---|
|
Anchor |
---|
1091900 | 1091900 | (4) Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1091920 | 1091920 | INT8U Anchor |
---|
1091926 | 1091926 | OSQPostFront( Anchor |
---|
1091932 | 1091932 | OS_EVENT *pevent, Anchor |
---|
1091938 | 1091938 | void *pmsg); Table Cell (td) |
---|
|
Anchor |
---|
1091946 | 1091946 | Table Cell (td) |
---|
|
Anchor |
---|
1091948 | 1091948 | Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1091950 | 1091950 | INT8U Anchor |
---|
1091956 | 1091956 | OSQPostOpt( Anchor |
---|
1091962 | 1091962 | OS_EVENT *pevent, Anchor |
---|
1091968 | 1091968 | void *pmsg, Anchor |
---|
1091974 | 1091974 | INT8U opt); Table Cell (td) |
---|
|
Anchor |
---|
1091952 | 1091952 | Table Cell (td) |
---|
|
Anchor |
---|
1091978 | 1091978 | (4) Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
Table Cell (td) |
---|
|
Anchor |
---|
1091980 | 1091980 | INT8U Anchor |
---|
1091986 | 1091986 | OSQQuery( Anchor |
---|
1091992 | 1091992 | OS_EVENT *pevent, Anchor |
---|
1091998 | 1091998 | OS_Q_DATA *p_q_data); Table Cell (td) |
---|
|
Anchor |
---|
1091982 | 1091982 | Table Cell (td) |
---|
|
Anchor |
---|
1092002 | 1092002 | (5) Table Row (tr) |
---|
Table Row (tr) |
---|
Table Row (tr) |
---|
...
*
OSQCreate(
void **start,
INT16U size); | void
OSQCreate(
OS_Q *p_q,
CPU_CHAR *p_name,
OS_MSG_QTY max_qty,
OS_ERR *p_err); | (2) | OS_EVENT *
OSQDel(
OS_EVENT *pevent,
INT8U opt,
INT8U *perr); | OS_OBJ_QTY,
OSQDel(
OS_Q *p_q,
OS_OPT opt,
OS_ERR *p_err); |
| INT8U
OSQFlush(
OS_EVENT *pevent); | OS_MSG_QTY
OSQFlush(
OS_Q *p_q,
OS_ERR *p_err); |
| void *
OSQPend(
OS_EVENT *pevent,
INT32U timeout,
INT8U *perr); | void *
OSQPend(
OS_Q *p_q,
OS_MSG_SIZE *p_msg_size,
OS_TICK timeout,
OS_OPT opt,
CPU_TS *p_ts,
OS_ERR *p_err); | (3) | INT8U
OSQPendAbort(
OS_EVENT *pevent,
INT8U opt,
INT8U *perr); | OS_OBJ_QTY
OSQPendAbort(
OS_Q *p_q,
OS_OPT opt,
OS_ERR *p_err); |
| INT8U
OSQPost(
OS_EVENT *pevent,
void *pmsg); | void
OSQPost(
OS_Q *p_q,
void *p_void,
OS_MSG_SIZE msg_size,
OS_OPT opt,
OS_ERR *p_err); | (4) | INT8U
OSQPostFront(
OS_EVENT *pevent,
void *pmsg); |
|
| INT8U
OSQPostOpt(
OS_EVENT *pevent,
void *pmsg,
INT8U opt); |
| (4) | INT8U
OSQQuery(
OS_EVENT *pevent,
OS_Q_DATA *p_q_data); |
| (5) |
|
Panel |
---|
|
(1) In µC/OS-III, there is no “accept” API as this feature is built into the OSQPend() by specifying the OS_OPT_PEND_NON_BLOCKING option. |
...
(2) In µC/OS-II, OSQCreate() returns the address of an OS_EVENT , which is used as the “handle” to the message queue. In µC/OS-III, the application must allocate storage for an OS_Q object, which serves the same purpose as the OS_EVENT . The benefit in µC/OS-III is that it is not necessary to predetermine at compile time, the number of message queues. |
...
(3) µC/OS-III returns additional information when a message queue is posted. Specifically, the sender includes the size of the message and takes a snapshot of the current timestamp and stores it in the message. The receiver of the message therefore knows when the message was posted. |
...
(4) In µC/OS-III, OSQPost() offers a number of options that replaces the three post functions provided in µC/OS-II. |
...
(5) µC/OS-III does not provide query services as they were rarely used. |