NewSerialRead builds a SerialRead bound to the given UART channel. prompt may be empty.
(id string, binding workflow.OutputBinding, prompt string, uart *channel.UART)
| 37 | // NewSerialRead builds a SerialRead bound to the given UART channel. |
| 38 | // prompt may be empty. |
| 39 | func 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 | |
| 48 | func (r *SerialRead) Execute(ctx context.Context, scope *engine.Scope) (string, error) { |
| 49 | if err := r.uart.Flush(); err != nil { |
nothing calls this directly
no outgoing calls
no test coverage detected