Repository navigation
Use the iMotions port read off the lab machine - #248
Conversation
The placeholder and the validation message now say 5050, and the mock server's 9999 is labelled as its own testing port.
jmacd867
left a comment
There was a problem hiding this comment.
Thanks for tracking down the port. Documenting where to read it (Global Settings > API > Event Receiving) in the README is exactly what #195 needed.
A few things before this closes #239:
1. The placeholder is still a value people will copy. The placeholder (DEFAULT_TCP_PLACEHOLDER) and the validation error both read 127.0.0.1:5050. #239 asked for something "clearly not a value to copy", and that's what happened with 9999. 127.0.0.1 also means the relay's own machine, but in the lab iMotions runs on a separate computer. Could the placeholder, the error message and the README examples (README.md:105-108) all use something like <iMotions IP>:5050?
2. The mock server still prints a bare 9999. The comment is updated, but #239 asked for the output to say it too. The startup line (Server listening on ...) and the usage line ((default 9999)) could say it's a local testing port, not iMotions'.
3. Smaller, take or leave:
- The error message could build its text from the placeholder constant, so the next port change is one edit instead of two.
- The name
DEFAULT_TCP_PLACEHOLDERcontradicts its own comment ("a setting rather than a fixed default"). MaybeIMOTIONS_ADDR_HINT? - "9999 used to sit here..." in
view.rsis history and fits better in the commit message. docs/client_meeting_notes.md(lines 61 and 68) still lists the port as open. That's fine as a meeting record, but a one-line pointer to the #195 comment would stop people from rereading it as unresolved.
cargo test in relay passes (8/8) and the mock server builds. I can't check 5050 end to end without the lab machine.
The placeholder and the validation message now share one constant and read <iMotions IP>:5050, since iMotions is on its own machine in the lab. The mock server says in its output that its port is local, not iMotions'.
|
All four addressed in 1c0dcc0 (force-free, pushed to the branch).
One thing for whoever merges second. #242 adds |
jmacd867
left a comment
There was a problem hiding this comment.
Approving. All four points are addressed, the placeholder and the error message now share one constant, and CI passes. cargo test in relay also passes locally.
Not blocking, fine as a follow-up:
docs/client_meeting_notes.md: line 61 still points to "the open question" in the README, which is gone now, and the Open items table still lists "Confirm which port iMotions listens on".- A small test that
validate_tcp_addr("localhost:5050")fails with a message containingIMOTIONS_ADDR_HINTwould pin the link between the two. It matters for #247, see my comment there. - The error-message line in
state.rsis 105 characters, over rustfmt's 100. - Could you confirm the three outgoing port names in the README (
Remote Control, the twoDestination Serverports) match the lab screen? They aren't in the #195 comment.
Closes #239. Updates #195 with the port, which that issue can keep tracking for the import procedure.
#239 was written when nobody knew the port and asked for a placeholder that clearly was not a value to copy. We now have the real one, so this does the better version of that: carry the confirmed value with its provenance, instead of a number three files happened to agree on.
Where 5050 came from
Read off the lab machine's iMotions install,
Global Settings>API>Event Receiving, withEnable event receptionandUse TCPboth ticked. The same panel lists our event source asId: PilotDataSync, version 1,Positional Flight Data, which matches what the relay's generatediMotions.xmldefines and what it puts on the wire.It is a setting rather than a product default, so the README says to check it on whichever machine you are using instead of trusting the placeholder.
Changes
relay/src/view.rs: placeholder is127.0.0.1:5050, with a comment recording where the value came from.relay/src/state.rs: the validation message matches.src/server/src/main.rs: the mock keeps 9999, now labelled as its own local testing port so running it is never mistaken for talking to iMotions. That was Relay's 127.0.0.1:9999 placeholder reads like a real iMotions port #239's suggestion and it still holds.README.md: a short section on reading the port off the API tab, what the event source should look like, and which three ports on that same tab are not ours. The "nothing confirms it is iMotions' real port" warning is replaced.Still open
How
iMotions.xmlis imported is still undocumented. It was already registered on the lab machine and nobody on the team performed the import, so #195 stays open for that half.Untestable here: the relay has still never been pointed at a real iMotions instance. This changes a default and documentation only, and the relay has no default address, so nothing connects anywhere on its own.