VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
temperatureMonitorActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 //
7 //class DtTemperatureMonitorActuator
8 //
9 //This is a component which simply keeps track of the entity's internal temperature.
10 //Factors that affect temperature will be external temperature and if entity is moving.
11 //
12 #pragma once
13 
15 
16 
17 //String which uniquely identifies this controller
18 const char DtTemperatureMonitorActuatorType[] = "temperature-monitor-actuator";
19 
21 {
22 public:
23  //constructor
26  DtReaderWriterRegistry * parentRegistry = 0);
27 
28  //destructor
30 
31  //copy constructor
33 
34  //assignment operator
36 
37  //Returns the string type for this component.
38  virtual const char* type() const;
39 
40  //Overridden from the base class to call createPSR().
41  virtual bool init();
42 
43  //Update control values
44  //For this actuator, we apply some simple constraints to internal temperature and we print out the value every 10 seconds of
45  //simulation time.
46  virtual void tick();
47 
49  virtual void calculateInternalTemperature();
50 
52  const double getTemperature() const;
53 
54  //This is called by the factory
55  static DtSimComponent* creator(const DtString & name, DtLocalObject* owner,
56  DtSimulationServices * simManager, DtComponentDescriptor* desc,
57  DtReaderWriterRegistry * parentRegistry);
58 
59 
60 protected:
62 };
63 
64 #pragma once
double myNextPrintTime
Definition: temperatureMonitorActuator.h:61
const char DtTemperatureMonitorActuatorType[]
Definition: temperatureMonitorActuator.h:18
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
virtual bool init()
Overridden to cache a pointer to the entity's radio in this class.
Definition: temperatureMonitorActuator.h:20
End User Description: DtActuator is the base class for all actuator model components. Developer Description: The DtActuator base class caches a pointer to the entity's radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor's DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it's location, rotation and so forth. These are created in the entity's DtVrfObjectStateRepository createParts() function. This call creates all the attached parts for all the actuators. These articulated state repositories are managed by the DtAttachmentManager. They are cached by their partType which is the DIS Enumeration describing the part from the disEnums.h file and was specified in the actuator's DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtObjectType used to look up articulated parts in the DtAttachementManager. When an actuator needs access to a particular articulated part it looks it up by the part's object type.
Definition: actuatorComponent.h:47
DtTemperatureMonitorActuator & operator=(const DtTemperatureMonitorActuator &orig)
const double getTemperature() const
returns the current internal temperature
virtual const char * type() const
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual void calculateInternalTemperature()
Apply some simple factors that could change internal temperatue of the entity.
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:89
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
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:566
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc, DtReaderWriterRegistry *parentRegistry)
DtTemperatureMonitorActuator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=NULL, DtReaderWriterRegistry *parentRegistry=0)
virtual DtSymbolString name() const
Accessor for name of this readable/writable object.
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

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)