Changes between Version 10 and Version 11 of DSC/zdc_framework


Ignore:
Timestamp:
Jul 17, 2013, 7:11:28 PM (11 years ago)
Author:
seskar
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • DSC/zdc_framework

    v10 v11  
    2323Please note that idb2 and 1700000000 are provided merely for illustration purposes and that the teams must allow for the values passed to be entered by the evaluators. Finally, no modifications to this execution format is allowed, and no additional fields will be used during evaluation.
    2424
    25 Teams should also implement their radios such that packets are drawn from port 5123, while packets are delivered to port 5125. An illustration of this can be seen in the Python code '''here'''.
     25Teams should also implement their radios such that packets are drawn from port 5123, while packets are delivered to port 5125. An illustration of this can be seen in the Python code in the table below:
    2626
     27||= Transmitter =||= Receiver =||
     28|--------------------------------------------------------
     29{{{#!td style="border: 0px; font-size: 90%"
     30  {{{
     31class dsc_pkt_src(object):
     32    def __init__(self, server, port=5123 ):
     33        self.pkt_size = 1440 # 1440 bytes of data 
     34        self.pkt_server_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     35        self.pkt_server_socket.connect((server,port))
     36        self.MESSAGE = struct.pack('!l', self.pkt_size)
     37        self.pkt_server_socket.send(self.MESSAGE)
     38
     39    def read(self):
     40           try:
     41              data = self.pkt_server_socket.recv(self.pkt_size)
     42           except socket.error:
     43              print "Connection to packet server closed"
     44              return ''
     45           self.pkt_server_socket.send(self.MESSAGE)
     46        return data
     47  }}}
     48}}}
     49{{{#!td style="border: 0px; font-size: 90%"
     50  {{{
     51class dsc_pkt_sink(object):   
     52      def __init__(self, server, port=5125):       
     53          self.pkt_sink_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
     54          self.pkt_sink_socket.connect((server,port))
     55
     56      def send(self, payload):
     57          try:
     58             self.pkt_sink_socket.recv(4)
     59             self.pkt_sink_socket.send(payload)
     60          except socket.error:
     61             print "Connection to packet sink closed"
     62  }}}
     63}}}
     64
     65Teams are also required to label their image with the image name they intend to use for submission stored in file named '''/.orbit_image''' on the root of the filesystem. For example, if the team itends to submit image with image name '''orbit-bot.ndz''' the /.orbit_image shoudl contain '''orbit-bot'''.
    2766
    2867== Setting up the arena ==