Line | |
---|
1 | import wlan_exp.platform as wlan_exp_platform |
---|
2 | from 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 |
---|
15 | def _get_node_info_fmt(platform_config=None): |
---|
16 | return _w3_node_info |
---|
17 | |
---|
18 | w3_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 |
---|
27 | w3_platform.get_node_info_format = _get_node_info_fmt |
---|
28 | |
---|
29 | wlan_exp_platform.register_platform(w3_platform) |
---|
Note: See
TracBrowser
for help on using the repository browser.