CCL Version 3.3.1 
CIGI Class Library : Users' Guide
Operation : IG Session

IG Session Operation

The normal sequence of the initial operation of the IG:
  1. Setup the IO. (Usually networking.)
  2. Create a IG session.
  3. Create Event, Session, and/or Callback processing objects and/or routines.
  4. Get references to the Incoming Message and the Outgoing Message.
  5. Set the CIGI version of the external interface.
  6. Set the external interface as synchronous or asynchronous.
  7. Get a reference to the Incoming Message object.
  8. Set the internally used version of CIGI.
  9. Set whether iteration is used or not used.
  10. Register all Event, Signal, and Callback processors being used.
  11. Create a CigiSOFV? object and set the parameters as needed.

The normal per frame sequence of the operation of the IG:

1.   Note the reference to the Outgoing Message object.
2.   Process the incoming message (if any) from the host.
if( CigiIncomingMsgSize > 0 ) { try { IncomingMsgPointer->ProcessIncomingMsg( (unsigned char *)CIncomingMsgBuffer, CigiIncomingMsgSize ); } catch( CigiException & theException ) { std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } }

3.  Modify the Start of Frame object as needed.
4.  Pack the Start of Frame packet onto the outgoing message buffer as shown:

OutgoingMessage << SOF;

5.  Update the frame counter
6.  Prepare the outgoing message for sending.

try { Omsg.PackageMsg(&pCigiOutBuf,CigiOutSz); } catch( CigiException &theException ) { std::cout << "getNetMessages - Exception: " << theException.what() << std::endl; } // Update Frame IDs Omsg.UpdateSOF(pCigiOutBuf);

7.  Wait until start of frame time
8.  Send the message:

// wait until start of frame time waitUntilBeginningOfFrame(); // send SOF message int sentBytes = network.send( pCigiOutgoingMsgBuffer, CigiOutgoingMsgSize );

9.  Receive the message from the Host:

CigiIncomingMsgSize = network.recv( CIncomingMsgBuffer, RECV_BUFFER_MAX_SIZE );
SourceForge LogoBoeing
******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ******** ********