Class RoleClientBase
- Namespace
- SmarterLink.Clients
- Assembly
- SmarterLink.Clients.dll
Base class for all role-specific SmarterLink clients. Provides access to event subscriptions and the ability to publish custom payloads.
public abstract class RoleClientBase
- Inheritance
-
RoleClientBase
- Derived
- Inherited Members
Properties
Notifications
Provides access to event subscription registration for this participant.
public NotificationClient Notifications { get; }
Property Value
Methods
NotifyCustomPayload(string, string, string, string?)
Publishes a custom (application-defined) payload wrapped in the standard SmarterLink protocol envelope. Use this when the built-in typed event model does not fit your use case, for example when integrating with a third-party system or sending application-specific side-channel data.
public Task NotifyCustomPayload(string topic, string payloadType, string payload, string? userData = null)
Parameters
topicstringThe full MQTT topic to publish to. Publishers should follow the standard SmarterLink topic hierarchy where possible; deviation is permitted when the standard structure cannot reasonably be applied.
payloadTypestringAn application-defined string identifying the payload schema (e.g.
"JobConfig"). Receivers use this to select the correct deserialization logic.payloadstringThe payload as a JSON string.
userDatastringOptional application-defined string passed through the protocol header without interpretation.