Skip to content

Reaquire a port by id #83

@yakir12

Description

@yakir12

A common situation I've encountered: I have the port name (i.e. as a String, e.g. "/dev/serial/by-id/usb-Arduino__www.arduino.cc__0043_95735353032351F0F0F0-if00"), I open it, do stuff with the SerialPort object, and then for various reasons I "lose" the SerialPort object. I then have no means of reacquiring it. In fact, the only real option I have is to restart the Julia session and get it by name again.

One way would be for me to keep my own record of the SerialPort object (like a const Ref of the object) and maintain it that way. But perhaps it would be better if that functionality existed in LibSerialPort.jl. Simply put, just like there is an open port function that accepts the port name as a string, there should be a close function that accepts the port name as a string (and not just as a SerialPort).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions