|
virtual void | Signal () override |
| Put object into the signaled state.
|
|
| CINOSSync (const char *aName=0, uint32 aInitialCount=0, bool aManual=false) |
|
virtual | ~CINOSSync () |
| Destroy sync object.
|
|
virtual const char * | GetName () |
| Get name of sync object.
|
|
virtual uint32 | Wait (uint32 aTimeout=0xFFFFFFFF) |
| wait for signaled state for max. aTimeout usec
|
|
virtual void | SignalEx (CINOSTaskExMsg *apMsg, uint32 auRplId, uint32 auAppError) |
|
virtual bool | MsgEvent (CINOSTaskExMsg *apMsg) |
|
virtual void | Reset () |
| Reset object state.
|
|
volatile uint32 * | GetLockAdr () |
| Return pointer to core locking structure.
|
|
virtual bool | UsesPolling () const |
|
bool | IsSame (CINOSSync *i_pSync) |
|
int | operator< (const CINOSSync &aSync) const |
|
int | operator== (const CINOSSync &aSync) const |
|
int | operator< (const char *aName) const |
|
int | operator== (const char *aName) const |
|
Helper sync object that sends an arbitrary message (CINOSTaskExMsg) to the specified task.
A typical use case is when executing axis functions which may take rather long and the CINOSTaskEx should not be blocked so that other task messages can be executed. In that case, the axis function should be executed asynchronously. Still, the function may need to react upon the axis function completion, e.g. to set an internal state accordingly. That's where this class is very handy: it can be passed to such an axis command and, by the time the axis command completes, it'll put an arbitrary CINOSTaskExMsg to the specified CINOSTaskEx. That CINOSTaskExMsg may then trigger another internal function which can perform the 'post processing stuff'. Here's an example:
CINOSTaskExMsg* pUsrMsg = new CINOSTaskExMsg(CINOSTaskEx::eMsgUser,
eUsrJoyDisAxisStopped);
pUsrMsg->AddParam((uint32) apMsg);
pUsrMsg->AddParam(name);
pAxis->Stop(axis->GetJoyParam(), CINOSMcSyncMsg::Create(*this, pUsrMsg));
Objects of this type will delete themselves when CINOSMcSyncMsg::Signal is called, therefore, don't create them on the stack.