21 #ifndef HEADERS_R_RTOS_MSGQUEUING_H_ 22 #define HEADERS_R_RTOS_MSGQUEUING_H_ 31 #define MAX_MSGQ_SIZE (uint8_t)0x8u 35 #define MAX_MSGQ_MSK (uint8_t)(MAX_MSGQ_SIZE-(uint8_t)0x1u) struct mqPrtcpnt * nxtMQPrtcpnt
pointer to the next participant in the list
Definition: R_RTOS_msgQueuing.h:157
MQPrtcpnts pubs
list of all publishers for the queue
Definition: R_RTOS_msgQueuing.h:186
PartID mqPrtcpntID
PartID of the participant.
Definition: R_RTOS_msgQueuing.h:158
Message queue participant structure for task and system subscribers and publishers.
Definition: R_RTOS_msgQueuing.h:155
uint8_t dataQueueEnd
last element in the queue
Definition: R_RTOS_msgQueuing.h:190
struct mqPrtcpnt MQPrtcpnt
mqPrtcpnt
Structure of a function call related to a message queue.
Definition: R_RTOS_inc.h:1029
Task publisher type.
Definition: R_RTOS_msgQueuing.h:141
Identifier for a message queue participant.
Definition: R_RTOS_inc.h:429
struct mqPrtcpnt * PMQPrtcpnt
Pointer to amqPrtcpnt.
uint8_t DUMMY
unused dummy byte
Definition: R_RTOS_msgQueuing.h:160
RetCode msgQ_readDataFrmQ(const QID msgQID, const TskID tskID, PMQData *data)
Read the most recent unread data from the message queue related to QID.
Definition: R_RTOS_msgQueuing.c:530
enum partIDType PartIDType
partIDType
Task subscriber element related to a message queue.
Definition: R_RTOS_msgQueuing.h:91
struct mqPub * PMQPub
Pointer to a mqPub.
uint8_t QID
Identifier for a message queue.
Definition: R_RTOS_inc.h:416
Defines, Typedefs and Macros for the whole system.
uint8_t subscbrCnt
amount of subscribers to this queue
Definition: R_RTOS_msgQueuing.h:191
RetCode msgQ_unSub(const QID msgQID, const uint16_t id)
Unsubscribe the participant specified by id from the message queue related to the QID...
Definition: R_RTOS_msgQueuing.c:431
RetCode msgQ_regTskSub(PTskTCB const subTsk, const QID msgQID)
Register a task to the message queue related to the QID as a subscriber.
Definition: R_RTOS_msgQueuing.c:328
QID queueID
identifier of the message queue
Definition: R_RTOS_msgQueuing.h:188
RetCode msgQ_pubDataToQ(const QID msgQID, const DataSize size, const DataType type, CData const data)
Publish constant data of a given size and type to the message queue related to the QID...
Definition: R_RTOS_msgQueuing.c:502
uint8_t DataSize
Size of the data in a data container.
Definition: R_RTOS_inc.h:395
RetCode msgQ_takeDataFrmQ(const QID msgQID, const TskID tskID, PMQData *data)
Definition: R_RTOS_msgQueuing.c:570
struct mqTskSub MQTskSub
mqTskSub
RetCode msgQ_initQueue(QID msgQID)
Initialize the message queue with the given QID.
Definition: R_RTOS_msgQueuing.c:220
struct mqSub * PMQSub
Pointer to a mqSub.
RetCode msgQ_regTskPub(PTskTCB const pubTsk, const QID msgQID)
Register a task to the message queue related to the QID as a publisher.
Definition: R_RTOS_msgQueuing.c:272
enum mqPrtcpntTypeEnum MQPrtcpntType
mqPrtcpntTypeEnum
MQPrtcpnts subs
list of all subscribers to the queue
Definition: R_RTOS_msgQueuing.h:187
System subscriber type.
Definition: R_RTOS_msgQueuing.h:143
volatile PTskMB tskMailBox
mailBox of the subscriber
Definition: R_RTOS_msgQueuing.h:93
struct mqDummyElmnt MQDummyElmnt
mqDummyElmnt
uint8_t dataQueueStart
first element in the queue ( ALSO THE OFFSET FOR THE CIRCULAR ARRAY BUFFER!!! )
Definition: R_RTOS_msgQueuing.h:189
Task mailbox for messaging services.
Definition: R_RTOS_inc.h:989
PMQPub MQPubs
Pointer to MQPub elements for a publisher list.
Definition: R_RTOS_msgQueuing.h:80
Message queue which contains publishers, subscribers, data as well as information about the queue...
Definition: R_RTOS_msgQueuing.h:183
uint8_t TskID
Task identification number (ID).
Definition: R_RTOS_inc.h:532
RetCode msgQ_delQueue(const QID msgQID)
Delete the message queue with the given QID.
Definition: R_RTOS_msgQueuing.c:243
enum dataTypes DataType
Enumeration of data types for data stored within another structure.
RetCode msgQ_regSysPub(const uint8_t participant, const QID msgQID)
Register a system function to the message queue related to the QID as a publisher.
Unified subscriber element related to a message queue.
Definition: R_RTOS_msgQueuing.h:119
void * element
Dummy element.
Definition: R_RTOS_msgQueuing.h:60
Dummy of a message queue element.
Definition: R_RTOS_msgQueuing.h:58
Publisher element related to a message queue.
Definition: R_RTOS_msgQueuing.h:72
const uint32_t * CData
pointer a constant double word (32 bit) of data.
Definition: R_RTOS_inc.h:887
struct mqTskSub * PMQTskSub
Pointer to a mqTskSub.
RetCode msgQ_regSysSub(const SysFktID subSysFktID, const QID msgQID)
Register a system function to the message queue related to the QID as a subscriber.
Definition: R_RTOS_msgQueuing.c:387
volatile PMsgFktCall msgCallBack
callback function of the system function subscriber
Definition: R_RTOS_msgQueuing.h:107
Task PartID Type.
Definition: R_RTOS_msgQueuing.h:45
Task Control Block.
Definition: R_RTOS_inc.h:1322
volatile PTskTCB publisher
pointer to the TskTCB of the publisher
Definition: R_RTOS_msgQueuing.h:74
Circular array backed fixed size buffer for data entities.
Definition: R_RTOS_inc.h:904
System subscriber element related to a message queue.
Definition: R_RTOS_msgQueuing.h:105
struct mqSysSub MQSysSub
mqSysSub
#define MAX_MSGQ_SIZE
Maximum size of one single message queue.
Definition: R_RTOS_msgQueuing.h:31
mqPrtcpntTypeEnum
Enumeration of message queue participant types.
Definition: R_RTOS_msgQueuing.h:139
uint8_t SysFktID
System function ID.
Definition: R_RTOS_inc.h:361
System PartID Type.
Definition: R_RTOS_msgQueuing.h:46
PMQPrtcpnt MQPrtcpnts
Pointer to MQPrtcpnt elements for a list.
Definition: R_RTOS_msgQueuing.h:172
struct msgQ MsgQ
Message queue which contains publishers, subscribers, data as well as information about the queue...
struct mqSysSub * PMQSysSub
Pointer to a mqSysSub.
partIDType
Enumeration of PartID types.
Definition: R_RTOS_msgQueuing.h:43
uint8_t RetCode
Return codes for functions.
Definition: R_RTOS_inc.h:1424
PMQSub MQSubs
Pointer to MQSub elements for a subscriber list.
Definition: R_RTOS_msgQueuing.h:131
Task subscriber type.
Definition: R_RTOS_msgQueuing.h:142
union mqPrtcpnt::@1 MQElmnt
specialized participant structures in a union
MQPrtcpntType prtcpntType
type of the participant
Definition: R_RTOS_msgQueuing.h:159
struct mqDummyElmnt * PMQDummyElmnt
Pointer to a mqDummyElmnt.