fix(rotator): one held TCP session for a DCU-1 controller
The DCU-1 client opened a connection per command and closed it again, "mirroring the gs232/pst/rotgenius idiom". That idiom is right for the UDP backends beside it and wrong over TCP to an embedded serial server, which is what an RT-21's Ethernet option is: the heading is polled every 500 ms while the antenna turns, GoTo sends two commands (AP1 then AM1), Stop sends two more — each its own connect and close. Modules of that class commonly accept a SINGLE session and need a moment to release it, so the churn on its own looks like a controller ignoring half of what it is told. The socket is now kept between calls, one mutex serialises every exchange — which also stops the poll and an operator command from holding two sessions at once — and a write or read error drops it so the next call redials. One retry after a redial, because a kept socket's first write succeeds long after the far end has gone. Serial keeps open-per-call: a COM port has one owner, and holding it would lock out the controller's own software. Keeping a session only helps if the client survives the call, and dcu1Client built a fresh one every time, so it is cached per controller identity. Two rotors on the same box share one client, which is the point when one session is all there is. SaveRotators drops the cache: a client left over from the previous host would hold the very session its replacement needs. Three tests against a fake controller that accepts one session at a time: four commands share one session, a dropped session is redialled exactly once, and a failed dial leaves nothing behind.
This commit is contained in:
+4
-2
@@ -14,7 +14,8 @@
|
||||
"A correction you make on the transmit VFO is now kept for the whole pass, and remembered for that transponder. Doppler tracking used to undo it a second later.",
|
||||
"The Green Heron RT-21 is named in the rotator list. It speaks the DCU-1 command set OpsLog already drives, over its COM port or straight over TCP with the Ethernet option — set the controller to DCU-1 / Rotor-EZ.",
|
||||
"Retract and Calibrate on a SteppIR now show the elements moving, and inhibit the transmitter while they do. Neither said anything before — the same was missing on an Ultrabeam retract, where the element lengths counting down hid it.",
|
||||
"The window can be made as small as you like. The 1100x700 floor is gone — only Windows own limit remains."
|
||||
"The window can be made as small as you like. The 1100x700 floor is gone — only Windows own limit remains.",
|
||||
"A DCU-1 controller reached over TCP now gets one connection held open, instead of a new one for every command — twice a second while the antenna turns. Controllers that accept a single session, an RT-21 with the Ethernet option among them, could not keep up."
|
||||
],
|
||||
"fr": [
|
||||
"Le tracé du ciel et la position passent dans leur propre colonne, à gauche de la carte. Largeur réglable, et la colonne se replie comme celle de droite.",
|
||||
@@ -29,7 +30,8 @@
|
||||
"Une correction faite sur le VFO d’émission est désormais conservée pour toute la passe, et mémorisée pour ce transpondeur. Le suivi Doppler l’effaçait une seconde plus tard.",
|
||||
"Le Green Heron RT-21 est nommé dans la liste des rotators. Il parle le jeu de commandes DCU-1 que OpsLog pilote déjà, via son port COM ou directement en TCP avec l’option Ethernet — régler le contrôleur sur DCU-1 / Rotor-EZ.",
|
||||
"Rétracter et Calibrer sur une SteppIR montrent désormais les éléments en mouvement, et inhibent l’émission pendant ce temps. Ni l’un ni l’autre ne le signalait — même manque sur la rétraction d’une Ultrabeam, où le défilement des longueurs d’éléments le masquait.",
|
||||
"La fenêtre peut être réduite autant que vous voulez. Le plancher de 1100x700 disparaît — il ne reste que la limite propre à Windows."
|
||||
"La fenêtre peut être réduite autant que vous voulez. Le plancher de 1100x700 disparaît — il ne reste que la limite propre à Windows.",
|
||||
"Un contrôleur DCU-1 joint en TCP reçoit désormais une seule connexion maintenue ouverte, au lieu d’une nouvelle à chaque commande — deux fois par seconde en rotation. Les contrôleurs n’acceptant qu’une session, dont un RT-21 avec l’option Ethernet, ne pouvaient pas suivre."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user