The Data Interaction example demonstrates the following:
- How to create arbitrary data
- How to send arbitrary data over a network
How to Run the Example
This example demonstrates how to use data interactions to encode and decode your information.
Usage
To run this example:
-
Run two instances of the setData executable in the protocol of choice from the <VR-Link install>/bin64 directory.
-
Observe that the new data is being sent/received over the network.
Sample Data
Data Interaction Example Code
#include <iostream>
{
std::cout << "SetData Interaction from "
{
}
for (
int field = 1; field <= inter->
numVarFields(); field++ )
{
}
}
int main( int argc, char* argv[] )
{
try
{
#if DtDIS
appInit.setUseAsynchIO( true );
appInit.setDisVersionToSend( 7 );
#else
appInit.setFedFileName( DtDefaultRpr2Fom );
appInit.setExecName( "MAK-One-2024" );
appInit.setRprFomVersion( 2.0 );
appInit.setRprFomRevision( 1 );
#endif
appInit.parseCmdLine();
while (simTime <= 60.0)
{
simTime += dt;
}
}
return 0;
}