Changes between Initial Version and Version 1 of WARPLab/Reference/NodesConfig


Ignore:
Timestamp:
May 3, 2013, 4:38:57 PM (11 years ago)
Author:
welsh
Comment:

Initial page

Legend:

Unmodified
Added
Removed
Modified
  • WARPLab/Reference/NodesConfig

    v1 v1  
     1[[TracNav(WARPLab7/TOC)]]
     2
     3= Nodes Config =
     4
     5  The Nodes Config utility allows a user greater flexibility when specifying the configuration information of a [wiki:WARPLab7/Reference/Architecture/Classes#Node wl_node] as part of the [wiki:WARPLab7/Reference/Utility#wl_initNodes wl_initNodes] setup process.  Please note that in order to use the wl_nodesConfig utility, the
     6
     7|| [[Image(wiki:GettingStarted/files:important.png,nolink,valign=middle)]] || wl_nodesConfig only works with WARP v3 hardware and the [wiki:HardwareUsersGuides/WARPv3/UserIO dip switches] must have a value of all '1's (ie 0xF) ||
     8
     9== wl_nodesConfig ==
     10File source: [browser:ResearchApps/PHY/WARPLAB/WARPLab7/M_Code_Reference/wl_nodesConfig.m wl_nodesConfig.m]
     11
     12
     13This function is the best way to create a [wiki:WARPLab7/Reference/Architecture/Classes#Node wl_node] information structure that can be used with [wiki:WARPLab7/Reference/Utility#wl_initNodes wl_initNodes].  When calling wl_nodesConfig, the user must specify two arguments:  1) a command and 2) a filename.  For example:
     14
     15{{{
     16nodesConfig = wl_nodesConfig('read', 'my_node_config_file.txt')
     17}}}
     18
     19There are two valid commands that can be passed to wl_nodesConfig:
     20
     211. 'validate'
     22
     23This command will parse the file specified by the filename and return either '1' if the input file is valid, or it will error out with a message specifying the issue with the input file.
     24
     25{{{
     26configFileValid = wl_nodesConfig('validate', 'my_node_config_to_be_validated.txt')
     27}}}
     28
     29
     302. 'read'
     31
     32This command will parse the file specified by the filename and return a vector of node information structures, one per line in the file, that can be used with [wiki:WARPLab7/Reference/Utility#wl_initNodes wl_initNodes].
     33
     34{{{
     35nodesConfig = wl_nodesConfig('read', 'my_node_config_file.txt')
     36nodes = wl_initNodes(nodesConfig)
     37}}}
     38
     39or
     40
     41{{{
     42nodes = wl_initNodes( wl_nodesConfig('read', 'my_node_config_file.txt') )
     43}}}
     44
     45
     46
     47
     48== Configuration File ==
     49
     50The configuration file for wl_nodesConfig must contain the following information:
     51
     521. '''serialNumber'''
     53
     54This is the WARP hardware serial number printed on your board:  W3-a-XXXXX, where XXXXX is your five digit serial number.
     55
     562. '''ID'''
     57
     58This is the [wiki:WARPLab7/Reference/Architecture/Classes#Node wl_node] ID that should be used for the node.  This node ID must be unique in the file.
     59
     603. '''ipAddress'''
     61
     62This is the IP address that you would like the WARP hardware to use, for example {{{10.0.0.105}}}.  This IP address must be unique in the file.
     63
     64
     65The configuration file can also contain optional information:
     66
     671. '''name'''
     68
     69This will be used as the text string when you query the {{{name}}} field of a [wiki:WARPLab7/Reference/Architecture/Classes#Node wl_node].
     70
     71The configuration file is also extensible so that users can add their own parameters that can be used to initial a [wiki:WARPLab7/Reference/Architecture/Classes#Node wl_node] as part of the [wiki:WARPLab7/Reference/Utility#wl_initNodes wl_initNodes] setup.
     72
     73
     74=== Configuration File Formatting Notes ===
     75
     761. In the configuration file {{{','}}} (comma) and {{{'\t'}}} (tab) are reserved characters and will be interpreted as the next field when parsing the file.  Putting in additional commas and tabs where not expected can result in an invalid file. 
     77
     782. All spaces, ie {{{' '}}}, are valid and are not removed from the field.
     79
     803. If you add in an optional field, then you must put the correct number of delimiters, ie {{{','}}}, to indicate that fields are not used
     81
     824. There should be no spaces in the field names of the header row
     83
     84
     85=== Example File ===
     86
     87This example file specifies a set of nodes with IP addresses.  To use this example, please update the file to use one line per WARP board and replace the serial number with the number that appears on your hardware.
     88
     89{{{
     90serialNumber,ID,ipAddress,name,
     91W3-a-XXXXX,10,10.0.0.25,Transmit Node
     92W3-a-YYYYY,20,10.0.0.50,Receive Node 1
     93W3-a-ZZZZZ,30,10.0.0.75,Receive Node 2
     94}}}
     95
     96
     97== Example Setup ==
     98
     99Coming soon ...
     100
     101
     102
     103
     104
     105
     106
     107
     108
     109