Changes between Version 3 and Version 4 of GEC16Agenda/WiMAX-Tutorial/Coop/02


Ignore:
Timestamp:
03/20/13 17:07:05 (11 years ago)
Author:
Fraida Fund
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC16Agenda/WiMAX-Tutorial/Coop/02

    v3 v4  
    1212{{{
    1313#!python
    14 #!/usr/bin/python
     14from oml4py import OMLBase
     15
     16class CoopShim(BaseShim):
     17
     18  coop = {}
     19
     20  coop['oml'] = OMLBase("coopshim","coopshim2","n3","tcp:omfserver-witest.poly.edu:3003")
     21  coop['oml'].addmp("req", "id:long total:long")
     22  coop['oml'].addmp("recv", "id:long total:long source:string")
     23  coop['oml'].addmp("sent", "id:long total:long dest:string")
     24  coop['oml'].start()
     25
     26
     27  ...
     28
     29  self.coop['oml'].inject("req", [pkt_id, self.coop['n_req']])
     30
     31  ...
     32
     33  self.coop['oml'].inject("recv", [pkt_id, self.coop['n_recv'], str(srcip)])
     34
     35  ...
     36
     37  self.coop['oml'].inject("sent", [str(pkt_id), self.coop['n_sent'], str(srcip)])
     38
    1539}}}
    1640