Class: PressurizationPublisher
Defined in: src/sdk/instruments/PressurizationPublisher.ts:24
A publisher for Pressurization information.
Extends
Constructors
Constructor
new PressurizationPublisher(
bus
,pacer
):PressurizationPublisher
Defined in: src/sdk/instruments/PressurizationPublisher.ts:43
Create an PressurizationPublisher
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
bus | EventBus | undefined | The EventBus to publish to |
pacer | undefined | PublishPacer <PressurizationEvents > | undefined | An optional pacer to use to control the rate of publishing |
Returns
PressurizationPublisher
Overrides
Properties
bus
protected
readonly
bus:EventBus
Defined in: src/sdk/instruments/BasePublishers.ts:10
Inherited from
indexedSimVars
protected
readonly
indexedSimVars:Map
<"cabin_altitude"
|"cabin_altitude_rate"
|"pressure_diff"
,IndexedSimVarPublisherEntry
<any
>>
Defined in: src/sdk/instruments/BasePublishers.ts:149
Inherited from
SimVarPublisher
.indexedSimVars
pacer
protected
readonly
pacer:undefined
|PublishPacer
<PressurizationEvents
>
Defined in: src/sdk/instruments/BasePublishers.ts:13
Inherited from
publishActive
protected
publishActive:boolean
Defined in: src/sdk/instruments/BasePublishers.ts:12
Inherited from
publisher
protected
readonly
publisher:Publisher
<PressurizationEvents
>
Defined in: src/sdk/instruments/BasePublishers.ts:11
Inherited from
resolvedSimVars
protected
readonly
resolvedSimVars:Map
<"cabin_altitude"
|"cabin_altitude_rate"
|"pressure_diff"
,ResolvedSimVarPublisherEntry
<any
>>
Defined in: src/sdk/instruments/BasePublishers.ts:147
Inherited from
SimVarPublisher
.resolvedSimVars
subscribed
protected
readonly
subscribed:Set
<"cabin_altitude"
|"cabin_altitude_rate"
|"pressure_diff"
>
Defined in: src/sdk/instruments/BasePublishers.ts:151
Inherited from
INDEXED_REGEX
protected
readonly
static
INDEXED_REGEX:RegExp
Defined in: src/sdk/instruments/BasePublishers.ts:145
Inherited from
Methods
getValue()
protected
getValue<K
>(topic
):undefined
|PressurizationEvents
[K
]
Defined in: src/sdk/instruments/BasePublishers.ts:343
Gets the current value for a topic.
Type Parameters
Type Parameter |
---|
K extends "cabin_altitude" | "cabin_altitude_rate" | "pressure_diff" |
Parameters
Parameter | Type | Description |
---|---|---|
topic | K | A topic. |
Returns
undefined
| PressurizationEvents
[K
]
The current value for the specified topic.
Inherited from
getValueFromEntry()
protected
getValueFromEntry<T
>(entry
):T
Defined in: src/sdk/instruments/BasePublishers.ts:357
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()
protected
handleSubscribedTopic(topic
):void
Defined in: src/sdk/instruments/BasePublishers.ts:193
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()
protected
onTopicSubscribed(topic
):void
Defined in: src/sdk/instruments/BasePublishers.ts:279
Responds to when one of this publisher's topics is subscribed to for the first time.
Parameters
Parameter | Type | Description |
---|---|---|
topic | "cabin_altitude" | "cabin_altitude_rate" | "pressure_diff" | The topic that was subscribed to. |
Returns
void
Inherited from
SimVarPublisher
.onTopicSubscribed
onUpdate()
onUpdate():
void
Defined in: src/sdk/instruments/PressurizationPublisher.ts:34
Updates the ADC publisher.
Returns
void
Overrides
publish()
protected
publish<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 keyof PressurizationEvents |
Parameters
Parameter | Type | Default value | Description |
---|---|---|---|
topic | K | undefined | The topic key to publish to. |
data | PressurizationEvents [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()
protected
publishTopic(topic
):void
Defined in: src/sdk/instruments/BasePublishers.ts:325
Publishes data to the event bus for a topic.
Parameters
Parameter | Type | Description |
---|---|---|
topic | "cabin_altitude" | "cabin_altitude_rate" | "pressure_diff" | The topic to publish. |
Returns
void
Inherited from
resolveIndexedSimVar()
protected
resolveIndexedSimVar(topic
,entry
,index
):undefined
|string
Defined in: src/sdk/instruments/BasePublishers.ts:250
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 | "cabin_altitude" | "cabin_altitude_rate" | "pressure_diff" | 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
subscribe()
subscribe(
data
):void
Defined in: src/sdk/instruments/BasePublishers.ts:298
NOOP - For backwards compatibility.
Parameters
Parameter | Type | Description |
---|---|---|
data | keyof PressurizationEvents | Key of the event type in the simVarMap |
Returns
void
Deprecated
Inherited from
tryMatchIndexedSubscribedTopic()
protected
tryMatchIndexedSubscribedTopic(topic
):void
Defined in: src/sdk/instruments/BasePublishers.ts:208
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
Inherited from
SimVarPublisher
.tryMatchIndexedSubscribedTopic
unsubscribe()
unsubscribe(
data
):void
Defined in: src/sdk/instruments/BasePublishers.ts:308
NOOP - For backwards compatibility.
Parameters
Parameter | Type | Description |
---|---|---|
data | keyof PressurizationEvents | Key of the event type in the simVarMap |
Returns
void