mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed Class Reference
Inheritance diagram for mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed:

## Public Member Functions

| __init__ (self)
| ctor
| get_pyserial_version (self, pyserial_version)
| Retrieve pyserial module version.
| safe_sendBreak (self, serial)
| Closure for pyserial version dependant API calls.
| setup (self, *args, **kwargs)
| Configure plugin, this function should be called before plugin execute() method is used.
| execute (self, capability, *args, **kwargs)
| Executes capability by name.
Public Member Functions inherited from mbed_host_tests.host_tests_plugins.host_test_plugins.HostTestPluginBase
| is_os_supported (self, os_name=None)
| print_plugin_error (self, text)
| Interface helper methods - overload only if you need to have custom behaviour.
| print_plugin_info (self, text, NL=True)
| Function prints notification in console and exits always with True.
| print_plugin_char (self, char)
| check_mount_point_ready (self, destination_disk, init_delay=0.2, loop_delay=0.25, target_id=None, timeout=60)
| Waits until destination_disk is ready and can be accessed by e.g.
| check_serial_port_ready (self, serial_port, target_id=None, timeout=60)
| Function checks (using mbed-ls) and updates serial port name information for DUT with specified target_id.
| check_parameters (self, capability, *args, **kwargs)
| This function should be ran each time we call execute() to check if none of the required parameters is missing.
| run_command (self, cmd, shell=True)
| Runs command from command line.
| mbed_os_info (self)
| Returns information about host OS.
| mbed_os_support (self)
| Function used to determine host OS.

## Public Attributes

| re_float
| pyserial_version
| is_pyserial_v3
Public Attributes inherited from mbed_host_tests.host_tests_plugins.host_test_plugins.HostTestPluginBase
| plugin_logger

## Static Public Attributes

str | name = 'HostTestPluginResetMethod_Mbed'
str | type = 'ResetMethod'
bool | stable = True
list | capabilities = ['default']
list | required_parameters = ['serial']
Static Public Attributes inherited from mbed_host_tests.host_tests_plugins.host_test_plugins.HostTestPluginBase
str | name = "HostTestPluginBase"
| Interface:
str | type = "BasePlugin"
list | capabilities = []
list | required_parameters = []
bool | stable = False

## Protected Member Functions

| _safe_sendBreak_v2_7 (self, serial)
| pyserial 2.7 API implementation of sendBreak/setBreak
| _safe_sendBreak_v3_0 (self, serial)
| pyserial 3.x API implementation of send_brea / break_condition

## Detailed Description

Definition at line 25 of file module_reset_mbed.py.

## Constructor & Destructor Documentation

## __init__()

mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed.__init__ | ( |  | self | ) |

ctor

We can check module version by referring to version attribute import pkg_resources print pkg_resources.require("mbed-host-tests")[0].version '2.7'

Reimplemented from mbed_host_tests.host_tests_plugins.host_test_plugins.HostTestPluginBase.

Definition at line 34 of file module_reset_mbed.py.

## Member Function Documentation

## _safe_sendBreak_v2_7()

mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed._safe_sendBreak_v2_7 | ( |  | self,
|  |  | serial
| ) |  |

protected

pyserial 2.7 API implementation of sendBreak/setBreak

Below API is deprecated for pyserial 3.x versions! http://pyserial.readthedocs.org/en/latest/pyserial_api.html#serial.Serial.sendBreak http://pyserial.readthedocs.org/en/latest/pyserial_api.html#serial.Serial.setBreak

Definition at line 67 of file module_reset_mbed.py.

## _safe_sendBreak_v3_0()

mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed._safe_sendBreak_v3_0 | ( |  | self,
|  |  | serial
| ) |  |

protected

pyserial 3.x API implementation of send_brea / break_condition

http://pyserial.readthedocs.org/en/latest/pyserial_api.html#serial.Serial.send_break http://pyserial.readthedocs.org/en/latest/pyserial_api.html#serial.Serial.break_condition

Definition at line 86 of file module_reset_mbed.py.

## execute()

mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed.execute | ( |  | self,
|  |  | capability,
|  | * | args,
|  | ** | kwargs
| ) |  |

Executes capability by name.

Parameters

  capability | Capability name
  args | Additional arguments
  kwargs | Additional arguments

Each capability e.g. may directly just call some command line program or execute building pythonic function

Returns
  Capability call return value

Reimplemented from mbed_host_tests.host_tests_plugins.host_test_plugins.HostTestPluginBase.

Definition at line 110 of file module_reset_mbed.py.

## get_pyserial_version()

mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed.get_pyserial_version | ( |  | self,
|  |  | pyserial_version
| ) |  |

Retrieve pyserial module version.

Returns
  Returns float with pyserial module number

Definition at line 47 of file module_reset_mbed.py.

## safe_sendBreak()

mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed.safe_sendBreak | ( |  | self,
|  |  | serial
| ) |  |

Closure for pyserial version dependant API calls.

Definition at line 60 of file module_reset_mbed.py.

## setup()

mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed.setup | ( |  | self,
|  | * | args,
|  | ** | kwargs
| ) |  |

Configure plugin, this function should be called before plugin execute() method is used.

Reimplemented from mbed_host_tests.host_tests_plugins.host_test_plugins.HostTestPluginBase.

Definition at line 105 of file module_reset_mbed.py.

## Member Data Documentation

## capabilities

list mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed.capabilities = ['default']

static

Definition at line 31 of file module_reset_mbed.py.

## is_pyserial_v3

mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed.is_pyserial_v3

Definition at line 45 of file module_reset_mbed.py.

## name

str mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed.name = 'HostTestPluginResetMethod_Mbed'

static

Definition at line 28 of file module_reset_mbed.py.

## pyserial_version

mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed.pyserial_version

Definition at line 44 of file module_reset_mbed.py.

## re_float

mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed.re_float

Definition at line 42 of file module_reset_mbed.py.

## required_parameters

list mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed.required_parameters = ['serial']

static

Definition at line 32 of file module_reset_mbed.py.

## stable

bool mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed.stable = True

static

Definition at line 30 of file module_reset_mbed.py.

## type

str mbed_host_tests.host_tests_plugins.module_reset_mbed.HostTestPluginResetMethod_Mbed.type = 'ResetMethod'

static

Definition at line 29 of file module_reset_mbed.py.

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

- mbed_host_tests/host_tests_plugins/module_reset_mbed.py