PinMetaData

@Serializable
data class PinMetaData(val name: String = "", val hardwareId: String = "", val mode: Mode = Mode.OUT, val state: DigitalState = DigitalState.OFF, val initialState: DigitalState = DigitalState.OFF, val shutdownState: DigitalState = DigitalState.OFF, val pinNumber: Int = 0, val hardwareType: HardwareType = HardwareType.GROUND, val isConfigurable: Boolean = false, val address: Int? = null, val color: String? = null, val error: String = "", val sources: List<NodeIdentity> = emptyList(), val snapshot: Snapshot = Snapshot(), val invocationTriggers: List<InvocationTrigger> = emptyList(), val nodeAction: NodeAction = NodeAction.EXECUTE, val inputs: List<NodeIdentity> = emptyList()) : SourceMetaData(source)

Payload for a Server.Pin node.

Constructors

Link copied to clipboard
constructor(name: String = "", hardwareId: String = "", mode: Mode = Mode.OUT, state: DigitalState = DigitalState.OFF, initialState: DigitalState = DigitalState.OFF, shutdownState: DigitalState = DigitalState.OFF, pinNumber: Int = 0, hardwareType: HardwareType = HardwareType.GROUND, isConfigurable: Boolean = false, address: Int? = null, color: String? = null, error: String = "", sources: List<NodeIdentity> = emptyList(), snapshot: Snapshot = Snapshot(), invocationTriggers: List<InvocationTrigger> = emptyList(), nodeAction: NodeAction = NodeAction.EXECUTE, inputs: List<NodeIdentity> = emptyList())

Properties

Link copied to clipboard
val address: Int?

I²C / SPI bus address if the pin is part of a bus device — null for plain GPIO.

Link copied to clipboard

Optional CSS colour hint shown on the pin tile.

Link copied to clipboard
open override val error: String

Last known error message for this node, or empty string when healthy.

Link copied to clipboard

Stable hardware identifier (typically "<host>:<header>:<pin>").

Link copied to clipboard

Hardware capability of the assigned pin — see HardwareType.

Link copied to clipboard

Level the pin is driven to immediately after configuration.

Link copied to clipboard
open override val inputs: List<NodeIdentity>

sets the nodes this node reads from to complete its work when invoked

Link copied to clipboard

The set of InvocationTriggers configured to wake this node. The node processor checks the incoming event against this list before doing any work. An empty list means "never auto-fire" — only manual execution.

Link copied to clipboard

true if the user is allowed to change this pin's configuration in the editor.

Link copied to clipboard

true when the pin has been assigned a real header position and a non-default hardware id. Unconfigured defaults (pinNumber == 0 and empty hardwareId) should not be registered with the krill-pi4j daemon.

Link copied to clipboard
val mode: Mode

Direction / capability — output, input, or PWM.

Link copied to clipboard

Display name shown on the pin tile.

Link copied to clipboard
open override val nodeAction: NodeAction

The action this node performs when it fires. Defaults to NodeAction.EXECUTE on every concrete implementation so that deserialising a payload that predates this field yields the original behaviour unchanged.

Link copied to clipboard

GPIO pin number on the header (1-based). 0 means "not configured yet".

Link copied to clipboard

Level the pin is driven to during graceful server shutdown.

Link copied to clipboard
open override val snapshot: Snapshot

Stores the last result of when this node was invoked and is a source of data

Link copied to clipboard
open override val sources: List<NodeIdentity>

Upstream nodes whose values feed this one. For a filter or executor this is the data being read; for a trigger it is the value being watched.

Link copied to clipboard

Current observed pin level.