MCPcopy Create free account
hub / github.com/ForestHubAI/edge-agents / SerialRead

Struct SerialRead

go/engine/node/serialread.go:30–35  ·  view source on GitHub ↗

SerialRead blocks on a serial port until one line arrives, then emits it through the output binding and advances. The receive buffer is flushed first so pre-existing chatter doesn't satisfy the read; when prompt is non-empty it is written next, then the blocking read runs. The driver's Read steals f

Source from the content-addressed store, hash-verified

28// The driver's Read steals from the broadcast path while it is in flight,
29// so any concurrent OnSerialReceive trigger pauses for the duration.
30type SerialRead struct {
31 engine.LinearNode
32 binding workflowapi.OutputBinding
33 prompt string
34 uart *channel.UART
35}
36
37// NewSerialRead builds a SerialRead bound to the given UART channel.
38// prompt may be empty.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected