nl:: Weave:: Profiles:: DataManagement_Legacy:: DMPublisher
#include <src/lib/profiles/data-management/Legacy/DMPublisher.h>
The abstract base class for application-specific WDM publishers.
Summary
DMPublisher is the standard WDM publisher base class. It is a mix of the DM ProtocolEngine class, which handles the comms crank-turning, and the wholly abstract PublisherDataManager class. Support for subscription and notification are optional and may be suppressed simply by configuring a subscription table with no entries.
Inheritance
Inherits from:nl::Weave::Profiles::DataManagement_Legacy::ProtocolEngine
nl::Weave::Profiles::DataManagement_Legacy::PublisherDataManager
Constructors and Destructors |
|
---|---|
DMPublisher(void)
The default constructor for DMPublisher objects.
|
|
~DMPublisher(void)
The destructor for DMPublisher objects.
|
Public functions |
|
---|---|
CancelTransactionRequest(uint16_t aTxnId, WEAVE_ERROR aError)
|
|
Clear(void)
|
virtual void
Clear the internal state of DMPublisher object.
|
Finalize(void)
|
virtual void
Shut down an operating DMPublisher.
|
IncompleteIndication(Binding *aBinding, StatusReport & aReport)
|
virtual void
Handle an indication that a binding has failed.
|
Init(WeaveExchangeManager *aExchangeMgr, uint32_t aResponseTimeout)
|
virtual WEAVE_ERROR
Initialize a DMPublisher object.
|
Init(WeaveExchangeManager *aExchangeMgr)
|
virtual WEAVE_ERROR
|
OnMsgReceived(ExchangeContext *aResponseCtx, uint32_t aProfileId, uint8_t aMsgType, PacketBuffer *aMsg)
|
void
|
UpdateResponse(ExchangeContext *aResponseCtx, StatusReport & aStatus)
|
Respond to an update request.
|
ViewResponse(ExchangeContext *aResponseCtx, StatusReport & aStatus, ReferencedTLVData *aDataList)
|
Respond to a view request.
|
Public functions
CancelTransactionRequest
WEAVE_ERROR CancelTransactionRequest( uint16_t aTxnId, WEAVE_ERROR aError )
Clear
virtual void Clear( void )
Clear the internal state of DMPublisher object.
Clears the notify transaction pool and the subscription table.
DMPublisher
DMPublisher( void )
The default constructor for DMPublisher objects.
Clears all internal state.
Finalize
virtual void Finalize( void )
Shut down an operating DMPublisher.
Clears all the operating state and shuts down the listener if one is running.
IncompleteIndication
virtual void IncompleteIndication( Binding *aBinding, StatusReport & aReport )
Handle an indication that a binding has failed.
When a binding becomes incomplete, i.e. when the connection is closed for a TCP binding, the protocol engine must fail any transactions that depend on it, which includes calling their status handlers. Also, the incomplete indication is passed up to any superclass object implementing the alternate form of this method that takes a peer ID.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
Init
virtual WEAVE_ERROR Init( WeaveExchangeManager *aExchangeMgr, uint32_t aResponseTimeout )
Initialize a DMPublisher object.
This method has the side effect of installing a listener in the exchange manager for the full range of client requests possibly including those for subscription.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
WEAVE_NO_ERROR On success. Otherwise, return a WEAVE_ERROR reflecting a failure to properly set up the publisher.
|
Init
virtual WEAVE_ERROR Init( WeaveExchangeManager *aExchangeMgr )
OnMsgReceived
void OnMsgReceived( ExchangeContext *aResponseCtx, uint32_t aProfileId, uint8_t aMsgType, PacketBuffer *aMsg )
UpdateResponse
WEAVE_ERROR UpdateResponse( ExchangeContext *aResponseCtx, StatusReport & aStatus )
Respond to an update request.
Send the response to an update request after processing, using the exchange context that was given in the indication.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Returns |
WEAVE_NO_ERROR On success. Otherwise return a WEAVE_ERROR reflecting a failure to send the response message.
|
ViewResponse
WEAVE_ERROR ViewResponse( ExchangeContext *aResponseCtx, StatusReport & aStatus, ReferencedTLVData *aDataList )
Respond to a view request.
Send the response to a view request after processing, using the exchange context that was given in the indication.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
~DMPublisher
virtual ~DMPublisher( void )
The destructor for DMPublisher objects.
Clears all internal state and removes the listener from the exchange manager if one is in place.