| optoMDC

Public Member Functions | Public Attributes | List of all members
optoKummenberg.connections.Board Class Reference
Inheritance diagram for optoKummenberg.connections.Board:

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

## Public Attributes
| verbose
| simulated
| Status
| EEPROM
| SnapshotManager
| ProxyBoard
| channel
| Connection
| Commands

## Detailed Description

    Board object from which to issue MRE2 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__()

def optoKummenberg.connections.Board.__init__ | ( |  | self,
|  | str or None | port = `None`,
|  | int | baudrate = `115200`,
|  | bool | comm_lock = `True`,
|  | float | timeout = `None`,
|  | bool | verbose = `False`,
|  | bool | simple = `False`,
|  | bool | board_reset = `False`,
|  | float | inter_byte_timeout = `0.2`
| ) |  |

## Member Function Documentation

## ◆ IsSimpleMode()

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

    Will determine if board is in simple-mode.

    Returns
    -------
    is_simple_mode: bool

    Raises
    ------
    none

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

## ◆ ResetChannel()

def 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

## ◆ Commands

optoKummenberg.connections.Board.Commands

## ◆ Connection

optoKummenberg.connections.Board.Connection

## ◆ EEPROM

optoKummenberg.connections.Board.EEPROM

## ◆ 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/johnathon.barhydt/PycharmProjects/138-882-00_optoMDC/src/main/python/optoKummenberg/connections.py