VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes
DtRemoteEnvironmentController Class Reference

DtRemoteEnvironmentController allows the user to interrogate the back-end which is simulating the environmental weather object to get the current weather state. More...

List of all members.

Public Member Functions

 DtRemoteEnvironmentController ()
 Constructor.
virtual void init (DtVrfMessageInterface *msgIf, DtReflectedEnvironmentProcessList *rel)
 Caches the given pointers as myMsgIf and myReflectedEnvironmentProcessList.
bool reflectingCurrentWeatherState ()
 Indicates if the weather state of the back-end simulating the weather has been reflected.
virtual void processEnvironmentProcessAdded (DtReflectedEnvironmentProcess *obj)
 Checks to see if the first recordPointer in the state repository of the DtReflectedEnvironmentProcess is of type DtEnvVrfWeatherStateRecordType, and if so it caches a pointer to the SR in myReflectedWeatherSR.
virtual void processEnvironmentProcessRemoved (DtReflectedEnvironmentProcess *obj)
 Checks to see if the DtReflectedEnvironmentProcess being removed corresponds to the one cached in myReflectedWeatherSR, and if so myReflectedWeatherSR is set to 0.
virtual void setAirTurbidity (double value)
 Air Turbidity.
virtual double airTurbidity ()
 If !reflectingCurrentWeatherState(), the default is 0.0.
virtual void setCloudState (DtVrfWeatherCloudState)
 Cloud State.
virtual DtVrfWeatherCloudState cloudState ()
 If !reflectingCurrentWeatherState(), the default is DtVrfWeatherCloudStateClear.
virtual void setPrecipitationIntensity (double value)
 Precipitation Intensity.
virtual double precipitationIntensity ()
 If !reflectingCurrentWeatherState(), the default is 0.0.
virtual void setPrecipitationType (DtVrfWeatherPrecipitationType)
 Precipitation Intensity.
virtual
DtVrfWeatherPrecipitationType 
precipitationType ()
 If !reflectingCurrentWeatherState(), the default is 0.0.
virtual void setWindSpeed (double value)
 Wind speed in m/s.
virtual double windSpeed ()
 If !reflectingCurrentWeatherState(), the default is 0.0.
virtual void setWindDirection (double value)
 Wind direction in radians.
virtual double windDirection ()
 If !reflectingCurrentWeatherState(), the default is 0.0.
virtual void setVisibility (double value)
 Visibility in meters.
virtual double visibility ()
 If !reflectingCurrentWeatherState(), the default is 16,000 (16km)
virtual double illumination ()
 Illumination in percentage (0 to 1.0).
virtual void setTimeOfDay (double secondsPastMidnight)
 The current time of day, specified by the number of seconds passed midnight.
virtual double timeOfDay ()
 If !reflectingCurrentWeatherState(), the default is 43200 (12:00 noon)
virtual void setTimeOfDayAdvancementSpeed (double speed)
 The current time of day advancement speed.
virtual double timeOfDayAdvancementSpeed ()
 If !reflectingCurrentWeatherState(), the default is 0 (no advance)

Static Public Member Functions

static void environmentProcessAddedCallback (DtReflectedEnvironmentProcess *obj, void *userData)
 Registered by onInit, calls processEnvironmentProcessAdded.
static void environmentProcessRemovedCallback (DtReflectedEnvironmentProcess *obj, void *userData)
 Registered by onInit, calls processEnvironmentProcessRemoved.

Protected Member Functions

bool updateVrfEnvironmentalWeatherStateRecord ()
 Called by all the weather accessors to update myVrfEnvironmentalWeatherStateRecord from DtEnvironmentProcessRepository.
virtual void processUpdatedCallback (DtReflectedEnvironmentProcess *e)

Static Protected Member Functions

static void environmentProcessUpdatedCallback (DtReflectedEnvironmentProcess *e, void *usr)
 Update internal data structures.

Protected Attributes

DtReflectedEnvironmentProcessListmyReflectedEnvironmentProcessList
DtVrfMessageInterfacemyMsgIf
DtEnvironmentProcessRepositorymyReflectedWeatherSR
DtVrfEnvironmentalWeatherStateRecordmyVrfEnvironmentalWeatherStateRecord

Detailed Description

DtRemoteEnvironmentController allows the user to interrogate the back-end which is simulating the environmental weather object to get the current weather state.

Sim commands can also be sent to change the weather state. If there is no weather state available, the accessors will all provide reasonable default values which represent a clear, windless and sunny environment state. The user can check to see if the back-end's weather values are being reflected by calling reflectingCurrentWeatherState().


Constructor & Destructor Documentation

Constructor.


Member Function Documentation

Caches the given pointers as myMsgIf and myReflectedEnvironmentProcessList.

Registers environmentProcessAddedCallback and environmentProcessRemovedCallback with the DtReflectedEnvironmentProcessList. In order to check to see if the environment object has already been reflected, the environment list is walked and each reflected object is passed to processEnvironmentProcessAdded.

Indicates if the weather state of the back-end simulating the weather has been reflected.

Unless this returns true, none of the accessors will return real data!

virtual void DtRemoteEnvironmentController::setAirTurbidity ( double  value) [virtual]

Air Turbidity.

virtual double DtRemoteEnvironmentController::airTurbidity ( ) [virtual]

If !reflectingCurrentWeatherState(), the default is 0.0.

Cloud State.

If !reflectingCurrentWeatherState(), the default is DtVrfWeatherCloudStateClear.

virtual void DtRemoteEnvironmentController::setPrecipitationIntensity ( double  value) [virtual]

Precipitation Intensity.

If !reflectingCurrentWeatherState(), the default is 0.0.

Precipitation Intensity.

If !reflectingCurrentWeatherState(), the default is 0.0.

virtual void DtRemoteEnvironmentController::setWindSpeed ( double  value) [virtual]

Wind speed in m/s.

virtual double DtRemoteEnvironmentController::windSpeed ( ) [virtual]

If !reflectingCurrentWeatherState(), the default is 0.0.

virtual void DtRemoteEnvironmentController::setWindDirection ( double  value) [virtual]

Wind direction in radians.

virtual double DtRemoteEnvironmentController::windDirection ( ) [virtual]

If !reflectingCurrentWeatherState(), the default is 0.0.

virtual void DtRemoteEnvironmentController::setVisibility ( double  value) [virtual]

Visibility in meters.

virtual double DtRemoteEnvironmentController::visibility ( ) [virtual]

If !reflectingCurrentWeatherState(), the default is 16,000 (16km)

virtual double DtRemoteEnvironmentController::illumination ( ) [virtual]

Illumination in percentage (0 to 1.0).

Illumination cannot be set directly. It is a function of time of day. If !reflectingCurrentWeatherState() is default is 1.0 (100% illumination)

virtual void DtRemoteEnvironmentController::setTimeOfDay ( double  secondsPastMidnight) [virtual]

The current time of day, specified by the number of seconds passed midnight.

virtual double DtRemoteEnvironmentController::timeOfDay ( ) [virtual]

If !reflectingCurrentWeatherState(), the default is 43200 (12:00 noon)

virtual void DtRemoteEnvironmentController::setTimeOfDayAdvancementSpeed ( double  speed) [virtual]

The current time of day advancement speed.

If !reflectingCurrentWeatherState(), the default is 0 (no advance)

static void DtRemoteEnvironmentController::environmentProcessAddedCallback ( DtReflectedEnvironmentProcess *  obj,
void *  userData 
) [static]

Registered by onInit, calls processEnvironmentProcessAdded.

virtual void DtRemoteEnvironmentController::processEnvironmentProcessAdded ( DtReflectedEnvironmentProcess *  obj) [virtual]

Checks to see if the first recordPointer in the state repository of the DtReflectedEnvironmentProcess is of type DtEnvVrfWeatherStateRecordType, and if so it caches a pointer to the SR in myReflectedWeatherSR.

static void DtRemoteEnvironmentController::environmentProcessRemovedCallback ( DtReflectedEnvironmentProcess *  obj,
void *  userData 
) [static]

Registered by onInit, calls processEnvironmentProcessRemoved.

virtual void DtRemoteEnvironmentController::processEnvironmentProcessRemoved ( DtReflectedEnvironmentProcess *  obj) [virtual]

Checks to see if the DtReflectedEnvironmentProcess being removed corresponds to the one cached in myReflectedWeatherSR, and if so myReflectedWeatherSR is set to 0.

Called by all the weather accessors to update myVrfEnvironmentalWeatherStateRecord from DtEnvironmentProcessRepository.

static void DtRemoteEnvironmentController::environmentProcessUpdatedCallback ( DtReflectedEnvironmentProcess *  e,
void *  usr 
) [static, protected]

Update internal data structures.

virtual void DtRemoteEnvironmentController::processUpdatedCallback ( DtReflectedEnvironmentProcess *  e) [protected, virtual]

Member Data Documentation


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

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)