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

Function NewSerialRead

go/engine/node/serialread.go:39–46  ·  view source on GitHub ↗

NewSerialRead builds a SerialRead bound to the given UART channel. prompt may be empty.

(id string, binding workflow.OutputBinding, prompt string, uart *channel.UART)

Source from the content-addressed store, hash-verified

37// NewSerialRead builds a SerialRead bound to the given UART channel.
38// prompt may be empty.
39func NewSerialRead(id string, binding workflowapi.OutputBinding, prompt string, uart *channel.UART) *SerialRead {
40 return &SerialRead{
41 LinearNode: engine.NewLinearNode(id),
42 binding: binding,
43 prompt: prompt,
44 uart: uart,
45 }
46}
47
48func (r *SerialRead) Execute(ctx context.Context, scope *engine.Scope) (string, error) {
49 if err := r.uart.Flush(); err != nil {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected