Skip to content

JavaScript

Classes

TempETAViewModel
TempETAViewModel

Typedefs

Heater : Object
HeaterHistoryEntry : Object
PluginSettings : Object
SoundConfig : Object
PluginMessage : Object
Heater : Object
HeaterHistoryEntry : Object
PluginSettings : Object
SoundConfig : Object
PluginMessage : Object

TempETAViewModel

Kind: global class

new TempETAViewModel()

Knockout view model for the Temperature ETA plugin. The runtime implementation lives in temp_eta.js; this file provides non-invasive JSDoc typedefs and an overview for documentation generation.

new TempETAViewModel()

TempETA runtime JSDoc (small safe step).

This comment block exists in the runtime file but should not be used as a source for generated API documentation (see temp_eta.docs.js).

new TempETAViewModel()

Knockout view model for the Temperature ETA plugin. The runtime implementation lives in temp_eta.js; this file provides non-invasive JSDoc typedefs and an overview for documentation generation.

new TempETAViewModel()

TempETA runtime JSDoc (small safe step).

This comment block exists in the runtime file but should not be used as a source for generated API documentation (see temp_eta.docs.js).

tempETAViewModel.onDataUpdaterPluginMessage(plugin, data) ⇒ void

Handle incoming plugin messages delivered by OctoPrint's data updater.

Kind: instance method of TempETAViewModel

Param Type Description
plugin string

plugin identifier (should be "temp_eta")

data Object

plugin message payload

data.type string

message type (e.g. 'history_reset','settings_reset','heater_update')

[data.heater] string

heater id when applicable (e.g. 'tool0','bed')

[data.eta] number

ETA in seconds when provided

[data.eta_kind] string

kind of ETA ('linear','exponential',...)

[data.cooldown_target] number | null
[data.actual] number | null
[data.target] number | null

tempETAViewModel.isETAVisible(eta) ⇒ boolean

Determine whether an ETA value should be considered visible.

Kind: instance method of TempETAViewModel Returns: boolean -

true if ETA should be shown to the user

Param Type Description
eta number | null | undefined

ETA in seconds (may be null/undefined)

tempETAViewModel.getHeaterLabel(heaterName) ⇒ string

Return a user-facing label for a heater id.

Kind: instance method of TempETAViewModel Returns: string -

localized label

Param Type Description
heaterName string

heater identifier (e.g. 'tool0','bed')

tempETAViewModel.getHeaterIdleText(heater) ⇒ string

Return the localized idle text for a heater (e.g. 'Idle' or 'Cooling').

Kind: instance method of TempETAViewModel Returns: string -

localized idle text

Param Type Description
heater Heater

heater object

tempETAViewModel.getHeaterLabel(heaterName) ⇒ string

Return a user-facing label for a heater id.

Kind: instance method of TempETAViewModel Returns: string -

localized label

Param Type Description
heaterName string

heater identifier (e.g. 'tool0','bed')

tempETAViewModel.onDataUpdaterPluginMessage(plugin, data) ⇒ void

Handle incoming plugin messages delivered by OctoPrint's data updater.

Kind: instance method of TempETAViewModel

Param Type Description
plugin string

plugin identifier (should be "temp_eta")

data Object

plugin message payload

data.type string

message type (e.g. 'history_reset','settings_reset','heater_update')

[data.heater] string

heater id when applicable (e.g. 'tool0','bed')

[data.eta] number

ETA in seconds when provided

[data.eta_kind] string

kind of ETA ('linear','exponential',...)

[data.cooldown_target] number | null
[data.actual] number | null
[data.target] number | null

tempETAViewModel.isETAVisible(eta) ⇒ boolean

Determine whether an ETA value should be considered visible.

Kind: instance method of TempETAViewModel Returns: boolean -

true if ETA should be shown to the user

Param Type Description
eta number | null | undefined

ETA in seconds (may be null/undefined)

tempETAViewModel.getHeaterLabel(heaterName) ⇒ string

Return a user-facing label for a heater id.

Kind: instance method of TempETAViewModel Returns: string -

localized label

Param Type Description
heaterName string

heater identifier (e.g. 'tool0','bed')

tempETAViewModel.getHeaterIdleText(heater) ⇒ string

Return the localized idle text for a heater (e.g. 'Idle' or 'Cooling').

Kind: instance method of TempETAViewModel Returns: string -

localized idle text

Param Type Description
heater Heater

heater object

tempETAViewModel.getHeaterLabel(heaterName) ⇒ string

Return a user-facing label for a heater id.

Kind: instance method of TempETAViewModel Returns: string -

localized label

Param Type Description
heaterName string

heater identifier (e.g. 'tool0','bed')

TempETAViewModel

Kind: global class

new TempETAViewModel()

Knockout view model for the Temperature ETA plugin. The runtime implementation lives in temp_eta.js; this file provides non-invasive JSDoc typedefs and an overview for documentation generation.

new TempETAViewModel()

TempETA runtime JSDoc (small safe step).

This comment block exists in the runtime file but should not be used as a source for generated API documentation (see temp_eta.docs.js).

new TempETAViewModel()

Knockout view model for the Temperature ETA plugin. The runtime implementation lives in temp_eta.js; this file provides non-invasive JSDoc typedefs and an overview for documentation generation.

new TempETAViewModel()

TempETA runtime JSDoc (small safe step).

This comment block exists in the runtime file but should not be used as a source for generated API documentation (see temp_eta.docs.js).

tempETAViewModel.onDataUpdaterPluginMessage(plugin, data) ⇒ void

Handle incoming plugin messages delivered by OctoPrint's data updater.

Kind: instance method of TempETAViewModel

Param Type Description
plugin string

plugin identifier (should be "temp_eta")

data Object

plugin message payload

data.type string

message type (e.g. 'history_reset','settings_reset','heater_update')

[data.heater] string

heater id when applicable (e.g. 'tool0','bed')

[data.eta] number

ETA in seconds when provided

[data.eta_kind] string

kind of ETA ('linear','exponential',...)

[data.cooldown_target] number | null
[data.actual] number | null
[data.target] number | null

tempETAViewModel.isETAVisible(eta) ⇒ boolean

Determine whether an ETA value should be considered visible.

Kind: instance method of TempETAViewModel Returns: boolean -

true if ETA should be shown to the user

Param Type Description
eta number | null | undefined

ETA in seconds (may be null/undefined)

tempETAViewModel.getHeaterLabel(heaterName) ⇒ string

Return a user-facing label for a heater id.

Kind: instance method of TempETAViewModel Returns: string -

localized label

Param Type Description
heaterName string

heater identifier (e.g. 'tool0','bed')

tempETAViewModel.getHeaterIdleText(heater) ⇒ string

Return the localized idle text for a heater (e.g. 'Idle' or 'Cooling').

Kind: instance method of TempETAViewModel Returns: string -

localized idle text

Param Type Description
heater Heater

heater object

tempETAViewModel.getHeaterLabel(heaterName) ⇒ string

Return a user-facing label for a heater id.

Kind: instance method of TempETAViewModel Returns: string -

localized label

Param Type Description
heaterName string

heater identifier (e.g. 'tool0','bed')

tempETAViewModel.onDataUpdaterPluginMessage(plugin, data) ⇒ void

Handle incoming plugin messages delivered by OctoPrint's data updater.

Kind: instance method of TempETAViewModel

Param Type Description
plugin string

plugin identifier (should be "temp_eta")

data Object

plugin message payload

data.type string

message type (e.g. 'history_reset','settings_reset','heater_update')

[data.heater] string

heater id when applicable (e.g. 'tool0','bed')

[data.eta] number

ETA in seconds when provided

[data.eta_kind] string

kind of ETA ('linear','exponential',...)

[data.cooldown_target] number | null
[data.actual] number | null
[data.target] number | null

tempETAViewModel.isETAVisible(eta) ⇒ boolean

Determine whether an ETA value should be considered visible.

Kind: instance method of TempETAViewModel Returns: boolean -

true if ETA should be shown to the user

Param Type Description
eta number | null | undefined

ETA in seconds (may be null/undefined)

tempETAViewModel.getHeaterLabel(heaterName) ⇒ string

Return a user-facing label for a heater id.

Kind: instance method of TempETAViewModel Returns: string -

localized label

Param Type Description
heaterName string

heater identifier (e.g. 'tool0','bed')

tempETAViewModel.getHeaterIdleText(heater) ⇒ string

Return the localized idle text for a heater (e.g. 'Idle' or 'Cooling').

Kind: instance method of TempETAViewModel Returns: string -

localized idle text

Param Type Description
heater Heater

heater object

tempETAViewModel.getHeaterLabel(heaterName) ⇒ string

Return a user-facing label for a heater id.

Kind: instance method of TempETAViewModel Returns: string -

localized label

Param Type Description
heaterName string

heater identifier (e.g. 'tool0','bed')

Heater : Object

Kind: global typedef Properties

Name Type Description
name string

heater id (e.g. 'tool0', 'bed')

actual function | number | null

current temperature observable or number

target function | number | null

target temperature observable or number

[cooldownTarget] function | number | null
[etaKind] function | string | null
[_history] Array.<HeaterHistoryEntry>
[_historyStart] number

HeaterHistoryEntry : Object

Kind: global typedef Properties

Name Type Description
t number

epoch seconds of sample

a number

actual temp

[tg] number | null

recorded target

PluginSettings : Object

Kind: global typedef Properties

Name Type
[color_mode] string
[show_in_sidebar] boolean
[show_in_navbar] boolean
[show_in_tab] boolean
[historical_graph_window_seconds] number
[debug_logging] boolean

SoundConfig : Object

Kind: global typedef Properties

Name Type
enabled boolean
volume number
files Array.<string>

PluginMessage : Object

Kind: global typedef Properties

Name Type
type string
[heater] string
[eta] number
[eta_kind] string
[cooldown_target] number | null
[actual] number | null
[target] number | null

Heater : Object

Kind: global typedef Properties

Name Type Description
name string

heater id (e.g. 'tool0', 'bed')

actual function | number | null

current temperature observable or number

target function | number | null

target temperature observable or number

[cooldownTarget] function | number | null
[etaKind] function | string | null
[_history] Array.<HeaterHistoryEntry>
[_historyStart] number

HeaterHistoryEntry : Object

Kind: global typedef Properties

Name Type Description
t number

epoch seconds of sample

a number

actual temp

[tg] number | null

recorded target

PluginSettings : Object

Kind: global typedef Properties

Name Type
[color_mode] string
[show_in_sidebar] boolean
[show_in_navbar] boolean
[show_in_tab] boolean
[historical_graph_window_seconds] number
[debug_logging] boolean

SoundConfig : Object

Kind: global typedef Properties

Name Type
enabled boolean
volume number
files Array.<string>

PluginMessage : Object

Kind: global typedef Properties

Name Type
type string
[heater] string
[eta] number
[eta_kind] string
[cooldown_target] number | null
[actual] number | null
[target] number | null