62 if ((errCode = pthread_mutexattr_init(rtDesc->
pMutexAttr)) != 0) {
71 if ((errCode = pthread_condattr_init(rtDesc->
pCondAttr)) != 0) {
80 if ((errCode = pthread_attr_init(rtDesc->
pThreadAttr)) != 0) {
88 if ((errCode = pthread_mutex_init(&(rtDesc->
mutex), rtDesc->
pMutexAttr)) != 0) {
95 if ((errCode = pthread_cond_init(&(rtDesc->
cond), rtDesc->
pCondAttr)) != 0) {
110 if ((errCode = pthread_mutexattr_destroy(rtDesc->
pMutexAttr)) != 0) {
119 if ((errCode = pthread_condattr_destroy(rtDesc->
pCondAttr)) != 0) {
128 if ((errCode = pthread_attr_destroy(rtDesc->
pThreadAttr)) != 0) {
135 if ((errCode = pthread_cond_destroy(&(rtDesc->
cond))) != 0) {
141 if ((errCode = pthread_mutex_destroy(&(rtDesc->
mutex))) != 0) {
152 pthread_condattr_t* pCondAttr) {
void * rtData
The pointer to the RT Container data.
void FwRtSetInitializeActivPr(FwRtDesc_t rtDesc, FwRtAction_t initializeActivPr)
Define the function implementing the Initialization Action for the Activation Procedure.
void FwRtSetPosixAttr(FwRtDesc_t rtDesc, pthread_attr_t *pThreadAttr, pthread_mutexattr_t *pMutexAttr, pthread_condattr_t *pCondAttr)
Set the pointers to the attribute objects of the POSIX thread, mutex and condition variable used by t...
FwRtState_t state
The state of the RT Container.
Header file to define all constants and types for the RT Container Module of the FW Profile...
The RT Container is in state STOPPED.
FwRtAction_t initializeNotifPr
Pointer to the function encapsulating the initialization action for the Notification Procedure...
void FwRtSetImplementActivLogic(FwRtDesc_t rtDesc, FwRtAction_t implementActivLogic)
Define the function implementing the activation logic for the RT Container.
void FwRtSetInitializeNotifPr(FwRtDesc_t rtDesc, FwRtAction_t initializeNotifPr)
Define the function implementing the Initialization Action for the Notification Procedure.
Declaration of the configuration interface for a RT Container.
FwRtAction_t implementNotifLogic
Pointer to the function encapsulating the implementation of the notification logic.
pthread_condattr_t * FwRtGetCondAttr(FwRtDesc_t rtDesc)
Get the value of the attributes of the condition variable associated to the RT Container.
The function to destroy the container mutex has reported an error.
FwRtCounterU2_t notifCounter
The notification counter.
void FwRtReset(FwRtDesc_t rtDesc)
Reset the RT Container descriptor (RTD).
pthread_cond_t cond
The condition variable associated to the RT Container.
The function to initialize a thread attribute has reported an error.
FwRtAction_t finalizeActivPr
Pointer to the function encapsulating the finalization action for the Activation Procedure.
int errCode
The return value of the last system call which failed.
FwRtAction_t implementActivLogic
Pointer to the function encapsulating the implementation of the activation logic. ...
The function to initialize the container mutex has reported an error.
FwRtOutcome_t(* FwRtAction_t)(FwRtDesc_t)
Type for a pointer to a container action.
The function to initialize the container condition has reported an error.
void FwRtSetFinalizeActivPr(FwRtDesc_t rtDesc, FwRtAction_t finalizeActivPr)
Define the function implementing the Finalization Action for the Activation Procedure.
The function to destroy the container condition has reported an error.
void FwRtShutdown(FwRtDesc_t rtDesc)
Shutdown the RT Container.
FwRtAction_t setUpNotification
Pointer to the function encapsulating the logic to set up the notification for the RT Container...
FwRtAction_t execFuncBehaviour
Pointer to the function encapsulating the execution of the functional behaviour associated to the RT ...
The RT Container has not yet been initialized.
pthread_mutex_t mutex
The mutex associated to the RT Container.
pthread_mutexattr_t * FwRtGetMutexAttr(FwRtDesc_t rtDesc)
Get the value of the attributes of the mutex associated to the RT Container.
void FwRtSetImplementNotifLogic(FwRtDesc_t rtDesc, FwRtAction_t implementNotifLogicPr)
Define the function implementing the Notification Logic for the Notification Procedure.
void FwRtSetSetUpNotif(FwRtDesc_t rtDesc, FwRtAction_t setUpNotification)
Define the function implementing the logic to set up a notification for the RT Container.
FwRtOutcome_t DummyAction(FwRtDesc_t rtDesc)
Dummy function which always returns 1.
pthread_attr_t * FwRtGetActivThreadAttr(FwRtDesc_t rtDesc)
Get the value of the attributes of the Activation Thread.
pthread_attr_t * pThreadAttr
The pointer to the Activation Thread attributes.
The function to destroy a mutex attribute has reported an error.
A configuration function has been called during the container's normal operation (i.e.
FwRtAction_t initializeActivPr
Pointer to the function encapsulating the initialization action for the Activation Procedure...
pthread_mutexattr_t * pMutexAttr
The pointer to the mutex attributes.
void FwRtSetFinalizeNotifPr(FwRtDesc_t rtDesc, FwRtAction_t finalizeNotifPr)
Define the function implementing the Finalization Action for the Notification Procedure.
The function to destroy a mutex attribute has reported an error.
FwRtBool_t notifPrStarted
The flag indicating whether the Notification Procedure is STÂRTED.
void FwRtSetData(FwRtDesc_t rtDesc, void *rtData)
Set the pointer to the RT Container data in the container descriptor.
void FwRtInit(FwRtDesc_t rtDesc)
Initialize a RT Container.
FwRtAction_t finalizeNotifPr
Pointer to the function encapsulating the finalization action for the Notification Procedure...
The function to initialize a mutex attribute has reported an error.
void * FwRtGetData(FwRtDesc_t rtDesc)
Get the pointer to the container data in the container descriptor.
The function to destroy a thread attribute has reported an error.
Structure representing a RT Container Descriptor.
pthread_condattr_t * pCondAttr
The pointer to the condition variable attributes.
int FwRtOutcome_t
Type used for the outcome of a container action.
FwRtBool_t activPrStarted
The flag indicating whether the Activation Procedure is STÂRTED.
The function to initialize a mutex attribute has reported an error.
void FwRtSetExecFuncBehaviour(FwRtDesc_t rtDesc, FwRtAction_t execFuncBehaviour)
Define the function which executes the functional behaviour associated to the RT Container.