Avionics
Dropship Simulator
|
#include <Component.h>
Public Member Functions | |
Component (Logger *prmLogger) | |
virtual void | FrameMove (double fTime) |
this is a generic unimplemented component framemove, eventually make a pure virtual function? More... | |
virtual | ~Component () |
float | EvaluateDependency (System system) |
void | PropogateLoad (System system) |
Public Attributes | |
GUID | attachedTo |
Component * | attachedToComponent = nullptr |
std::string | name |
std::vector< Dependency > | dependencies |
float | averageServiceLife = 0.0f |
Average service life in hours. More... | |
float | serviceLifeCycleHit = 0.0f |
Power-on service life cycle hit. More... | |
float | weight = 0.0f |
float | cost = 0.0f |
float | pickupPressure = 0.0f |
Minimum pressure/voltage to activate. More... | |
float | dropoutPressure = 0.0f |
Minimum pressure/voltage to keep active. More... | |
float | maxPressure = 0.0f |
float | loadDraw = 0.0f |
float | minTemp = 0.0f |
float | maxTemp = 0.0f |
float | maxCapacity = 0.0f |
std::string | make |
std::string | model |
std::string | description |
float | temperature = 0.0f |
componentInfo More... | |
float | serviceLifeRemaining = 0.0f |
float | setState = -999.0f |
float | currentState = -999.0f |
double | lastTimeProcessed = 0 |
these don't get stored anywhere More... | |
float | currentLoad = 0 |
Public Attributes inherited from Systems::BaseComponent | |
GUID | guid |
std::string | guidStr |
System | system |
D3DXVECTOR3 | location |
float | capacityPressureEtc |
propogated supply More... | |
float | propogatedLoad |
propogated demand More... | |
int | hpPhysical |
int | hpEnergy |
float | hpPhysicalRemaining |
float | hpEnergyRemaining |
Fault | fault = Fault::NoSignal |
Protected Attributes | |
Logger * | logger = nullptr |
Private Member Functions | |
Component ()=default | |
Definition at line 9 of file Component.h.
|
privatedefault |
|
explicit |
Definition at line 5 of file Component.cpp.
|
inlinevirtual |
Polymorphism gotcha - if this isn't here then std::vector embedded in derived classes don't clean up!
Definition at line 66 of file Component.h.
float Component::EvaluateDependency | ( | System | system | ) |
|
virtual |
this is a generic unimplemented component framemove, eventually make a pure virtual function?
this is to expose it on the bus methods... for a bus bar this makes sense because currentState is unused...
Reimplemented in Systems::Real, Systems::Combustion, Systems::Igniter, Systems::N1, Systems::N2, Systems::Starter, Systems::Battery, Systems::TempSensor, Systems::Switch, and Systems::Relay.
Definition at line 11 of file Component.cpp.
void Component::PropogateLoad | ( | System | system | ) |
GUID Systems::Component::attachedTo |
Definition at line 18 of file Component.h.
Component* Systems::Component::attachedToComponent = nullptr |
Definition at line 19 of file Component.h.
float Systems::Component::averageServiceLife = 0.0f |
Average service life in hours.
Definition at line 26 of file Component.h.
float Systems::Component::cost = 0.0f |
Definition at line 31 of file Component.h.
float Systems::Component::currentLoad = 0 |
Definition at line 56 of file Component.h.
float Systems::Component::currentState = -999.0f |
Definition at line 52 of file Component.h.
std::vector<Dependency> Systems::Component::dependencies |
Definition at line 22 of file Component.h.
std::string Systems::Component::description |
Definition at line 43 of file Component.h.
float Systems::Component::dropoutPressure = 0.0f |
Minimum pressure/voltage to keep active.
Definition at line 36 of file Component.h.
double Systems::Component::lastTimeProcessed = 0 |
these don't get stored anywhere
Definition at line 55 of file Component.h.
float Systems::Component::loadDraw = 0.0f |
Definition at line 39 of file Component.h.
|
protected |
Definition at line 15 of file Component.h.
std::string Systems::Component::make |
Definition at line 43 of file Component.h.
float Systems::Component::maxCapacity = 0.0f |
Definition at line 42 of file Component.h.
float Systems::Component::maxPressure = 0.0f |
Definition at line 38 of file Component.h.
float Systems::Component::maxTemp = 0.0f |
Definition at line 41 of file Component.h.
float Systems::Component::minTemp = 0.0f |
Definition at line 40 of file Component.h.
std::string Systems::Component::model |
Definition at line 43 of file Component.h.
std::string Systems::Component::name |
Definition at line 21 of file Component.h.
float Systems::Component::pickupPressure = 0.0f |
Minimum pressure/voltage to activate.
Definition at line 34 of file Component.h.
float Systems::Component::serviceLifeCycleHit = 0.0f |
Power-on service life cycle hit.
Definition at line 28 of file Component.h.
float Systems::Component::serviceLifeRemaining = 0.0f |
Definition at line 48 of file Component.h.
float Systems::Component::setState = -999.0f |
For an output (sensor) currentState gets set internally to setState based on data dependency being available (real sensors write to setState) For an input (switch, throttle) currentState gets set internally to setState based on data dependency being available, 0.0 is off, 1.0 is on, component bases decisions off of currentState
Definition at line 51 of file Component.h.
float Systems::Component::temperature = 0.0f |
componentInfo
Definition at line 47 of file Component.h.
float Systems::Component::weight = 0.0f |
Definition at line 30 of file Component.h.