optoKummenberg

Loading...
Searching...
No Matches
optoKummenberg.registers.MiscSystems.SnapshotManager Class Reference
Inheritance diagram for optoKummenberg.registers.MiscSystems.SnapshotManager:

## Public Member Functions
| __init__ (self, board=None)
| SaveSnapshot (self, index)
| Saves actual configuration of the driver into memory available slot.
| LoadSnapshot (self, index)
| Loads the saved snapshot (configuration) into driver.
| GetSnapShotCapacity (self)
| Gets number of available snapshots slots in memory.
| GetDefaultSnapShot (self)
| Gets the index of the default (startup) snapshot.
| SetDefaultSnapShot (self, value)
| Sets the index of the default (startup) snapshot.
| GetErrorSystem (self)
| Gets the ID of system which caused the last snapshot error.
| GetErrorRegister (self)
| Gets the ID of register which caused the last snapshot error.
| GetErrorValue (self)
| Gets the value which caused the last snapshot error.
Public Member Functions inherited from optoKummenberg.registers.ClassAbstracts.System
| __init__ (self, int or None channel=None, board=None)
| set_register (self, str or int register_name_or_id, value, bool set_internal=False)
| set_register_id (self, int register_id, value, type=None)
| get_register (self, str or int register_name_or_id)
| get_register_id (self, int register_id)
| get_register_names (self)

## Public Attributes
int | sys_id = 0x27
dict | snapshot_capacity
dict | default_snapshot
dict | error_system
dict | error_register
dict | error_value
Public Attributes inherited from optoKummenberg.registers.ClassAbstracts.System
| name = self.__class__.__name__
| register_list = self._get_register_list()

## Protected Attributes
bool | _readonly = False
Protected Attributes inherited from optoKummenberg.registers.ClassAbstracts.System
| _channel = channel
| _board = board

## Additional Inherited Members
Protected Member Functions inherited from optoKummenberg.registers.ClassAbstracts.System
| _get_register_list (self)
Static Protected Attributes inherited from optoKummenberg.registers.ClassAbstracts.System
bool | _is_a_system = False

## Detailed Description

    Device Functionality - Snapshot Manager
    System ID: 0x27
    *
    * A system that supports saving and loading firmware configurations.
    *
    * ### Register Map:
    *
    * | Address | Name              | Default Value | Description                                         | Type   | Access     |
    * | --------|------------------ |---------------|-----------------------------------------------------|--------|----------- |
    * | 0x2700  | Snapshot capacity | 2             | Number of available snapshot slots, read-only       | uint32 | read only  |
    * | 0x2701  | Default snapshot  | 0             | Snapshot to load on system startup                  | uint32 | read write |
    * | 0x2702  | Error system      | 0             | ID of system which caused the last snapshot error   | uint8  | read only  |
    * | 0x2703  | Error register    | 0             | ID of register which caused the last snapshot error | uint8  | read only  |
    * | 0x2704  | Error value       | 0             | ID of value which caused the last snapshot error    | uint32 | read only  |

## Constructor & Destructor Documentation

## ◆ __init__()

optoKummenberg.registers.MiscSystems.SnapshotManager.__init__ | ( |  | self,
|  |  | board = None )

## Member Function Documentation

## ◆ GetDefaultSnapShot()

optoKummenberg.registers.MiscSystems.SnapshotManager.GetDefaultSnapShot | ( |  | self | ) |

Gets the index of the default (startup) snapshot.

## ◆ GetErrorRegister()

optoKummenberg.registers.MiscSystems.SnapshotManager.GetErrorRegister | ( |  | self | ) |

Gets the ID of register which caused the last snapshot error.

Used for debugging of the configuration.

## ◆ GetErrorSystem()

optoKummenberg.registers.MiscSystems.SnapshotManager.GetErrorSystem | ( |  | self | ) |

Gets the ID of system which caused the last snapshot error.

Used for debugging of the configuration.

## ◆ GetErrorValue()

optoKummenberg.registers.MiscSystems.SnapshotManager.GetErrorValue | ( |  | self | ) |

Gets the value which caused the last snapshot error.

Used for debugging of the configuration.

## ◆ GetSnapShotCapacity()

optoKummenberg.registers.MiscSystems.SnapshotManager.GetSnapShotCapacity | ( |  | self | ) |

Gets number of available snapshots slots in memory.

## ◆ LoadSnapshot()

optoKummenberg.registers.MiscSystems.SnapshotManager.LoadSnapshot | ( |  | self,
|  |  | index )

Loads the saved snapshot (configuration) into driver.

Snapshot with index 0 contains factory settings and can be used to reset the driver to factory default configuration.

## ◆ SaveSnapshot()

optoKummenberg.registers.MiscSystems.SnapshotManager.SaveSnapshot | ( |  | self,
|  |  | index )

Saves actual configuration of the driver into memory available slot.

(all register values) Nubmer of available slots can be obtained by GetSnapShotCapacity method. Index 0 is reserved for factory settings and cannot be overwritten. This configuration can then be loaded by LoadSnapshot method. Snapshot can also be configured as startup snapshot with SetDefaultSnapShot method, driver will then start up with this configuration.

## ◆ SetDefaultSnapShot()

optoKummenberg.registers.MiscSystems.SnapshotManager.SetDefaultSnapShot | ( |  | self,
|  |  | value )

Sets the index of the default (startup) snapshot.

Driver will start with this configuration on the next power startup.

## Member Data Documentation

## ◆ _readonly

bool optoKummenberg.registers.MiscSystems.SnapshotManager._readonly = False
| protected

## ◆ default_snapshot

dict optoKummenberg.registers.MiscSystems.SnapshotManager.default_snapshot

Initial value:
= {'id': self.sys_id << 8 | 0x01,
'type': int,
'unit': None,
'range': [0, 7],
'default': False,
'value': False}

## ◆ error_register

dict optoKummenberg.registers.MiscSystems.SnapshotManager.error_register

Initial value:
= {'id': self.sys_id << 8 | 0x03,
'type': int,
'unit': None,
'range': None,
'default': False,
'value': False}

## ◆ error_system

dict optoKummenberg.registers.MiscSystems.SnapshotManager.error_system

Initial value:
= {'id': self.sys_id << 8 | 0x02,
'type': int,
'unit': None,
'range': None,
'default': False,
'value': False}

## ◆ error_value

dict optoKummenberg.registers.MiscSystems.SnapshotManager.error_value

Initial value:
= {'id': self.sys_id << 8 | 0x04,
'type': int,
'unit': None,
'range': None,
'default': False,
'value': False}

## ◆ snapshot_capacity

dict optoKummenberg.registers.MiscSystems.SnapshotManager.snapshot_capacity

Initial value:
= {'id': self.sys_id << 8 | 0x00,
'type': int,
'unit': None,
'range': None,
'default': False,
'value': False}

## ◆ sys_id

int optoKummenberg.registers.MiscSystems.SnapshotManager.sys_id = 0x27

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

- C:/git/142-421-00_optoKummenberg/src/main/python/optoKummenberg/registers/MiscSystems.py