.sourceDev is not a member of the DEVCHAN structure. Where did you get that from? I suspect it's a custom structure you are using; it's not part of the NetLInx library.
.sourceDev is not a member of the DEVCHAN structure. Where did you get that from? I suspect it's a custom structure you are using; it's not part of the NetLInx library.
Where in the question do you see a reference to a DEVCHAN structure?
Also: page 63 of the manual does not really answer the question, so...... Good Question
Button.SourceDev is the originator DEV of the Button Event. 99% of the time it is the same as Button.Input.Device. But it does not have to be the same. For instance, when NetLinx Studio (we'll say Studio is at 32001:1:1) using Diagnostics emulates a panel (and we'll say the panel is at 128:1:1), and Studio sends a push, the Button.SourceDev would be 32001:1:1 and the Button.Input.Device would be 128:1:1.
Button.SourceDev is the originator DEV of the Button Event. 99% of the time it is the same as Button.Input.Device. But it does not have to be the same. For instance, when NetLinx Studio (we'll say Studio is at 32001:1:1) using Diagnostics emulates a panel (and we'll say the panel is at 128:1:1), and Studio sends a push, the Button.SourceDev would be 32001:1:1 and the Button.Input.Device would be 128:1:1.
Is this the case with combined devices as well? (in that : button.input.device references the virtual device and button.sourcedev references the actual source device?)
Is this the case with combined devices as well? (in that : button.input.device references the virtual device and button.sourcedev references the actual source device?)
There is a difference...but not as you stated.
In a combined situation, the master is really intercepting the input from the real device, and creating a push from the virtual device. So in an event for a combined device, the button.input.device contains the DEV for the virtual used in the combine, and the button.sourceDev contains 0:1:x since the master was the originator of the processed message (even though the real device started the chain of events, the originator of the message used in the event was the master)
There could be a philosophical argument made as to whether what you describe would be proper behavior, or whether what is implemented is proper behavior. That being said...I do not think it would be changed because it is possible the change could break some systems already deployed.
Where in the question do you see a reference to a DEVCHAN structure?
Also: page 63 of the manual does not really answer the question, so...... Good Question
It was an assumption, since that is how BUTTON.INPUT.CHANNEL is generally used. I guess I just phrased my question badly, I was wondering where sourceDev came from, since I had never seen it before.
Button.SourceDev is the originator DEV of the Button Event. 99% of the time it is the same as Button.Input.Device. But it does not have to be the same. For instance, when NetLinx Studio (we'll say Studio is at 32001:1:1) using Diagnostics emulates a panel (and we'll say the panel is at 128:1:1), and Studio sends a push, the Button.SourceDev would be 32001:1:1 and the Button.Input.Device would be 128:1:1.
Let?s say we?re working in a secure environment and we don?t want any outside sources (Emulate a Device, Control a Device, Telnet, etc) to be able to execute code at any time. Would the ?do something here? only get executed if and only if someone literally pushed button 1 on the physical device 10001? Just curious.
Let?s say we?re working in a secure environment and we don?t want any outside sources (Emulate a Device, Control a Device, Telnet, etc) to be able to execute code at any time. Would the ?do something here? only get executed if and only if someone literally pushed button 1 on the physical device 10001? Just curious.
Thanks.
"Upon further review...the call on the field is reversed."
It appears sourceDev is almost exclusively populated with the master's DEV. I'll have to dig further to see when it is not and is instead populated with the actual source DEV. Sorry for the misinformation. I was working from memory and did not validate before I submitted my original response. My apologies. I'll post when I have more info.
Comments
Also: page 63 of the manual does not really answer the question, so...... Good Question
There is a difference...but not as you stated.
In a combined situation, the master is really intercepting the input from the real device, and creating a push from the virtual device. So in an event for a combined device, the button.input.device contains the DEV for the virtual used in the combine, and the button.sourceDev contains 0:1:x since the master was the originator of the processed message (even though the real device started the chain of events, the originator of the message used in the event was the master)
There could be a philosophical argument made as to whether what you describe would be proper behavior, or whether what is implemented is proper behavior. That being said...I do not think it would be changed because it is possible the change could break some systems already deployed.
Let?s say we?re working in a secure environment and we don?t want any outside sources (Emulate a Device, Control a Device, Telnet, etc) to be able to execute code at any time. Would the ?do something here? only get executed if and only if someone literally pushed button 1 on the physical device 10001? Just curious.
Thanks.
"Upon further review...the call on the field is reversed."
It appears sourceDev is almost exclusively populated with the master's DEV. I'll have to dig further to see when it is not and is instead populated with the actual source DEV. Sorry for the misinformation. I was working from memory and did not validate before I submitted my original response. My apologies. I'll post when I have more info.