void client_ValueEvent(UmpMessageID msgID, int actorID, byte[] value) { string Ident = XAMUmpClientItem.CreateIdentifier(actorID, msgID, false); var item = VariableList.GetItem(Ident) as XAMUmpClientItem; if (item == null) { Trace("receive message actor <" + actorID + "> message ID <" + msgID + "> not found ", TracePrio.WARNING); return; } if (!item.IsReadAccess) { Trace("receive message <" + actorID + "> message ID <" + msgID + "> is write only ", TracePrio.WARNING); return; } switch (msgID) { case UmpMessageID.EditValue: int editValue = BitConverter.ToInt16(value, 0); base.Trace("ValueEvent '" + Ident + "' received edit value <" + editValue + ">", TracePrio.MESSAGE); item.SetValidReaded(editValue, "ok", DateTime.Now); item.IsInitialized = true; break; case UmpMessageID.I2C_Temperature: int temp = BitConverter.ToInt16(value, 0); byte valid = value[2]; if (valid > 0) { Trace("ValueEvent '" + Ident + "' received temperature <" + temp + ">", TracePrio.MESSAGE); item.SetValidReaded(temp, "ok", DateTime.Now); item.IsInitialized = true; } else { item.SetInvalidReaded(XAMCommon.PropertyQuality.Bad, "not valid <" + valid + ">"); } break; } }