VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
simComponentNetwork.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 #include <vlutil/vlList.h>
15 #include <list>
17 
18 class DtSimComponent;
19 class DtLocalObject;
20 class DtSimComponentList;
22 class DtString;
24 class DtPortConnection;
28 class DtLocalObject;
29 
35 {
36 private:
38 
41  DtSimComponentNetwork& operator=(const DtSimComponentNetwork& orig);
43 
44 public:
45 
46 
47  DtSimComponentNetwork(DtLocalObject* vrfObject, DtComponentSystem* parentSystem);
48  virtual ~DtSimComponentNetwork();
49 
50  virtual bool init();
51 
52  virtual void tick(bool hostDestroyed);
53 
55  virtual bool postAddComponentsInit();
56 
57  virtual bool addSensorComponent(DtSimComponent * component);
58  virtual bool addControllerComponent(DtSimComponent * component);
59  virtual bool addActuatorComponent(DtSimComponent * component);
60 
64  virtual bool removeSensorComponent(DtSimComponent * component);
68  virtual bool removeControllerComponent(DtSimComponent * component);
72  virtual bool removeActuatorComponent(DtSimComponent * component);
73 
77  virtual DtSimComponent * lookupComponent(const DtString& name) const;
78 
81  virtual std::list<DtSimComponent*> lookupComponentsByType(const DtString & typeString);
82 
84  virtual DtComponentSystem* lookupComponentSystem(const DtString& name) const;
85  virtual const DtComponentSystemList* componentSystemList() const;
86 
87  virtual DtSimComponentList * sensorComponentList() const;
88  virtual DtControllerComponentList * controllerComponentList() const;
89  virtual DtSimComponentList * actuatorComponentList() const;
90 
92  virtual int createComponentsFromList(
93  const DtComponentDescriptorList& descList, DtSimComponentList* destination,
94  int& priority, bool remoteOnly);
95 
103  virtual int createSystemsFromList(const DtComponentSystemDescriptorList& descList,
104  int& priority, bool remoteOnly);
105 
115  virtual bool createComponentConnection(const DtString& source,
116  const DtString& destination, int warningLevel = 1);
117 
121  virtual void createConnectionsFromList(const DtConnectionDescriptorList&
122  descList, bool suppressErrorMsgs = false);
123 
126  virtual void disconnectComponent(DtSimComponent *component);
127 
129  virtual void removeConnection(DtPortConnection* conn);
130 
133  virtual void removeConnection(DtPortGroupConnection* conn);
134 
136 
137  virtual void enable();
138  virtual void disable();
140 
142  virtual void clear();
143 
144 protected:
148  virtual bool createComponentConnection(DtSimComponent* sourceComp, const DtString& sourcePortName,
149  DtSimComponent* destComponent, const DtString& destPortName, DtString& errorString);
150 
151  virtual bool createSensorComponentList();
152  virtual bool createControllerComponentList();
153  virtual bool createActuatorComponentList();
154 
155 protected:
156 
157 
162 
165 };
Class Description: DtControllerComponentList.
Definition: controllerComponentList.h:38
DtLocalObject * myVrfObject
Definition: simComponentNetwork.h:163
DtControllerComponentList * myControllerComponentList
Definition: simComponentNetwork.h:159
A set of DtSimComponent and DtComponentSystem instances that are connected with a set of connections...
Definition: simComponentNetwork.h:34
A DtComponentSystem is a collection of DtSimComponents that are associated with each other...
Definition: componentSystem.h:35
List of DtComponentSystemDescriptor instances.
Definition: componentSystemDescriptorList.h:20
Instances of DtComponentDescriptorList are readable/writeable lists of DtComponentDescriptor objects...
Definition: componentDescriptorList.h:22
std::list< DtComponentSystem * > DtComponentSystemList
Definition: componentSystem.h:294
Class Description: DtSimComponentList.
Definition: simComponentList.h:39
A DtPortConnection represents a connection between a DtOutputPort and a DtInputPort. PortConnections can be either active or inactive. An active connection is a connection which is supplying data, while an inactive connection is not currently supplying data. Data must be passed through connections as DtPortData.
Definition: portConnection.h:29
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
const char * source
Definition: lz4.h:442
Instances of DtConnectionDescriptorList are readable/writeable lists of DtConnectionDescriptor object...
Definition: connectionDescriptorList.h:22
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
DtSimComponentList * mySensorComponentList
Definition: simComponentNetwork.h:158
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
DtSimComponentList * myActuatorComponentList
Definition: simComponentNetwork.h:160
Definition: portGroupConnection.h:25
DtComponentSystemList mySystemList
Definition: simComponentNetwork.h:161
DtComponentSystem * myParentSystem
Definition: simComponentNetwork.h:164
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)