On this page
packet.hex
Returns payload bytes as space-separated uppercase hex, such as "78 01 FF", for logging.
Syntax
Atlas Script
packet.hex(offset?, count?)Parameters
offsetOptional- Byte offset into the packet. Payload-relative for packet.* methods, and absolute (whole IP packet) for the raw_* variants.
countOptional- Optional number of bytes to include. Omit it to run to the end of the payload; a larger count is clamped to the bytes available.
Return value
Returns payload bytes as space-separated uppercase hex, such as "78 01 FF", for logging.
Remarks
Returns payload bytes as space-separated uppercase hex, such as "78 01 FF", for logging. With no arguments, formats the whole payload; an offset past the end returns an empty string.
Examples
Usage pattern
// Replace offset, count with values described above.
packet.hex(offset, count);