Repository navigation
Connect an unlisted transport only when it opts in - #190
Conversation
0a464d4 to
6966331
Compare
|
@lhoward, would love your review on this (scope grew while I was working on it, of course) Opt in by adding transport to the 'urn:x-padl:transport:example': {
label: 'Example',
oneToOne: true,
},The key is the transport URN base your Senders and Receivers actually advertise, without a With That is the wrong tool if a Sender parameter has to be renamed onto the Receiver, the way RTP copies Until the entry is there, Connect stops with One consequence of registering it: any transport in |
|
This comment was generated by Claude and reviewed by me. Looks good, and works against our hardware from the matrix with local Nit: |
|
The heuristics in And the inconsistent Will also revisit what we do with |
6966331 to
03f6aea
Compare
|
The branch is rewritten on top of "Send the values copied from a Sender as they are", and force-pushed, so comments on the previous commits will not line up with the files. Four commits:
Addressing Luke's comment on handling the Dante channel name: the staged value is now submitted as the type on the control. The generic card has a choice of string, integer, number or boolean, so The transport helpers all read the URN base (
Activation modes use Immediate, Scheduled Relative and Scheduled Absolute when Friendly Names is on, in the field and in the menu. An empty choice on a Sender or Receiver stores null. The channel-mapping editor uses the same names and has no empty choice, because |
1037dc6 to
cf6e083
Compare
makeConnection copies the parameters listed for the Sender's transport. A transport with no list, such as a manufacturer's own, which IS-05 v1.2 allows, left that list undefined, so connecting failed with a TypeError before any request was made. For such a transport, copy each parameter that the Sender's active transport_params and the Receiver's staged transport_params both have. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T8cahEd4GfsHQ89sNrmP4p
A PATCH to a Receiver turns a string that reads as a number into a number, which suits a value typed into a text input. The values makeConnection copies from the Sender already have the type the Sender gave them, so a string parameter such as a channel name of "11" or "05" must stay a string. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01T8cahEd4GfsHQ89sNrmP4p
Same-name copy is what WebSocket already does. RTP, MQTT and MXL each need their own mapping, so makeConnection refuses a transport with no explicit list and no oneToOne flag. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
Known parameters submit the JSON type they should keep. A staged string such as "" or "11" is not reinterpreted. An opted-in transport is edited on one card per leg. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
The Content-Type from the sender's transport file is kept with the data and sent on connect. A registered transport that does not use a file hides the type and data. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
Immediate, Scheduled Relative and Scheduled Absolute follow the Friendly Names setting in the field and in the menu. An empty choice stores null. The channel-mapping editor uses the same names. POST /map/activations/ requires a mode, so that menu has no empty choice. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
A select cannot hold null, so the null row submits null. auto and null follow the real values after one separator, in that order, whether they came from the props or from choices. The closed field shows the word null. The subscription create menu uses the same word style for an empty resource path, and keeps that row first. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
GenericReceiverEdit and GenericSenderEdit show the parameters the node sent, so they are enough for general use. oneToOne remains the connect opt-in. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
A text filter uses a comma to separate alternatives. Basic query cannot express that, so the value is left out of the request and the field is marked. With RQL on, a match button joins a receiver's media types or event types into that string so the input can show them. Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>
4c52966 to
9d95d6b
Compare
|
Rebased on tip of sony:master with two extra commits:
|
IS-05 requires type with data even when the type is unchanged. The staged diff was omitting it after the hard-coded application/sdp was removed. Co-authored-by: Simon Lo <simon.lo@sony.com> Signed-off-by: Gareth Sylvester-Bradley <garethsb@nvidia.com>




Builds on #188. This is the version to merge; #188 can close once this is in.
Summary
Same-name copy is what WebSocket already does, and what
ext_parameters already do. RTP, MQTT and MXL each need their own Sender-to-Receiver mapping, so it is not the fallback for every transportmakeConnectiondoes not already list.copySharedParamsoneToOneon itsTRANSPORTSentry.makeConnectionthen copies each parameter name that the Sender's activetransport_paramsand the Receiver's stagedtransport_paramsboth have.ext_parameters stay on their existing path.getSharedParamsis that intersection, using the same merge asgetExtParams.sender_id,master_enableandactivate_immediateand leavingtransport_paramsalone is not a connection.verbatimon themakeConnectionupdate stays, so a string copied from the Sender, such as"11", is not sent as a number.Test plan
yarn lint-checkyarn test --watchAll=false --testPathPattern 'ConnectionsList.test|dataProvider.test|GenericTransportParamInput.test|makeConnection.test'(4 suites, 63 tests). This covers staged-text coercion, a verbatim copied string staying a string, DASH and an unrecognised transport being refused, an opted-in transport copying shared parameter names, RTP keeping its own parameter list, and the transport-file hint for RTP, DASH, MQTT, WebSocket, MXL, and an unrecognised transport.