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