I'm looking at using CVI Network streaming to pass data between a master application and a slave that would connect to a device under test. Working with the cnsWriter/cnsReader samples in CVI, I can get communication to go one direction only -- either from master to slave, or from slave to master. However, when trying to enable both streams simultaneously, I keep getting errors saying that an application is already streaming to an endpoint in the specified context.
Master code to open writing stream to slave reader:
CNSNewScalarEndpoint("ni.dex://127.0.0.2:cvi_writer/writer", "//127.0.0.2/CommandReader", CNSTypeInt32, 1000, 0, CNSDirectionWriter, CNSWaitForever, 0, &WriteEndpointID);
Corresponding code in slave to connect as reader:
CNSNewScalarEndpoint("CommandReader", "", CNSTypeInt32, 1000, 0, CNSDirectionReader, CNSWaitForever, 0, &ReadEndpointID);
Slave code to open a writing stream back to the master application:
result = CNSNewScalarEndpoint("ni.dex://127.0.0.5:cvi_writer2/writer2", "//127.0.0.5/DataReader", CNSTypeInt32, 1000, 0, CNSDirectionWriter, CNSWaitForever, 0, &WriteEndpointID);
And Master code to connect to data stream from slave as a reader:
result = CNSNewScalarEndpoint("DataReader", "", CNSTypeInt32, 1000, 0, CNSDirectionReader, CNSWaitForever, 0, &ReadEndpointID);
Is it possible for an application (or 2 simultaneous applications) to have both writer and reader streams active at the same time?
Thanks!