Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
70 lines (46 sloc) 1.64 KB
import socket
import threading
import struct
import logging
class RemoteMeDataWriter:
def __init__(self):
self.__logger = logging.getLogger('remoteMe.RemoteMeData')
def writeInt8(self,value):
def writeUInt8(self, value):
data = bytearray(struct.calcsize(">b"))
struct.pack_into(">B", data, 0, value)
def writeInt16(self, value):
data = bytearray(struct.calcsize(">h"))
struct.pack_into(">h", data, 0, value)
def writeUInt16(self, value):
data = bytearray(struct.calcsize(">H"))
struct.pack_into(">H", data, 0, value)
def writeInt32(self, value):
data = bytearray(struct.calcsize(">i"))
struct.pack_into(">i", data, 0, value)
def writeUInt32(self, value):
data = bytearray(struct.calcsize(">I"))
struct.pack_into(">I", data, 0, value)
def writeString(self, value):
data = value.encode("utf-8")
def writeDouble(self, value):
data = bytearray(struct.calcsize(">d"))
struct.pack_into(">d", data, 0, value)
def writeData(self, data):
def getBytes(self):
def getBytesAsHexString(self):
return "".join("%02x " % b for b in
You can’t perform that action at this time.