Code: Select all
EVENT_UDP_PORT=<port to listen to>
EVENT_UDP_MESSAGE=<message contains>
OnEvent>UDP_MESSAGE_RECIEVED,EVENT_UDP_PORT,EVENT_UDP_MESSAGE,<sub routine>
Code: Select all
OnEvent>UDP_MESSAGE_RECIEVED,123456,MSUDP,TRIGGER_FROM_UDP
SRT>TRIGGER_FROM_UDP
//sub routine var is set to the full received message
Separate>TRIGGER_FROM_UDP_Var_1,:,TEMP
Separate>TEMP_2,|,TEMP_COMMANDS
Let>k=0
Repeat>k
Let>k=k+1
Separate>TEMP_COMMANDS_%k%,=,TEMP
Let>%TEMP_1%=%TEMP_2%
Until>k=TEMP_COMMANDS_count
//This would result in me having the following variables set:
//%variable% ---> "123"
//%start% ---> "hello"
END>TRIGGER_FROM_UDP
So in partnership with this event a SendToUDP>port,message[,ip] would be great. The IP could be set to X.Y.Z.255 by default to broadcast to all units.