VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions
vrvControlToolkit::DtVrlinkDataInterMarshaller< DataMsg > Class Template Reference

Templated class that takes a VR-Link Data Interactioni (DIS or HLA) and encodes or decodes a VR-Vantage control into the interaction or out of the interaction. More...

Public Member Functions

 DtVrlinkDataInterMarshaller ()
 
virtual ~DtVrlinkDataInterMarshaller ()
 
virtual void encode (DtVrvControl_v1 *cmd, DataMsg *msg)
 Copies the cmd into the data interaction. More...
 
virtual DtVrvControl_v1decode (const DataMsg *msg)
 copies the cmd out of the data interaction. More...
 

Detailed Description

template<class DataMsg>
class vrvControlToolkit::DtVrlinkDataInterMarshaller< DataMsg >

Templated class that takes a VR-Link Data Interactioni (DIS or HLA) and encodes or decodes a VR-Vantage control into the interaction or out of the interaction.

Constructor & Destructor Documentation

template<class DataMsg >
vrvControlToolkit::DtVrlinkDataInterMarshaller< DataMsg >::~DtVrlinkDataInterMarshaller ( )
virtual

Member Function Documentation

template<class DataMsg >
void vrvControlToolkit::DtVrlinkDataInterMarshaller< DataMsg >::encode ( DtVrvControl_v1 cmd,
DataMsg *  msg 
)
virtual

Copies the cmd into the data interaction.

References vrvControlToolkit::DtVrvControlDatumParamId, and vrvControlToolkit::DtVrvControl_v1::mySize.

template<class DataMsg >
DtVrvControl_v1 * vrvControlToolkit::DtVrlinkDataInterMarshaller< DataMsg >::decode ( const DataMsg *  msg)
virtual

copies the cmd out of the data interaction.

This function allocates memory using "new char[size]" and then returns a cast pointer to the beginning of the buffer. You MUST delete this data structure by casting to a char* and using delete [] for example delete [] (char*)cmd; This function may return NULL in the event that the message is not the right endiness or magic number mismatch (corrupt)

References vrvControlToolkit::DtVrvControlDatumParamId, vrvControlToolkit::DtVrvMagicNumber, and vrvControlToolkit::DtVrvControl_v1::myMagicNumber.


The documentation for this class was generated from the following file:

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)