ChannelBts

Summary

Represents a BTS Channel Adapter object.

Methods
Properties

Structure

class ChannelBts
close_channel(channel_id: uint8) bool

Attempt to close a specific channel given its Id.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

True if operation was successful, False if not.

Return type

bool

disable_GND(channel_id: uint8) bool

Attempt to disable the GND of specific channel given its Id.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

True if operation was successful, False if not.

Return type

bool

disable_SIM(channel_id: uint8) bool

Attempt to disable the SIM of specific channel given its Id.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

True if operation was successful, False if not.

Return type

bool

disable_VBAT(channel_id: uint8) bool

Attempt to disable the vbat of specific channel given its Id.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

True if operation was successful, False if not.

Return type

bool

enable_GND(channel_id: uint8) bool

Attempt to enable the GND of specific channel given its Id.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

True if operation was successful, False if not.

Return type

bool

enable_SIM(channel_id: uint8) bool

Attempt to enable the SIM of specific channel given its Id.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

True if operation was successful, False if not.

Return type

bool

enable_VBAT(channel_id: uint8) bool

Attempt to enable the vbat of specific channel given its Id.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

True if operation was successful, False if not.

Return type

bool

get_channel_amperage(channel_id: uint8) float

Gets the amperage of a channel given its Id.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

Amperage of the channel.

Return type

float

get_channel_voltage(channel_id: uint8) float

Gets the voltage of a channel given its Id.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

Voltage of the channel.

Return type

float

get_status()

The Status of the Adapter.

is_channel_gnd_enabled(channel_id: uint8) bool

Gets the GND status of specific channel given its Id, True if GND is enabled, False if not.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

Channel's GND status

Return type

bool

is_channel_open(channel_id: uint8) bool

Gets the status of specific channel given its Id, True if channel is open, False if not.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

Channel's status

Return type

bool

is_channel_sim_enabled(channel_id: uint8) bool

Gets the SIM status of specific channel given its Id, True if SIM is enabled, False if not.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

Channel's SIM status

Return type

bool

is_channel_vbat_enabled(channel_id: uint8) bool

Gets the vbat status of specific channel given its Id, True if vbat is enabled, False if not.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

Channel's vbat status

Return type

bool

open_channel(channel_id: uint8) bool

Attempt to open a specific channel given its Id.

Parameters

channel_id (uint8) – Desired channel's id.

Returns

True if operation was successful, False if not.

Return type

bool

set_poti_resistance_value(value: float) bool

Attempts to set the value of the POTI resistance of the adapter to a specific value.

Parameters

value (float) – Desired value.

Returns

True if operation was successful, False if not.

Return type

bool

subscribe_events(type: str, channel_mask: uint16)

Subscribe to to BTS events

Parameters
  • type (str) – one of open, vbat, gnd, sim, relay, poti, voltage, current

  • channel_mask (uint16) – the mask of the channel

sw_reset() bool

Attempts to reset the switch to its default state.

Returns

True if operation was successful, False if not.

Return type

bool

switch_relay(value: bool) bool

Attempt to switch the adapter relay.

Parameters

value (bool) – Desired switch value.

Returns

True if operation was successful, False if not.

Return type

bool

cluster_name

The name of the cluster that is mapped to the channel.

Type

str

name

The channel name. This Property is Read Only.

Type

str