Changes between Version 8 and Version 9 of OFDMReferenceDesign/Applications/Characterization


Ignore:
Timestamp:
Jun 29, 2009, 11:29:54 AM (15 years ago)
Author:
rpl1
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OFDMReferenceDesign/Applications/Characterization

    v8 v9  
    2323=== OFDM Reference Design Code ===
    2424
    25 __Summary:__ The following extensions to the OFDM Reference Design expand node control by allowing a server to relay requests to warpnodes. The requests are sent as different struct types. These structs will set board parameters to certain values using Command and Traffic structs, and command (command structs) the board to stop and start transmissions, as well as request data (stat structs) about the transmission. This model places the boards in a state where data for wireless transmission is locally created instead of taken from the Ethernet.
     25__Summary:__ The following extensions to the OFDM Reference Design expand node control by allowing a server to relay requests to warpnodes. The requests are sent as different struct types. These structs will set board parameters to certain values using Command and Traffic structs, and command (command structs) the board to stop and start transmissions, as well as request data (stat structs) about the transmission. This model places the boards in a state where data for wireless transmission is locally created instead of taken from the Ethernet. The two complete codes for the modifications are the attached files csmaMac.c and warpnet_node2.c
    2626
    2727The development of creating an interactive warpnet control requires the introduction of new structure types for the warp platform
     
    340340
    341341=== Tcl Client Code ===
     342Summary: The Tcl Client automates control of warpnode parameters. The Tcl Client sends values to the server. Attached are two versions of the tcl client. The ''automated_client.tcl'', which loops through changing txpowers and modOrders with a set time interval, and the ''interactive_client.tcl'', which pauses before transmitting a request to start transmission on nodes, asks for a time interval or defaults to a user input for stopping the data transmission. To run a tcl program, open up a command line such as a terminal and type:
     343{{{
     344 tclsh filename.tcl
     345}}}
     346
     347
     348Initially, a few user specified global parameters needs to be set. This includes the filename for where statistics are written, the number of nodes, and information for connecting to the socket. In this set up, the dumb_server contains the IP address of 10.0.0.6 and connects through port 9090.
     349
     350{{{
     351set filename "PacketData.m"
     352set NumNodes 2;
     353set dumbServerIP 10.0.0.6
     354set dumbServerPort 9090
     355}}}
     356
     357
     358To main code for developing an automated experiment that writes statistic data to a file begins by connecting the socket with the dumb server and configuring the socket to automate flushing of the memory
     359
     360{{{
     361#Open a socket connection
     362set sock [socket $dumbServerIP $dumbServerPort]
     363
     364#Automate flushing of the socket
     365fconfigure $sock -buffering none -blocking 0
     366}}}
     367
     368Next a default time interval is set and an blank file $filename is created (clears the file if it contains data)
     369
     370{{{
     371set TimeInterval 100
     372;#Create Blank File
     373set fileID [open $filename "w"]
     374}}}
     375
     376A create a test for sweeping through txpowers would use a for loop that modifies the txpower value in the control structure.
     377
     378The following lists supported structures definitions and examples of how to use them:
     379
     380{{{
     381;# Control Struct: structType, nodeID, modOrder, txPower, coding, channel
     382set ControlStruct0 [list 50 0 4 63 3 9 ]
     383set ControlStruct1 [list 50 1 4 63 3 9 ]
     384
     385;# Traffic Struct: structType, nodeID, trafficMode 0 = RECEIVE 1 = TRANSMIT , reserved0, txInterval, txPacketLen, reserved1
     386set TrafficStruct0 [list 52 0 1 0 0 1470 0 ]
     387set TrafficStruct1 [list 52 1 1 0 0 1470 0 ]
     388
     389;# structType, nodeID is only relevant for ack on stop, cmdID, cmdParam
     390set CommandStructStart [list 51 0 102 0 ]
     391set CommandStructStop [list 51 0 103 0 ]
     392
     393;# structType, nodeID, cmdID, cmdParam
     394set CommandStructStats0 [list 51 0 104 0 ]
     395set CommandStructStats1 [list 51 1 104 0 ]
     396set CommandStructResetStats0 [list 51 0 97 0 ]
     397set CommandStructResetStats1 [list 51 1 97 0 ]
     398}}}
     399
     400The function ''senddata'' sends a struct to the dumb server. The first parameter is the struct to send. The second parameter specifies modes, such as requesting an ackPacket with ''$SendAck'' or statPacket from the server with ''$WriteStat.'' The default parameter requests nothing from the server.
     401
     402The following highlights a test for sweeping through txPowers from 0 to 63 while changing from QPSK to 16QAM:
     403
     404{{{
     405for {set power 0} {$power < 64} {incr power} {
     406        for {set mod 1} {$mod<3} {incr mod} { ;#set mod
     407       
     408#Send a Control Struct to node 0
     409senddata $sock [list 50 0 [expra  {$mod*2}] $power 3 9 ] $SendAck
     410#Send a Control Struct to node 1
     411senddata $sock [list 50 1 [expr {$mod*2}] $power 3 9 ] $SendAck
     412
     413#Send a Traffic Struct to node 0
     414senddata $sock [list 52 0 1 0 0 1470 0 ] $SendAck
     415#Send a Traffic Struct to node 1
     416senddata $sock [list 52 1 1 0 0 1470 0 ] $SendAck
     417
     418#Reset Statistics on nodes, sets everything to 0
     419senddata $sock $CommandStructResetStats0 $SendAck
     420senddata $sock $CommandStructResetStats1 $SendAck
     421
     422#Begin data transmission over the air
     423senddata $sock $CommandStructStart
     424after $TimeInterval
     425#Stop data tranmission over the air
     426senddata $sock $CommandStructStop $SendAck
     427
     428senddata $sock $CommandStructStats0 $WriteStat
     429senddata $sock $CommandStructStats1 $WriteStat
     430       
     431        }
     432}
     433}}}
     434
     435
     436The last step is to close the socket and exit the tcl script:
     437
     438{{{
     439close $sock
     440exit
     441}}}
     442
     443
     444
     445