Table of Contents

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

Provides access to event subscription registration for this participant.

public NotificationClient Notifications { get; }

Property Value

NotificationClient

Methods

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

topic string

The 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.

payloadType string

An application-defined string identifying the payload schema (e.g. "JobConfig"). Receivers use this to select the correct deserialization logic.

payload string

The payload as a JSON string.

userData string

Optional application-defined string passed through the protocol header without interpretation.

Returns

Task