ITCHCPP 1.6.0
High-Performance NASDAQ TotalView-ITCH 5.0 Parser & Market-Data Platform
Loading...
Searching...
No Matches
wire.hpp File Reference

Single source of truth for the ITCH 5.0 wire layout metadata shared by the eager parser, the zero-copy overlay, and the encoder. More...

#include <cstddef>
#include <cstdint>
#include "itch/messages.hpp"
+ Include dependency graph for wire.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  itch
 
namespace  itch::detail
 

Functions

template<typename Visitor >
constexpr auto itch::detail::for_each_message_type (Visitor &&visitor) -> void
 Invokes visitor.template operator()<MsgType>(type_byte) once for each ITCH 5.0 message type, in a fixed order.
 

Variables

constexpr std::size_t itch::detail::TIMESTAMP_STRUCT_PADDING = sizeof(std::uint64_t) - 6
 The on-wire ITCH timestamp is 48 bits (6 bytes), but every message struct stores it in a 64-bit field, so each struct is exactly two bytes wider than its encoding.
 
template<typename MsgType >
constexpr std::size_t itch::detail::WIRE_SIZE = sizeof(MsgType) - TIMESTAMP_STRUCT_PADDING
 The exact on-wire size, in bytes, of a fully formed message of type T.
 

Detailed Description

Single source of truth for the ITCH 5.0 wire layout metadata shared by the eager parser, the zero-copy overlay, and the encoder.

Keeping the per-type wire size and the canonical list of message types in one place means the dispatch table, the overlay accessors, and the writer can never drift apart from one another.

Author
Bertin Balouki SIMYELI

Definition in file wire.hpp.