SerialDeviceMetaData

@Serializable
data class SerialDeviceMetaData(val name: String = "", val hardwareId: String = "", val hardwareType: HardwareType = HardwareType.SERIAL, val status: NodeState = NodeState.CREATE_OR_OVERWRITE, val interval: Long = 5000, val baudRate: Int = 9600, val readTimeout: Int = 1000, val writeTimeout: Int = 0, val operation: SerialDeviceOperation = SerialDeviceOperation.READ, val timestamp: Long = 0, val dataBits: SerialDataBits = SerialDataBits.EIGHT, val parity: SerialParity = SerialParity.NONE, val stopBits: SerialStopBits = SerialStopBits.ONE, val flowControl: SerialFlowControl = SerialFlowControl.NONE, val encoding: SerialEncoding = SerialEncoding.UTF_8, val terminator: SerialTerminator = SerialTerminator.CR, val sendCommand: String = "R", val sources: List<NodeIdentity> = listOf(NodeIdentity("", "")), val snapshot: Snapshot = Snapshot(), val invocationTriggers: List<InvocationTrigger> = emptyList(), val nodeAction: NodeAction = NodeAction.EXECUTE, val error: String = "", val inputs: List<NodeIdentity> = emptyList()) : SourceMetaData(source)

Payload for a Server.SerialDevice node.

Constructors

Link copied to clipboard
constructor(name: String = "", hardwareId: String = "", hardwareType: HardwareType = HardwareType.SERIAL, status: NodeState = NodeState.CREATE_OR_OVERWRITE, interval: Long = 5000, baudRate: Int = 9600, readTimeout: Int = 1000, writeTimeout: Int = 0, operation: SerialDeviceOperation = SerialDeviceOperation.READ, timestamp: Long = 0, dataBits: SerialDataBits = SerialDataBits.EIGHT, parity: SerialParity = SerialParity.NONE, stopBits: SerialStopBits = SerialStopBits.ONE, flowControl: SerialFlowControl = SerialFlowControl.NONE, encoding: SerialEncoding = SerialEncoding.UTF_8, terminator: SerialTerminator = SerialTerminator.CR, sendCommand: String = "R", sources: List<NodeIdentity> = listOf(NodeIdentity("", "")), snapshot: Snapshot = Snapshot(), invocationTriggers: List<InvocationTrigger> = emptyList(), nodeAction: NodeAction = NodeAction.EXECUTE, error: String = "", inputs: List<NodeIdentity> = emptyList())

Properties

Link copied to clipboard

Baud rate — 9600 is the safe default for unknown devices.

Link copied to clipboard

Data bits per frame.

Link copied to clipboard

Charset for decoding / encoding payloads.

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

Flow-control mode.

Link copied to clipboard

Stable hardware identifier (typically the device path or serial number).

Link copied to clipboard

Hardware classification — always SERIAL for this node type.

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

Polling interval for READ operations, in milliseconds.

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

Display name shown on the device 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

Whether this node reads from or writes to the device.

Link copied to clipboard

Parity configuration.

Link copied to clipboard

Read timeout in milliseconds before the read coroutine gives up.

Link copied to clipboard

Command sent on each poll when operation is READ — e.g. "R" for Atlas Scientific sensors. Empty string is allowed for devices that stream data without prompting.

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

Lifecycle state of the underlying jSerialComm port.

Link copied to clipboard

Stop bits per frame.

Link copied to clipboard

Line terminator appended to outbound commands.

Link copied to clipboard

Epoch millis of the most recent successful exchange.

Link copied to clipboard

Write timeout in milliseconds. 0 means no timeout.