Mbed LS
|
Public Member Functions | |
def | __init__ (self, list_unmounted=False, **kwargs) |
def | find_candidates (self) |
def | list_mbeds_ext (self) |
Function adds extra information for each mbed device. More... | |
def | list_mbeds (self, fs_interaction=FSInteraction.BeforeFilter, filter_function=None, unique_names=False, read_details_txt=False) |
def | mock_manufacture_id (self, mid, platform_name, oper='+') |
Replace (or add if manufacture id doesn't exist) entry in self.manufacture_ids. More... | |
def | list_manufacture_ids (self) |
Creates list of all available mappings for target_id -> Platform. More... | |
def | retarget_read (self) |
Load retarget data from local file. More... | |
def | retarget (self) |
Enable retargeting. More... | |
def | get_dummy_platform (self, platform_name) |
Returns simple dummy platform. More... | |
def | get_supported_platforms (self, device_type=None) |
Return a dictionary of supported target ids and the corresponding platform name. More... | |
def | list_platforms (self) |
Useful if you just want to know which platforms are currently available on the system. More... | |
def | list_platforms_ext (self) |
Useful if you just want to know how many platforms of each type are currently available on the system. More... | |
def | list_mbeds_by_targetid (self) |
Get information about mbeds with extended parameters/info included. More... | |
def | __str__ (self) |
Object to string casting. More... | |
def | get_string (self, border=False, header=True, padding_width=1, sortby='platform_name') |
Printing with some sql table like decorators. More... | |
def | get_json_data_from_file (self, json_spec_filename, verbose=False) |
Loads from file JSON formatted string to data structure. More... | |
def | get_htm_target_id (self, mount_point) |
def | get_mbed_htm (self, mount_point) |
def | get_mbed_htm_comment_section_ver_build (self, line) |
def | get_mbed_htm_lines (self, mount_point) |
def | get_details_txt (self, mount_point) |
def | parse_details_txt (self, lines) |
def | scan_html_line_for_target_id (self, line) |
def | mount_point_ready (self, path) |
Check if a mount point is ready for file operations. More... | |
Static Public Member Functions | |
def | run_cli_process (cmd, shell=True) |
Public Attributes | |
retarget_data | |
plat_db | |
list_unmounted | |
dummy_counter | |
Static Public Attributes | |
list | os_supported = [] |
HOME_DIR = expanduser("~") | |
string | MOCK_FILE_NAME = '.mbedls-mock' |
string | RETARGET_FILE_NAME = 'mbedls.json' |
string | DETAILS_TXT_NAME = 'DETAILS.TXT' |
string | MBED_HTM_NAME = 'mbed.htm' |
dictionary | VENDOR_ID_DEVICE_TYPE_MAP |
Base class for mbed-lstools, defines mbed-ls tools interface for mbed-enabled devices detection for various hosts
Definition at line 54 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.__init__ | ( | self, | |
list_unmounted = False , |
|||
** | kwargs | ||
) |
ctor
Definition at line 79 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.__str__ | ( | self | ) |
Object to string casting.
Definition at line 489 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.find_candidates | ( | self | ) |
Find all candidate devices connected to this computer Note: Should not open any files @return A dict with the keys 'mount_point', 'serial_port' and 'target_id_usb_id'
Reimplemented in mbed_lstools.linux.MbedLsToolsLinuxGeneric.
Definition at line 98 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.get_details_txt | ( | self, | |
mount_point | |||
) |
Definition at line 617 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.get_dummy_platform | ( | self, | |
platform_name | |||
) |
Returns simple dummy platform.
Definition at line 412 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.get_htm_target_id | ( | self, | |
mount_point | |||
) |
Definition at line 547 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.get_json_data_from_file | ( | self, | |
json_spec_filename, | |||
verbose = False |
|||
) |
Loads from file JSON formatted string to data structure.
Definition at line 530 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.get_mbed_htm | ( | self, | |
mount_point | |||
) |
Definition at line 553 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.get_mbed_htm_comment_section_ver_build | ( | self, | |
line | |||
) |
Definition at line 578 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.get_mbed_htm_lines | ( | self, | |
mount_point | |||
) |
Definition at line 606 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.get_string | ( | self, | |
border = False , |
|||
header = True , |
|||
padding_width = 1 , |
|||
sortby = 'platform_name' |
|||
) |
Printing with some sql table like decorators.
border | Table border visibility |
header | Table header visibility |
padding_width | Table padding |
sortby | Column used to sort results |
Definition at line 498 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.get_supported_platforms | ( | self, | |
device_type = None |
|||
) |
Return a dictionary of supported target ids and the corresponding platform name.
device_type | Filter which device entries are returned from the platform database |
Definition at line 433 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.list_manufacture_ids | ( | self | ) |
Creates list of all available mappings for target_id -> Platform.
Definition at line 373 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.list_mbeds | ( | self, | |
fs_interaction = FSInteraction.BeforeFilter , |
|||
filter_function = None , |
|||
unique_names = False , |
|||
read_details_txt = False |
|||
) |
List details of connected devices @return Returns list of structures with detailed info about each mbed @param fs_interaction A member of the FSInteraction class that picks the trade of between quality of service and speed @param filter_function Function that is passed each mbed candidate, should return True if it should be included in the result Ex. mbeds = list_mbeds(filter_function=lambda m: m['platform_name'] == 'K64F') @param unique_names A boolean controlling the presence of the 'platform_unique_name' member of the output dict @param read_details_txt A boolean controlling the presense of the output dict attributes read from other files present on the 'mount_point' @details Function returns list of dictionaries with mbed attributes 'mount_point', TargetID name etc. Function returns mbed list with platform names if possible
Definition at line 118 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.list_mbeds_by_targetid | ( | self | ) |
Get information about mbeds with extended parameters/info included.
Ordered by target id (key: target_id).
Definition at line 477 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.list_mbeds_ext | ( | self | ) |
Function adds extra information for each mbed device.
Get information about mbeds with extended parameters/info included
Definition at line 110 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.list_platforms | ( | self | ) |
Useful if you just want to know which platforms are currently available on the system.
Definition at line 447 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.list_platforms_ext | ( | self | ) |
Useful if you just want to know how many platforms of each type are currently available on the system.
Definition at line 461 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.mock_manufacture_id | ( | self, | |
mid, | |||
platform_name, | |||
oper = '+' |
|||
) |
Replace (or add if manufacture id doesn't exist) entry in self.manufacture_ids.
oper | '+' add new mock / override existing entry '-' remove mid from mocking entry |
Definition at line 358 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.mount_point_ready | ( | self, | |
path | |||
) |
Check if a mount point is ready for file operations.
Definition at line 689 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.parse_details_txt | ( | self, | |
lines | |||
) |
Definition at line 651 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.retarget | ( | self | ) |
Enable retargeting.
Read data from local retarget configuration file
Definition at line 404 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.retarget_read | ( | self | ) |
Load retarget data from local file.
Definition at line 389 of file lstools_base.py.
|
static |
Definition at line 697 of file lstools_base.py.
def mbed_lstools.lstools_base.MbedLsToolsBase.scan_html_line_for_target_id | ( | self, | |
line | |||
) |
Definition at line 667 of file lstools_base.py.
|
static |
Definition at line 69 of file lstools_base.py.
mbed_lstools.lstools_base.MbedLsToolsBase.dummy_counter |
Definition at line 415 of file lstools_base.py.
|
static |
Definition at line 66 of file lstools_base.py.
mbed_lstools.lstools_base.MbedLsToolsBase.list_unmounted |
Definition at line 92 of file lstools_base.py.
|
static |
Definition at line 70 of file lstools_base.py.
|
static |
Definition at line 67 of file lstools_base.py.
|
static |
Definition at line 63 of file lstools_base.py.
mbed_lstools.lstools_base.MbedLsToolsBase.plat_db |
Definition at line 90 of file lstools_base.py.
mbed_lstools.lstools_base.MbedLsToolsBase.retarget_data |
Definition at line 82 of file lstools_base.py.
|
static |
Definition at line 68 of file lstools_base.py.
|
static |
Definition at line 72 of file lstools_base.py.