optoKummenberg

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
optoKummenberg.connections.Board Class Reference
Inheritance diagram for optoKummenberg.connections.Board:

## Public Member Functions
| __init__ (self, str or None port=None, int baudrate=256000, bool comm_lock=True, float timeout=CMD_TIMEOUT, bool verbose=False, bool simple=False, bool board_reset=False, float inter_byte_timeout=CMD_TIMEOUT, bool simulated=False)
| ResetChannel (self, int channel_to_reset)
| IsSimpleMode (self)
Public Member Functions inherited from optoKummenberg.commands.Command
| handshake (self, bool force=False)
| go_pro (self, bool force=False)
| reset_general (self, bool force=False)
| reset (self, bool force=False)
| generic_command (self, bool force=False)
| get_firmware_id (self, bool force=False)
| get_status (self, bool force=False)
| start_self_test (self, bool force=False)
| load_snapshot (self, int memory_id, bool force=False)
| save_snapshot (self, int memory_id, bool force=False)
| go_simple (self, bool force=False)
| set_value (self, dict or list or int register, value)
| get_value (self, dict or list or int register)
| set_vector (self, dict or int register, int index, vector)
| get_vector (self, dict or int register, int index, int count)
| disconnect (self)

## Public Attributes
| verbose
| simulated
| extended_signal_flow
| Status
| EEPROM
| SnapshotManager
| ProxyBoard
| channel
| Connection
| Commands
Public Attributes inherited from optoKummenberg.commands.Command
| verbose

## Protected Member Functions
| _set_internal_mode (self, current_mode_is_simple, simple_mode_desired)

## Protected Attributes
| _simple
Protected Attributes inherited from optoKummenberg.commands.Command
| _simple

## Detailed Description

    Board object from which to issue driver commands over connection.

    Parameters
    ----------
    port, baudrate, comm_lock, timeout, verbose
        Extended from Connection class
    simple: bool, optional
        Determines whether or not Board will be set in simple-mode after initialization.
    board_reset: bool, optional
        Determines whether or not to reset the Board during initialization.
    number_of_channels: int
        How many channel will be instantiated during initalization.

    Raises
    ------
    none

    Notes
    -----
    Board extends Connection class. Refer to Connection for parameters, etc.

    Examples
    --------
    Instantiate a simple-mode Board with connection over COM12 port, with baud rate 9600. Then switch into pro-mode.
    This will not flush the firmware registers, so it is assumed to already be reset.

    >>> board = Board(port='COM12', baudrate=9600, verbose=True, simple=True)
    Establishing Connection via port [COM12]...
    Connected.
    Initializing Board in Simple Mode...
    Sending: b'~\x00\x06\x02\x00\x00\x00\x00~'
    Received: b''
    Verifying Simple via Handshake...
    Sending: b'Start\r\n'
    Received: b'NO\r\n'
    Handshake NOT Successful: UNKNOWN_ERROR_CODE.
    Sending: b'Start\r\n'
    Received: b'OK\r\n'
    Handshake Successful.
    Board Initialized in Simple Mode.
    Initialization Finalized. Board is Ready.
    >>> board.go_pro()
    Sending: b'GoPro\r\n'
    Received: b'OK\r\n'
    Go Pro Successful.

## Constructor & Destructor Documentation

## ◆ __init__()

optoKummenberg.connections.Board.__init__ | ( |  | self,
|  | str or None | port = None,
|  | int | baudrate = 256000,
|  | bool | comm_lock = True,
|  | float | timeout = CMD_TIMEOUT,
|  | bool | verbose = False,
|  | bool | simple = False,
|  | bool | board_reset = False,
|  | float | inter_byte_timeout = CMD_TIMEOUT,
|  | bool | simulated = False )

Reimplemented from optoKummenberg.commands.Command.

## Member Function Documentation

## ◆ _set_internal_mode()

optoKummenberg.connections.Board._set_internal_mode | ( |  | self,
|  |  | current_mode_is_simple,
|  |  | simple_mode_desired )
| protected

## ◆ IsSimpleMode()

optoKummenberg.connections.Board.IsSimpleMode | ( |  | self | ) |

    Will determine if board is in simple-mode.

    Returns
    -------
    is_simple_mode: bool

    Raises
    ------
    none

    Examples
    --------
    >>> board.IsSimpleMode()

## ◆ ResetChannel()

optoKummenberg.connections.Board.ResetChannel | ( |  | self,
|  | int | channel_to_reset )

    Reset given channel to static input in open-loop mode, with input value 0. Reset Gain/Offset.

    Returns
    -------
    none

    Raises
    ------
    none

    Examples
    --------
    >>> board.reset_channel(0)
    Flushing input-output buffers...
    Closing Connection...
    Disconnected.

## Member Data Documentation

## ◆ _simple

optoKummenberg.connections.Board._simple
| protected

## ◆ channel

optoKummenberg.connections.Board.channel

## ◆ Commands

optoKummenberg.connections.Board.Commands

## ◆ Connection

optoKummenberg.connections.Board.Connection

## ◆ EEPROM

optoKummenberg.connections.Board.EEPROM

## ◆ extended_signal_flow

optoKummenberg.connections.Board.extended_signal_flow

## ◆ ProxyBoard

optoKummenberg.connections.Board.ProxyBoard

## ◆ simulated

optoKummenberg.connections.Board.simulated

## ◆ SnapshotManager

optoKummenberg.connections.Board.SnapshotManager

## ◆ Status

optoKummenberg.connections.Board.Status

## ◆ verbose

optoKummenberg.connections.Board.verbose

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

- C:/Users/filip.stary/Documents/142-421-00_optoKummenberg/src/main/python/optoKummenberg/connections.py