VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
extendablePartActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
18 
19 class DtString;
20 class DtSimManager;
21 class DtBooleanInputPort;
22 class DtIntegerOutputPort;
23 class DtSimObjectBaseObjectStateRepository;
26 class DtExtendablePartActuatorAxisInfo;
27 
28 namespace makVrf
29 {
30  class DtArticulatedPartStateRepository;
31 }
32 
44  public DtBindableLuaComponent<DtExtendablePartActuator>
45 {
46 
47 public:
48 
52  DtLocalObject* owner,
53  DtSimulationServices* simManager,
54  DtComponentDescriptor* desc = 0,
55  DtReaderWriterRegistry* parentRegistry = 0);
56 
58  virtual ~DtExtendablePartActuator();
59 
60  virtual bool init();
61 
63  virtual bool postAddComponentsInit();
64 
67  virtual const char* type() const;
68 
70  virtual void tick();
71 
75  static DtSimComponent * creator(const DtString& name,
76  DtLocalObject* owner,
77  DtSimulationServices* simManager,
78  DtComponentDescriptor* desc = 0,
79  DtReaderWriterRegistry* parentRegistry = 0);
80 
83  virtual void bindLuaFunctions(lua_State* L);
84  virtual void bindLuaGlobals(lua_State* L);
85 
86 public:
91  virtual void extend();
92  virtual void extendWithRate(double rate);
93 
96  virtual void reset();
97 
100  virtual void retract();
101  virtual void retractWithRate(double rate);
102 
104  virtual bool isExtended() const;
105 
107  virtual bool isRetracted() const;
109 
110 protected:
111 
113  {
114  State_Retracted = 0,
115  State_In_Transision = 1,
116  State_Extended = 2
117  };
118 
120  virtual bool createPorts();
121 
127  virtual DtExtendablePartActuatorPSR* createPSR();
128 
129 private:
135  const DtExtendablePartActuator & operator=(const
136  DtExtendablePartActuator & orig);
137 
138 protected:
139 
142 
147 
155 
158 
160 
164 
166 };
DtPartState
Definition: extendablePartActuator.h:112
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual bool postAddComponentsInit()
Called after all components have been created, initialized and added to the component manager...
Definition: simComponent.h:128
DtExtendablePartActuatorDescriptor is the descriptor for DtExtendablePartActuator components...
Definition: extendablePartActuatorDescriptor.h:20
DtExtendablePartActuator is a simple actuator which controls the movement of an articulated part as i...
Definition: extendablePartActuator.h:43
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
virtual bool init()
Overridden to cache a pointer to the entity&#39;s radio in this class.
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
DtBooleanInputPort * myRequestedStateInputPort
Output Port Name: requested-state Output Port Description: The requested state for this extendable pa...
Definition: extendablePartActuator.h:153
DtIntegerOutputPort * myCurrentStateOutputPort
Output Port Name: current-state Output Port Description: Current extension state. Output Port Range: ...
Definition: extendablePartActuator.h:146
Definition: readerWriterRegistry.h:39
Definition: bindableLuaComponent.h:53
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 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&#39;s object type.
Definition: actuatorComponent.h:47
virtual void reset()
For those reader/writer items that support it, resets the reader/writer value to original state Defau...
const DtExtendablePartActuatorDescriptor * myDescriptor
Definition: extendablePartActuator.h:159
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
Contains class declarations for DtBooleanInputPort, DtBooleanOutputPort, and DtBooleanPortData.
Definition: boolIOPort.h:25
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:94
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:40
A process state repository for the DtExtendablePartActuator component.
Definition: extendablePartActuatorPSR.h:18
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:123
DtExtendablePartActuatorPSR * myProcessState
Container for state data associated with this component such as whether it is in the closed or opened...
Definition: extendablePartActuator.h:163
Instances of DtIntegerOutputPort are output ports through which data producers can send integer value...
Definition: integerIOPort.h:45
makVrf::DtArticulatedPartStateRepository * myArtPartStateRep
The state repository that represents the extendable articulated part.
Definition: extendablePartActuator.h:157
virtual void bindLuaGlobals(lua_State *)=0
Override to bind lua globals.
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Definition: extendablePartActuator.h:165
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. 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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)