class SubscriptionEngine
Defined at line 71 of file gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/SubscriptionEngine.h
This is a singleton hosting all WDM Next subscriptions, both client and publisher sides.
Public Methods
SubscriptionEngine * GetInstance ()
Retrieve the singleton Subscription Engine. Note this function should be implemented by the
adoption layer.
Returns
A pointer to the shared Subscription Engine
void SetEventCallback (void *const aAppState, const EventCallback aEventCallback)
Set the event back function and pointer to associated state object for SubscriptionEngine specific call backs
Parameters
void DefaultEventHandler (EventIDaEvent,const InEventParam &aInParam,OutEventParam &aOutParam)
This is the default event handler to be called by application layer for any ignored or unrecognized event
Parameters
WEAVE_ERROR GetMinEventLogPosition (size_t & outLogPosition)
Retrieve the minimum relative position of the event offload point from all active subscription handlers.
Retrieves the minimum relative (to the boottime) position of
the event offload point from all active subscription handlers.
Parameters
WEAVE_ERROR NewClient (SubscriptionClient **constappClient,Binding *constapBinding,void *constapAppState,const SubscriptionClient::EventCallbackaEventCallback,const TraitCatalogBase<TraitDataSink> *constapCatalog,const uint32_taInactivityTimeoutDuringSubscribingMsec)
This is the default event handler to be called by application layer for any ignored or unrecognized event
Parameters
WEAVE_ERROR NewClient (SubscriptionClient **constappClient,Binding *constapBinding,void *constapAppState,const SubscriptionClient::EventCallbackaEventCallback,const TraitCatalogBase<TraitDataSink> *constapCatalog,const uint32_taInactivityTimeoutDuringSubscribingMsec,IWeaveWDMMutex *aUpdateMutex)
This is the default event handler to be called by application layer for any ignored or unrecognized event
Parameters
WEAVE_ERROR NewSubscriptionHandler (SubscriptionHandler **const subHandler)
uint16_t GetClientId (const SubscriptionClient *const apClient)
SubscriptionClient * FindClient (const uint64_t aPeerNodeId, const uint64_t aSubscriptionId)
bool UpdateClientLiveness (const uint64_taPeerNodeId,const uint64_taSubscriptionId,const boolaKill)
WEAVE_ERROR EnablePublisher (IWeavePublisherLock * aLock, TraitCatalogBase<TraitDataSource> *const aPublisherCatalog)
NotificationEngine * GetNotificationEngine ()
Defined at line 353 of file gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/SubscriptionEngine.h
WEAVE_ERROR Lock ()
The lock methods here guard access to a couple of data structures:
- mPublisherCatalog
- mHandlers
- mNotificationEngine
- mTraintInfoPool
- mNumTraitInfosPool
The implementation is not complete in ensuring all of the above structures are guarded.
WEAVE_ERROR Unlock ()
void DisablePublisher ()
After this call returns, it's free to tear down the current publisher catalog
SubscriptionHandler * FindHandler (const uint64_t aPeerNodeId, const uint64_t aSubscriptionId)
bool UpdateHandlerLiveness (const uint64_taPeerNodeId,const uint64_taSubscriptionId,const boolaKill)
uint16_t GetHandlerId (const SubscriptionHandler *const apHandler)
uint16_t GetCommandObjId (const Command *const apHandle)
nl::Weave::WeaveExchangeManager * GetExchangeManager ()
Defined at line 377 of file gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/SubscriptionEngine.h
void SubscriptionEngine ()
WEAVE_ERROR Init (nl::Weave::WeaveExchangeManager *constapExchangeMgr,void *constaAppState,const EventCallbackaEventCallback)
WEAVE_ERROR RegisterForSubscriptionlessNotifications (const TraitCatalogBase<TraitDataSink> *const apCatalog)
Enumerations
enum EventID
| Name | Value | Comments |
|---|---|---|
| kEvent_OnIncomingSubscribeRequest | 0 | -- |
| kEvent_OnIncomingSubscriptionlessNotification | 1 | -- |
| kEvent_DataElementAccessControlCheck | 2 |
Called when an incoming subscriptionless notification is being processed for |
| kEvent_SubscriptionlessNotificationProcessingComplete | 3 | -- |
| kEvent_OnIncomingUpdateRequest | 4 |
Called when an incoming update has arrived before updating the data element. |
| kEvent_UpdateRequestDataElementAccessControlCheck | 5 | -- |
| kEvent_UpdateRequestProcessingComplete | 6 |
Called upon completion of processing of all trait data in the update. |
Events generated directly from this component
Defined at line 87 of file gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/SubscriptionEngine.h
enum (unnamed)
| Name | Value |
|---|---|
| kMaxNumSubscriptionClients | (WDM_MAX_NUM_SUBSCRIPTION_CLIENTS) |
Defined at line 263 of file gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/SubscriptionEngine.h
Records
Friends
class WdmUpdateServerTest
class TestWdm
class TestTdm
class NotificationEngine
class SubscriptionClient
class SubscriptionHandler