Example #1
0
 def toActuatorDataFromJson(self,jsonData):
     adDict = json.loads(jsonData)
     
     #print(" decode [pre] --> " + str(adDict))
     
     ad              = ActuatorData()
     ad.Name         = adDict['name']
     ad.timeStamp    = adDict['timeStamp']
     ad.Command      = adDict['command']
     ad.Value        = adDict['curValue']
     ad.Value        = adDict['value']
     ad.timeStamp    = adDict['timestamp']
     
     #print(" decode [post] --> " + str(ad))
     
     return ad
Example #2
0
 def toActuatorDataFromJson(self, jsonData):
     adDict = json.loads(jsonData)
     ad = ActuatorData()
     ad.name = adDict['name']
     ad.command = adDict['command']
     ad.val = adDict['val']
     ad.stateData = adDict['stateData']
     ad.timeStamp = adDict['timeStamp']
     
     return ad
Example #3
0
 def toActuatorDataFromJson2(self,jsonData):
     adDict = json.loads(jsonData)
     
     ad              = ActuatorData()
     ad.Value        = adDict['value']
     ad.timeStamp    = adDict['timestamp']
     
     #print(" decode [post] --> " + str(ad))
     
     return ad
 def jsonToactuator(self, jsonData):
     adDict = json.loads(jsonData)
     ad = ActuatorData()
     ad.name = adDict['name']
     ad.timeStamp = adDict['timeStamp']
     ad.hasError = adDict['hasError']
     ad.command = adDict['command']
     ad.errCode = adDict['errCode']
     ad.statusCode = adDict['statusCode']
     ad.stateData = adDict['stateData']
     ad.curValue = adDict['curValue']
     return ad
Example #5
0
    def jsonToActuatorData(self, jsonData):
        adDict = json.loads(jsonData)

        #print(" decode [pre] --> " + str(adDict))

        ad = ActuatorData()
        ad.name = adDict['name']
        ad.timeStamp = adDict['timeStamp']
        ad.hasError = adDict['hasError']
        ad.command = adDict['command']
        ad.errCode = adDict['errCode']
        ad.statusCode = adDict['statusCode']
        ad.stateData = adDict['stateData']
        ad.curValue = adDict['curValue']

        #print(" decode [post] --> " + str(ad))

        return ad