From 3d070377eb8e34582736c81354332fc554e338c8 Mon Sep 17 00:00:00 2001 From: Gareth Hancock <64541249+GazHank@users.noreply.github.com> Date: Tue, 20 Jun 2023 17:59:33 +0100 Subject: [PATCH 1/5] Add friendlyName and LowLatency to definitions Signed-off-by: Gareth Hancock <64541249+GazHank@users.noreply.github.com> --- docs/api-binding-mock.md | 1 + docs/api-bindings-cpp.mdx | 10 +++++++--- versioned_docs/version-10.x.x/api-bindings-cpp.mdx | 10 +++++++--- versioned_docs/version-10.x.x/bin-repl.md | 3 ++- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/docs/api-binding-mock.md b/docs/api-binding-mock.md index f38bf1f..2854605 100644 --- a/docs/api-binding-mock.md +++ b/docs/api-binding-mock.md @@ -27,6 +27,7 @@ interface CreatePortOptions { manufacturer?: string; vendorId?: string; productId?: string; + friendlyName?: string; } // Create a port and enable the echo and recording. diff --git a/docs/api-bindings-cpp.mdx b/docs/api-bindings-cpp.mdx index bb4428d..69410e6 100644 --- a/docs/api-bindings-cpp.mdx +++ b/docs/api-bindings-cpp.mdx @@ -61,6 +61,7 @@ interface PortInfo { locationId: string | undefined; productId: string | undefined; vendorId: string | undefined; + friendlyName: string | undefined; } function list(): Promise @@ -78,7 +79,8 @@ const ports = await LinuxBinding.list() // pnpId: 'usb-Arduino__www.arduino.cc__0043_752303138333518011C1-if00', // locationId: undefined, // productId: '0043', -// vendorId: '2341' +// vendorId: '2341', +// friendlyName: undefined // }] ``` @@ -94,7 +96,8 @@ const ports = await WindowsBinding.list() // pnpId: 'USB\\VID_2341&PID_0043\\752303138333518011C1', // locationId: 'Port_#0003.Hub_#0001', // productId: '0043', -// vendorId: '2341' +// vendorId: '2341', +// friendlyName: 'USB Serial Device (COM3)' // }] ``` @@ -110,7 +113,8 @@ const ports = await DarwinBinding.list() // pnpId: undefined, // locationId: '14500000', // productId: '0043', -// vendorId: '2341' +// vendorId: '2341', +// friendlyName: undefined // }] ``` diff --git a/versioned_docs/version-10.x.x/api-bindings-cpp.mdx b/versioned_docs/version-10.x.x/api-bindings-cpp.mdx index bb4428d..69410e6 100644 --- a/versioned_docs/version-10.x.x/api-bindings-cpp.mdx +++ b/versioned_docs/version-10.x.x/api-bindings-cpp.mdx @@ -61,6 +61,7 @@ interface PortInfo { locationId: string | undefined; productId: string | undefined; vendorId: string | undefined; + friendlyName: string | undefined; } function list(): Promise @@ -78,7 +79,8 @@ const ports = await LinuxBinding.list() // pnpId: 'usb-Arduino__www.arduino.cc__0043_752303138333518011C1-if00', // locationId: undefined, // productId: '0043', -// vendorId: '2341' +// vendorId: '2341', +// friendlyName: undefined // }] ``` @@ -94,7 +96,8 @@ const ports = await WindowsBinding.list() // pnpId: 'USB\\VID_2341&PID_0043\\752303138333518011C1', // locationId: 'Port_#0003.Hub_#0001', // productId: '0043', -// vendorId: '2341' +// vendorId: '2341', +// friendlyName: 'USB Serial Device (COM3)' // }] ``` @@ -110,7 +113,8 @@ const ports = await DarwinBinding.list() // pnpId: undefined, // locationId: '14500000', // productId: '0043', -// vendorId: '2341' +// vendorId: '2341', +// friendlyName: undefined // }] ``` diff --git a/versioned_docs/version-10.x.x/bin-repl.md b/versioned_docs/version-10.x.x/bin-repl.md index c9287cc..adcf226 100644 --- a/versioned_docs/version-10.x.x/bin-repl.md +++ b/versioned_docs/version-10.x.x/bin-repl.md @@ -39,7 +39,8 @@ globals { SerialPort, SerialPortMock, path, port } pnpId: undefined, locationId: '02100000', vendorId: '2341', - productId: '8036' + productId: '8036', + friendlyName: undefined } ] > port.open() From 5c2ee86e42ec76e1f8a1e399e2863bc9066fe31c Mon Sep 17 00:00:00 2001 From: Gareth Hancock <64541249+GazHank@users.noreply.github.com> Date: Tue, 20 Jun 2023 18:17:24 +0100 Subject: [PATCH 2/5] Fix friendlyName for mock Signed-off-by: Gareth Hancock <64541249+GazHank@users.noreply.github.com> --- docs/api-binding-mock.md | 2 +- versioned_docs/version-10.x.x/api-binding-mock.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/api-binding-mock.md b/docs/api-binding-mock.md index 2854605..7c837c2 100644 --- a/docs/api-binding-mock.md +++ b/docs/api-binding-mock.md @@ -27,7 +27,7 @@ interface CreatePortOptions { manufacturer?: string; vendorId?: string; productId?: string; - friendlyName?: string; + friendlyName: string; } // Create a port and enable the echo and recording. diff --git a/versioned_docs/version-10.x.x/api-binding-mock.md b/versioned_docs/version-10.x.x/api-binding-mock.md index f38bf1f..7c837c2 100644 --- a/versioned_docs/version-10.x.x/api-binding-mock.md +++ b/versioned_docs/version-10.x.x/api-binding-mock.md @@ -27,6 +27,7 @@ interface CreatePortOptions { manufacturer?: string; vendorId?: string; productId?: string; + friendlyName: string; } // Create a port and enable the echo and recording. From c8518787c7d86226f5db827cba8838ff5e3a4174 Mon Sep 17 00:00:00 2001 From: Gareth Hancock <64541249+GazHank@users.noreply.github.com> Date: Wed, 21 Jun 2023 09:18:11 +0100 Subject: [PATCH 3/5] add friednlyName to bin-repl Signed-off-by: Gareth Hancock <64541249+GazHank@users.noreply.github.com> --- docs/bin-repl.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/bin-repl.md b/docs/bin-repl.md index c9287cc..adcf226 100644 --- a/docs/bin-repl.md +++ b/docs/bin-repl.md @@ -39,7 +39,8 @@ globals { SerialPort, SerialPortMock, path, port } pnpId: undefined, locationId: '02100000', vendorId: '2341', - productId: '8036' + productId: '8036', + friendlyName: undefined } ] > port.open() From b26b0f22a929f9367a154dd47869d5f2d95e7f98 Mon Sep 17 00:00:00 2001 From: Gareth Hancock <64541249+GazHank@users.noreply.github.com> Date: Wed, 21 Jun 2023 09:19:40 +0100 Subject: [PATCH 4/5] add friendlyName to bin-repl Signed-off-by: Gareth Hancock <64541249+GazHank@users.noreply.github.com> --- docs/bin-repl.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/bin-repl.md b/docs/bin-repl.md index c9287cc..adcf226 100644 --- a/docs/bin-repl.md +++ b/docs/bin-repl.md @@ -39,7 +39,8 @@ globals { SerialPort, SerialPortMock, path, port } pnpId: undefined, locationId: '02100000', vendorId: '2341', - productId: '8036' + productId: '8036', + friendlyName: undefined } ] > port.open() From ab118f6ea10766b04beb2856e1838f2cfce5a6d7 Mon Sep 17 00:00:00 2001 From: Gareth Hancock <64541249+GazHank@users.noreply.github.com> Date: Thu, 22 Jun 2023 08:49:13 +0100 Subject: [PATCH 5/5] Fix optionality per review comment Signed-off-by: Gareth Hancock <64541249+GazHank@users.noreply.github.com> --- docs/api-binding-mock.md | 2 +- versioned_docs/version-10.x.x/api-binding-mock.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-binding-mock.md b/docs/api-binding-mock.md index 7c837c2..2854605 100644 --- a/docs/api-binding-mock.md +++ b/docs/api-binding-mock.md @@ -27,7 +27,7 @@ interface CreatePortOptions { manufacturer?: string; vendorId?: string; productId?: string; - friendlyName: string; + friendlyName?: string; } // Create a port and enable the echo and recording. diff --git a/versioned_docs/version-10.x.x/api-binding-mock.md b/versioned_docs/version-10.x.x/api-binding-mock.md index 7c837c2..2854605 100644 --- a/versioned_docs/version-10.x.x/api-binding-mock.md +++ b/versioned_docs/version-10.x.x/api-binding-mock.md @@ -27,7 +27,7 @@ interface CreatePortOptions { manufacturer?: string; vendorId?: string; productId?: string; - friendlyName: string; + friendlyName?: string; } // Create a port and enable the echo and recording.