EnumAdapter

class EnumAdapter<RUNTIME : ClusterEnum> : FieldAdapter


Generated Enum should Implement Cluster Enum and then this Enum Adapter can be constructed once for each enum and stored as in or as a companion for use in reading writing adapters

Summary

Public constructors

<RUNTIME : ClusterEnum> EnumAdapter(values: Array<RUNTIME>)

Public functions

open ULong
toRaw(value: RUNTIME)

Converts the runtime type back to a number

open RUNTIME
toRuntime(value: ULong)

Converts the numeric value to the Enum

Public properties

open RUNTIME

Public constructors

EnumAdapter

<RUNTIME : ClusterEnum> EnumAdapter(values: Array<RUNTIME>)

Public functions

toRaw

open fun toRaw(value: RUNTIME): ULong

Converts the runtime type back to a number

toRuntime

open fun toRuntime(value: ULong): RUNTIME

Converts the numeric value to the Enum

Public properties

defaultValue

open val defaultValue: RUNTIME