|
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
|
Bids then asks follow the fixed part as a flexible array of Level (bid_count + ask_count). More...
#include <fastmm/core/messages.hpp>
Public Member Functions | |
| Level * | levels () noexcept |
| const Level * | levels () const noexcept |
| std::span< const Level > | bids () const noexcept |
| std::span< const Level > | asks () const noexcept |
| std::span< Level > | bids () noexcept |
| std::span< Level > | asks () noexcept |
| bool | is_snapshot () const noexcept |
Static Public Member Functions | |
| static constexpr std::uint32_t | size_for (std::uint32_t bids, std::uint32_t asks) noexcept |
Public Attributes | |
| EventHeader | hdr |
| std::uint32_t | bid_count |
| std::uint32_t | ask_count |
| std::uint64_t | first_update_id |
| Binance U. | |
| std::uint64_t | last_update_id |
| Binance u / Bybit u. | |
| std::uint64_t | prev_update_id |
| Binance futures pu (0 if n/a) | |
Bids then asks follow the fixed part as a flexible array of Level (bid_count + ask_count).
Used both for deltas (qty == 0 means delete) and full snapshots (flag kSnapshot).
Never construct a BookDeltaMsg by value, not even with zero levels. The fixed part is 96 bytes but hdr.len is rounded to the 64-byte message granule, so size_for(0, 0) == 128. Everything that forwards a message copies hdr.len bytes (MsgRing, journal, BookSyncer), so a stack or member BookDeltaMsg is read 32 bytes past its end. Build it in place instead: alignas(64) std::byte buf[BookDeltaMsg::size_for(bids, asks)]; or ring.try_reserve(len)
|
inlinestaticconstexprnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
| EventHeader fastmm::BookDeltaMsg::hdr |
| std::uint32_t fastmm::BookDeltaMsg::bid_count |
| std::uint32_t fastmm::BookDeltaMsg::ask_count |
| std::uint64_t fastmm::BookDeltaMsg::first_update_id |
Binance U.
| std::uint64_t fastmm::BookDeltaMsg::last_update_id |
Binance u / Bybit u.
| std::uint64_t fastmm::BookDeltaMsg::prev_update_id |
Binance futures pu (0 if n/a)