McStas Readout Master 0.8.0
Loading...
Searching...
No Matches
ParameterPublisher Class Referenceabstract

Receives the per-point instrument parameter values as replay steps through a file. More...

#include <replay.h>

Inheritance diagram for ParameterPublisher:

Public Member Functions

virtual void publish (size_t point, const std::string &name, const std::string &value, const std::optional< std::string > &unit)=0
 
virtual void point_ready (size_t)
 
virtual void pulse_ready (size_t, uint64_t)
 The point's pulse has begun, at pulse_ns nanoseconds since the epoch.
 

Detailed Description

Receives the per-point instrument parameter values as replay steps through a file.

Replay calls publish once per (point, parameter) before any of that point's readouts are sent, then point_ready once all of the point's parameters have been published. Implementations forward the values to, e.g., an EPICS mailbox; the transport lives outside this library.

Definition at line 35 of file replay.h.

Member Function Documentation

◆ point_ready()

virtual void ParameterPublisher::point_ready ( size_t  )
inlinevirtual

Definition at line 39 of file replay.h.

◆ pulse_ready()

virtual void ParameterPublisher::pulse_ready ( size_t  ,
uint64_t   
)
inlinevirtual

The point's pulse has begun, at pulse_ns nanoseconds since the epoch.

Called after the senders start the point's pulse and before any of its events are sent, which is the only moment the reference time exists: point_ready runs before begin_pulse, and begin_pulse sleeps to the next grid tick before fixing the time.

A publisher deriving timestamps – a chopper's top-dead-centre crossings, say – must take them from here rather than from a clock of its own, or they land before the pulse they belong to by up to one full period.

Not called when a file has no sendable readouts, because then there is no pulse.

Definition at line 52 of file replay.h.


The documentation for this class was generated from the following file: