VR-Forces 4.0.4 Class Documentation
Checking for VR-Forces Licenses at Runtime

VR-Forces can check the availability of VR-Forces licenses at runtime.

This lets you write code to handle a situation in which an expected license is unavailable for some reason. For example, you might want to use the opportunity to pop up a warning to alert the user. You can check for the availability of back-end, remote control API, or GUI licenses. For details, please see vrfCheckLicense.h.

The following example shows how to embed a VR-Forces back-end in a manned simulator. Before trying to create an instance of the top-level back-end class (DtCgf), it checks to see if a back-end license is available. If not, it prints a warning message.

#include <vrfCheckLicense.h>
...

if (DtHaveVrfSimLicense() == true)
{
   DtCgf* cgf = new DtCgf(addr);
   cgf->init(exerciseConn);
   ...
}
else
{
   DtWarn << "Error checking out a VR-Forces back-end license." 
      << std::endl;
   ...

[<< Customizing or Extending the vrfSim Application] [Home] [Top of Page]


Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)