Home › Forums › V-Control General › Getting Device Status without Monitoring
- This topic has 1 reply, 2 voices, and was last updated 3 years, 9 months ago by
Dierk Walter.
-
AuthorPosts
-
April 8, 2019 at 15:34 #2197
JonasStade
ParticipantHi @ all,
I tried to add some channels to my E2 Device like LastRecalled Preset or if CueList is running or something like that. The E2 is sending a feedback every time a request is send to the device from every controler in the network, so you get the information directly broadcasted and just have to grab them into the driver.
My problem is, I wanted to use an Event for this, but it seems not the right way to do this, so I tried Monitor and ACK, but this also didn’t work. So what is the correct solution for this?
On the receiving port you will get something like this every time I press a Preset Button on the Controler or send it via V-Control:
<LayerAIndex Min=”-1″ Max=”63″>4</LayerAIndex>
<SplitMode Min=”0″ Max=”1″>0</SplitMode>
<JoinMode Min=”0″ Max=”1″>0</JoinMode>
<ToggleMode Min=”0″ Max=”1″>0</ToggleMode>
<Swap Min=”0″ Max=”1″>0</Swap>
<Error Min=”-1000000″ Max=”1000000″>0</Error>
</Mixer>
</MixerCollection>
</ScreenDest>
</ScreenDestCol>
</DestMgr>
<PresetMgr id=”0″>
<LastRecall>1</LastRecall>
<Preset id=”1″>
<GuiId>705a0fd19f13-00788c</GuiId>
<Conflict Min=”0″ Max=”1″>0</Conflict>
</Preset>
</PresetMgr>
</System>Now I wanted to isolate the number between <LastRecall>1</LastRecall> and fill it into the device value:
Dim LastRecall,out as string
LastRecall = NthField(ioResult,”<LastRecall>”, 2)
out = NthField(LastRecall,”</LastRecall>”, 1)
SetDevicevar(“LastRecall”,out)Instead of Event there should be something like “monitor receive” for this solution were you set up something like a regex and then you can fill the values into the driver 😉
Has someone an idea how this could work?
April 16, 2019 at 08:40 #2201Dierk Walter
KeymasterYou have to do this with an Event.
https://v-control.com/wiki/doku.php/device_editor#events
The Ack string of the Event should be
</System>(in Hex, maybe followed by a 0D0A), because the message is only complete if it is terminated by that.
Then you can Parse the ioResult (which contains the received message), fetch your data and fill device variables with that.
-
This reply was modified 3 years, 9 months ago by
Dierk Walter.
-
This reply was modified 3 years, 9 months ago by
Dierk Walter.
-
This reply was modified 3 years, 9 months ago by
Dierk Walter.
-
This reply was modified 3 years, 9 months ago by
Dierk Walter.
-
This reply was modified 3 years, 9 months ago by
Dierk Walter.
-
This reply was modified 3 years, 9 months ago by
Dierk Walter.
-
This reply was modified 3 years, 9 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.