ni.com is currently undergoing scheduled maintenance.
Some services may be unavailable at this time. Please contact us for help or try again later.
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
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?
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
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.