VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
laserLightActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
14 
16 #include "vrfcore/timer.h"
19 
23 class DtVrfBalGunPSR;
24 class DtIntegerInputPort;
25 class DtAnalogInputPort;
26 class DtAnalogOutputPort;
28 class DtBooleanInputPort;
30 class DtVectorOutputPort;
31 
40  public DtBindableLuaComponent<DtLaserLightActuator>
41 {
42 
43 public:
44 
47  DtLaserLightActuator(const DtString& name,
48  DtLocalObject* owner,
49  DtSimulationServices* simManager,
50  DtComponentDescriptor* desc = 0,
51  DtReaderWriterRegistry* parentRegistry = 0);
52 
53 
55  virtual ~DtLaserLightActuator() override;
56 
57  virtual bool init() override;
58 
60  virtual void preFirstTickInit() override;
61 
64  virtual const char* type() const override;
65 
67  virtual void tick() override;
68 
70 
71 
74  virtual bool laserLightLimitHit() const;
75 
77 
80  virtual void bindLuaFunctions(lua_State* L) override;
81  virtual void bindLuaGlobals(lua_State* L) override;
82 
86  static DtSimComponent * creator(const DtString& name,
87  DtLocalObject* owner,
88  DtSimulationServices* simManager,
89  DtComponentDescriptor* desc = 0,
90  DtReaderWriterRegistry* parentRegistry = 0);
91 
92 protected:
93 
95  virtual bool createPortGroups() override;
96 
98  virtual bool createPorts() override;
99 
101  virtual DtLaserLightActuatorPSR* createPSR();
102 
104  virtual void updatePorts();
105 
107  virtual void updateParts(double azRate, double elRate);
108 
109 protected:
110 
113 
116 
119 
120 protected:
122 
124 
127 
130 
133  double myMinAzimuth;
134  double myMaxAzimuth;
138 
141 
145 
148 
155 
162 
169 
176 
183 
190 
196 
204 
212 
220 
225 
231 
237 
243 
249 
251 
254 };
Instances of DtOrientationOutputPort are output ports through which data producers can send a DtTaitB...
Definition: orientationIOPort.h:51
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
DtAnalogOutputPort * myMaxElevationOutputPort
Output Port Name: max-elevation Output Port Description: The maximum elevation at which the laser lig...
Definition: laserLightActuator.h:248
DtAnalogInputPort * myOrderedAzimuthPort
Input Port Name: ordered-azimuth Input Port Description: Azimuth at which to attempt to aim the laser...
Definition: laserLightActuator.h:161
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
DtAnalogOutputPort * myMinElevationOutputPort
Output Port Name: min-elevation Output Port Description: The minimum elevation at which the laser lig...
Definition: laserLightActuator.h:242
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
DtIntegerInputPort * myElevationRotationRatePercentagePort
Input Port Name: elevation-rotation-rate-percentage Input Port Description: Percentage of maximum rot...
Definition: laserLightActuator.h:182
virtual void bindLuaFunctions(lua_State *)=0
Override to bind lua functions.
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
double myMaxAzimuth
Definition: laserLightActuator.h:134
DtOutputPortGroup is a data port group of a data provider. It may contain any number of DtOutputPorts...
Definition: outputPortGroup.h:34
Definition: bindableLuaComponent.h:56
double myLastReceivedAzimuth
Last recieved azimuth and elevation received from the controller. Used to detect when new angles have...
Definition: laserLightActuator.h:142
Contains class declarations for DtIntegerInputPort, DtIntegerOutputPort, and DtIntegerPortData.
Definition: integerIOPort.h:25
DtLaserLightActuatorDescriptor * myLaserLightDescriptor
Definition: laserLightActuator.h:121
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&#39;s radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor&#39;s DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it&#39;s location, rotation and so forth. These are created in the entity&#39;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&#39;s DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtEntityType 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&#39;s object type.
Definition: actuatorComponent.h:47
double myMinElevation
Definition: laserLightActuator.h:136
DtArtPartType myLaserLightElevationArtPart
Definition: laserLightActuator.h:126
DtBooleanInputPort * myPowerOnPort
Input Port Name: power-on Input Port Description: Specifies whether the laser light is powered on...
Definition: laserLightActuator.h:168
DtLaserLightActuatorPSR is a process state repository which holds state variables for the DtLaserLigh...
Definition: laserLightActuatorPSR.h:19
bool myNeedToRetrieveLaserLightLimits
Definition: laserLightActuator.h:131
Instances of DtAnalogOutputPort are input ports through which data producers can send real numbers...
Definition: analogIOPort.h:45
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: laserLightActuator.h:253
DtIntegerInputPort * myAzimuthRotationRatePercentagePort
Input Port Name: azimuth-rotation-rate-percentage Input Port Description: Percentage of maximum rotat...
Definition: laserLightActuator.h:189
double myLastReceivedElevation
Last recieved azimuth and elevation received from the controller. Used to detect when new angles have...
Definition: laserLightActuator.h:143
virtual bool init() override
Overridden to cache a pointer to the entity&#39;s radio in this class.
DtBooleanOutputPort * myOrientationAchievedOutputPort
Output Port Name: orientation-achieved Output Port Description: Specifies whether the laser light was...
Definition: laserLightActuator.h:219
DtAnalogOutputPort * myMinAzimuthOutputPort
Output Port Name: min-azimuth Output Port Description: The minimum azimuth at which the laser light c...
Definition: laserLightActuator.h:230
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation frame...
Contains class declarations for DtBooleanInputPort, DtBooleanOutputPort, and DtBooleanPortData.
Definition: boolIOPort.h:25
DtAnalogOutputPort * myMaxAzimuthOutputPort
Output Port Name: max-azimuth Output Port Description: The maximum azimuth at which the laser light c...
Definition: laserLightActuator.h:236
double myMaxElevationRate
Definition: laserLightActuator.h:135
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
DtArtPartType myLaserLightAzimuthArtPart
Definition: laserLightActuator.h:125
double myMaxAzimuthRate
Definition: laserLightActuator.h:132
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
DtLaserLightActuator provides a model of a laser light.
Definition: laserLightActuator.h:39
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:97
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
double myMinAzimuth
Definition: laserLightActuator.h:133
double myMaxElevation
Definition: laserLightActuator.h:137
DtLaserLightActuatorDescriptor; a descriptor for the DtLaserLightActuator component.
Definition: laserLightActuatorDescriptor.h:25
Contains class declarations for DtAnalogInputPort, DtAnalogOutputPort, and DtAnalogPortData.
Definition: analogIOPort.h:25
DtIntegerInputPort * myRotationRatePercentagePort
Input Port Name: rotation-rate-percentage Input Port Description: Percentage of maximum rotation rate...
Definition: laserLightActuator.h:175
bool myRotation360
Cache for the condition for 360 rotation.
Definition: laserLightActuator.h:129
virtual void bindLuaGlobals(lua_State *)=0
Override to bind lua globals.
DtOutputPortGroup * myLaserLightLimitsOutputPortGroup
Output Port Group Name: laser-light-limits Output Port Group Description: Allows the actuator to comm...
Definition: laserLightActuator.h:224
Class DtVrfBalGunPSR: Used to hold checkpointable state for the processes associated with ballistic g...
Definition: vrfBalGunPSR.h:36
DtAnalogInputPort * myOrderedElevationPort
Input Port Name: ordered-elevation Input Port Description: Elevation at which to attempt to aim the l...
Definition: laserLightActuator.h:154
DtVectorOutputPort * myPositionOutputPort
Input Port Name: position Input Port Description: Outputs the position of the laser in body coordinat...
Definition: laserLightActuator.h:211
DtOutputPortGroup * myLaserLightOutputPortGroup
Output Port Group Name: laser-light-offset Output Port Group Description: Allows an external controll...
Definition: laserLightActuator.h:195
DtOrientationOutputPort * myOrientationOutputPort
Output Port Name: orientation Input Port Description: Outputs the orientation of the laser relative t...
Definition: laserLightActuator.h:203
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
A locally simulated VRF object.
Definition: localObject.h:98
DtLaserLightActuatorPSR * myProcessState
Definition: laserLightActuator.h:123

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)