Mbed LS
mbed_lstools.main Namespace Reference

Functions

def create (**kwargs)
 Factory used to create host OS specific mbed-lstools object. More...
 
def mbed_os_support ()
 Function used to determine if host OS is supported by mbed-lstools. More...
 
def mbed_lstools_os_info ()
 Returns information about host OS. More...
 
def get_version ()
 Get mbed-ls Python module version string. More...
 
def print_version (mbeds, args)
 
def print_mbeds (mbeds, args, simple)
 
def print_table (mbeds, args)
 
def print_simple (mbeds, args)
 
def mock_platform (mbeds, args)
 
def list_platforms (mbeds, args)
 
def mbeds_as_json (mbeds, args)
 
def json_by_target_id (mbeds, args)
 
def json_platforms (mbeds, args)
 
def json_platforms_ext (mbeds, args)
 
def parse_cli (to_parse)
 Parse the command line. More...
 
def start_logging ()
 
def mbedls_main ()
 Function used to drive CLI (command line interface) application. More...
 

Variables

 logger = logging.getLogger("mbedls.main")
 

Detailed Description

mbed SDK
Copyright (c) 2011-2015 ARM Limited

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Function Documentation

◆ create()

def mbed_lstools.main.create ( **  kwargs)

Factory used to create host OS specific mbed-lstools object.

:param kwargs: keyword arguments to pass along to the constructors

Returns
Returns MbedLsTools object or None if host OS is not supported

Definition at line 36 of file main.py.

◆ get_version()

def mbed_lstools.main.get_version ( )

Get mbed-ls Python module version string.

Definition at line 89 of file main.py.

◆ json_by_target_id()

def mbed_lstools.main.json_by_target_id (   mbeds,
  args 
)

Definition at line 141 of file main.py.

◆ json_platforms()

def mbed_lstools.main.json_platforms (   mbeds,
  args 
)

Definition at line 147 of file main.py.

◆ json_platforms_ext()

def mbed_lstools.main.json_platforms_ext (   mbeds,
  args 
)

Definition at line 153 of file main.py.

◆ list_platforms()

def mbed_lstools.main.list_platforms (   mbeds,
  args 
)

Definition at line 133 of file main.py.

◆ mbed_lstools_os_info()

def mbed_lstools.main.mbed_lstools_os_info ( )

Returns information about host OS.

Returns
Returns tuple with information about OS and host platform

Definition at line 76 of file main.py.

◆ mbed_os_support()

def mbed_lstools.main.mbed_os_support ( )

Function used to determine if host OS is supported by mbed-lstools.

Returns
Returns None if host OS is not supported else return OS short name

This function should be ported for new OS support

Definition at line 58 of file main.py.

◆ mbedls_main()

def mbed_lstools.main.mbedls_main ( )

Function used to drive CLI (command line interface) application.

Returns
Function exits with success code

Definition at line 236 of file main.py.

◆ mbeds_as_json()

def mbed_lstools.main.mbeds_as_json (   mbeds,
  args 
)

Definition at line 136 of file main.py.

◆ mock_platform()

def mbed_lstools.main.mock_platform (   mbeds,
  args 
)

Definition at line 116 of file main.py.

◆ parse_cli()

def mbed_lstools.main.parse_cli (   to_parse)

Parse the command line.

Returns
Retrun a namespace that contains:
  • command - python function to run
  • skip_retarget - bool indicting to skip retargeting
  • list_unmounted - list boards that are not mounted
  • debug - turn on debug logging

Definition at line 159 of file main.py.

◆ print_mbeds()

def mbed_lstools.main.print_mbeds (   mbeds,
  args,
  simple 
)

Definition at line 97 of file main.py.

◆ print_simple()

def mbed_lstools.main.print_simple (   mbeds,
  args 
)

Definition at line 113 of file main.py.

◆ print_table()

def mbed_lstools.main.print_table (   mbeds,
  args 
)

Definition at line 110 of file main.py.

◆ print_version()

def mbed_lstools.main.print_version (   mbeds,
  args 
)

Definition at line 94 of file main.py.

◆ start_logging()

def mbed_lstools.main.start_logging ( )

Definition at line 226 of file main.py.

Variable Documentation

◆ logger

mbed_lstools.main.logger = logging.getLogger("mbedls.main")

Definition at line 31 of file main.py.