Constructor
new SkyCondition(name, bitNumber)
Constructor.
Name | Type | Description |
---|---|---|
name | string | the name |
bitNumber | number | the bit offset, starting from |
- Source
Extends
Members
bitmaskBitNumber
Get the bit offset value, starting from 1
for the least significant bit.
- Source
bitmaskBitOffset
Get the bit offset value, starting from 0
for the least significant bit.
- Source
code
Get the state code value.
- Source
name
Get the enum name.
- Overrides
- Source
Methods
equals(value) → {boolean}
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's name
is compared to this instance's name
.
Name | Type | Description |
---|---|---|
value | string | | the value to test |
- Overrides
- Source
true
if value
is the same as this instance's name
value
- Type:
- boolean
(static) enumValues()
Get the module:domain~SkyConditions values.
- Source
(static) forCode(code) → {DeviceOperatingState}
Get an enum for a code value.
Name | Type | Description |
---|---|---|
code | number | the code to look for |
- Source
the state, or null
if not found
- Type:
- DeviceOperatingState