23 #include <vlutil/vlHashlist.h>
24 #include <vlutil/vlString.h>
25 #include <vlutil/vlList.h>
57 #define CACHED_NEXT_FRAME_STATE_PROPERTY(property) \
58 DtPropertyInterface* myNextFrame##property = 0;
59 #define SET_CACHED_STATE_PROPERTY(property, value) \
60 setCachedNextFrameStatePropertyValue(&myNextFrame##property, #property, value);
62 #define CACHED_CURRENT_FRAME_STATE_PROPERTY(property) \
63 const DtPropertyInterface* myCurrFrame##property = 0;
64 #define GET_CACHED_STATE_PROPERTY_VALUE(property, value) \
65 getCachedCurrentFrameStatePropertyValue(&myCurrFrame##property, #property, value);
90 #ifdef DtObjectDebugger_Enable
136 virtual void enable();
137 virtual void disable();
138 virtual bool isEnabled();
139 virtual void setIsEnabled(
bool yesNo);
145 virtual void preFirstTickInit();
155 virtual void postTick();
164 virtual void timedTick();
169 virtual void setMinTickPeriod(
double minTickPeriod,
double minTickPeriodVariance);
173 virtual void setupFirstTickTime();
181 virtual const char* type()
const = 0;
196 virtual void setListItem(DtListItem* item);
197 virtual DtListItem* listItem();
201 virtual void putData(std::string& fp,
int indentLevel = 0)
override;
221 virtual DtList inputPortList()
const;
236 virtual DtList outputPortList()
const;
248 virtual DtList inputPortGroupList()
const;
260 virtual DtList outputPortGroupList()
const;
268 virtual int priority()
const;
274 virtual void setPriority(
int priority);
285 virtual void setDT(
double deltaT);
297 virtual bool tickWhileDestroyed()
const;
304 virtual DtOutputStream& objectConsoleDebug(
const DtString& channel =
"")
const;
306 virtual DtOutputStream& objectConsoleVerbose(
const DtString& channel =
"")
const;
308 virtual DtOutputStream& objectConsoleInfo(
const DtString& channel =
"")
const;
310 virtual DtOutputStream& objectConsoleWarn(
const DtString& channel =
"")
const;
312 virtual DtOutputStream& objectConsoleError(
const DtString& channel =
"")
const;
313 virtual int notifyLevel()
const;
352 static void addSimComponentCreatorFcn(
const DtString& type,
377 virtual void isClutterChanged();
382 virtual bool taskVisualizationsActive()
const;
389 virtual bool taskVisualizationsEnabled()
const;
392 virtual void onRestore();
396 return myTaskVisualizations;
401 virtual void updateImgui();
405 virtual bool debugActive()
const;
409 virtual void setupTimedTickLogic(
double minTickPeriod,
double minTickPeriodVariance);
412 virtual double computeCurrentTime();
418 bool testInvariant()
const;
423 virtual bool createPortGroups();
428 virtual bool createPorts();
439 const DtString& defaultPsrName,
bool useDescriptorParams =
true);
446 virtual void destroyTaskVisualizations();
449 virtual void destroyTaskVisualization(
const DtString& name);
464 double calculateNextTaskVisTickTime()
const;
475 template<
typename ValType>
480 template<
typename ValType>
494 void removeSimObjectPredicateCallback(
const DtSimObject*,
503 void invokeSimObjectPredicateCallbacks();
507 virtual void clearPredicateCallbacks();
603 template<
typename ValType>
623 template<
typename ValType>
638 objectConsoleWarn() <<
"Could not find state property: " << propName << std::endl;
const DtComponentDescriptor * myComponentDescriptor
Definition: simComponent.h:554
virtual bool postAddComponentsInit()
Called after all components have been created, initialized and added to the component manager...
Definition: simComponent.h:126
This class is used to interface with the terrain a particular entity is "attached" to...
Definition: attachedTerrain.h:57
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:604
const DtPropertyInterface * cachedCurrentFrameStateProperty(const DtPropertyInterface **prop, const DtString &propName) const
Definition: simComponent.h:613
virtual const DtRwProperties & stateProperties() const
Gets current frame state properties, unless there are none, in which case it returns the next frame s...
bool myLocalDebug
Local debug flag for this component instance. If true, debugActive() will return true.
Definition: simComponent.h:574
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:536
virtual DtlObjPtr getData(DtlObjPtr args, const SearchPaths &searchPaths, const DtVariableBindingsList &variableBindings)
Deriving class overrides these to get/put class specific data.
Definition: readerWriter.h:85
class DtSimResourceManager:
Definition: simResourceManager.h:19
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:528
int myPriority
Definition: simComponent.h:540
Definition: readerWriterRegistry.h:39
double myDT
Definition: simComponent.h:544
class DtSimComponentFactory:
Definition: simComponentFactory.h:36
class DtVrfProcessStateRepositoryManager:
Definition: vrfProcessStateRepositoryManager.h:49
const DtLocalObject * entity() const
Definition: simComponent.h:364
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:522
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:91
DtPredicateCallbackManager * myPredicateCallbackManager
Definition: simComponent.h:569
static DtSimComponentFactory * myFactory
Definition: simComponent.h:538
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:443
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:561
DtListItem * myListItem
Definition: simComponent.h:526
DtComponentSystem * mySystem
Pointer to the DtComponentSystem that this component belongs.
Definition: simComponent.h:525
DtInputPortGroupMap myInputPortGroupList
Definition: simComponent.h:535
boost::signals2::scoped_connection myIsClutterChangedConnection
Definition: simComponent.h:571
The DtPhysicalWorld is the primary interface to and manager of all of the "physical" aspects of the s...
Definition: physicalWorld.h:112
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:542
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:588
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:584
std::map< DtString, DtOutputPortGroup * > DtOutputPortGroupMap
Definition: simComponent.h:531
DtSimComponent *(* DtSimComponentCreatorFcn)(const DtString &name, DtLocalObject *owner, DtSimulationServices *simServices, DtComponentDescriptor *compDescriptor, DtReaderWriterRegistry *registry)
Definition: simComponentFactory.h:25
DtInputPortMap myInputPortList
Definition: simComponent.h:533
std::list< DtVrfProcessStateRepository * > myComponentPsrs
List of PSRs made using createComponentPsr() that will be deleted by this component when it is destro...
Definition: simComponent.h:558
double myNextTaskVisTickTime
The next tick time for updating the task visualizations.
Definition: simComponent.h:564
bool myFirstTick
Initialized to true in the constructor, set to false by the first call to postTick.
Definition: simComponent.h:552
bool myIsEnabled
Indicates whether this component should be enabled for ticking or not.
Definition: simComponent.h:548
DtOutputPortMap myOutputPortList
Definition: simComponent.h:534
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:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
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:80
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:583
virtual DtRwProperties & nextFrameStateProperties()
Returns the full list of the next frame external state properties. NB: To get the internal state prop...
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
DtLocalObject * entity()
Gets the entity.
Definition: simComponent.h:363
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:131
bool getCachedCurrentFrameStatePropertyValue(const DtPropertyInterface **prop, const DtString &propName, ValType &value) const
Definition: simComponent.h:624
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
std::map< DtString, DtOutputPort * > DtOutputPortMap
Definition: simComponent.h:529
std::unique_ptr< DtTimedTickLogic > myTimedTickLogic
Definition: simComponent.h:543
void(* DtVrfObjectPredicateCallbackFunction)(DtSimObjectReference obj, DtVrfObjectPredicateEvaluator *predicateEval, void *userData)
Definition: simComponent.h:51
makVrf::DtTaskVisualizationMap & taskVisualizations()
Definition: simComponent.h:394
std::map< DtString, DtInputPortGroup * > DtInputPortGroupMap
Definition: simComponent.h:530
DtSimulationServices * mySimServices
Definition: simComponent.h:568
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:23
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:566
std::map< DtTaskVisualizationId, DtTaskVisualizationStateComponent * > DtTaskVisualizationMap
Definition: taskVisualizationForwards.h:20
DtPropertyInterface * cachedNextFrameStateProperty(DtPropertyInterface **prop, const DtString &propName)
Definition: simComponent.h:593
virtual const DtPropertyInterface * findPropertyInterface(const DtString &propertyName) const override
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.
Definition: localObject.h:98