Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(9)  |  Call(6)  |  Derive(0)  |  Import(3)

src/p/y/pyogp.lib.base-0.1/pyogp/lib/base/event_queue.py   pyogp.lib.base(Download)
from pyogp.lib.base.message.message_handler import MessageHandler
from pyogp.lib.base.message.message import Message, Block, Variable
from pyogp.lib.base.message.template_dict import TemplateDictionary
 
# initialize logging
 
        # enables proper packet parsing in event queue responses
        self.template_dict = TemplateDictionary()
        self.current_template = None
 

src/p/y/pyogp.lib.base-0.1/pyogp/lib/base/message/tests/test_template_parser.py   pyogp.lib.base(Download)
from pyogp.lib.base.message.data import msg_tmpl
from pyogp.lib.base.message.template import MessageTemplate, MessageTemplateBlock, MessageTemplateVariable
from pyogp.lib.base.message.template_dict import TemplateDictionary
from pyogp.lib.base.message.template_parser import MessageTemplateParser
from pyogp.lib.base.message.msgtypes import MsgFrequency, MsgTrust, MsgEncoding, MsgDeprecation, MsgBlockType, MsgType
    def test_create_dictionary(self):
        try:
            msg_dict = TemplateDictionary(None)
            assert False, "Template dictionary fail case list==None not caught"
        except:
            assert True
 
    def test_get_packet(self):
        msg_dict = TemplateDictionary(self.template_list)
    def test_get_packet_pair(self):
        msg_dict = TemplateDictionary(self.template_list)
        packet = msg_dict.get_template_by_pair('Medium', 8)
        assert packet.name == 'ConfirmEnableSimulator', "Frequency-Number pair resulting in incorrect packet"        
 
    def setUp(self):
        self.template_file = msg_tmpl
        self.parser = MessageTemplateParser(self.template_file)
        self.msg_dict = TemplateDictionary(self.parser.message_templates)
 

src/p/y/pyogp.lib.base-0.1/pyogp/lib/base/message/tests/test_packetdata.py   pyogp.lib.base(Download)
from pyogp.lib.base.message.udpdeserializer import UDPMessageDeserializer
from pyogp.lib.base.message.template_parser import MessageTemplateParser
from pyogp.lib.base.message.template_dict import TemplateDictionary
 
AGENT_DATA_UPDATE="C0 00 00 00 02 00 FF FF 01 83 1C 8A 77 67 E3 7B 42 2E AF B3 85 09 31 97 CA D1 03 4A 42 00 01 06 4B 72 61 66 74 00 01 01 00 1A"
    def setUp(self):
        self.template_file = msg_tmpl
        parser = MessageTemplateParser(self.template_file)
        self.template_list = parser.message_templates        
        self.template_dict = TemplateDictionary(self.template_list)