source: ReferenceDesigns/w3_802.11/python/wlan_exp_platform_w3/__init__.py

Last change on this file was 6320, checked in by chunter, 5 years ago

1.8.0 release wlan-exp

File size: 1.2 KB
Line 
1import wlan_exp.platform as wlan_exp_platform
2from wlan_exp.info import InfoStruct
3
4# Define the WARP v3 platform node info struct - must match the typedef
5#  in w3_high.c. Struct field defs use the format defined for InfoStructs
6#  in wlan_exp.info.py
7_w3_node_info_flds = [('fpga_dna',              'Q', 'uint64', 'Virtex-6 FPGA DNA value'),
8                      ('max_tx_power_dbm', 'b', 'int8',   'RF interface maximum Tx power'),
9                      ('min_tx_power_dbm', 'b', 'int8',   'RF interface minimum Tx power')]
10
11_w3_node_info = InfoStruct(field_defs=_w3_node_info_flds)
12
13# Define a getter for the platform node info format
14#  The current format does not depend on the platform_config value
15def _get_node_info_fmt(platform_config=None):
16    return _w3_node_info
17
18w3_platform = wlan_exp_platform.WlanExpPlatform(
19    name = 'Mango WARP v3', 
20    platform_id = 1,
21    sn_regexp = r'[Ww]3-a-(?P<sn>\d+)',
22    sn_str_fmt = 'W3-a-{0:05}'
23)
24
25# Override the default node methods for platform-specific behavior
26#  TODO: these overrides should really be method overrides in a subclass
27w3_platform.get_node_info_format = _get_node_info_fmt
28
29wlan_exp_platform.register_platform(w3_platform)
Note: See TracBrowser for help on using the repository browser.