case DataTypes.BINARY:
boolean bool = b.getBoolean();
dataValue = new BinaryValue(bool);
break;
case DataTypes.IMAGE:
throw new ShouldNeverHappenException("Images are not supported");
case DataTypes.MULTISTATE:
int i = b.getInt();
dataValue = new MultistateValue(i);
break;
case DataTypes.NUMERIC:
double d = b.getDouble();
dataValue = new NumericValue(d);
break;
default:
throw new ShouldNeverHappenException("Data type of " + dataType + " is not supported");
}
//Get the annotation
String annotation = b.getString();
if(annotation != null){
try{
return new AnnotatedPointValueTime(dataValue, ts, TranslatableMessage.deserialize(annotation));
}catch(Exception e){
throw new ShouldNeverHappenException(e);
}
}else{
return new PointValueTime(dataValue, ts);
}
}