new DeviceOperatingState(name, bitNumber)
Constructor.
Extends:
Parameters:
Name | Type | Description |
---|---|---|
name |
string | the name |
bitNumber |
number | the bit offset, starting from |
Extends
Members
-
code
-
Get the state code value.
-
name
-
Get the enum name.
- Inherited From:
- Overrides:
Methods
-
<static> enumValues()
-
Get the module:domain~DeviceOperatingStates values.
-
<static> forCode(code)
-
Get an enum for a code value.
Parameters:
Name Type Description code
number the code to look for
Returns:
the state, or
null
if not found- Type
- DeviceOperatingState
-
equals(value)
-
Test if a string is equal to this enum's name.
As long as enum values are consistently obtained from the module:util~Enum.enumValues array then enum instances can be compared with
===
. If unsure, this method can be used to compare string values instead.If
value
is passed as an actual Enum instance, then if that enum is the same class as this enum it'sname
is compared to this instance'sname
.Parameters:
Name Type Description value
string | Enum the value to test
- Inherited From:
- Overrides:
Returns:
true
ifvalue
is the same as this instance'sname
value- Type
- boolean