Qudi
Public Member Functions | Public Attributes | List of all members
core.module.StatusVar Class Reference

This class defines a status variable that is loaded before activation and saved after deactivation. More...

Public Member Functions

def __init__ (self, name=None, default=None, var_name=None, constructor=None, representer=None)
 
def copy (self, kwargs)
 Create a new instance of StatusVar with copied and updated values. More...
 
def constructor (self, func)
 This is the decorator for declaring constructor function for this StatusVar. More...
 
def representer (self, func)
 This is the decorator for declaring a representer function for this StatusVar. More...
 

Public Attributes

 var_name
 
 name
 
 constructor_function
 
 representer_function
 
 default
 

Detailed Description

This class defines a status variable that is loaded before activation and saved after deactivation.

Constructor & Destructor Documentation

◆ __init__()

def core.module.StatusVar.__init__ (   self,
  name = None,
  default = None,
  var_name = None,
  constructor = None,
  representer = None 
)
Parameters
nameidentifier of the status variable when stored
defaultdefault value for the status variable when a saved version is not present
constructorconstructor function for variable, do loading type checks or conversion here
representerrepresenter function for status variable, do saving conversion here
var_namename of the variable inside a running module. Only set this if you know what you are doing!

Member Function Documentation

◆ constructor()

def core.module.StatusVar.constructor (   self,
  func 
)

This is the decorator for declaring constructor function for this StatusVar.

Parameters
funcconstructor function for this StatusVar
Returns
: return the original function so this can be used as a decorator

◆ copy()

def core.module.StatusVar.copy (   self,
  kwargs 
)

Create a new instance of StatusVar with copied and updated values.

Parameters
kwargsAdditional or overridden parameters for the constructor of this class

◆ representer()

def core.module.StatusVar.representer (   self,
  func 
)

This is the decorator for declaring a representer function for this StatusVar.

Parameters
funcrepresenter function for this StatusVar
Returns
: return the original function so this can be used as a decorator

The documentation for this class was generated from the following file: