Mbed LS
mbed_lstools.main Namespace Reference

Functions

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

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()

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()

mbed_lstools.main.get_version ( )

Get mbed-ls Python module version string.

Definition at line 89 of file main.py.

◆ json_by_target_id()

mbed_lstools.main.json_by_target_id (   mbeds,
  args 
)

Definition at line 141 of file main.py.

◆ json_platforms()

mbed_lstools.main.json_platforms (   mbeds,
  args 
)

Definition at line 147 of file main.py.

◆ json_platforms_ext()

mbed_lstools.main.json_platforms_ext (   mbeds,
  args 
)

Definition at line 153 of file main.py.

◆ list_platforms()

mbed_lstools.main.list_platforms (   mbeds,
  args 
)

Definition at line 133 of file main.py.

◆ mbed_lstools_os_info()

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()

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()

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()

mbed_lstools.main.mbeds_as_json (   mbeds,
  args 
)

Definition at line 136 of file main.py.

◆ mock_platform()

mbed_lstools.main.mock_platform (   mbeds,
  args 
)

Definition at line 116 of file main.py.

◆ parse_cli()

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()

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

Definition at line 97 of file main.py.

◆ print_simple()

mbed_lstools.main.print_simple (   mbeds,
  args 
)

Definition at line 113 of file main.py.

◆ print_table()

mbed_lstools.main.print_table (   mbeds,
  args 
)

Definition at line 110 of file main.py.

◆ print_version()

mbed_lstools.main.print_version (   mbeds,
  args 
)

Definition at line 94 of file main.py.

◆ start_logging()

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.