Documentation ¶
Overview ¶
Package monitor provides a client for Pluggable Monitors. Documentation is available here: https://arduino.github.io/arduino-cli/latest/pluggable-monitor-specification/
Index ¶
- type PluggableMonitor
- func (mon *PluggableMonitor) Close() error
- func (mon *PluggableMonitor) Configure(param, value string) error
- func (mon *PluggableMonitor) Describe() (*PortDescriptor, error)
- func (mon *PluggableMonitor) GetID() string
- func (mon *PluggableMonitor) Open(portAddress, portProtocol string) (io.ReadWriter, error)
- func (mon *PluggableMonitor) Quit() error
- func (mon *PluggableMonitor) Run() (err error)
- func (mon *PluggableMonitor) String() string
- type PortDescriptor
- type PortParameterDescriptor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PluggableMonitor ¶
type PluggableMonitor struct {
// contains filtered or unexported fields
}
PluggableMonitor is a tool that communicates with a board through a communication port.
func New ¶
func New(id string, args ...string) *PluggableMonitor
New create and connect to the given pluggable monitor
func (*PluggableMonitor) Close ¶
func (mon *PluggableMonitor) Close() error
Close the communication port with the board.
func (*PluggableMonitor) Configure ¶
func (mon *PluggableMonitor) Configure(param, value string) error
Configure sets a port configuration parameter.
func (*PluggableMonitor) Describe ¶
func (mon *PluggableMonitor) Describe() (*PortDescriptor, error)
Describe returns a description of the Port and the configuration parameters.
func (*PluggableMonitor) GetID ¶
func (mon *PluggableMonitor) GetID() string
GetID returns the identifier for this monitor
func (*PluggableMonitor) Open ¶
func (mon *PluggableMonitor) Open(portAddress, portProtocol string) (io.ReadWriter, error)
Open connects to the given Port. A communication channel is opened
func (*PluggableMonitor) Quit ¶
func (mon *PluggableMonitor) Quit() error
Quit terminates the monitor. No more commands can be accepted by the monitor.
func (*PluggableMonitor) Run ¶
func (mon *PluggableMonitor) Run() (err error)
Run starts the monitor executable process and sends the HELLO command to the monitor to agree on the pluggable monitor protocol. This must be the first command to run in the communication with the monitor. If the process is started but the HELLO command fails the process is killed.
func (*PluggableMonitor) String ¶
func (mon *PluggableMonitor) String() string
type PortDescriptor ¶
type PortDescriptor struct { Protocol string `json:"protocol,omitempty"` ConfigurationParameters map[string]*PortParameterDescriptor `json:"configuration_parameters,omitempty"` }
PortDescriptor is a struct to describe the characteristic of a port