Page 1 of 1
Signal update frames duplicating? 30/06/2024 at 08:23 #157709 | |
itwithlyam
3 posts |
Hi, I have been experimenting with the Interface Gateway recently and have managed to connect reliably running with a scenario using full ARS. However, looking through the data, some events like signal updates appear to be duplicated (sending twice), and sometimes even tripled. I have attached some examples (after being sent into a Discord channel by a bot) of this happening. Post has attachments. Log in to view them. Log in to reply |
Signal update frames duplicating? 30/06/2024 at 08:27 #157710 | |
itwithlyam
3 posts |
Now I think about it, this may just be how ARS works? I've not tested it with humans yet so it will be interesting to see the differences.
Log in to reply |
Signal update frames duplicating? 02/07/2024 at 08:29 #157718 | |
jonathanp
19 posts |
I don't think that any guarantee is given that a Signal Data message represents a discrete event which has just occurred in the simulation. It simply says what the current state is. If no non-event messages were ever sent it would be impossible to get the full state of the program without clearing and replacing every signal. It's up to your program to keep track of the simulation state and determine if any relevant changes have occurred. Last edited: 02/07/2024 at 08:30 by jonathanp Reason: None given Log in to reply |
Signal update frames duplicating? 02/07/2024 at 15:29 #157720 | |
Dionysusnu
579 posts |
SimSig does implement the Snapshot request message to get the whole state of the simulation. From my experience, signal states only get sent when they do update. Nevertheless, I agree that a discreteness guarantee is not a useful expectation. Last edited: 02/07/2024 at 15:30 by Dionysusnu Reason: None given Log in to reply |
Signal update frames duplicating? 02/07/2024 at 17:39 #157722 | |
GeoffM
6378 posts |
It is possible that some internal states trigger an Interface Gateway message without any apparent changes. That said, the example shown only shows one of the nine possible Information Gateway signal change types (ie only showing aspect) so is not a helpful example. Yes, SimSig uses snapshots. SimSig Boss Log in to reply |
Signal update frames duplicating? 05/07/2024 at 21:31 #157747 | |
itwithlyam
3 posts |
Alright thanks. I think it might be a good idea to make this clear in the documentation to anyone trying to get started working with the IG, as this was super confusing for me
Log in to reply |
Signal update frames duplicating? 09/07/2024 at 14:48 #157784 | |
Jay_G
54 posts |
To be helpful, it would be good to see the IG gateway to see it generating multiple messages. Of course, it could even be your bot sending multiple messages. As an aside, as I’ve been fiddling with the IG my self, would it not be more useful to have your bot report what’s actually changed? As Geoff said, a “signal” has many states. It could be lamp proving changing, or auto button being pressed / selected. When that changes, you’ll get a message listing ALL the states of that signal. It’s up to your app to work out what’s changed. You could have it remember every signal it’s told about, and what the last aspect state was. If the aspect state is the same, don’t report on it. Last edited: 09/07/2024 at 14:52 by Jay_G Reason: None given Log in to reply |