pymoto.Signal

class pymoto.Signal(tag: str = '', state: Any = None, sensitivity: Any = None, min: Any = None, max: Any = None)

Manages the state data, sensitivities, and connects module in- and outputs

Initialize using Signal() Optional arguments: tag (string) Optional keyword arguments: tag=(string)

>> Signal(‘x1’)

>> Signal(tag=’x2’)

__init__(tag: str = '', state: Any = None, sensitivity: Any = None, min: Any = None, max: Any = None)
Keyword Arguments:
  • tag – The name of the signal

  • state – The initialized state

  • sensitivity – The initialized sensitivity

  • min – Minimum allowed value

  • max – Maximum allowed value

Methods

__init__([tag, state, sensitivity, min, max])

add_sensitivity(ds)

Add a new term to internal sensitivity

reset([keep_alloc])

Reset the sensitivities to zero or None This must be called to clear internal memory of subsequent sensitivity calculations.

add_sensitivity(ds: Any)

Add a new term to internal sensitivity

reset(keep_alloc: bool = None)

Reset the sensitivities to zero or None This must be called to clear internal memory of subsequent sensitivity calculations.

Parameters:

keep_alloc – Keep the sensitivity allocation intact?

Returns:

self