Changes between Version 15 and Version 16 of WARPnet1/BuildClientScripts


Ignore:
Timestamp:
Jun 25, 2010, 2:16:20 PM (14 years ago)
Author:
sgupta
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WARPnet1/BuildClientScripts

    v15 v16  
    2626        int pktGen_period;
    2727        int pktGen_length;
    28         int pktGen_numPackets;
    2928} warpnetControl;
    3029
     
    5150        packetGeneratorPeriod = 0
    5251        packetGeneratorLength = 0
    53         packetGeneratorNumPackets = 0
    5452       
    5553        def __init__(self, logger=None):
     
    6361                self.packetGeneratorPeriod = 10
    6462                self.packetGeneratorLength = 1300
    65                 self.packetGeneratorNumPackets = 1000
    6663       
    6764        def prepToSend(self, nodeID):
    6865                self.updateDone = False
    69                 return struct.pack('!6BH3I', self.structID, nodeID, self.txPower, self.channel, self.modOrderHeader, \
    70                                 self.modOrderPayload, self.reserved, self.packetGeneratorPeriod, self.packetGeneratorLength, self.packetGeneratorNumPackets)
     66                return struct.pack('!6BH2I', self.structID, nodeID, self.txPower, self.channel, self.modOrderHeader, \
     67                                self.modOrderPayload, self.reserved, self.packetGeneratorPeriod, self.packetGeneratorLength)
    7168               
    7269        def updateFromNode(self, rawData, pcapts):
     
    7572}}}
    7673
    77 The `prepToSend` function creates the raw data that is seen by `warpnet.c` in the FPGA. It creates a byte packed data of 6 bytes (6B), 1 short (H) and 3 ints (3I). This is exactly what the node is expecting. A appropriate response from the node is a `warpnetACK` which `updateFromNode` parses in the python file.
     74The `prepToSend` function creates the raw data that is seen by `warpnet.c` in the FPGA. It creates a byte packed data of 6 bytes (6B), 1 short (H) and 2 ints (2I). This is exactly what the node is expecting. A appropriate response from the node is a `warpnetACK` which `updateFromNode` parses in the python file.
    7875
    7976For a struct that is requesting data the raw data sent would be a `warpnetRequest` struct and expect a response of the appropriate type.