def publish(self, topic, data): self.pub.publish( 'thb.{}.{}'.format(self.node, topic), Endpoint.encode(data, Endpoint.FMT_RAW_JSON), )
def gwrite(self, tag, data): log.debug('GAME_WRITE: %s', repr([tag, data])) encoded = Endpoint.encode(data) self.gdhistory.append([tag, json.loads(encoded)])
def gwrite(self, tag, data): log.debug('GAME_WRITE: %s', repr([tag, data])) encoded = Endpoint.encode(data) self.gdhistory.append([tag, Endpoint.decode(encoded)])