Send string to a controller
adys
Posts: 395
how can I send a string to a controller without declare virtual device?
I want to send string from controller to controller for a simple command to update the screen, what is the device that I need to put in the data event?
I mean this one
DATA_EVENT[vdvStatusCmd]
{
COMMAND:
{
can I use some address to catch data event only for the controller?
Maybe 5001:0:0?
I seach and didn't find nothing about it
thanks
Ady.
I want to send string from controller to controller for a simple command to update the screen, what is the device that I need to put in the data event?
I mean this one
DATA_EVENT[vdvStatusCmd]
{
COMMAND:
{
can I use some address to catch data event only for the controller?
Maybe 5001:0:0?
I seach and didn't find nothing about it
thanks
Ady.
0
Comments
on system 1:
vdvMyDevice = 33001:1:0
on system 2:
vdvMyDevice = 33001:1:1 // make sure you type system 1 here. otherwise it's not gonna be the same device
then send your string to this device and get it in the data_event of the other controller. make sure that one controller is in the URL List of the other controller (but not both controllers in both URL Lists)
if you want to send strings in both directions, you should consider sending SEND_STRING in one direction and SEND_COMMAND in the other
this is what I have done so far, just wondring if there is a way without virtual device
look so simple if I could just listen on 5001:0:0 and just get the strings
If two masters are connected to each other via the master-to-master URL method you should be able to send strings from one master to the other directly.
Say for example the main master is System 1 and the 2nd master is system 2.
In the program on master one
SEND_STRING 0:0:2, 'hello world'
then if you monitor 0:0:0 on the 2nd master, you should get the string.
thanks!
that exactly what I wanted to know.
on what device address to listen on the 2nd master
I thought maybe 5001:0:0 , but 0:0:0 is good too
I ususly use 0.0.0 for debug, isn't it for debug and notifications ?
sending to 0:0:0 means sending to the controller the code runs on. which is used for debug.
But now the debug will have full of messages and if I connect with Telnet, of Diagnostics windows, I will see al the messages.
Any way to filter that?
I wonder why AMX didn't make seperate ports for debug and messaging, it would made things simpler.
If I have to filter it alone maybe its better to go with the tranditional way of using virtual device and leave 0.0.0 for debug as it is today...
Could you please start over and tell us what you want to achieve, and what is preventing that? I accept that sometimes "we don't know what we don't know" which makes it tough!
I want to call a funcation on controller x from code that running on controller y.
I must send string or command, right?
usualy what I do I declare a virtual device, and monitor it with data event.
What I asked is why I need to declare virtual device instead of sending it the controllet itself.
and wanted to know what is the adrees of the controller if I want to monitor it..
Not very important, but since I am getting a lot of tricks and info in the forous that I can't find anywhere else, its was worth asking
They did - you make a virtual for your messaging. Not every system needs it, after all, and creating a virtual device for this purpose costs practically nothing in terms of resources or programming time.