Skip to content

Commit

Permalink
Device updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Oghenefego Ahia authored and Oghenefego Ahia committed Dec 17, 2016
1 parent ee84a14 commit 156ac39
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
18 changes: 10 additions & 8 deletions device.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ def __init__(self, deviceID, hwTier, eventsPerSec, location):
def getSpecsForGame(game):
pass

def requestResend():
pass

def sendPacket():
pass
packet = Packet((5,50), , deviceID)

def run():
sendPacket()




class OculusRift(Device):
Expand All @@ -31,14 +33,14 @@ class PlayStationVR(Device):
def __init__(self, deviceID, hwTier, eventsPerSec, location):
super(PlayStationVR, self).__init__(deviceID, 120, eventsPerSec, location)

class GearVR(Device):
def __init__(self, deviceID, hwTier, eventsPerSec, location):
super(GearVR, self).__init__(deviceID, 60, eventsPerSec, location)

class LG360VR(Device):
def __init__(self, deviceID, hwTier, eventsPerSec, location):
super(LG360VR, self).__init__(deviceID, 120, eventsPerSec, location)

class GearVR(Device):
def __init__(self, deviceID, hwTier, eventsPerSec, location):
super(GearVR, self).__init__(deviceID, 60, eventsPerSec, location)

class VisusVR(Device):
def __init__(self, deviceID, hwTier, eventsPerSec, location):
super(VisusVR, self).__init__(deviceID, 60, eventsPerSec, location)
Expand Down
9 changes: 6 additions & 3 deletions packet.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@

class Packet(object):

def __init__(self, packet_id, event, timestamp, receiverAddress, senderAddress):
def __init__(self, position, timestamp, receiverAddress, senderAddress):
self._init_packet_id()
self.event = event
self.timestamp = timestamp
self.position = position
self.receiverAddress = receiverAddress
self.senderAddress = senderAddress

def _init_packet_id(self):
self.packet_id = uuid.uuid4() # generate a random UUID
self.packet_id = uuid.uuid4() # generate a random UUID

@property
def packet_id(self):
return self.packet_id

0 comments on commit 156ac39

Please sign in to comment.