03-09-2013 10:03 AM
The function CNVCreateSubscriber() can generate a callback function, which used to process the received data. I'd like to know: can call the callback function in another machine ? This machine will be the client application.
David
03-09-2013 05:14 PM
I don't understand this question. The architecture publisher/suscriber is intended to work between processes one of which is the suscriber, i.e. the one that reads the variable value. The processes can be run on different machines as well as on the same machine. Examples of a publisher and a suscriber applications can be found in samples\networkvariable folder.
Can you detail a little bit more your question?
03-09-2013 10:35 PM
Hi Roberto,
Due to be the first to study the network variable, so there are some questions to it. When using CNVCreateSubscriber() to create the subscriber (this is the server, write data to the process), at the same time it also needs to define the callback function, but I need the callback function to be placed into the client (the reader), and the client will be at another machine. I'd like to know when the server writing data, the client on another machine can use that callback function to read data ?
David
03-10-2013 05:03 PM - edited 03-10-2013 05:06 PM
Take a look at those examples:
\samples\networkvariable\publisher\NVPublisher
\samples\networkvariable\subscriber\NVSubscriber
The subscriber is the application that reads from the variable (from the help: When the value of the network variable changes, the dataCallback function is called with the new value), while the publisher is the one that writes to it. Those tasks can reside on different machines.
03-11-2013 03:46 AM
Thanks.