Class CConsumer#

Inheritance Relationships#

Base Types#

Class Documentation#

class CConsumer : public sdv::IInterfaceAccess, public sdv::IObjectDestroy, public sdv::core::ISignalRead#

Class implementing the signal consumer. Needed for consumer interface implementation.

Public Functions

CConsumer(CSignal &rSignal, sdv::IInterfaceAccess *pEvent = nullptr)#

Constructor.

Parameters:
  • rSignal[in] Reference to the signal instance.

  • pEvent[in] The event to be triggered on a signal change. Optional.

virtual void DestroyObject() override#

Destroy the object. Overload of sdv::IObjectDestroy::DestroyObject.

virtual sdv::any_t Read(sdv::IInterfaceAccess *pTransaction) const override#

Get the signal value. Overload of sdv::core::ISignalRead::Read.

Parameters:

pTransaction[in] The transaction interface. Could be NULL in case the most up-to-date value is requested.

Returns:

Returns the value.

void Write(const sdv::any_t &ranyVal, uint64_t uiTransactionID)#

Update the signal value with the transaction ID supplied. A new entry will be created if the transaction is larger.

Parameters:
  • ranyVal[in] Reference to the value to update the signal with.

  • uiTransactionID[in] The transaction ID or 0 for current transaction ID.

void Distribute(const sdv::any_t &ranyVal)#

Distribute a value to all consumers.

Parameters:

ranyVal[in] Reference of the value to consumers.