mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive Class Reference
Inheritance diagram for mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive:

## Public Member Functions

| __init__ (self, name, port, baudrate, config)
| reset_dev_via_serial (self, delay=1)
| Reset device using selected method, calls one of the reset plugins.
| read (self, count)
| Read data from serial port RX buffer.
| write (self, payload, log=False)
| Write data to serial port TX buffer.
| flush (self)
| Flush read/write channels of DUT.
| connected (self)
| Check if there is a connection to DUT.
| finish (self)
| Handle DUT dtor like (close resource) operations here.
| reset (self)
| Reset the dut.
| __del__ (self)
Public Member Functions inherited from mbed_host_tests.host_tests_conn_proxy.conn_primitive.ConnectorPrimitive
| write_kv (self, key, value)
| Forms and sends Key-Value protocol message.
| error (self)
| Returns LAST_ERROR value.

## Public Attributes

| port
| baudrate
| read_timeout
| write_timeout
| config
| target_id
| polling_timeout
| forced_reset_timeout
| skip_reset
| serial
| LAST_ERROR
Public Attributes inherited from mbed_host_tests.host_tests_conn_proxy.conn_primitive.ConnectorPrimitive
| LAST_ERROR
| logger
| polling_timeout

## Detailed Description

Definition at line 27 of file conn_primitive_serial.py.

## Constructor & Destructor Documentation

## __init__()

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.__init__ | ( |  | self,
|  |  | name,
|  |  | port,
|  |  | baudrate,
|  |  | config
| ) |  |

Reimplemented from mbed_host_tests.host_tests_conn_proxy.conn_primitive.ConnectorPrimitive.

Definition at line 28 of file conn_primitive_serial.py.

## __del__()

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.__del__ | ( |  | self | ) |

Definition at line 143 of file conn_primitive_serial.py.

## Member Function Documentation

## connected()

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.connected | ( |  | self | ) |

Check if there is a connection to DUT.

Returns
  True if there is conenction to DUT (read/write/flush API works)

Reimplemented from mbed_host_tests.host_tests_conn_proxy.conn_primitive.ConnectorPrimitive.

Definition at line 133 of file conn_primitive_serial.py.

## finish()

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.finish | ( |  | self | ) |

Handle DUT dtor like (close resource) operations here.

Reimplemented from mbed_host_tests.host_tests_conn_proxy.conn_primitive.ConnectorPrimitive.

Definition at line 136 of file conn_primitive_serial.py.

## flush()

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.flush | ( |  | self | ) |

Flush read/write channels of DUT.

Reimplemented from mbed_host_tests.host_tests_conn_proxy.conn_primitive.ConnectorPrimitive.

Definition at line 129 of file conn_primitive_serial.py.

## read()

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.read | ( |  | self,
|  |  | count
| ) |  |

Read data from serial port RX buffer.

Reimplemented from mbed_host_tests.host_tests_conn_proxy.conn_primitive.ConnectorPrimitive.

Definition at line 100 of file conn_primitive_serial.py.

## reset()

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.reset | ( |  | self | ) |

Reset the dut.

Reimplemented from mbed_host_tests.host_tests_conn_proxy.conn_primitive.ConnectorPrimitive.

Definition at line 140 of file conn_primitive_serial.py.

## reset_dev_via_serial()

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.reset_dev_via_serial | ( |  | self,
|  |  | delay = `1`
| ) |  |

Reset device using selected method, calls one of the reset plugins.

Definition at line 79 of file conn_primitive_serial.py.

## write()

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.write | ( |  | self,
|  |  | payload,
|  |  | log = `False`
| ) |  |

Write data to serial port TX buffer.

Reimplemented from mbed_host_tests.host_tests_conn_proxy.conn_primitive.ConnectorPrimitive.

Definition at line 115 of file conn_primitive_serial.py.

## Member Data Documentation

## baudrate

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.baudrate

Definition at line 31 of file conn_primitive_serial.py.

## config

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.config

Definition at line 34 of file conn_primitive_serial.py.

## forced_reset_timeout

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.forced_reset_timeout

Definition at line 37 of file conn_primitive_serial.py.

## LAST_ERROR

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.LAST_ERROR

Definition at line 66 of file conn_primitive_serial.py.

## polling_timeout

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.polling_timeout

Definition at line 36 of file conn_primitive_serial.py.

## port

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.port

Definition at line 30 of file conn_primitive_serial.py.

## read_timeout

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.read_timeout

Definition at line 32 of file conn_primitive_serial.py.

## serial

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.serial

Definition at line 39 of file conn_primitive_serial.py.

## skip_reset

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.skip_reset

Definition at line 38 of file conn_primitive_serial.py.

## target_id

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.target_id

Definition at line 35 of file conn_primitive_serial.py.

## write_timeout

mbed_host_tests.host_tests_conn_proxy.conn_primitive_serial.SerialConnectorPrimitive.write_timeout

Definition at line 33 of file conn_primitive_serial.py.

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

- mbed_host_tests/host_tests_conn_proxy/conn_primitive_serial.py