MeshMachine::AContextStore Class Reference
class MeshMachine::AContextStore
|
If an activity has a transition or fork that is blocked by a mutex, the context must be stored so that when the transition or fork is unblocked it would be able to continue with the context that it had before it was blocked. If this aggregate wasn't used in the previous scenario, the context of the event that triggered the unblocking would be used, and this may have the wrong message, or event originator set.
Error recovery is another scenario this class is useful in.
Constructor & Destructor Documentation
AContextStore()
AContextStore
|
(
|
)
|
[protected, inline, explicit]
|
~AContextStore()
~AContextStore
|
(
|
)
|
[protected, inline]
|
Member Functions Documentation
IsStored()
IMPORT_C
TBool
|
IsStored
|
(
|
)
|
const
|
Check of the context is stored.
LoadContext(AMMNodeBase &, CNodeActivityBase *, TDes8 &, TDes8 &, const Messages::TNodeId &)
Load a stored context. Once the stored context has been loaded the status of
iContextDesc
is undefined and load shouldn't be called again until something has been stored.
The pointer returned uses memory allocated in the
aCtxBuff
that is passed in, and as such, does not need to be freed. However
aCtxBuff
and
aMsgBuff
must be cleaned up after use.
Parameters
AMMNodeBase
& aNode
|
The node for the context
|
CNodeActivityBase
* aNodeActivity
|
The activity for the context.
|
TDes8
& aCtxBuff
|
A memory buffer in which the context will be created.
|
TDes8
& aMsgBuff
|
A memory buffer in which the message will be created.
|
const
Messages::TNodeId
& aDummy
|
Will become the recipient node id in the context.
|
Retry(CNodeActivityBase &, TNodeContextBase &)
Used for error recovery. If the context is stored, loads the stored context and reruns the last transition that was run.
StoreContext
LoadContext
Parameters
CNodeActivityBase
& aActivity
|
The activity to retry
|
TNodeContextBase
& aContext
|
The context within which the retrying is taking place. NOTE: This is not the stored context
|
StoreContext(const TNodeContextBase &)
Store context in buffer. Designed to be called from a transition to store the transitions context for error recovery or to wait on a mutex.
Member Data Documentation
const TInt KInterfaceId
const
TInt
|
KInterfaceId
|
[static]
|
RBuf8
iContextDesc
RBuf8
|
iContextDesc
|
[protected]
|
Buffer to store the context.
Messages::TNodeSignal::TMessageId
iRetryingForMessageId
Message id of the message which kicked off the retry attempt
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.