3 Copyright (c) 2011-2015 ARM Limited
5 Licensed under the Apache License, Version 2.0 (the "License");
6 you may not use this file except in compliance with the License.
7 You may obtain a copy of the License at
9 http://www.apache.org/licenses/LICENSE-2.0
11 Unless required by applicable law or agreed to in writing, software
12 distributed under the License is distributed on an "AS IS" BASIS,
13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 See the License for the specific language governing permissions and
15 limitations under the License.
17 Author: Przemyslaw Wirkus <Przemyslaw.Wirkus@arm.com>
20 """! @package mbed-host-test-plugins
22 This package contains plugins used by host test to reset, flash devices etc.
23 This package can be extended with new packages to add more generic functionality
27 from .
import host_test_registry
30 from .
import module_copy_shell
31 from .
import module_copy_mbed
32 from .
import module_reset_mbed
33 from .
import module_power_cycle_mbed
36 from .
import module_copy_silabs
37 from .
import module_reset_silabs
38 from .
import module_copy_stlink
39 from .
import module_reset_stlink
40 from .
import module_copy_ublox
41 from .
import module_reset_ublox
42 from .
import module_reset_mps2
43 from .
import module_copy_mps2
53 HOST_TEST_PLUGIN_REGISTRY.register_plugin(module_copy_mbed.load_plugin())
54 HOST_TEST_PLUGIN_REGISTRY.register_plugin(module_copy_shell.load_plugin())
55 HOST_TEST_PLUGIN_REGISTRY.register_plugin(module_reset_mbed.load_plugin())
58 HOST_TEST_PLUGIN_REGISTRY.register_plugin(module_copy_mps2.load_plugin())
59 HOST_TEST_PLUGIN_REGISTRY.register_plugin(module_reset_mps2.load_plugin())
60 HOST_TEST_PLUGIN_REGISTRY.register_plugin(module_copy_silabs.load_plugin())
61 HOST_TEST_PLUGIN_REGISTRY.register_plugin(module_reset_silabs.load_plugin())
62 HOST_TEST_PLUGIN_REGISTRY.register_plugin(module_copy_stlink.load_plugin())
63 HOST_TEST_PLUGIN_REGISTRY.register_plugin(module_reset_stlink.load_plugin())
64 HOST_TEST_PLUGIN_REGISTRY.register_plugin(module_power_cycle_mbed.load_plugin())
65 HOST_TEST_PLUGIN_REGISTRY.register_plugin(module_reset_ublox.load_plugin())
66 HOST_TEST_PLUGIN_REGISTRY.register_plugin(module_copy_ublox.load_plugin())
76 """! Interface to call plugin registry functional way
77 @param capability Plugin capability we want to call
78 @param args Additional parameters passed to plugin
79 @param kwargs Additional parameters passed to plugin
80 @return Returns return value from call_plugin call
82 return HOST_TEST_PLUGIN_REGISTRY.call_plugin(type, capability, *args, **kwargs)
85 """! Get list of all capabilities for plugin family with the same type
86 @param type Type of a plugin
87 @return Returns list of all capabilities for plugin family with the same type. If there are no capabilities empty list is returned
89 return HOST_TEST_PLUGIN_REGISTRY.get_plugin_caps(type)
92 """! Return plugins information
93 @return Dictionary HOST_TEST_PLUGIN_REGISTRY
95 return HOST_TEST_PLUGIN_REGISTRY.get_dict()
98 """! Prints plugins' information in user friendly way
100 print(HOST_TEST_PLUGIN_REGISTRY)
def get_plugin_caps(type)
Get list of all capabilities for plugin family with the same type.
def get_plugin_info()
Return plugins information.
def call_plugin(type, capability, *args, **kwargs)
Functional interface for host test plugin registry.
def print_plugin_info()
Prints plugins' information in user friendly way.