Ejemplo n.º 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
Ejemplo n.º 2
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