25 #include <boost/signals2.hpp>
49 virtual const char*
type()
const;
63 static void setSupplyingCallback(
DtSimMessage * msg,
void * usr);
72 virtual void addSetDataCallbacks();
76 void removeSetDataCallbacks();
93 static void transferSuppliesTaskCallback(
DtSimMessage* msg,
void* usr);
137 virtual void processTransferSuppliesTask(
DtSimMessage* msg);
138 virtual void processTransferSuppliesTaskPSR();
142 DtEntityType & supplyType,
143 double & quantityRequestedTotal,
149 std::map<DtString, double> & supplies,
150 std::map<DtString, double> & suppliesRate,
153 virtual bool verifyTransferSuppliesTaskParams(
double amount,
double rate);
155 virtual void transferSupplies();
156 virtual void processReadyState();
157 virtual void processRequestingState();
158 virtual void processReceivingState();
160 virtual void updateTaskedSupplies(
const DtEntityType& supplyType,
161 double quantityRequestedTotal,
164 virtual void updateTaskedSuppliesPSR(
const std::map<DtString, double>& supplies,
165 std::map<DtString, double> & suppliesRate,
168 virtual void updateReceivedSupplies(
DtTime interval);
169 virtual void removeReceivedSupplies();
170 virtual bool checkResourceAvailable(DtEntityType type);
171 virtual double resourceAvailable(DtEntityType type);
172 virtual void updateResource(DtEntityType type,
double quantity);
173 virtual void updatePSR();
175 virtual const DtString lookUpSupplyType(
const DtEntityType& type)
const;
176 virtual const DtEntityType lookupSupplyName(
const DtString& name)
const;
179 virtual double lookupMaxRate(
const DtEntityType& type);
181 virtual double calculateQuantityRequested(
double quantityRequestedTotal);
182 virtual DtTime calculateReceivingStateTimeout(
double quantityRequestedTotal,
183 double quantityReceivedTotal,
184 double quantityRequested,
185 double quantityOffered,
187 virtual DtTime determineTimer2Period();
189 virtual DtTime currentSimTime();
206 const DtTime theRequestingStateDefaultTimeout = 30.0;
213 const double theReceivingStateTimeoutPercentage = 0.95;
217 const double theTotalReceivedAmountCompletePercentage = 0.999;
222 const int theNumTransferSessions = 10;
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
Definition: resupplyReceivedEvent.h:14
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
This class provides a base class for all controllers that are capable of executing a DtSimTask...
Definition: singleTaskControllerComponent.h:22
DtResupplyReceiverControllerPSR * myProcessState
Container for state data associated with this component. This state is saved and restored as part of ...
Definition: resupplyReceiverController.h:194
The DtSimObjectReference is a shared pointer that can be used amongst many object for access to the u...
Definition: simObjectReference.h:26
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
boost::signals2::scoped_connection myResupplyOfferEventConnection
Definition: resupplyReceiverController.h:224
DtResupplyReceiverControllerDescriptor is a DtComponentDescriptor that has additional information nee...
Definition: resupplyReceiverControllerDescriptor.h:20
Definition: readerWriterRegistry.h:39
This class implements a controller, which gives the unit the capability to receive supplies...
Definition: resupplyReceiverController.h:32
Definition: resupplyOfferEvent.h:14
DtResupplyReceiverStateData myReceiverStateData
Controller state transition class.
Definition: resupplyReceiverController.h:200
virtual bool init() override
Calls setRadio()
Definition: resupplyCancelEvent.h:13
boost::signals2::scoped_connection myResupplyCancelEventConnection
Definition: resupplyReceiverController.h:225
File: simMsg.h.
Definition: simMessage.h:35
Definition: resupplyReceiverStateData.h:131
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
The base class for all messages to/from a specific DtVrfObject. Various subclasses of this class will...
Definition: vrfObjectMessage.h:30
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
const DtResupplyReceiverControllerDescriptor * myResupplyReceiverDesc
Controller descriptor.
Definition: resupplyReceiverController.h:197
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:91
DtResupplyReceiverControllerPSR is a process state repository which holds state variables for the DtR...
Definition: resupplyReceiverControllerPSR.h:22
VR-Link includes.
Definition: transferSuppliesTask.h:21
Definition: serviceRequestEvent.h:14
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