optoKummenberg

Loading...
Searching...
No Matches
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, float inter_byte_timeout=CMD_TIMEOUT, bool simulated=False, bool ethernet=False, str ip_address=None, int ethernet_port=5000)
| ResetChannel (self, int channel_to_reset)
| IsSimpleMode (self)
Public Member Functions inherited from optoKummenberg.commands.Command
| __init__ (self, board=None)
| handshake (self, bool force=False)
| go_pro (self, bool force=False)
| reset_general (self, bool force=False)
| reset (self, bool force=False, float registration_interval=10)
| 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
| simulated = simulated
| ethernet = ethernet
| Connection = None
| ethernet_port = ethernet_port
| Commands = Command()
bool | extended_signal_flow = False
| Status = registers.Status(board=self)
| EEPROM = registers.BoardEEPROM(board=self)
| SnapshotManager = registers.SnapshotManager(board=self)
| ProxyBoard = ProxyBoard(board=self)
list | channel = [self.ProxyBoard.Channel_0]
Public Attributes inherited from optoKummenberg.commands.Command
| verbose

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

## Additional Inherited Members
Protected Attributes inherited from optoKummenberg.commands.Command
bool | _simple = self.IsSimpleMode()

## 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,
|  | float | inter_byte_timeout = CMD_TIMEOUT,
|  | bool | simulated = False,
|  | bool | ethernet = False,
|  | str | ip_address = None,
|  | int | ethernet_port = 5000 )

## 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

## ◆ channel

optoKummenberg.connections.Board.channel = [self.ProxyBoard.Channel_0]

## ◆ Commands

optoKummenberg.connections.Board.Commands = Command()

## ◆ Connection

optoKummenberg.connections.Board.Connection = None

## ◆ EEPROM

optoKummenberg.connections.Board.EEPROM = registers.BoardEEPROM(board=self)

## ◆ ethernet

optoKummenberg.connections.Board.ethernet = ethernet

## ◆ ethernet_port

optoKummenberg.connections.Board.ethernet_port = ethernet_port

## ◆ extended_signal_flow

bool optoKummenberg.connections.Board.extended_signal_flow = False

## ◆ ProxyBoard

optoKummenberg.connections.Board.ProxyBoard = ProxyBoard(board=self)

## ◆ simulated

optoKummenberg.connections.Board.simulated = simulated

## ◆ SnapshotManager

optoKummenberg.connections.Board.SnapshotManager = registers.SnapshotManager(board=self)

## ◆ Status

optoKummenberg.connections.Board.Status = registers.Status(board=self)

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

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