Referencia
Attribútumok
A Komodok és a nézetek deklarálására használható attribútumok. A konstruktor paraméterei kötelezőek, a tulajdonságok megadása opcionális ([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.
Hol használható: Property.
| Név | Típus | Alapérték | Leírás |
|---|---|---|---|
Label |
string? |
– | Label on the export form; null = the property name. |
Input
Declares an IInput property as an input port.
Hol használható: Property.
| Név | Típus | Alapérték | Leírás |
|---|---|---|---|
id |
string |
kötelező | |
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.
Hol használható: Class, Struct.
| Név | Típus | Alapérték | Leírás |
|---|---|---|---|
id |
string |
kötelező | |
version |
int |
kötelező |
Komod
Marks a class as a Komod. The id is reverse-domain style and stable across versions.
Hol használható: Class.
| Név | Típus | Alapérték | Leírás |
|---|---|---|---|
id |
string |
kötelező | |
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.
Hol használható: Method.
| Név | Típus | Alapérték | Leírás |
|---|---|---|---|
name |
string? |
kötelező (alap: –) | 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.
Hol használható: Class.
| Név | Típus | Alapérték | Leírás |
|---|---|---|---|
komodId |
string |
kötelező | |
kind |
ViewKind |
kötelező |
Output
Declares an IOutput property as an output port.
Hol használható: Property.
| Név | Típus | Alapérték | Leírás |
|---|---|---|---|
id |
string |
kötelező | |
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. |