Reference

Attributes

The attributes used to declare Komods and views. Constructor parameters are required, properties are optional ([Komod("id", DisplayName = "…")]).

DeploymentSetting

Marks a property of a Komod's settings record as a deployment setting: the export of a KOFA Lite program shows it on the "Komod beállítások" tab (prefilled with the value currently used), stores the chosen value in app.json (komodOptions) and the Lite host applies it over the instance's own settings at every start. Use it for values that belong to the machine rather than to the graph, e.g. the Bluetooth name or a server address. The property must be a string, number, boolean or enum.

Where it can be used: Property.

Name Type Default Description
Label string? – Label on the export form; null = the property name.

Input

Declares an IInput property as an input port.

Where it can be used: Property.

Name Type Default Description
id string required
DisplayName string? –
Description string? –
QueueCapacity int 0 0 = PortQos.Latest, otherwise a queue with this capacity.
Multiple bool false Whether more than one output may be linked to this input (messages are merged).
Deadline string? – TimeSpan string (e.g. "00:00:00.300"). When no message arrives for this long, OnInputTimeout is called. Mandatory for actuators (failsafe).
FromUi bool false UI input: the values come from the browser (a Komod UI calls InjectAsync), not from a link. Such an input cannot be linked in the graph, and only the Operator role may inject into it.

KofaType

Marks a type as a port payload. Ids are reverse-domain style, unique and never reused.

Where it can be used: Class, Struct.

Name Type Default Description
id string required
version int required

Komod

Marks a class as a Komod. The id is reverse-domain style and stable across versions.

Where it can be used: Class.

Name Type Default Description
id string required
DisplayName string? –
Description string? –
Category KomodCategory Other
VehicleTypes VehicleTypes Any
Kind KomodKind Node
MaxInstances int 0 0 = unlimited.
RelayPriority RelayPriority Auto Default relay priority of the instances; the user can override it per graph node.

KomodCommand

Marks a public method of a Komod as a command the UI can call (IKomodClientContext.InvokeAsync) while the instance runs. Supported signatures: an optional argument (deserialized from JSON) and an optional CancellationToken, returning Task, Task, ValueTask, ValueTask, void or a value; the result is serialized to JSON. Throw KomodCommandException for a user facing error.

Where it can be used: Method.

Name Type Default Description
name string? required (default: –) Command name; null = the method name without an Async suffix, camelCase.
RequiresAdmin bool false Who may call it: false = Operator (default), true = Admin only.

KomodView

Registers a component deriving from KomodComponentBase as a view of a Komod.

Where it can be used: Class.

Name Type Default Description
komodId string required
kind ViewKind required

Output

Declares an IOutput property as an output port.

Where it can be used: Property.

Name Type Default Description
id string required
DisplayName string? –
Description string? –
RelayPriority RelayPriority Auto Relay priority of this output; Auto = the Komod's value. Bulk payloads (byte arrays) cannot be High, and Blocked is Komod level only.