Home AMX User Forum NetLinx Studio

Data Event

adysadys Posts: 395
is there any whey to know the system number of the Command sender to data event?

I mean I want to know who send the command to here


DATA_EVENT[vdvStatusCmd]
{
COMMAND:
{



I know I have the Data.Device.System but that gives me the vdvStatusCmd system..

thanks

Ady.

Comments

  • mpullinmpullin Posts: 949
    Data.SourceDev.System
  • adysadys Posts: 395
    Thanks

    I checked it now, and its the same as Data.Device.System

    I am sending message from system 3 to system 5, and I get value 5 in both ..

    When taking it in the sender side from getlast[tpList] it 3 as it should

    I can send it in the string command, but I preffer more elegant solution
  • Joe HebertJoe Hebert Posts: 2,159
    adys wrote:
    is there any whey to know the system number of the Command sender to data event?
    mpullin wrote:
    Data.SourceDev.System
    Yes, that is what one would expect, however, SourceDev appears to be broken. I?ve never been able to get it to return anything other than the Master dev. Maybe broken is the wrong word but it seems pretty much useless if it just returns the Master no matter what the original source was.

    I tried every scenario I could think of for Button.SourceDev and Data.SourceDev and found that:

    SourceDev.Number always returns 0
    SourceDev.Port always returns 1
    SourceDev.System always returns the system number that the code is running in.


    Here is a link to a thread from last year that addressed the subject although it was kind of left up in the air with no confirmed resolution.

    http://www.amxforums.com/showthread.php?t=1333
  • adysadys Posts: 395
    thanks

    So the only solution is to take the System number before I send the string and put it in inside the string commnad

    so I did

    if anyone knows about other solution I will love to know

    Ady
Sign In or Register to comment.