Avionics
Dropship Simulator
|
Abstract base class for instrumentation By definition, instruments don't do any of the work (they don't modify values) If you have something that takes data like VSI and AGL and then triggers GPWS that would be in a module This is presentation layer only - because we can have multiple copies of a particular instrument concurrently displayed What if we don't have data on the bus for the instrument, like FMS stores the waypoint order, waypoint locations? N1 and ITT are different, we are reading from sensors that could be flawed... not from FADEC directly. More...
#include <Instrument.h>
Public Member Functions | |
Instrument (int prmX, int prmY, float prmXScale, float prmYScale) | |
virtual void | Initialize (Bus *prmBus, Logger *prmLogger, DEVICE_OBJECT *prmDevice, int prmScreenWidth, int prmScreenHeight, std::vector< Font > *prmFonts, bool prmFlip) |
void | DrawText (const WCHAR *str, int x, int y, int flags, D3DXCOLOR color, int font, std::string elementName) |
virtual void | Render (float fElapsed)=0 |
virtual | ~Instrument () |
Protected Attributes | |
Bus * | bus = nullptr |
Logger * | logger = nullptr |
int | screenWidth = 0 |
int | screenHeight = 0 |
DEVICE_OBJECT * | pDevice = nullptr |
std::vector< Font > * | fonts = nullptr |
bool | flip = false |
int | x |
int | y |
int | width = 0 |
int | height = 0 |
float | xScale |
float | yScale |
int | standardWidth = 0 |
int | standardHeight = 0 |
Private Member Functions | |
Instrument () | |
Abstract base class for instrumentation By definition, instruments don't do any of the work (they don't modify values) If you have something that takes data like VSI and AGL and then triggers GPWS that would be in a module This is presentation layer only - because we can have multiple copies of a particular instrument concurrently displayed What if we don't have data on the bus for the instrument, like FMS stores the waypoint order, waypoint locations? N1 and ITT are different, we are reading from sensors that could be flawed... not from FADEC directly.
Definition at line 15 of file Instrument.h.
|
private |
|
inline |
Definition at line 37 of file Instrument.h.
|
inlinevirtual |
Polymorphism gotcha - if this isn't here then std::vector embedded in derived classes don't clean up!
Definition at line 80 of file Instrument.h.
|
inline |
restore
Definition at line 56 of file Instrument.h.
|
inlinevirtual |
Reimplemented in MovingMap, ITTIndicator, N1Indicator, AlertMessageStack, FlightModeAnnunciator, HeadingIndicator, AltitudeTape, AttitudeIndicator, and IndicatedAirSpeedTape.
Definition at line 45 of file Instrument.h.
|
pure virtual |
Implemented in MovingMap, ITTIndicator, N1Indicator, Diagnostics, AlertMessageStack, FlightModeAnnunciator, HeadingIndicator, AltitudeTape, AttitudeIndicator, and IndicatedAirSpeedTape.
|
protected |
Definition at line 21 of file Instrument.h.
|
protected |
Definition at line 26 of file Instrument.h.
|
protected |
Definition at line 25 of file Instrument.h.
|
protected |
Definition at line 30 of file Instrument.h.
|
protected |
Definition at line 22 of file Instrument.h.
|
protected |
Definition at line 24 of file Instrument.h.
|
protected |
Definition at line 23 of file Instrument.h.
|
protected |
Definition at line 23 of file Instrument.h.
|
protected |
Definition at line 32 of file Instrument.h.
|
protected |
Definition at line 32 of file Instrument.h.
|
protected |
Definition at line 30 of file Instrument.h.
|
protected |
Definition at line 29 of file Instrument.h.
|
protected |
Definition at line 31 of file Instrument.h.
|
protected |
Definition at line 29 of file Instrument.h.
|
protected |
Definition at line 31 of file Instrument.h.