#include <fastmm/strategies/param_publisher.hpp>
|
| struct | BlockOps |
| | Copying and freeing a parameter block whose layout is known only at run time (strategies/hot_params.hpp); validate runs after the schema's parsers. More...
|
| |
| struct | Value |
| | Every parameter of the copy, in schema order: one instrument's, or the shared set. More...
|
| |
|
| template<class Params > |
| | ParamPublisher (ParamSink sink, const Params ¤t, std::size_t instruments=0) |
| |
| | ParamPublisher (ParamSink sink, const ParamSchema &schema, const BlockOps &ops, const void *current, std::size_t instruments=0) |
| | schema's parsers and ops work on blocks like current; schema must outlive the publisher.
|
| |
| | ParamPublisher (const ParamPublisher &)=delete |
| |
| ParamPublisher & | operator= (const ParamPublisher &)=delete |
| |
| | ParamPublisher (ParamPublisher &&)=delete |
| |
| ParamPublisher & | operator= (ParamPublisher &&)=delete |
| |
| | ~ParamPublisher ()=default |
| |
| bool | publish (const std::vector< ParamValue > &values, InstrumentId inst=kAllInstruments) |
| | Validates and sends one update.
|
| |
| std::uint64_t | publish_as (const std::vector< ParamValue > &values, InstrumentId inst, ParamUpdateMsg::Origin origin, std::string_view source) |
| | publish() with the update's origin and source (ParamUpdateMsg::source, cut to 39 bytes).
|
| |
| std::optional< std::string > | build (const std::vector< ParamValue > &values, InstrumentId inst, ParamUpdateMsg &out) const |
| | The update publish() would send, without sending it or changing the copy; the error message when it is invalid.
|
| |
| void | close () |
| | Later publishes return false (the session has stopped).
|
| |
| bool | closed () const |
| |
| std::uint64_t | published () const |
| | Updates sent, and updates the sink refused.
|
| |
| std::uint64_t | refused () const |
| |
| const ParamSchema & | schema () const |
| |
| std::vector< Value > | values (InstrumentId inst=kAllInstruments) const |
| |
| std::string | describe (InstrumentId inst=kAllInstruments) const |
| | name=value pairs of the copy: one instrument's, or the shared set.
|
| |
◆ ParamValue
◆ ParamPublisher() [1/4]
template<class Params >
| fastmm::ParamPublisher::ParamPublisher |
( |
ParamSink |
sink, |
|
|
const Params & |
current, |
|
|
std::size_t |
instruments = 0 |
|
) |
| |
|
inline |
◆ ParamPublisher() [2/4]
| fastmm::ParamPublisher::ParamPublisher |
( |
ParamSink |
sink, |
|
|
const ParamSchema & |
schema, |
|
|
const BlockOps & |
ops, |
|
|
const void * |
current, |
|
|
std::size_t |
instruments = 0 |
|
) |
| |
|
inline |
schema's parsers and ops work on blocks like current; schema must outlive the publisher.
◆ ParamPublisher() [3/4]
◆ ParamPublisher() [4/4]
◆ ~ParamPublisher()
| fastmm::ParamPublisher::~ParamPublisher |
( |
| ) |
|
|
default |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ publish()
Validates and sends one update.
Throws std::invalid_argument when it is invalid; returns false when the sink refused it (ring full) or the publisher is closed.
◆ publish_as()
publish() with the update's origin and source (ParamUpdateMsg::source, cut to 39 bytes).
The update's publish_seq, 0 when the sink refused it or the publisher is closed.
◆ build()
The update publish() would send, without sending it or changing the copy; the error message when it is invalid.
out.publish_seq and out.hdr.recv_ts stay zero.
◆ close()
| void fastmm::ParamPublisher::close |
( |
| ) |
|
|
inline |
Later publishes return false (the session has stopped).
◆ closed()
| bool fastmm::ParamPublisher::closed |
( |
| ) |
const |
|
inline |
◆ published()
| std::uint64_t fastmm::ParamPublisher::published |
( |
| ) |
const |
|
inline |
Updates sent, and updates the sink refused.
◆ refused()
| std::uint64_t fastmm::ParamPublisher::refused |
( |
| ) |
const |
|
inline |
◆ schema()
| const ParamSchema & fastmm::ParamPublisher::schema |
( |
| ) |
const |
|
inline |
◆ values()
◆ describe()
name=value pairs of the copy: one instrument's, or the shared set.
◆ kAllInstruments
| constexpr InstrumentId fastmm::ParamPublisher::kAllInstruments = ParamUpdateMsg::kAllInstruments |
|
staticconstexpr |