Skip to content

Adjust pluggable monitor spec re: DESCRIBE command response to match library behavior #1738

Closed
@per1234

Description

@per1234

Describe the problem

The pluggable monitor specification states:

https://arduino.github.io/arduino-cli/dev/pluggable-monitor-specification/#describe-command

The enum types must have a list of possible values

The example response shown in the specification also uses values key names, so I don't think it is only a matter of incorrect formatting of "values"

🐛 github.com/arduino/pluggable-monitor-protocol-handler.monitor.PortParameterDescriptor.Values has a field tag value of value, instead of the specification compliant values:

https://github.com/arduino/pluggable-monitor-protocol-handler/blob/3dee1f8eddeb94f728c66645ec748da0501340e6/message.go#L38

To reproduce

$ git clone https://github.com/arduino/pluggable-monitor-protocol-handler

$ cd pluggable-monitor-protocol-handler/dummy-monitor/

$ git log -1 --oneline
3dee1f8 (HEAD -> main, origin/main, origin/HEAD) Merge pull request arduino/pluggable-monitor-protocol-handler#12 from per1234/issue-forms

$ go build

$ ./dummy-monitor
HELLO 1 "Arduino IDE"
{
  "eventType": "hello",
  "message": "OK",
  "protocolVersion": 1
}
DESCRIBE
{
  "eventType": "describe",
  "message": "OK",
  "port_description": {
    "protocol": "test",
    "configuration_parameters": {
      "echo": {
        "label": "echo",
        "type": "enum",
        "value": [
          "on",
          "off"
        ],
        "selected": "on"
      },
      "speed": {
        "label": "Baudrate",
        "type": "enum",
        "value": [
          "9600",
          "19200",
          "38400",
          "57600",
          "115200"
        ],
        "selected": "9600"
      }
    }
  }
}

🐛 There are non-compliant key names:

  • port_description.configuration_parameters.echo.value
  • port_description.configuration_parameters.speed.value

Expected behavior

DESCRIBE command response is specification compliant.

'github.com/arduino/pluggable-monitor-protocol-handler' version

3dee1f8

Additional context

No response

Issue checklist

  • I searched for previous reports in the issue tracker
  • I verified the problem still occurs when using the latest version
  • My report contains all necessary details

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions