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
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
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
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