Class: XMLGaugeConfigFactory
Parse an XMLEngineDisplay configuration into an array of gauge specs.
Constructors
constructor
• new XMLGaugeConfigFactory(instrument
, bus
): XMLGaugeConfigFactory
Create an XMLGaugeConfigFactory.
Parameters
Name | Type | Description |
---|---|---|
instrument | BaseInstrument | The instrument that holds this engine display. |
bus | EventBus | An event bus for gauges that need it. |
Returns
Defined in
src/sdk/components/XMLGauges/XMLGaugeAdapter.ts:73
Methods
parseConfig
▸ parseConfig(document
): XMLExtendedGaugeConfig
Convenience method to take a full XML instrument config and parse out the display config section. This will check first to see if we are using an enhanced, multi-page config by looking for an EnginePage tag in the EngineDisplay element. If it finds it, it will assume we have an advanced config, and return the content along with that of LeanPage and SystemPag, if present. If no EnginePage exists, we assume we're dealing with a legacy configuration and just return the content of EngineDisplay itself as our engine page with everything else undefined.
Parameters
Name | Type | Description |
---|---|---|
document | Document | The XML configuation document. |
Returns
An XMLEnhancedGaugeConfig with the full gauge configuration.
Defined in
src/sdk/components/XMLGauges/XMLGaugeAdapter.ts:89