Enum TraitValueKind
- All Implemented Interfaces:
Comparable<TraitValueKind>
What sort of value a Trait carries, and therefore which
TraitValue getter is the one that works.
There is deliberately no TLV
HomeKit characteristics can carry TLV8 blobs, which is how accessory
vendors ship extensions outside the published characteristic set. Those
have no portable meaning -- decoding one requires the vendor's own schema,
and there is nothing on the Matter side to map them to. Exposing a byte
array here would look like a capability and be an invitation to write
iOS-only code inside a cross-platform API. A trait whose platform value is
TLV8 is simply not in the Trait table.
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionTrue or false.A measured quantity with aTraitUnit.One of a fixed set, carried as an ordinal into one of this package's domain enums --LockState,HeatingCoolingMode,AirQualityLeveland the rest.A whole number with no unit.Free text. -
Method Summary
Modifier and TypeMethodDescriptionstatic TraitValueKindReturns the enum constant of this type with the specified name.static TraitValueKind[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class Enum
clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf
-
Enum Constant Details
-
BOOLEAN
True or false. Read withTraitValue.getBoolean(). -
INT
A whole number with no unit. Read withTraitValue.getInt(). -
DOUBLE
A measured quantity with aTraitUnit. Read withTraitValue.getDouble(TraitUnit), which makes you name the unit you expect. -
STRING
Free text. Read withTraitValue.getString(). -
ENUM
One of a fixed set, carried as an ordinal into one of this package's domain enums --LockState,HeatingCoolingMode,AirQualityLeveland the rest. Read it through that enum's own lookup rather than throughTraitValue.getEnumOrdinal(), which exists for the codec.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-