def update(self, delivery, state=None): if state: delivery.local.data = [self.id, Described(ulong(state), [])] delivery.update(0x34)
def __init__(self, value, name='selector'): super(Selector, self).__init__({symbol(name): Described(symbol('apache.org:selector-filter:string'), value)})
def _send_ctrl(self, descriptor, value): delivery = self.txn_ctrl.send(Message(body=Described(descriptor, value))) delivery.transaction = self return delivery