|
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
|
New strategy parameter values (ADR-0013): up to kMaxFields (field index, raw value) pairs, built and validated off the engine thread (strategies/param_publisher.hpp). More...
#include <fastmm/core/messages.hpp>
Public Types | |
| enum class | Origin : std::uint8_t { Strategy = 0 , Control = 1 } |
Public Member Functions | |
| bool | all_instruments () const noexcept |
| std::string_view | source_view () const noexcept |
| void | set_source (std::string_view s) noexcept |
Copies s into source, cut to kSourceLen - 1 bytes. | |
Public Attributes | |
| EventHeader | hdr |
| std::uint32_t | count |
| pairs used | |
| Origin | origin |
| std::uint8_t | pad0_ [3] |
| std::uint64_t | publish_seq |
| the publisher's sequence number, from 1 | |
| std::uint16_t | field [kMaxFields] |
| schema index of each pair | |
| char | source [kSourceLen] |
| who asked for it, e.g. "manual", "scheduled:drain" | |
| std::uint8_t | pad1_ [8] |
| std::int64_t | value [kMaxFields] |
| raw value of each pair | |
Static Public Attributes | |
| static constexpr std::size_t | kMaxFields = 32 |
| static constexpr std::size_t | kSourceLen = 40 |
source, NUL-terminated | |
| static constexpr InstrumentId | kAllInstruments {} |
| hdr.instrument of an update for every instrument: the invalid id. | |
New strategy parameter values (ADR-0013): up to kMaxFields (field index, raw value) pairs, built and validated off the engine thread (strategies/param_publisher.hpp).
The engine applies them together at one event, journals the message and calls on_params. A field index is the position of the parameter in the strategy's schema; the journal header records the schema, so a replay resolves indices by name. A raw value is the field's int64 form (ParamDesc::get_raw): the value of an integer or bool, the raw fixed-point value of Price, Qty, Notional and Ratio, the nanoseconds of a Duration and the IEEE-754 bits of a double. origin names the publisher (the control socket's sequence is the one fastmm-ctl waits on) and source who asked for the change (fastmm-ctl param --source), both zero in journals written before they existed.
|
strong |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Copies s into source, cut to kSourceLen - 1 bytes.
|
staticconstexpr |
|
staticconstexpr |
source, NUL-terminated
|
staticconstexpr |
hdr.instrument of an update for every instrument: the invalid id.
| EventHeader fastmm::ParamUpdateMsg::hdr |
| std::uint32_t fastmm::ParamUpdateMsg::count |
pairs used
| Origin fastmm::ParamUpdateMsg::origin |
| std::uint8_t fastmm::ParamUpdateMsg::pad0_[3] |
| std::uint64_t fastmm::ParamUpdateMsg::publish_seq |
the publisher's sequence number, from 1
| std::uint16_t fastmm::ParamUpdateMsg::field[kMaxFields] |
schema index of each pair
| char fastmm::ParamUpdateMsg::source[kSourceLen] |
who asked for it, e.g. "manual", "scheduled:drain"
| std::uint8_t fastmm::ParamUpdateMsg::pad1_[8] |
| std::int64_t fastmm::ParamUpdateMsg::value[kMaxFields] |
raw value of each pair