pylab_ml.misc.registermaster.RegisterMaster

class RegisterMaster(logger=None, filename=None, interface=None, instname='regs', read_mod_write=False)[source]

Bases: mqtt_deviceattributes

Returns a container object for registers imported from registermaster.

filename: name of registermaster (excel file), default from ENV:registermaster atomic: enables read-modify-write behavoiur of bit-slices

(reset: False)

interface: hardware object for STI/BiPhase protocol

__init__(logger=None, filename=None, interface=None, instname='regs', read_mod_write=False)[source]

Methods

__init__([logger, filename, interface, ...])

apply_configuration(data)

Call from the Plugin if the modul placed in the hardwaresetups.

close()

find(addr)

handle_exception(msg[, typ, name])

init()

mqtt_add(client, instrument[, liste, qos])

Add the instrument to mqtt.

mqtt_disconnect()

Remove the instrument from mqtt.

publish(topic, value)

Publish topic as type='cmd' with paylad=value.

publish_get(function_name, value)

Publish function_name as type='get' with paylad=value.

publish_set(function_name, value)

Publish function_name as type='set' with paylad=value.

readreg(adr[, bank, compare, onlycheck, ...])

reset()

reset_internal()

reset_regs([default, force])

Reset the slices to the reset value

set_bank(adr)

Set the bank from a giving adr and recalculate adr.

set_configuration_values(data)

Only empty dummy function.

writereg(adr, dat[, bank])

Attributes

command

mqtt_enable

mqtt_list

mqtt_status

Getter for the mqtt_status.

use

apply_configuration(data)[source]

Call from the Plugin if the modul placed in the hardwaresetups.

Parameters:

data (TYPE) – DESCRIPTION.

Return type:

None.

json = <module 'json' from '/home/runner/miniconda3/envs/test/lib/python3.9/json/__init__.py'>
mqtt_add(client, instrument, liste='#', qos=0)

Add the instrument to mqtt.

calling from base_instrument, after the instrument (device) has been create. Normally you have not to use this function, only base_instrument use it.

Returns:

None.

mqtt_disconnect()

Remove the instrument from mqtt.

calling from base_instrument, if the instrument are closing. Normally you have not to use this function, only base_instrument use it.

Returns:

None.

property mqtt_status

Getter for the mqtt_status.

publish(topic, value)

Publish topic as type=’cmd’ with paylad=value.

publish_get(function_name, value)

Publish function_name as type=’get’ with paylad=value.

publish_set(function_name, value)

Publish function_name as type=’set’ with paylad=value.

reset_regs(default=None, force=False)[source]

Reset the slices to the reset value

Parameters:
  • default (set the register to the default value) – if None, default values 0 will be used

  • force (False -> Only a writable slice sees a reset.) – True -> readable and writable slice sees a reset.

Return type:

None.

set_bank(adr)[source]

Set the bank from a giving adr and recalculate adr.

Parameters:

adr (TYPE) – DESCRIPTION.

Return type:

adr.

set_configuration_values(data)[source]

Only empty dummy function.