mbed_host_tests.host_tests_plugins.module_copy_mps2.HostTestPluginCopyMethod_MPS2 Class Reference
Inheritance diagram for mbed_host_tests.host_tests_plugins.module_copy_mps2.HostTestPluginCopyMethod_MPS2:

## Public Member Functions

def | __init__ (self)
def | mps2_copy (self, image_path, destination_disk)
| mps2 copy method for "mbed enabled" devices. More...
def | setup (self, args, kwargs)
def | execute (self, capability, args, kwargs)
| Executes capability by name. More...
Public Member Functions inherited from mbed_host_tests.host_tests_plugins.host_test_plugins.HostTestPluginBase
def | __init__ (self)
def | setup (self, args, kwargs)
| Interface methods. More...
def | execute (self, capability, args, kwargs)
| Executes capability by name. More...
def | is_os_supported (self, os_name=None)
def | print_plugin_error (self, text)
| Interface helper methods - overload only if you need to have custom behaviour. More...
def | print_plugin_info (self, text, NL=True)
| Function prints notification in console and exits always with True. More...
def | print_plugin_char (self, char)
def | 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. More...
def | 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. More...
def | 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. More...
def | run_command (self, cmd, shell=True)
| Runs command from command line. More...
def | mbed_os_info (self)
| Returns information about host OS. More...
def | mbed_os_support (self)
| Function used to determine host OS. More...

## Static Public Attributes

string | name = 'HostTestPluginCopyMethod_MPS2'
string | type = 'CopyMethod'
bool | stable = True
list | capabilities = ['mps2']
list | required_parameters = ['image_path', 'destination_disk']
Static Public Attributes inherited from mbed_host_tests.host_tests_plugins.host_test_plugins.HostTestPluginBase
string | name = "HostTestPluginBase"
| Interface: More...
string | type = "BasePlugin"
list | capabilities = []
list | required_parameters = []
bool | stable = False

## Additional Inherited Members

Public Attributes inherited from mbed_host_tests.host_tests_plugins.host_test_plugins.HostTestPluginBase
| plugin_logger

## Detailed Description

Definition at line 25 of file module_copy_mps2.py.

## Constructor & Destructor Documentation

## __init__()

def mbed_host_tests.host_tests_plugins.module_copy_mps2.HostTestPluginCopyMethod_MPS2.__init__ | ( |  | self | ) |

    ctor

Definition at line 34 of file module_copy_mps2.py.

## Member Function Documentation

## execute()

def mbed_host_tests.host_tests_plugins.module_copy_mps2.HostTestPluginCopyMethod_MPS2.execute | ( |  | self,
|  |  | capability,
|  |  | args,
|  |  | kwargs
| ) |  |

Executes capability by name.

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

Returns
  Returns True if 'capability' operation was successful

Definition at line 71 of file module_copy_mps2.py.

## mps2_copy()

def mbed_host_tests.host_tests_plugins.module_copy_mps2.HostTestPluginCopyMethod_MPS2.mps2_copy | ( |  | self,
|  |  | image_path,
|  |  | destination_disk
| ) |  |

mps2 copy method for "mbed enabled" devices.

This copies the file on the MPS2 keeping the same extension but renaming it "mbed.extension"

Parameters

  image_path | Path to file to be copied
  destination_disk | Path to destination (mbed mount point)

this uses shutil copy to copy the file.

Returns
  Returns True if copy (flashing) was successful

Definition at line 39 of file module_copy_mps2.py.

## setup()

def mbed_host_tests.host_tests_plugins.module_copy_mps2.HostTestPluginCopyMethod_MPS2.setup | ( |  | self,
|  |  | args,
|  |  | kwargs
| ) |  |

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

Definition at line 66 of file module_copy_mps2.py.

## Member Data Documentation

## capabilities

list mbed_host_tests.host_tests_plugins.module_copy_mps2.HostTestPluginCopyMethod_MPS2.capabilities = ['mps2']

static

Definition at line 31 of file module_copy_mps2.py.

## name

string mbed_host_tests.host_tests_plugins.module_copy_mps2.HostTestPluginCopyMethod_MPS2.name = 'HostTestPluginCopyMethod_MPS2'

static

Definition at line 28 of file module_copy_mps2.py.

## required_parameters

list mbed_host_tests.host_tests_plugins.module_copy_mps2.HostTestPluginCopyMethod_MPS2.required_parameters = ['image_path', 'destination_disk']

static

Definition at line 32 of file module_copy_mps2.py.

## stable

bool mbed_host_tests.host_tests_plugins.module_copy_mps2.HostTestPluginCopyMethod_MPS2.stable = True

static

Definition at line 30 of file module_copy_mps2.py.

## type

string mbed_host_tests.host_tests_plugins.module_copy_mps2.HostTestPluginCopyMethod_MPS2.type = 'CopyMethod'

static

Definition at line 29 of file module_copy_mps2.py.

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

- mbed_host_tests/host_tests_plugins/module_copy_mps2.py