VR-Forces 4.2 Class Documentation
2.6 - 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.

...
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 Sun Nov 24 19:49:21 EST 2013 from SVN revision 133924
Copyright © 2005-2013 VT MÄK. All Rights Reserved (www.mak.com)