class SubscriptionEngine
Defined at line 71 of file x64-shared/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 (EventID aEvent, 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 **const appClient, Binding *const apBinding, void *const apAppState, const SubscriptionClient::EventCallback aEventCallback, const TraitCatalogBase<TraitDataSink> *const apCatalog, const uint32_t aInactivityTimeoutDuringSubscribingMsec)
This is the default event handler to be called by application layer for any ignored or unrecognized event
Parameters
WEAVE_ERROR NewClient (SubscriptionClient **const appClient, Binding *const apBinding, void *const apAppState, const SubscriptionClient::EventCallback aEventCallback, const TraitCatalogBase<TraitDataSink> *const apCatalog, const uint32_t aInactivityTimeoutDuringSubscribingMsec, 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_t aPeerNodeId, const uint64_t aSubscriptionId, const bool aKill)
WEAVE_ERROR EnablePublisher (IWeavePublisherLock * aLock, TraitCatalogBase<TraitDataSource> *const aPublisherCatalog)
NotificationEngine * GetNotificationEngine ()
Defined at line 353 of file x64-shared/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_t aPeerNodeId, const uint64_t aSubscriptionId, const bool aKill)
uint16_t GetHandlerId (const SubscriptionHandler *const apHandler)
uint16_t GetCommandObjId (const Command *const apHandle)
nl::Weave::WeaveExchangeManager * GetExchangeManager ()
Defined at line 377 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/SubscriptionEngine.h
void SubscriptionEngine ()
WEAVE_ERROR Init (nl::Weave::WeaveExchangeManager *const apExchangeMgr, void *const aAppState, const EventCallback aEventCallback)
WEAVE_ERROR RegisterForSubscriptionlessNotifications (const TraitCatalogBase<TraitDataSink> *const apCatalog)
Enumerations
enum EventID
| Name | Value |
|---|---|
| kEvent_OnIncomingSubscribeRequest | 0 |
| kEvent_OnIncomingSubscriptionlessNotification | 1 |
| kEvent_DataElementAccessControlCheck | 2 |
| kEvent_SubscriptionlessNotificationProcessingComplete | 3 |
| kEvent_OnIncomingUpdateRequest | 4 |
| kEvent_UpdateRequestDataElementAccessControlCheck | 5 |
| kEvent_UpdateRequestProcessingComplete | 6 |
Events generated directly from this component
Defined at line 87 of file x64-shared/gen/third_party/openweave-core/src/include/Weave/Profiles/data-management/Current/SubscriptionEngine.h
enum
| Name | Value |
|---|---|
| kMaxNumSubscriptionClients | (WDM_MAX_NUM_SUBSCRIPTION_CLIENTS) |
Defined at line 263 of file x64-shared/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