8 : MemberProfile(endpoint)
11 data::discovery::Field field;
12 field.set_type(data::discovery::Type::UINT);
void RegisterTarget(const std::string &path, Target *target)
Register a new Target with the specified path.
A special event handler that serves discovery information and ignores the event itself.
const std::string & GetName() const
Get the name of the event.
void UnregisterTarget(const std::string &path)
Unregister a Target.
void SetValue(const std::string &key, const data::Variant &value)
Add or update a value in the local telemetry cache.
void RegisterHandler(const std::string &name, Handler *handler)
Subscribe to events.
void FinishConstruction()
Called when the last constructor has finished its job.
std::list< InMemoryParameter * > _parameters
Parameters.
void SetFieldDefinitionForKey(const std::string &key, const data::discovery::Field &field, bool includeInStatus)
Add field to the schema.
A strongly typed in-memory parameter target that can be made read-only.
const std::string & GetPath() const
Get the resource path of the parameter.
void AddFauxEventHandler(FauxEventHandler *eventHandler)
Add an event handler and register it.
ExampleDevice(Endpoint *endpoint)
Construct a new Example Device object.
void AddInMemoryParameter(InMemoryParameter *parameter)
Add an In-Memory Parameter and register it.
Abstract base class for Endpoint implementations.
swarmio::services::telemetry::Service & GetTelemetryService()
Get a reference for the Telemetry service.
static discovery::Field GetFieldDescriptor(const Variant &value, bool includeArraySizes=false)
Get the schema for an existing map.
swarmio::services::event::Service _eventService
Event service.
swarmio::services::keyvalue::Service _keyvalueService
Key-Value service.
std::list< FauxEventHandler * > _eventHandlers
Event handlers.
uint32_t _messageCounter
Number of incoming messages.
~ExampleDevice() override
Destroy the Example Device object.
Represents a Node the Endpoint knows about and can send messages to.
void UnregisterHandler(const std::string &name)
Unsubscribe from events.
void AddConstantTelemetryValue(const std::string &key, const data::Variant &value, bool includeInStatus=false)
Add a constant telemetry value.
virtual bool ReceiveMessage(const Node *sender, const data::Message *message) override
Delivery point of all messages.