23 #include <boost/shared_ptr.hpp>
25 #include <vlutil/vlHashlist.h>
26 #include <vlutil/vlString.h>
27 #include <vlutil/vlList.h>
59 #define CACHED_NEXT_FRAME_STATE_PROPERTY(property) \
60 DtPropertyInterface* myNextFrame##property = 0;
61 #define SET_CACHED_STATE_PROPERTY(property, value) \
62 setCachedNextFrameStatePropertyValue(&myNextFrame##property, #property, value);
64 #define CACHED_CURRENT_FRAME_STATE_PROPERTY(property) \
65 const DtPropertyInterface* myCurrFrame##property = 0;
66 #define GET_CACHED_STATE_PROPERTY_VALUE(property, value) \
67 getCachedCurrentFrameStatePropertyValue(&myCurrFrame##property, #property, value);
92 #ifdef DtObjectDebugger_Enable
138 virtual void enable();
139 virtual void disable();
140 virtual bool isEnabled();
141 virtual void setIsEnabled(
bool yesNo);
147 virtual void preFirstTickInit();
157 virtual void postTick();
166 virtual void timedTick();
171 virtual void setMinTickPeriod(
double minTickPeriod,
double minTickPeriodVariance);
175 virtual void setupFirstTickTime();
183 virtual const char* type()
const = 0;
198 virtual void setListItem(DtListItem* item);
199 virtual DtListItem* listItem();
203 virtual void putData(std::string& fp,
int indentLevel = 0);
223 virtual DtList inputPortList()
const;
238 virtual DtList outputPortList()
const;
250 virtual DtList inputPortGroupList()
const;
262 virtual DtList outputPortGroupList()
const;
270 virtual int priority()
const;
276 virtual void setPriority(
int priority);
287 virtual void setDT(
double deltaT);
299 virtual bool tickWhileDestroyed()
const;
306 virtual DtOutputStream& objectConsoleDebug(
const DtString& channel =
"")
const;
308 virtual DtOutputStream& objectConsoleVerbose(
const DtString& channel =
"")
const;
310 virtual DtOutputStream& objectConsoleInfo(
const DtString& channel =
"")
const;
312 virtual DtOutputStream& objectConsoleWarn(
const DtString& channel =
"")
const;
314 virtual DtOutputStream& objectConsoleError(
const DtString& channel =
"")
const;
315 virtual int notifyLevel()
const;
354 static void addSimComponentCreatorFcn(
const DtString& type,
379 virtual void isClutterChanged();
384 virtual bool taskVisualizationsActive()
const;
391 virtual bool taskVisualizationsEnabled()
const;
394 virtual void onRestore();
398 return myTaskVisualizations;
403 virtual void setupTimedTickLogic(
double minTickPeriod,
double minTickPeriodVariance);
406 virtual double computeCurrentTime();
412 bool testInvariant()
const;
417 virtual bool createPortGroups();
422 virtual bool createPorts();
433 const DtString& defaultPsrName,
bool useDescriptorParams =
true);
440 virtual void destroyTaskVisualizations();
443 virtual void destroyTaskVisualization(
const DtString& name);
458 double calculateNextTaskVisTickTime()
const;
469 template<
typename ValType>
474 template<
typename ValType>
488 void removeSimObjectPredicateCallback(
const DtSimObject*,
497 void invokeSimObjectPredicateCallbacks();
501 virtual void clearPredicateCallbacks();
594 template<
typename ValType>
614 template<
typename ValType>
629 objectConsoleWarn() <<
"Could not find state property: " << propName << std::endl;
const DtComponentDescriptor * myComponentDescriptor
Definition: simComponent.h:548
virtual bool postAddComponentsInit()
Called after all components have been created, initialized and added to the component manager...
Definition: simComponent.h:128
Definition: attachedTerrain.h:46
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
void setCachedNextFrameStatePropertyValue(DtPropertyInterface **prop, const DtString &propName, ValType value)
Definition: simComponent.h:595
const DtPropertyInterface * cachedCurrentFrameStateProperty(const DtPropertyInterface **prop, const DtString &propName) const
Definition: simComponent.h:604
virtual const DtRwProperties & stateProperties() const
A DtComponentSystem is a collection of DtSimComponents that are associated with each other...
Definition: componentSystem.h:35
Abstract base class for a small class that tracks the tick period for DtSimComponent.
Definition: timedTickLogic.h:9
DtOutputPortGroupMap myOutputPortGroupList
Definition: simComponent.h:530
virtual DtlObjPtr getData(DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
Deriving class overrides these to get/put class specific data.
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
Definition: readerWriter.h:85
class DtSimResourceManager:
Definition: simResourceManager.h:38
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
#define DT_DEFINE_OBJECT_DEBUGGER_NAME(type)
Definition: objectCounter.h:31
Default on in debug, off in release.
Definition: objectCounter.h:27
std::map< DtString, DtInputPort * > DtInputPortMap
Definition: simComponent.h:522
int myPriority
Definition: simComponent.h:534
Definition: readerWriterRegistry.h:39
double myDT
Definition: simComponent.h:538
class DtSimComponentFactory:
Definition: simComponentFactory.h:36
class DtVrfProcessStateRepositoryManager:
Definition: vrfProcessStateRepositoryManager.h:49
const DtLocalObject * entity() const
Definition: simComponent.h:366
DtOutputPortGroup is a data port group of a data provider. It may contain any number of DtOutputPorts...
Definition: outputPortGroup.h:34
DtLocalObject * myEntity
Definition: simComponent.h:516
Description: This repository is an internal repository accessible only by local objects. It holds all information that is common to all the forms of all entity/aggregate/control objects within VR-Forces.
Definition: vrfObjectStateRepository.h:92
DtPredicateCallbackManager * myPredicateCallbackManager
Definition: simComponent.h:563
static DtSimComponentFactory * myFactory
Definition: simComponent.h:532
virtual DtOutputStream & objectConsoleWarn(const DtString &channel="") const
Interface class used to define minimal interface for a property. The DtPropertyInterface class provid...
Definition: propertyInterface.h:53
virtual void updateTaskVisualizations()
Called to update task visualizations after every tick. Implemented by subclasses. ...
Definition: simComponent.h:437
Contains the DtVrfObjectPredicate class declaration.
Definition: vrfObjectPredicate.h:20
static DtReaderWriterFactory * factory()
makVrf::DtTaskVisualizationMap myTaskVisualizations
The visualization objects to be drawn for this component.
Definition: simComponent.h:555
DtListItem * myListItem
Definition: simComponent.h:520
DtComponentSystem * mySystem
Pointer to the DtComponentSystem that this component belongs.
Definition: simComponent.h:519
DtInputPortGroupMap myInputPortGroupList
Definition: simComponent.h:529
boost::signals2::scoped_connection myIsClutterChangedConnection
Definition: simComponent.h:565
The DtPhysicalWorld is the primary interface to and manager of all of the "physical" aspects of the s...
Definition: physicalWorld.h:102
Definition: coordSystem.h:54
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
double myLastTickSimTime
Definition: simComponent.h:536
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
File: simMsg.h.
Definition: simMessage.h:35
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
The predicate callback manager allows for registration of callbacks by sim object for predicates...
Definition: predicateCallbackManager.h:20
double dT() const
This is the delta-t for this component, which may or may not be the same as the exerciseClock dT...
Definition: simComponent.h:579
static VRF4API_METHOD DtSimComponent * MarkThreadSafe(DtSimComponent *comp)
This is the deprecated API that can be used as a reference to migrate 4.X code to 5...
Definition: simComponent.h:575
std::map< DtString, DtOutputPortGroup * > DtOutputPortGroupMap
Definition: simComponent.h:525
DtSimComponent *(* DtSimComponentCreatorFcn)(const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDescriptor, DtReaderWriterRegistry *registry)
Definition: simComponentFactory.h:25
DtInputPortMap myInputPortList
Definition: simComponent.h:527
std::list< DtVrfProcessStateRepository * > myComponentPsrs
List of PSRs made using createComponentPsr() that will be deleted by this component when it is destro...
Definition: simComponent.h:552
double myNextTaskVisTickTime
The next tick time for updating the task visualizations.
Definition: simComponent.h:558
bool myFirstTick
Initialized to true in the constructor, set to false by the first call to postTick.
Definition: simComponent.h:546
bool myIsEnabled
Indicates whether this component should be enabled for ticking or not.
Definition: simComponent.h:542
DtOutputPortMap myOutputPortList
Definition: simComponent.h:528
DtOutputPorts are data ports owned by data producers. They are connected to DtPortConnections and sen...
Definition: outputPort.h:42
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
Definition: vrfObjectPredicateEvaluator.h:17
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:88
virtual void putData(std::string &fp, int indentLevel=0)
Deriving class overrides these to get/put class specific data.
Class DtVrfProcessStateRepository: Abstract base class for all process state repositories. Process state repositories represent (potentially) shared, savable information for one or more components functioning together to achieve some process or set of processes; such as aiming and firing a weapon; moving an object; or just waiting a specified amount of time.
Definition: vrfProcessStateRepository.h:45
VRF4API_METHOD const DtSimulationServices * simManager() const
This is the deprecated API that can be used as a reference to migrate 4.X code to 5...
Definition: simComponent.h:574
virtual DtRwProperties & nextFrameStateProperties()
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
DtLocalObject * entity()
Gets the entity.
Definition: simComponent.h:365
virtual void registerAttributeFunctions()
Called to register functions that provide system attribute values. Called by init(). Empty in this class. Overridden in different components to add attribute provider functions.
Definition: simComponent.h:133
bool getCachedCurrentFrameStatePropertyValue(const DtPropertyInterface **prop, const DtString &propName, ValType &value) const
Definition: simComponent.h:615
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
std::map< DtString, DtOutputPort * > DtOutputPortMap
Definition: simComponent.h:523
std::unique_ptr< DtTimedTickLogic > myTimedTickLogic
Definition: simComponent.h:537
void(* DtVrfObjectPredicateCallbackFunction)(DtSimObjectReference obj, DtVrfObjectPredicateEvaluator *predicateEval, void *userData)
Definition: simComponent.h:53
makVrf::DtTaskVisualizationMap & taskVisualizations()
Definition: simComponent.h:396
std::map< DtString, DtInputPortGroup * > DtInputPortGroupMap
Definition: simComponent.h:524
DtSimulationServices * mySimServices
Definition: simComponent.h:562
1) Define the interface class that will be used to represent the next and current frames...
Definition: taskVisualizationStateComponent.h:260
#define VRF4API_METHOD
Include this header file to allow for the definition/usage of the ability to mark something as deprec...
Definition: vrf4XAPI.h:22
bool setPropertyValue(ValueType val)
Sets the value of this property. If the value cannot be converted from the specified type...
DtSymbolString myFullComponentName
Definition: simComponent.h:560
std::map< DtTaskVisualizationId, DtTaskVisualizationStateComponent * > DtTaskVisualizationMap
Definition: taskVisualizationForwards.h:20
DtPropertyInterface * cachedNextFrameStateProperty(DtPropertyInterface **prop, const DtString &propName)
Definition: simComponent.h:584
boost::optional< ValueType > propertyValue() const
Returns the value of this property. You can only retrieve the value of properties which can contain s...
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86
virtual const DtPropertyInterface * findPropertyInterface(const DtString &propertyName) const