DeviceFrame.py
Go to the documentation of this file.
00001 __author__ = 'tom1231'
00002 import json
00003 
00004 SERVO = 1
00005 BATTERY = 2
00006 SWITCH = 3
00007 IMU = 4
00008 PPM = 5
00009 GPS = 6
00010 RELAY = 7
00011 URF = 8
00012 CLOSE_LOP_ONE = 9
00013 CLOSE_LOP_TWO = 10
00014 OPEN_LOP = 11
00015 DIFF_CLOSE = 12
00016 DIFF_OPEN = 13
00017 EX_DEV = 14
00018 HOKUYO = 15
00019 OPRNNI = 16
00020 USBCAM = 17
00021 DIFF_CLOSE_FOUR = 18
00022 ROBOT_MODEL = 19
00023 SLAM = 20
00024 Keyboard = 21
00025 PPMReader = 22
00026 JOYSTICK = 23
00027 SMOOTHER = 24
00028 LAUNCH = 25
00029 NODE = 26
00030 EMERGENCY_SWITCH = 27
00031 
00032 
00033 class DeviceFrame():
00034     def __init__(self, devType, frame, data=None):
00035         self._devData = dict()
00036         self._otherDevs = data
00037         self._type = devType
00038         self._frame = frame
00039         self._isValid = False
00040 
00041         self._toSave = True
00042 
00043     def nameIsValid(self):
00044         for dev in self._otherDevs:
00045             if dev != self and dev.getName() == self.getName(): return False
00046         return True
00047 
00048     def getDevType(self):
00049         return self._type
00050 
00051     def getDevData(self):
00052         return self._devData
00053 
00054     def setType(self, devType):
00055         self._type = devType
00056 
00057     def isToSave(self):
00058         return self._toSave
00059 
00060     def setToSave(self, val):
00061         self._toSave = val
00062 
00063     def saveToFile(self, file):
00064         raise NotImplementedError
00065 
00066     def add(self):
00067         raise NotImplementedError
00068 
00069     def showDetails(self, items=None):
00070         raise NotImplementedError
00071 
00072     def getName(self):
00073         raise NotImplementedError
00074 
00075     def printDetails(self):
00076         raise NotImplementedError
00077 
00078     def isValid(self):
00079         return self._isValid
00080 
00081     def toDict(self):
00082         raise NotImplementedError
00083 
00084     def fromDict(self, data):
00085         raise NotImplementedError
00086 
00087 
00088 
00089 


ric_board
Author(s): RoboTiCan
autogenerated on Fri Oct 27 2017 03:02:30