示例#1
0
    def __init__(self):
        Message.__init__(self)
        self.request_id_comp = IntComp()
        self.reason_comp = StringComp()

        self.add_component(self.request_id_comp)
        self.add_component(self.reason_comp)
示例#2
0
    def __init__(self, request_id, agent_id):
        Message.__init__(self)
        self.request_id_comp = IntComp()
        self.agent_id_comp = EntityIDComp()

        self.add_component(self.request_id_comp)
        self.add_component(self.agent_id_comp)

        self.set_message(request_id, agent_id)
示例#3
0
 def __init__(self):
     Command.__init__(self)
     self.path = EntityIDListComp()
     self.x = IntComp()
     self.y = IntComp()
     self.add_component(self.path)
     self.add_component(self.x)
     self.add_component(self.y)
     self.x.set_value(-1)
     self.y.set_value(-1)
示例#4
0
    def __init__(self):
        Message.__init__(self)
        self.request_id_comp = IntComp()
        self.version_comp = IntComp()
        self.agent_name_comp = StringComp()
        self.requested_entities_comp = StringListComp()

        self.add_component(self.request_id_comp)
        self.add_component(self.version_comp)
        self.add_component(self.agent_name_comp)
        self.add_component(self.requested_entities_comp)
示例#5
0
    def __init__(self):
        Message.__init__(self)
        self.agent_id = EntityIDComp()
        self.time = IntComp()
        self.updates = ChangeSetComp()
        self.hear = CommandListComp()

        self.add_component(self.agent_id)
        self.add_component(self.time)
        self.add_component(self.updates)
        self.add_component(self.hear)
示例#6
0
    def __init__(self):
        Message.__init__(self)
        self.request_id_comp = IntComp()
        self.agent_id_comp = EntityIDComp()
        self.world_comp = EntityListComp()
        self.config_comp = ConfigComp()

        self.add_component(self.request_id_comp)
        self.add_component(self.agent_id_comp)
        self.add_component(self.world_comp)
        self.add_component(self.config_comp)
示例#7
0
class AKMove(Command):
    urn = 'urn:rescuecore2.standard:message:move'

    def __init__(self):
        Command.__init__(self)
        self.path = EntityIDListComp()
        self.x = IntComp()
        self.y = IntComp()
        self.add_component(self.path)
        self.add_component(self.x)
        self.add_component(self.y)
        self.x.set_value(-1)
        self.y.set_value(-1)
示例#8
0
class KAConnectError(Message):
    urn = 'urn:rescuecore2:messages.control:ka_connect_error'

    def __init__(self):
        Message.__init__(self)
        self.request_id_comp = IntComp()
        self.reason_comp = StringComp()

        self.add_component(self.request_id_comp)
        self.add_component(self.reason_comp)

    def set_message(self, request_id, reason):
        self.request_id_comp.set_value(request_id)
        self.reason_comp.set_value(reason)
示例#9
0
class AKAcknowledge(Message):
    urn = 'urn:rescuecore2:messages.control:ak_acknowledge'

    def __init__(self, request_id, agent_id):
        Message.__init__(self)
        self.request_id_comp = IntComp()
        self.agent_id_comp = EntityIDComp()

        self.add_component(self.request_id_comp)
        self.add_component(self.agent_id_comp)

        self.set_message(request_id, agent_id)

    def set_message(self, request_id, agent_id):
        self.request_id_comp.set_value(request_id)
        self.agent_id_comp.set_value(agent_id)
示例#10
0
class KAConnectOK(Message):
    urn = 'urn:rescuecore2:messages.control:ka_connect_ok'

    def __init__(self):
        Message.__init__(self)
        self.request_id_comp = IntComp()
        self.agent_id_comp = EntityIDComp()
        self.world_comp = EntityListComp()
        self.config_comp = ConfigComp()

        self.add_component(self.request_id_comp)
        self.add_component(self.agent_id_comp)
        self.add_component(self.world_comp)
        self.add_component(self.config_comp)

    def set_message(self, request_id, agent_id, entities, config):
        self.request_id_comp.set_value(request_id)
        self.agent_id_comp.set_value(agent_id)
        self.world_comp.set_entities(entities)
        self.config_comp.set_config(config)
示例#11
0
class AKConnect(Message):
    urn = 'urn:rescuecore2:messages.control:ak_connect'

    def __init__(self):
        Message.__init__(self)
        self.request_id_comp = IntComp()
        self.version_comp = IntComp()
        self.agent_name_comp = StringComp()
        self.requested_entities_comp = StringListComp()

        self.add_component(self.request_id_comp)
        self.add_component(self.version_comp)
        self.add_component(self.agent_name_comp)
        self.add_component(self.requested_entities_comp)

    def set_message(self, request_id, version, agent_name,
                    requested_entity_types):
        self.request_id_comp.set_value(request_id)
        self.version_comp.set_value(version)
        self.agent_name_comp.set_value(agent_name)
        self.requested_entities_comp.set_value(requested_entity_types)
示例#12
0
class KASense(Message):
    urn = 'urn:rescuecore2:messages.control:ka_sense'

    def __init__(self):
        Message.__init__(self)
        self.agent_id = EntityIDComp()
        self.time = IntComp()
        self.updates = ChangeSetComp()
        self.hear = CommandListComp()

        self.add_component(self.agent_id)
        self.add_component(self.time)
        self.add_component(self.updates)
        self.add_component(self.hear)

    def get_change_set(self):
        return self.updates.get_change_set()

    def get_hearing(self):
        return self.hear.get_commands()

    def get_time(self):
        return self.time.get_value()
示例#13
0
 def __init__(self):
     Command.__init__(self)
     self.channel = IntComp()
     self.data = RawDataComp()
     self.add_component(self.channel)
     self.add_component(self.data)
示例#14
0
 def __init__(self):
     Command.__init__(self)
     self.x = IntComp()
     self.y = IntComp()
     self.add_component(self.x)
     self.add_component(self.y)
示例#15
0
 def __init__(self):
     Command.__init__(self)
     self.target = EntityIDComp()
     self.water = IntComp()
     self.add_component(self.target)
     self.add_component(self.water)
示例#16
0
 def __init__(self):
     Message.__init__(self)
     self.agent_id = EntityIDComp()
     self.time = IntComp()
     self.add_component(self.agent_id)
     self.add_component(self.time)