Skip to main content

Class: XMLGaugeConfigFactory

Parse an XMLEngineDisplay configuration into an array of gauge specs.

Constructors

constructor

new XMLGaugeConfigFactory(instrument, bus): XMLGaugeConfigFactory

Create an XMLGaugeConfigFactory.

Parameters

NameTypeDescription
instrumentBaseInstrumentThe instrument that holds this engine display.
busEventBusAn event bus for gauges that need it.

Returns

XMLGaugeConfigFactory

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

NameTypeDescription
documentDocumentThe XML configuation document.

Returns

XMLExtendedGaugeConfig

An XMLEnhancedGaugeConfig with the full gauge configuration.

Defined in

src/sdk/components/XMLGauges/XMLGaugeAdapter.ts:89