Welcome to the new FlexRadio Community! Please review the new Community Rules and other important new Community information on the Message Board.
Need the latest SmartSDR, Power Genius, Tuner Genius and Antenna Genius Software?
SmartSDR v3.8.19 and the SmartSDR v3.8.19 Release Notes | SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
SmartSDR v1.12.1 and the SmartSDR v1.12.1 Release Notes
Power Genius XL Utility v3.8.8 and the Power Genius XL Release Notes v3.8.8
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
SmartSDR v3.8.19 and the SmartSDR v3.8.19 Release Notes | SmartSDR v2.12.1 and the SmartSDR v2.12.1 Release Notes
SmartSDR v1.12.1 and the SmartSDR v1.12.1 Release Notes
Power Genius XL Utility v3.8.8 and the Power Genius XL Release Notes v3.8.8
Tuner Genius XL Utility v1.2.11 and the Tuner Genius XL Release Notes v1.2.11
Antenna Genius Utility v4.1.8
If you are having a problem, please refer to the product documentation or check the Help Center for known solutions.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
Need technical support from FlexRadio? It's as simple as Creating a HelpDesk ticket.
Ethernet API - Status messages - Different behaviour in 1.4.3
IW7DMH, Enzo
Member ✭✭
Hello,
after 1.4.3 upgrade, I experimented a strange behaviour in status message responses.
It seems that a client, after having sent a command, can't receive its related status response.
It happens only for some commands, not for all.
In the following picture I started two clients A and B.
Client A is only "listening" and it receives "all" status responses.
On the other side Client B is sending commands but for two of them, "slice agc_threshold" and "mixer lineout_gain" it can't get status responses. I underlined these with red lines.
When this happens my Arduino console loose synchronization with the Flex rig, so this behaviour, could be a big issue.
Could you confirm this?
Thank you very much
73' Enzo
iw7dmh
after 1.4.3 upgrade, I experimented a strange behaviour in status message responses.
It seems that a client, after having sent a command, can't receive its related status response.
It happens only for some commands, not for all.
In the following picture I started two clients A and B.
Client A is only "listening" and it receives "all" status responses.
On the other side Client B is sending commands but for two of them, "slice agc_threshold" and "mixer lineout_gain" it can't get status responses. I underlined these with red lines.
When this happens my Arduino console loose synchronization with the Flex rig, so this behaviour, could be a big issue.
Could you confirm this?
Thank you very much
73' Enzo
iw7dmh
0
Comments
-
Enzo,
In general, the philosophy is that the client that sent the message in the first place already knows the situation and doesn't need to hear it from the radio. The key reason we did this was to avoid race conditions. For example, if you are tuning with the mouse and sending "slice tune" commands, you might send 2-3 before you hear our first response. If we send a status with that and it reiterates the frequency of the first tune, your client will "jump" the slice back to the first frequency. This would result in a jittery display. So we opt not to send most status back to the client that originated the change. Your GUI should reflect any changes you send to the radio. The radio will either respond with an result of 0 (success) or it will return an error AND a new status to tell you the situation in the radio since your command did not work. Does this make sense? There are a few exceptions to this, but it is the general rule.
So what you should do in your client is assume that anything you tell the radio to do will happen. You can optionally wait until you get a response to show the change if you like. Status is not guaranteed with a successful operation that you initiate. It is guaranteed for a change made by another client.0 -
Ok Steve,
I looked for status messages, before updating internal objects, because I was, erroneously, considering status messages were granted to all clients.
The key aspect of your explanation "Status is not guaranteed with a successful operation that you initiate. It is guaranteed for a change made by another client" was not immediate to me reading the wiki docs (that are my starting points).
Of course my client knows the situation and considering the success result logic does make a lot of sense. I will adapt the parser to respect this logic.
But at this point I have only a doubt: does make sense sending, to an active client, both response packets and status packets? It could be time and band consuming as it systematically forces the client to update two times the same object status. (assuming one have an handler for responses and one handler for status).
That's all for the moment.
Many many thanks for your help.
73' Enzo
0 -
But at this point I have only a doubt: does make sense sending, to an active client, both response packets and status packets?
I'm not sure I understand the question, Enzo.0 -
Dear Steve, I am sorry for my poor English.
An active client for me is a client that send a command to the rig and wait for a response.
If I am right, it receives "always" the R response, and sometimes the S message.
So, in this scenario, the S answer is not deterministic.
If I have to implement an handler for R and another for S (as I have done) I must have two place in my code that can update the same object.
Using an high level programming language this is not a great problem, but in a micro-programmed enviroment this could be.
I don't know the reason of this choice, but I would consider the following use case:
1- the client connect the Flexrig and subscribe itself to some or every Flex objects;
2- when a client send a command it receives only the R packet (no more the S packets);
3- if an error happens it receives R and the related S packet;
4- when it needs, the client could ask for the "whole" status object.
I think this logic could be more convenient for both rig and clients: the rig send back less data and the client is free to ask for the status when it needs.
Best regards and Happy Easter
73' Enzo
iw7dmh
0 -
Dear Steve, I am sorry for my poor English.
Enzo, it beats my Italian any day (although I continue to study from time to time) ;-)
An active client for me is a client that send a command to the rig and wait for a response.
If I am right, it receives "always" the R response, and sometimes the S message.
So, in this scenario, the S answer is not deterministic.
If I have to implement an handler for R and another for S (as I have done) I must have two place in my code that can update the same object.
Using an high level programming language this is not a great problem, but in a micro-programmed enviroment this could be.
Well yes you have to parse both and you have to decide how to handle both. But the status message is what requires all of the parsing. The response generally won't require you to update a specific item -- it just tells you if what you tried to do was successful and, if not, why it was not successful. We generally ignore the response in our client except in some special circumstances. So most of the parsing occurs with the status. As a developer the response will help you figure out what is wrong. You can even issue commands like "CD1|slice tune 99 14.1" and it will give you more details on why the command won't work.
I don't know the reason of this choice, but I would consider the following use case:
1- the client connect the Flexrig and subscribe itself to some or every Flex objects;
2- when a client send a command it receives only the R packet (no more the S packets);
3- if an error happens it receives R and the related S packet;
This is basically what happens now. In a few cases we send out the status when it is not needed. I can't tell you today why this is done in every case, but we often had a good reason to do so.
4- when it needs, the client could ask for the "whole" status object.
Polling the status or asking really goes against the way we have things working. It will cause unnecessary network traffic which would make remote operation with your client potentially more difficult.
I think this logic could be more convenient for both rig and clients: the rig send back less data and the client is free to ask for the status when it needs.
But if there are other clients changing things and you are not being notified, how do you know when to ask for the status of the item? You don't so you must poll. When you start polling, everything falls apart because you might poll once a second and then someone will ask you to poll more often and for more things and before you know it, this will work just like CAT. CAT is a horrible design using polling as a crutch.
Best regards and Happy Easter
Happy Easter to you as well!0
Leave a Comment
Categories
- All Categories
- 289 Community Topics
- 2.1K New Ideas
- 530 The Flea Market
- 7.5K Software
- 6K SmartSDR for Windows
- 146 SmartSDR for Maestro and M models
- 359 SmartSDR for Mac
- 249 SmartSDR for iOS
- 230 SmartSDR CAT
- 171 DAX
- 352 SmartSDR API
- 8.7K Radios and Accessories
- 7K FLEX-6000 Signature Series
- 20 FLEX-8000 Signature Series
- 841 Maestro
- 43 FlexControl
- 847 FLEX Series (Legacy) Radios
- 793 Genius Products
- 415 Power Genius XL Amplifier
- 277 Tuner Genius XL
- 101 Antenna Genius
- 243 Shack Infrastructure
- 166 Networking
- 404 Remote Operation (SmartLink)
- 130 Contesting
- 630 Peripherals & Station Integration
- 125 Amateur Radio Interests
- 869 Third-Party Software