Browse docspacket.bit
On this page
API method

packet.bit

Reads one bit (0 = least significant, 7 = most significant) of a payload byte as true or false, or null when the offset or bit is out of range.

Syntax

Atlas Script
packet.bit(offset, bit)

Parameters

offset
Byte offset into the packet. Payload-relative for packet.* methods, and absolute (whole IP packet) for the raw_* variants.
bit
Bit index within the byte, 0 for the least-significant bit through 7.

Return value

See the remarks for the returned value and runtime behavior.

Remarks

Reads one bit (0 = least significant, 7 = most significant) of a payload byte as true or false, or null when the offset or bit is out of range.

Examples

Usage pattern
// Replace offset, bit with values described above.
packet.bit(offset, bit);
Reference details are generated from the Atlas Script schema in this documentation source snapshot. Confirm release-specific behavior in the Atlas for Windows build you use.