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 friendlyName to PortInfo interface <superseeded - will delete upon confirmation of alternative fix> #105

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/api-bindings-cpp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ interface PortInfo {
locationId: string | undefined;
productId: string | undefined;
vendorId: string | undefined;
friendlyName?: string | undefined;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this is technically true 🤔

Should we make it always present on other platforms but undefined to be consistent?

Copy link
Contributor Author

@GazHank GazHank Jun 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I was trying to work out if we had set a precedent elsewhere... and the only example I could find was the LowLatency mode for Linux.... however upon a closer look, while it is only defined within the Linux specific interface definition, Windows actually returns False. So I think the PortStatus definition might need to be changed too :-(

Happy to pivot in either direction, but I think it would be good to be consistent in how we handle things across the package... Can you think of any other platform specific items we might need to consider at the same time?

Copy link
Member

@reconbot reconbot Jun 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would assume that eventually we can provide the friendly name on other systems. So I wouldn't consider it platform specific by design.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, I'll draft an alternative change that includes friendlyname within port info, and lowlatency within get info, but allows them to be undefined

}

function list(): Promise<PortInfo>
Expand Down
1 change: 1 addition & 0 deletions versioned_docs/version-10.x.x/api-bindings-cpp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ interface PortInfo {
locationId: string | undefined;
productId: string | undefined;
vendorId: string | undefined;
friendlyName?: string | undefined;
}

function list(): Promise<PortInfo>
Expand Down