runtimepy.net.server.app.env.tab package#

Submodules#

runtimepy.net.server.app.env.tab.base module#

A module implementing a channel-environment tab HTML interface.

class runtimepy.net.server.app.env.tab.base.ChannelEnvironmentTabBase(name: str, command: ChannelCommandProcessor, app: AppInfo, tabs: TabbedContent, icon: str = 'alarm', markdown: str = None)[source]#

Bases: Tab, LoggerMixin, MarkdownMixin

A channel-environment tab interface.

runtimepy.net.server.app.env.tab.controls module#

A module implementing channel control HTML rendering.

class runtimepy.net.server.app.env.tab.controls.ChannelEnvironmentTabControls(name: str, command: ChannelCommandProcessor, app: AppInfo, tabs: TabbedContent, icon: str = 'alarm', markdown: str = None)[source]#

Bases: ChannelEnvironmentTabBase

A channel-environment tab interface.

runtimepy.net.server.app.env.tab.controls.default_button(parent: Element, name: str, chan: Channel[Int8Primitive] | Channel[Int16Primitive] | Channel[Int32Primitive] | Channel[Int64Primitive] | Channel[Uint8Primitive] | Channel[Uint16Primitive] | Channel[Uint32Primitive] | Channel[Uint64Primitive] | Channel[FloatPrimitive] | Channel[DoublePrimitive] | Channel[BooleanPrimitive], *classes: str, front: bool = True) Element[source]#

Create a default-value button.

runtimepy.net.server.app.env.tab.controls.get_channel_kind_str(env: ChannelEnvironment, chan: Channel[Int8Primitive] | Channel[Int16Primitive] | Channel[Int32Primitive] | Channel[Int64Primitive] | Channel[Uint8Primitive] | Channel[Uint16Primitive] | Channel[Uint32Primitive] | Channel[Uint64Primitive] | Channel[FloatPrimitive] | Channel[DoublePrimitive] | Channel[BooleanPrimitive], enum: RuntimeEnum | None) str[source]#

Get a string for this channel’s type for a UI.

runtimepy.net.server.app.env.tab.html module#

A module implementing a channel-environment tab HTML interface.

class runtimepy.net.server.app.env.tab.html.ChannelEnvironmentTabHtml(name: str, command: ChannelCommandProcessor, app: AppInfo, tabs: TabbedContent, icon: str = 'alarm', markdown: str = None)[source]#

Bases: ChannelEnvironmentTabControls

A channel-environment tab interface.

add_channel(parent: Element, name: str, chan: Channel[Int8Primitive] | Channel[Int16Primitive] | Channel[Int32Primitive] | Channel[Int64Primitive] | Channel[Uint8Primitive] | Channel[Uint16Primitive] | Channel[Uint32Primitive] | Channel[Uint64Primitive] | Channel[FloatPrimitive] | Channel[DoublePrimitive] | Channel[BooleanPrimitive], enum: RuntimeEnum | None, description: str = None) int[source]#

Add a channel to the table.

add_field(parent: Element, name: str, description: str = None) None[source]#

Add a bit-field row entry.

channel_table(parent: Element) None[source]#

Create the channel table.

compose(parent: Element) None[source]#

Compose the tab’s HTML elements.

get_id(data: str) str[source]#

Get an HTML id for an element.

runtimepy.net.server.app.env.tab.html.channel_color_button(parent: Element, name: str) Element[source]#

Create a button for changing a channel’s plot color.

runtimepy.net.server.app.env.tab.html.create_name_td(parent: Element) Element[source]#

Create a table data entry for channel names.

runtimepy.net.server.app.env.tab.message module#

A module implementing a channel-environment tab message-handling interface.

class runtimepy.net.server.app.env.tab.message.ChannelEnvironmentTabMessaging(name: str, command: ChannelCommandProcessor, app: AppInfo, tabs: TabbedContent, icon: str = 'alarm', markdown: str = None)[source]#

Bases: ChannelEnvironmentTabBase

A channel-environment tab interface.

handle_init(state: TabState) None[source]#

Handle tab initialization.

async handle_message(data: dict[str, Any], send: Callable[[dict[str, Any]], None], state: TabState) dict[str, Any][source]#

Handle a message from a tab.

handle_shown_state(shown: bool, outbox: dict[str, Any], send: Callable[[dict[str, Any]], None], state: TabState) None[source]#

Handle ‘shown’ state changing.

Module contents#

A module implementing a channel-environment tab HTML interface.

class runtimepy.net.server.app.env.tab.ChannelEnvironmentTab(name: str, command: ChannelCommandProcessor, app: AppInfo, tabs: TabbedContent, icon: str = 'alarm', markdown: str = None)[source]#

Bases: ChannelEnvironmentTabMessaging, ChannelEnvironmentTabHtml

A class aggregating all channel-environment tab interfaces.

all_tabs: dict[str, ChannelEnvironmentTab] = {}#
init() None[source]#

Initialize this instance.