new Boolean(container, propertyopt)
Represent a single bit within a BitStructure as a JavaScript boolean.
NOTE User code should not invoke this constructor directly. Use the container addBoolean helper method.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
container |
module:Layout~BitStructure | initializer for container. |
|
property |
string |
<optional> |
initializer for property. |
Extends
Members
bits
The span of this value in bits.
- Inherited From:
- Source:
container
The BitStructure instance to which this bit field belongs.
- Inherited From:
- Source:
property
The property name used when this bitfield is represented in an Object.
Intended to be functionally equivalent to module:Layout~Layout#property.
If left undefined the corresponding span of bits will be treated as padding: it will not be mutated by encode nor represented as a property in the decoded Object.
- Inherited From:
- Source:
start
The offset of the value within the containing packed unsigned integer. The least significant bit of the packed value is at offset zero, regardless of bit ordering used.
- Inherited From:
- Source:
valueMask
A mask of bits bits isolating value bits that fit within the field.
- Inherited From:
- Source:
wordMask
A mask of bits isolating the field value within the containing packed unsigned integer.
- Inherited From:
- Source:
Methods
decode() → {boolean}
- Overrides:
- Source:
Returns:
- Type
- boolean
encode()
Store a value into the corresponding subsequence of the containing bit field.
NOTE This is not a specialization of Layout.encode and there is no return value.
- Overrides:
- Source: