ITCHCPP 1.6.1
High-Performance NASDAQ TotalView-ITCH 5.0 Parser & Market-Data Platform
Loading...
Searching...
No Matches
itch::overlay::detail Namespace Reference

Functions

template<typename FieldType >
auto read_field (const std::byte *base, std::size_t offset) noexcept -> FieldType
 Reads an integral field of width sizeof(T) at offset, converting from network (big-endian) order on access.
 
auto read_timestamp (const std::byte *base, std::size_t offset) noexcept -> std::uint64_t
 Reads the 48-bit ITCH timestamp at offset into a 64-bit value.
 
auto read_stock (const std::byte *base, std::size_t offset) noexcept -> std::string_view
 Views an 8-byte fixed-width stock field as a string_view (untrimmed).
 

Variables

constexpr std::size_t STOCK_LOCATE_OFFSET = 1
 
constexpr std::size_t TRACKING_NUMBER_OFFSET = 3
 
constexpr std::size_t TIMESTAMP_OFFSET = 5
 

Function Documentation

◆ read_field()

template<typename FieldType >
auto itch::overlay::detail::read_field ( const std::byte *  base,
std::size_t  offset 
) -> FieldType
inlinenoexcept

Reads an integral field of width sizeof(T) at offset, converting from network (big-endian) order on access.

Template Parameters
FieldTypeThe type of the field to read.
Parameters
basePointer to the start of the message frame.
offsetByte offset of the field within the frame.
Returns
The field value, converted from big-endian if it is a multi-byte integral type.

Definition at line 37 of file overlay.hpp.

◆ read_timestamp()

auto itch::overlay::detail::read_timestamp ( const std::byte *  base,
std::size_t  offset 
) -> std::uint64_t
inlinenoexcept

Reads the 48-bit ITCH timestamp at offset into a 64-bit value.

Parameters
basePointer to the start of the message frame.
offsetByte offset of the timestamp field within the frame.
Returns
The timestamp, in nanoseconds past midnight.

Definition at line 53 of file overlay.hpp.

Referenced by itch::overlay::MessageView::timestamp().

◆ read_stock()

auto itch::overlay::detail::read_stock ( const std::byte *  base,
std::size_t  offset 
) -> std::string_view
inlinenoexcept

Views an 8-byte fixed-width stock field as a string_view (untrimmed).

Parameters
basePointer to the start of the message frame.
offsetByte offset of the stock field within the frame.
Returns
An untrimmed view of the 8-byte stock symbol field.

Definition at line 66 of file overlay.hpp.

Referenced by itch::overlay::AddOrderView::stock(), and itch::overlay::NonCrossTradeView::stock().

Variable Documentation

◆ STOCK_LOCATE_OFFSET

constexpr std::size_t itch::overlay::detail::STOCK_LOCATE_OFFSET = 1
constexpr

Definition at line 73 of file overlay.hpp.

Referenced by itch::overlay::MessageView::stock_locate().

◆ TRACKING_NUMBER_OFFSET

constexpr std::size_t itch::overlay::detail::TRACKING_NUMBER_OFFSET = 3
constexpr

Definition at line 74 of file overlay.hpp.

Referenced by itch::overlay::MessageView::tracking_number().

◆ TIMESTAMP_OFFSET

constexpr std::size_t itch::overlay::detail::TIMESTAMP_OFFSET = 5
constexpr

Definition at line 75 of file overlay.hpp.

Referenced by itch::overlay::MessageView::timestamp().