Class: LiquidDropPublisher
Defined in: src/sdk/instruments/LiquidDrop.ts:62
A publisher for data from the Modular Liquid Dropping system in the simulator.
Extends
SimVarPublisher<LiquidDropEvents,BaseLiquidDropEvents&BaseIndexedLiquidDropEvents>
Constructors
Constructor
new LiquidDropPublisher(
bus,pacer?):LiquidDropPublisher
Defined in: src/sdk/instruments/LiquidDrop.ts:68
Create an LiquidDropPublisher
Parameters
| Parameter | Type | Description |
|---|---|---|
bus | EventBus | The EventBus to publish to |
pacer? | PublishPacer<LiquidDropEvents> | An optional pacer to use to control the rate of publishing |
Returns
LiquidDropPublisher
Overrides
Properties
bus
protectedreadonlybus:EventBus
Defined in: src/sdk/instruments/BasePublishers.ts:10
Inherited from
indexedSimVars
protectedreadonlyindexedSimVars:Map<"liquid_drop_tank_max_weight"|"liquid_drop_tank_max_volume"|"liquid_drop_tank_volume"|"liquid_drop_tank_weight"|"liquid_drop_door_flow_rate"|"liquid_drop_door_open_target_pct"|"liquid_drop_door_open_pct"|"liquid_drop_scoop_flow_rate"|"liquid_drop_scoop_open_target_pct"|"liquid_drop_scoop_open_pct"|"liquid_drop_system_max_volume"|"liquid_drop_system_max_weight"|"liquid_drop_system_volume"|"liquid_drop_system_weight"|"liquid_drop_system_drop_flow_rate"|"liquid_drop_system_scoop_flow_rate",IndexedSimVarPublisherEntry<any>>
Defined in: src/sdk/instruments/BasePublishers.ts:153
Inherited from
SimVarPublisher.indexedSimVars
pacer
protectedreadonlypacer:undefined|PublishPacer<LiquidDropEvents>
Defined in: src/sdk/instruments/BasePublishers.ts:13
Inherited from
publishActive
protectedpublishActive:boolean
Defined in: src/sdk/instruments/BasePublishers.ts:12
Inherited from
publisher
protectedreadonlypublisher:Publisher<LiquidDropEvents>
Defined in: src/sdk/instruments/BasePublishers.ts:11
Inherited from
resolvedSimVars
protectedreadonlyresolvedSimVars:Map<`liquid_drop_tank_max_weight_${number}`|`liquid_drop_tank_max_volume_${number}`|`liquid_drop_tank_volume_${number}`|`liquid_drop_tank_weight_${number}`|`liquid_drop_door_flow_rate_${number}`|`liquid_drop_door_open_target_pct_${number}`|`liquid_drop_door_open_pct_${number}`|`liquid_drop_scoop_flow_rate_${number}`|`liquid_drop_scoop_open_target_pct_${number}`|`liquid_drop_scoop_open_pct_${number}`|"liquid_drop_system_max_volume"|"liquid_drop_system_max_weight"|"liquid_drop_system_volume"|"liquid_drop_system_weight"|"liquid_drop_system_drop_flow_rate"|"liquid_drop_system_scoop_flow_rate",ResolvedSimVarPublisherEntry<any>>
Defined in: src/sdk/instruments/BasePublishers.ts:151
Inherited from
SimVarPublisher.resolvedSimVars
subscribed
protectedreadonlysubscribed:Map<`liquid_drop_tank_max_weight_${number}`|`liquid_drop_tank_max_volume_${number}`|`liquid_drop_tank_volume_${number}`|`liquid_drop_tank_weight_${number}`|`liquid_drop_door_flow_rate_${number}`|`liquid_drop_door_open_target_pct_${number}`|`liquid_drop_door_open_pct_${number}`|`liquid_drop_scoop_flow_rate_${number}`|`liquid_drop_scoop_open_target_pct_${number}`|`liquid_drop_scoop_open_pct_${number}`|"liquid_drop_system_max_volume"|"liquid_drop_system_max_weight"|"liquid_drop_system_volume"|"liquid_drop_system_weight"|"liquid_drop_system_drop_flow_rate"|"liquid_drop_system_scoop_flow_rate",ResolvedSimVarPublisherEntry<any>>
Defined in: src/sdk/instruments/BasePublishers.ts:155
Inherited from
INDEXED_REGEX
protectedreadonlystaticINDEXED_REGEX:RegExp
Defined in: src/sdk/instruments/BasePublishers.ts:149
Inherited from
Methods
getValue()
protectedgetValue<K>(topic):undefined|LiquidDropEvents[K]
Defined in: src/sdk/instruments/BasePublishers.ts:328
Gets the current value for a topic.
Type Parameters
| Type Parameter |
|---|
K extends `liquid_drop_tank_max_weight_${number}` | `liquid_drop_tank_max_volume_${number}` | `liquid_drop_tank_volume_${number}` | `liquid_drop_tank_weight_${number}` | `liquid_drop_door_flow_rate_${number}` | `liquid_drop_door_open_target_pct_${number}` | `liquid_drop_door_open_pct_${number}` | `liquid_drop_scoop_flow_rate_${number}` | `liquid_drop_scoop_open_target_pct_${number}` | `liquid_drop_scoop_open_pct_${number}` | "liquid_drop_system_max_volume" | "liquid_drop_system_max_weight" | "liquid_drop_system_volume" | "liquid_drop_system_weight" | "liquid_drop_system_drop_flow_rate" | "liquid_drop_system_scoop_flow_rate" |
Parameters
| Parameter | Type | Description |
|---|---|---|
topic | K | A topic. |
Returns
undefined | LiquidDropEvents[K]
The current value for the specified topic.
Inherited from
getValueFromEntry()
protectedgetValueFromEntry<T>(entry):T
Defined in: src/sdk/instruments/BasePublishers.ts:342
Gets the current value for a resolved topic entry.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type | Description |
|---|---|---|
entry | ResolvedSimVarPublisherEntry<T> | An entry for a resolved topic. |
Returns
T
The current value for the specified entry.
Inherited from
SimVarPublisher.getValueFromEntry
handleSubscribedTopic()
protectedhandleSubscribedTopic(topic):void
Defined in: src/sdk/instruments/BasePublishers.ts:197
Handles when an event bus topic is subscribed to for the first time.
Parameters
| Parameter | Type | Description |
|---|---|---|
topic | string | The subscribed topic. |
Returns
void
Inherited from
SimVarPublisher.handleSubscribedTopic
isPublishing()
isPublishing():
boolean
Defined in: src/sdk/instruments/BasePublishers.ts:45
Tells whether or not the publisher is currently active.
Returns
boolean
True if the publisher is active, false otherwise.
Inherited from
onTopicSubscribed()
protectedonTopicSubscribed(topic):void
Defined in: src/sdk/instruments/BasePublishers.ts:283
Responds to when one of this publisher's topics is subscribed to for the first time.
Parameters
| Parameter | Type | Description |
|---|---|---|
topic | `liquid_drop_tank_max_weight_${number}` | `liquid_drop_tank_max_volume_${number}` | `liquid_drop_tank_volume_${number}` | `liquid_drop_tank_weight_${number}` | `liquid_drop_door_flow_rate_${number}` | `liquid_drop_door_open_target_pct_${number}` | `liquid_drop_door_open_pct_${number}` | `liquid_drop_scoop_flow_rate_${number}` | `liquid_drop_scoop_open_target_pct_${number}` | `liquid_drop_scoop_open_pct_${number}` | "liquid_drop_system_max_volume" | "liquid_drop_system_max_weight" | "liquid_drop_system_volume" | "liquid_drop_system_weight" | "liquid_drop_system_drop_flow_rate" | "liquid_drop_system_scoop_flow_rate" | The topic that was subscribed to. |
Returns
void
Inherited from
SimVarPublisher.onTopicSubscribed
onUpdate()
onUpdate():
void
Defined in: src/sdk/instruments/BasePublishers.ts:300
Publish all subscribed data points to the bus.
Returns
void
Inherited from
publish()
protectedpublish<K>(topic,data,sync,isCached):void
Defined in: src/sdk/instruments/BasePublishers.ts:63
Publish a message if publishing is acpive
Type Parameters
| Type Parameter |
|---|
K extends `liquid_drop_tank_max_weight_${number}` | `liquid_drop_tank_max_volume_${number}` | `liquid_drop_tank_volume_${number}` | `liquid_drop_tank_weight_${number}` | `liquid_drop_door_flow_rate_${number}` | `liquid_drop_door_open_target_pct_${number}` | `liquid_drop_door_open_pct_${number}` | `liquid_drop_scoop_flow_rate_${number}` | `liquid_drop_scoop_open_target_pct_${number}` | `liquid_drop_scoop_open_pct_${number}` | keyof BaseLiquidDropEvents |
Parameters
| Parameter | Type | Default value | Description |
|---|---|---|---|
topic | K | undefined | The topic key to publish to. |
data | LiquidDropEvents[K] | undefined | The data type for chosen topic. |
sync | boolean | false | Whether or not the event should be synced to other instruments. Defaults to false. |
isCached | boolean | true | Whether or not the event should be cached. Defaults to true. |
Returns
void
Inherited from
publishTopic()
protectedpublishTopic(topic,entry):void
Defined in: src/sdk/instruments/BasePublishers.ts:311
Publishes data to the event bus for a topic.
Parameters
| Parameter | Type | Description |
|---|---|---|
topic | `liquid_drop_tank_max_weight_${number}` | `liquid_drop_tank_max_volume_${number}` | `liquid_drop_tank_volume_${number}` | `liquid_drop_tank_weight_${number}` | `liquid_drop_door_flow_rate_${number}` | `liquid_drop_door_open_target_pct_${number}` | `liquid_drop_door_open_pct_${number}` | `liquid_drop_scoop_flow_rate_${number}` | `liquid_drop_scoop_open_target_pct_${number}` | `liquid_drop_scoop_open_pct_${number}` | "liquid_drop_system_max_volume" | "liquid_drop_system_max_weight" | "liquid_drop_system_volume" | "liquid_drop_system_weight" | "liquid_drop_system_drop_flow_rate" | "liquid_drop_system_scoop_flow_rate" | The topic to publish. |
entry | undefined | ResolvedSimVarPublisherEntry<any> | The entry corresponding to the topic |
Returns
void
Inherited from
resolveIndexedSimVar()
protectedresolveIndexedSimVar(topic,entry,index):undefined|string
Defined in: src/sdk/instruments/BasePublishers.ts:254
Attempts to resolve an indexed topic with an index, generating a version of the topic which is mapped to an indexed simvar. The resolved indexed topic can then be published.
Parameters
| Parameter | Type | Description |
|---|---|---|
topic | "liquid_drop_tank_max_weight" | "liquid_drop_tank_max_volume" | "liquid_drop_tank_volume" | "liquid_drop_tank_weight" | "liquid_drop_door_flow_rate" | "liquid_drop_door_open_target_pct" | "liquid_drop_door_open_pct" | "liquid_drop_scoop_flow_rate" | "liquid_drop_scoop_open_target_pct" | "liquid_drop_scoop_open_pct" | "liquid_drop_system_max_volume" | "liquid_drop_system_max_weight" | "liquid_drop_system_volume" | "liquid_drop_system_weight" | "liquid_drop_system_drop_flow_rate" | "liquid_drop_system_scoop_flow_rate" | The topic to resolve. |
entry | IndexedSimVarPublisherEntry<any> | The entry of the topic to resolve. |
index | number | The index with which to resolve the topic. If not defined, the topic will resolve to itself (without a suffix) and will be mapped the index-1 version of its simvar. |
Returns
undefined | string
The resolved indexed topic, or undefined if the topic could not be resolved with the specified index.
Inherited from
SimVarPublisher.resolveIndexedSimVar
startPublish()
startPublish():
void
Defined in: src/sdk/instruments/BasePublishers.ts:30
Start publishing.
Returns
void
Inherited from
stopPublish()
stopPublish():
void
Defined in: src/sdk/instruments/BasePublishers.ts:37
Stop publishing.
Returns
void
Inherited from
tryMatchIndexedSubscribedTopic()
protectedtryMatchIndexedSubscribedTopic(topic):void
Defined in: src/sdk/instruments/BasePublishers.ts:212
Checks if a subscribed topic matches one of this publisher's indexed topics, and if so resolves and starts publishing the indexed topic.
Parameters
| Parameter | Type | Description |
|---|---|---|
topic | string | The subscribed topic to check. |
Returns
void