Exemplo n.º 1
0
	def decode_extra(self, packet, bbuff):
		records = unpack_array(bbuff, 'byte', packet.data['record_count']*3)
		i = 0
		packet.data["blocks"] = []
		while i < packet.data['record_count']*3:
			packet.data["blocks"].append(dict(zip(('x','y','z'), records[i:i+3])))
			i+=3
		
		del packet.data["record_count"]
		
		for i in range(3):
			packet.data["offset_%d" % i] = unpack(bbuff, 'float')
Exemplo n.º 2
0
	def decode_extra(self, packet, bbuff):
		l = unpack(bbuff, 'short')
		packet.data['shared_secret'] = unpack_array(bbuff, 'ubyte', l)
		l = unpack(bbuff, 'short')
		packet.data['verify_token'] = unpack_array(bbuff, 'ubyte', l)
Exemplo n.º 3
0
	def decode_extra(self, packet, bbuff):
		packet.data[self.array_name] = unpack_array(bbuff, self.data_type, packet.data['data_size'])
		del packet.data["data_size"]