Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new commands to support watching for port changes #904

Open
3 tasks done
Xayton opened this issue Feb 23, 2024 · 0 comments
Open
3 tasks done

Add new commands to support watching for port changes #904

Xayton opened this issue Feb 23, 2024 · 0 comments
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement

Comments

@Xayton
Copy link
Contributor

Xayton commented Feb 23, 2024

Describe the request

New commands:

  • startwatchports: starts watching and returns multiple add events (corresponding to all the known ports at that time)
  • stopwatchports

When the WebSocket connection is closed by the client, the agent will automatically stop sending events and eventually stop watching for port changes (this is an internal implementation detail).

At the start of the communication, the watch functionality is stopped, and has to be started manually with a startwatchports.

If the agent is already sending watchport events, a startwatchports will not do anything. Same for the other way around with stopwatchports.

Result message:

{
  "message_type": "watchportevent"
  "message_data": 
  {
    "eventType": "add",
    "port": {
      "address": "/dev/ttyACM0",
      "label": "/dev/ttyACM0",
      "protocol": "serial",
      "protocol_label": "Serial Port (USB)",
      "properties": {
        "pid": "0x0070",
        "serialNumber": "3485187AA318",
        "vid": "0x2341"
      },
      "hardware_id": "3485187AA318"
    }
  }
}

Note: multiple port additions or removals would be sent using multiple watchportevent messages.

Describe the current behavior

Currently the Agent does not support watch functionality.

Arduino Create Agent version

1.3.8

Operating system

N/A

Operating system version

N/A

Browser

N/A

Browser version

N/A

Additional context

No response

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest version
  • My request contains all necessary details
@Xayton Xayton added the type: enhancement Proposed improvement label Feb 23, 2024
@per1234 per1234 added the topic: code Related to content of the project itself label Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: enhancement Proposed improvement
Projects
None yet
Development

No branches or pull requests

2 participants