1*cfb92d14SAndroid Build Coastguard Worker#!/usr/bin/env python 2*cfb92d14SAndroid Build Coastguard Worker# 3*cfb92d14SAndroid Build Coastguard Worker# Copyright (c) 2016, The OpenThread Authors. 4*cfb92d14SAndroid Build Coastguard Worker# All rights reserved. 5*cfb92d14SAndroid Build Coastguard Worker# 6*cfb92d14SAndroid Build Coastguard Worker# Redistribution and use in source and binary forms, with or without 7*cfb92d14SAndroid Build Coastguard Worker# modification, are permitted provided that the following conditions are met: 8*cfb92d14SAndroid Build Coastguard Worker# 1. Redistributions of source code must retain the above copyright 9*cfb92d14SAndroid Build Coastguard Worker# notice, this list of conditions and the following disclaimer. 10*cfb92d14SAndroid Build Coastguard Worker# 2. Redistributions in binary form must reproduce the above copyright 11*cfb92d14SAndroid Build Coastguard Worker# notice, this list of conditions and the following disclaimer in the 12*cfb92d14SAndroid Build Coastguard Worker# documentation and/or other materials provided with the distribution. 13*cfb92d14SAndroid Build Coastguard Worker# 3. Neither the name of the copyright holder nor the 14*cfb92d14SAndroid Build Coastguard Worker# names of its contributors may be used to endorse or promote products 15*cfb92d14SAndroid Build Coastguard Worker# derived from this software without specific prior written permission. 16*cfb92d14SAndroid Build Coastguard Worker# 17*cfb92d14SAndroid Build Coastguard Worker# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 18*cfb92d14SAndroid Build Coastguard Worker# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19*cfb92d14SAndroid Build Coastguard Worker# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20*cfb92d14SAndroid Build Coastguard Worker# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 21*cfb92d14SAndroid Build Coastguard Worker# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 22*cfb92d14SAndroid Build Coastguard Worker# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 23*cfb92d14SAndroid Build Coastguard Worker# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24*cfb92d14SAndroid Build Coastguard Worker# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 25*cfb92d14SAndroid Build Coastguard Worker# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 26*cfb92d14SAndroid Build Coastguard Worker# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 27*cfb92d14SAndroid Build Coastguard Worker# POSSIBILITY OF SUCH DAMAGE. 28*cfb92d14SAndroid Build Coastguard Worker# 29*cfb92d14SAndroid Build Coastguard Worker 30*cfb92d14SAndroid Build Coastguard WorkerAUTO_DUT = True 31*cfb92d14SAndroid Build Coastguard Worker"""bool: Whether use the auto DUT feature of thread harness.""" 32*cfb92d14SAndroid Build Coastguard Worker 33*cfb92d14SAndroid Build Coastguard WorkerDUT_DEVICE = ('COM16', 'OpenThread') 34*cfb92d14SAndroid Build Coastguard Worker"""(str, str): The first element is serial port of the DUT, and the second is 35*cfb92d14SAndroid Build Coastguard Workerthe device type.""" 36*cfb92d14SAndroid Build Coastguard Worker 37*cfb92d14SAndroid Build Coastguard WorkerDUT2_DEVICE = ('COM18', 'OpenThread') 38*cfb92d14SAndroid Build Coastguard Worker"""(str, str): The first element is serial port of the DUT, and the second is 39*cfb92d14SAndroid Build Coastguard Workerthe device type. DUT in RF-box for RF-shield needed cases.""" 40*cfb92d14SAndroid Build Coastguard Worker 41*cfb92d14SAndroid Build Coastguard WorkerDUT_VERSION = 'g12345' 42*cfb92d14SAndroid Build Coastguard Worker"""str: Version of DUT""" 43*cfb92d14SAndroid Build Coastguard Worker 44*cfb92d14SAndroid Build Coastguard WorkerDUT_MANUFACTURER = 'Open Thread' 45*cfb92d14SAndroid Build Coastguard Worker"""str: Manufacturer of the DUT""" 46*cfb92d14SAndroid Build Coastguard Worker 47*cfb92d14SAndroid Build Coastguard WorkerTHREAD_CHANNEL = 18 48*cfb92d14SAndroid Build Coastguard Worker"""int: Thread channel""" 49*cfb92d14SAndroid Build Coastguard Worker 50*cfb92d14SAndroid Build Coastguard WorkerTHREAD_PANID = '0xface' 51*cfb92d14SAndroid Build Coastguard Worker"""str: Thread PAN ID""" 52*cfb92d14SAndroid Build Coastguard Worker 53*cfb92d14SAndroid Build Coastguard WorkerTHREAD_NETWORKNAME = 'GRL' 54*cfb92d14SAndroid Build Coastguard Worker"""str: Thread network name""" 55*cfb92d14SAndroid Build Coastguard Worker 56*cfb92d14SAndroid Build Coastguard WorkerTHREAD_EXTPANID = '000db80000000000' 57*cfb92d14SAndroid Build Coastguard Worker"""str: Thread extended PAN ID""" 58*cfb92d14SAndroid Build Coastguard Worker 59*cfb92d14SAndroid Build Coastguard WorkerTHREAD_CHILD_TIMEOUT = 0 60*cfb92d14SAndroid Build Coastguard Worker"""int: Child timeout in seconds. Set to 0 to use Harness's default value.""" 61*cfb92d14SAndroid Build Coastguard Worker 62*cfb92d14SAndroid Build Coastguard WorkerTHREAD_SED_POLLING_INTERVAL = 0 63*cfb92d14SAndroid Build Coastguard Worker"""int: SED polling interval in seconds. Set to 0 to use Harness's default value.""" 64*cfb92d14SAndroid Build Coastguard Worker 65*cfb92d14SAndroid Build Coastguard WorkerHARNESS_HOME = 'C:\\GRL\\Thread1.1' 66*cfb92d14SAndroid Build Coastguard Worker"""str: Harness installation path, e.g. 'C:\\GRL\\Thread1.1'""" 67*cfb92d14SAndroid Build Coastguard Worker 68*cfb92d14SAndroid Build Coastguard WorkerHARNESS_URL = 'http://127.0.0.1:8000' 69*cfb92d14SAndroid Build Coastguard Worker"""str: Harness front-end url""" 70*cfb92d14SAndroid Build Coastguard Worker 71*cfb92d14SAndroid Build Coastguard WorkerTESTER_NAME = 'Thread Open' 72*cfb92d14SAndroid Build Coastguard Worker"""str: Who are you""" 73*cfb92d14SAndroid Build Coastguard Worker 74*cfb92d14SAndroid Build Coastguard WorkerTESTER_REMARKS = 'OpenThread is great' 75*cfb92d14SAndroid Build Coastguard Worker"""str: Any comments in the final PDF""" 76*cfb92d14SAndroid Build Coastguard Worker 77*cfb92d14SAndroid Build Coastguard WorkerGOLDEN_DEVICES = [] 78*cfb92d14SAndroid Build Coastguard Worker"""[(str, str)]: golden device list. 79*cfb92d14SAndroid Build Coastguard WorkerIt is a port and vendor pair list like [('COM1', 'OpenThread'), ('COM2', 'ARM')] for over-the-air golden devices 80*cfb92d14SAndroid Build Coastguard Workerconnected to Windows. For OpenThread golden devices, ser2net is also supported by using IP:PORT as the port 81*cfb92d14SAndroid Build Coastguard Workerlike ('192.168.1.2:5001', 'OpenThread'). 82*cfb92d14SAndroid Build Coastguard Worker""" 83*cfb92d14SAndroid Build Coastguard Worker 84*cfb92d14SAndroid Build Coastguard WorkerSHIELD_GOLDEN_DEVICES = [] 85*cfb92d14SAndroid Build Coastguard Worker"""[(str, str)]: shielded golden device list. 86*cfb92d14SAndroid Build Coastguard WorkerIt is a port and vendor pair list like [('COM1', 'OpenThread'), ('COM2', 'ARM')] for shielded golden devices 87*cfb92d14SAndroid Build Coastguard Workerconnected to Windows. For OpenThread golden devices, ser2net is also supported by using IP:PORT as the port 88*cfb92d14SAndroid Build Coastguard Workerlike ('192.168.1.2:5001', 'OpenThread'). 89*cfb92d14SAndroid Build Coastguard Worker 90*cfb92d14SAndroid Build Coastguard WorkerFor current topology, maximal common Leader and Commissioner devices for case 9.2.9 and 9.2.10 should be put 91*cfb92d14SAndroid Build Coastguard Workerinto the RF-box besides DUT2_DEVICE. 92*cfb92d14SAndroid Build Coastguard Worker 93*cfb92d14SAndroid Build Coastguard WorkerExample for CV testbed, 2 conformance devices should be put into the RF-box and listed here. 94*cfb92d14SAndroid Build Coastguard Worker 95*cfb92d14SAndroid Build Coastguard WorkerExample for IV testbed using TopologyConfig_20180907b.txt, 1 OpenThread, 1 ARM and 1 SiLabs devices should be 96*cfb92d14SAndroid Build Coastguard Workerput into the RF-box and listed here. 97*cfb92d14SAndroid Build Coastguard Worker 98*cfb92d14SAndroid Build Coastguard WorkerExample for IV testbed using TopologyConfig_20180907cK.txt, 1 OpenThread and 2 ARM devices should be put into 99*cfb92d14SAndroid Build Coastguard Workerthe RF-box and listed here. 100*cfb92d14SAndroid Build Coastguard Worker 101*cfb92d14SAndroid Build Coastguard Worker""" 102*cfb92d14SAndroid Build Coastguard Worker 103*cfb92d14SAndroid Build Coastguard WorkerMIXED_DEVICE_TYPE = True 104*cfb92d14SAndroid Build Coastguard Workerr"""bool: Whether golden devices are mixed-type. Must put 105*cfb92d14SAndroid Build Coastguard Worker TopologyConfig.txt under 106*cfb92d14SAndroid Build Coastguard Worker HARNESS_HOME\Thread_Harness\TestScripts before testing if True 107*cfb92d14SAndroid Build Coastguard Worker""" 108*cfb92d14SAndroid Build Coastguard Worker 109*cfb92d14SAndroid Build Coastguard WorkerOUTPUT_PATH = '.\\output' 110*cfb92d14SAndroid Build Coastguard Worker"""str: Path to store results and logs, MUST be writable.""" 111*cfb92d14SAndroid Build Coastguard Worker 112*cfb92d14SAndroid Build Coastguard WorkerSHIELD_SIMULATION = False 113*cfb92d14SAndroid Build Coastguard Worker"""bool: whether to simulate RF shield by changing channel""" 114*cfb92d14SAndroid Build Coastguard Worker 115*cfb92d14SAndroid Build Coastguard WorkerPDU_CONTROLLER_TYPE = None 116*cfb92d14SAndroid Build Coastguard Worker"""str: Type of connected PDU controller. 117*cfb92d14SAndroid Build Coastguard Worker 118*cfb92d14SAndroid Build Coastguard WorkerKeep this None if no PDU controller available. 119*cfb92d14SAndroid Build Coastguard Worker 120*cfb92d14SAndroid Build Coastguard WorkerTypes of supported PDU controllers: 121*cfb92d14SAndroid Build Coastguard Worker - None - when no PDU controller connected 122*cfb92d14SAndroid Build Coastguard Worker - 'APC_PDU_CONTROLLER' - when APC PDU controller connected 123*cfb92d14SAndroid Build Coastguard Worker - 'NORDIC_BOARD_PDU_CONTOLLER' - when Nordic boards PDU controller connected 124*cfb92d14SAndroid Build Coastguard Worker - 'IP_POWER_SOCKET_PDU_CONTROLLER' - when IP Power Socket 5G10A connected 125*cfb92d14SAndroid Build Coastguard Worker - 'EATON_PDU_CONTROLLER' - when EATON PDU controller connected 126*cfb92d14SAndroid Build Coastguard Worker""" 127*cfb92d14SAndroid Build Coastguard Worker 128*cfb92d14SAndroid Build Coastguard WorkerPDU_CONTROLLER_OPEN_PARAMS = {'port': 23, 'ip': '127.0.0.1'} 129*cfb92d14SAndroid Build Coastguard Worker"""dict: Parameters pass to the "open" method of PDU controller. 130*cfb92d14SAndroid Build Coastguard Worker 131*cfb92d14SAndroid Build Coastguard WorkerExample parameters for the 'APC_PDU_CONTROLLER': 132*cfb92d14SAndroid Build Coastguard Worker {'port': 23, 'ip': '127.0.0.1'} 133*cfb92d14SAndroid Build Coastguard Worker 134*cfb92d14SAndroid Build Coastguard WorkerExample parameters for the 'NORDIC_BOARD_PDU_CONTOLLER': 135*cfb92d14SAndroid Build Coastguard Worker {} - empty dictionary 136*cfb92d14SAndroid Build Coastguard Worker 137*cfb92d14SAndroid Build Coastguard WorkerExample parameters for the 'IP_POWER_SOCKET_PDU_CONTROLLER': 138*cfb92d14SAndroid Build Coastguard Worker {'user': 'user', 'pass': 'pass', 'ip': '127.0.0.1'} 139*cfb92d14SAndroid Build Coastguard Worker""" 140*cfb92d14SAndroid Build Coastguard Worker 141*cfb92d14SAndroid Build Coastguard WorkerPDU_CONTROLLER_REBOOT_PARAMS = {'outlet': 1} 142*cfb92d14SAndroid Build Coastguard Worker"""dict: Parameters pass to the "reboot" method of PDU controller. 143*cfb92d14SAndroid Build Coastguard Worker 144*cfb92d14SAndroid Build Coastguard WorkerExample parameters for the 'APC_PDU_CONTROLLER': 145*cfb92d14SAndroid Build Coastguard Worker {'outlet': 1} 146*cfb92d14SAndroid Build Coastguard Worker 147*cfb92d14SAndroid Build Coastguard WorkerExample parameters for the 'NORDIC_BOARD_PDU_CONTOLLER': 148*cfb92d14SAndroid Build Coastguard Worker {'boards_serial_numbers': ('12345123', ...)} 149*cfb92d14SAndroid Build Coastguard Worker 150*cfb92d14SAndroid Build Coastguard WorkerExample parameters for the 'IP_POWER_SOCKET_PDU_CONTROLLER': 151*cfb92d14SAndroid Build Coastguard Worker {'sockets': [0, 1]} 152*cfb92d14SAndroid Build Coastguard WorkerExample parameters for the 'EATON_PDU_CONTROLLER': 153*cfb92d14SAndroid Build Coastguard Worker {'ip': '127.0.0.1'} 154*cfb92d14SAndroid Build Coastguard Worker""" 155*cfb92d14SAndroid Build Coastguard Worker 156*cfb92d14SAndroid Build Coastguard WorkerSHIELD_CONTROLLER_TYPE = None 157*cfb92d14SAndroid Build Coastguard Worker"""str: Type of connected RF Shield controller. 158*cfb92d14SAndroid Build Coastguard Worker 159*cfb92d14SAndroid Build Coastguard WorkerKeep this None if no RF Shield controller available. 160*cfb92d14SAndroid Build Coastguard Worker 161*cfb92d14SAndroid Build Coastguard WorkerTypes of supported RF Shield controllers: 162*cfb92d14SAndroid Build Coastguard Worker - None - when no RF Shield controller connected 163*cfb92d14SAndroid Build Coastguard Worker - 'RF_SWITCH' - when RF Switch connected 164*cfb92d14SAndroid Build Coastguard Worker""" 165*cfb92d14SAndroid Build Coastguard Worker 166*cfb92d14SAndroid Build Coastguard WorkerSHIELD_CONTROLLER_PARAMS = None 167*cfb92d14SAndroid Build Coastguard Worker"""dict: Parameters passed to the "__init__" method of RF Shield controller. 168*cfb92d14SAndroid Build Coastguard Worker 169*cfb92d14SAndroid Build Coastguard WorkerExample parameters for the 'RF_SWITCH': 170*cfb92d14SAndroid Build Coastguard Worker {'channel': 200, 'port': 'COM50'} 171*cfb92d14SAndroid Build Coastguard Worker""" 172