This subclass of DtVrfMessageInterface creates and registers with the various factories to be able to create and print interactions.
How to Run
This example demonstrates how to listen for and display VR-Forces-specific interface messages.
Usage:
(Release) vrfMsgDump
(Debug) vrfMsgDumpd
To run the application:
- Start VR-Forces from the start menu.
- Start vrfMsgDump
The contents of all VR-Forces-specific interface messages (e.g. tasks, set data requests) will be displayed in the vrfMsgDump console window. As you run VR-Forces, any task or set data request messages that get created over the course of a scenario will be displayed by vrfMsgDump.
Header file:
#pragma once
{
public:
virtual const char*
type()
const;
protected:
virtual bool inVicinity(
const DtVector& localPosition);
protected:
protected:
};
Implementation:
#include "simpleRdrWrnResp.h"
#include <vlutil/vlPrint.h>
myEmitterListPort(NULL),
myReactingToWarning(false),
mySafeControlPointName("Safe Haven")
{
}
{
{
}
}
namespace
{
const char* SimpleRadarWarningResponseType = "simple-radar-warning-response";
}
{
return SimpleRadarWarningResponseType;
}
{
{
return false;
}
}
{
DtPROFILE(
"DtSimpleRadarWarningResponse::tick");
{
{
DtWarn << "DtSimpleRadarWarningResponse::tick() : Invalid safe control "
return;
}
{
{
{
"We have reached the safe location! " << std::endl;
"Resume normal activity." << std::endl;
}
else
{
}
}
}
else
{
{
"No emitter list for radar warning reaction controller" <<
std::endl;
return;
}
if (!(emitterList->first() && emitterList->first()->data()))
{
return;
}
if (!emitterSystemHost)
{
return;
}
"Simple radar warning rx detected emitter " << info->
id().string() <<
"." << std::endl;
"Move away from the source!" << std::endl;
{
}
}
}
}
{
parentRegistry);
}
{
{
"DtSimpleRadarWarningResponse::getControlPoint() : Can't find control point " <<
}
return controlPoint;
}
const DtVector& localPosition)
{
{
}
{
return true;
}
return false;
}