Register a listener for serial port connection and disconnection events. The listener is called with two arguments: the event type string ("added" or "removed") and a port-info object with name and path fields.
"added"
"removed"
name
path
The function to call when a serial port is added or removed
Register a listener for serial port connection and disconnection events. The listener is called with two arguments: the event type string (
"added"or"removed") and a port-info object withnameandpathfields.