Mbed LS
mbed_lstools.linux.MbedLsToolsLinuxGeneric Class Reference
Inheritance diagram for mbed_lstools.linux.MbedLsToolsLinuxGeneric:
mbed_lstools.lstools_base.MbedLsToolsBase object

Public Member Functions

 __init__ (self, **kwargs)
 ctor
 
 find_candidates (self)
 
- Public Member Functions inherited from mbed_lstools.lstools_base.MbedLsToolsBase
 list_mbeds_ext (self)
 Function adds extra information for each mbed device.
 
 list_mbeds (self, fs_interaction=FSInteraction.BeforeFilter, filter_function=None, unique_names=False, read_details_txt=False)
 
 mock_manufacture_id (self, mid, platform_name, oper='+')
 Replace (or add if manufacture id doesn't exist) entry in self.manufacture_ids.
 
 list_manufacture_ids (self)
 Creates list of all available mappings for target_id -> Platform.
 
 retarget_read (self)
 Load retarget data from local file.
 
 retarget (self)
 Enable retargeting.
 
 get_dummy_platform (self, platform_name)
 Returns simple dummy platform.
 
 get_supported_platforms (self, device_type=None)
 Return a dictionary of supported target ids and the corresponding platform name.
 
 list_platforms (self)
 Useful if you just want to know which platforms are currently available on the system.
 
 list_platforms_ext (self)
 Useful if you just want to know how many platforms of each type are currently available on the system.
 
 list_mbeds_by_targetid (self)
 Get information about mbeds with extended parameters/info included.
 
 __str__ (self)
 Object to string casting.
 
 get_string (self, border=False, header=True, padding_width=1, sortby='platform_name')
 Printing with some sql table like decorators.
 
 get_json_data_from_file (self, json_spec_filename, verbose=False)
 Loads from file JSON formatted string to data structure.
 
 get_htm_target_id (self, mount_point)
 
 get_mbed_htm (self, mount_point)
 
 get_mbed_htm_comment_section_ver_build (self, line)
 
 get_mbed_htm_lines (self, mount_point)
 
 get_details_txt (self, mount_point)
 
 parse_details_txt (self, lines)
 
 scan_html_line_for_target_id (self, line)
 
 mount_point_ready (self, path)
 Check if a mount point is ready for file operations.
 

Public Attributes

 nlp
 
 mmp
 
 udp
 
- Public Attributes inherited from mbed_lstools.lstools_base.MbedLsToolsBase
 retarget_data
 
 MOCK_FILE_NAME
 
 plat_db
 
 list_unmounted
 
 RETARGET_FILE_NAME
 
 dummy_counter
 

Protected Member Functions

 _dev_by_id (self, device_type)
 Get a dict, USBID -> device, for a device class.
 
 _fat_mounts (self)
 Lists mounted devices with vfat file system (potential mbeds)
 
 _hex_ids (self, dev_list)
 Build a USBID map for a device list.
 
 _sysfs_block_devices (self, block_devices)
 
- Protected Member Functions inherited from mbed_lstools.lstools_base.MbedLsToolsBase
 _fs_never (self, device, filter_function, read_details_txt)
 
 _fs_before_id_check (self, device, filter_function, read_details_txt)
 
 _fs_after_id_check (self, device, filter_function, read_details_txt)
 
 _update_device_from_fs (self, device, read_details_txt)
 
 _detect_device_type (self, device)
 
 _update_device_details_daplink_compatible (self, device, read_details_txt)
 
 _update_device_details_jlink (self, device, _)
 
 _update_device_from_htm (self, device)
 
 _update_device_details_atmel (self, device, _)
 
 _read_htm_ids (self, mount_point)
 Function scans mbed.htm to get information about TargetID.
 
 _mbed_htm_comment_section_ver_build (self, line)
 Check for Version and Build date of interface chip firmware im mbed.htm file.
 
 _htm_lines (self, mount_point)
 
 _details_txt (self, mount_point)
 Load DETAILS.TXT to dictionary: DETAILS.TXT example: Version: 0226 Build: Aug 24 2015 17:06:30 Git Commit SHA: 27a236b9fe39c674a703c5c89655fbd26b8e27e1 Git Local mods: Yes.
 
 _parse_details (self, lines)
 
 _target_id_from_htm (self, line)
 Extract Target id from htm line.
 

Additional Inherited Members

- Static Public Member Functions inherited from mbed_lstools.lstools_base.MbedLsToolsBase
 run_cli_process (cmd, shell=True)
 
- Static Public Attributes inherited from mbed_lstools.lstools_base.MbedLsToolsBase
list os_supported = []
 
 HOME_DIR = expanduser("~")
 
str MOCK_FILE_NAME = '.mbedls-mock'
 
str RETARGET_FILE_NAME = 'mbedls.json'
 
str DETAILS_TXT_NAME = 'DETAILS.TXT'
 
str MBED_HTM_NAME = 'mbed.htm'
 
dict VENDOR_ID_DEVICE_TYPE_MAP
 
- Static Protected Member Functions inherited from mbed_lstools.lstools_base.MbedLsToolsBase
 _run_cli_process (cmd, shell=True)
 Runs command as a process and return stdout, stderr and ret code.
 
- Protected Attributes inherited from mbed_lstools.lstools_base.MbedLsToolsBase
 _fs_before_id_check
 
 _fs_after_id_check
 

Detailed Description

 mbed-enabled platform for Linux with udev

Definition at line 39 of file linux.py.

Constructor & Destructor Documentation

◆ __init__()

mbed_lstools.linux.MbedLsToolsLinuxGeneric.__init__ (   self,
**  kwargs 
)

ctor

Reimplemented from mbed_lstools.lstools_base.MbedLsToolsBase.

Definition at line 42 of file linux.py.

Member Function Documentation

◆ _dev_by_id()

mbed_lstools.linux.MbedLsToolsLinuxGeneric._dev_by_id (   self,
  device_type 
)
protected

Get a dict, USBID -> device, for a device class.

Parameters
device_typeThe type of devices to search. For exmaple, "serial" looks for all serial devices connected to this computer
Returns
A dict: Device USBID -> device file in /dev

Definition at line 69 of file linux.py.

◆ _fat_mounts()

mbed_lstools.linux.MbedLsToolsLinuxGeneric._fat_mounts (   self)
protected

Lists mounted devices with vfat file system (potential mbeds)

Returns
Returns list of all mounted vfat devices

Uses Linux shell command: 'mount'

Definition at line 88 of file linux.py.

◆ _hex_ids()

mbed_lstools.linux.MbedLsToolsLinuxGeneric._hex_ids (   self,
  dev_list 
)
protected

Build a USBID map for a device list.

Parameters
disk_listList of disks in a system with USBID decoration
Returns
Returns map USBID -> device file in /dev

Uses regular expressions to get a USBID (TargeTIDs) a "by-id" symbolic link

Definition at line 101 of file linux.py.

◆ _sysfs_block_devices()

mbed_lstools.linux.MbedLsToolsLinuxGeneric._sysfs_block_devices (   self,
  block_devices 
)
protected

Definition at line 114 of file linux.py.

◆ find_candidates()

mbed_lstools.linux.MbedLsToolsLinuxGeneric.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 from mbed_lstools.lstools_base.MbedLsToolsBase.

Definition at line 52 of file linux.py.

Member Data Documentation

◆ mmp

mbed_lstools.linux.MbedLsToolsLinuxGeneric.mmp

Definition at line 48 of file linux.py.

◆ nlp

mbed_lstools.linux.MbedLsToolsLinuxGeneric.nlp

Definition at line 46 of file linux.py.

◆ udp

mbed_lstools.linux.MbedLsToolsLinuxGeneric.udp

Definition at line 50 of file linux.py.


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