Go to the documentation of this file.
11 #ifndef RTCTK_COMPONENTFRAMEWORK_IPCQRECORDINGUNIT_HPP
12 #define RTCTK_COMPONENTFRAMEWORK_IPCQRECORDINGUNIT_HPP
41 template <typename Topic, typename OutputStage = typename RecordingInfo<Topic>::Recorder>
53 std::string
const& unit_id,
61 SHM_QUEUE_NAME_PATH)},
66 TELEMETRY_SUBSET_PATH))
74 if(rtr.DataPointExists(path)) {
75 m_cpu_affinity = rtr.GetDataPoint<
int32_t>(path);
83 if(m_process_thread.joinable()) {
84 m_process_thread.join();
92 void Prepare(
const std::filesystem::path& file_path)
override;
101 std::optional<std::filesystem::path>
Stop()
override;
125 std::thread m_process_thread;
129 std::atomic<bool> m_start =
false;
130 std::atomic<bool> m_stop =
false;
134 std::string m_queue_name;
138 std::optional<size_t> m_cpu_affinity;
142 OutputStage m_output;
146 int64_t m_subsample_factor;
150 int64_t m_start_sample_id;
154 int64_t m_stop_after_num_samples;
158 int64_t m_last_observed_sample_id;
162 uint64_t m_sampling_counter;
191 #include "rtctk/componentFramework/ipcqRecordingUnit.ipp"
193 #endif // RTCTK_COMPONENTFRAMEWORK_IPCQRECORDINGUNIT_HPP
void Prepare(const std::filesystem::path &file_path) override
Prepare the recording thread and start recording.
static OutputStage::DisabledFields GetDisabled(RepositoryIf &rtr, const DataPointPath &sub_path)
get disabled fields from a DataPoint in the runtime repo.
std::optional< std::filesystem::path > Stop() override
Stop the recording thread and wait for it's termination.
T GetDataPoint(const DataPointPath &path) const
Fetches a datapoint from the repository.
Definition: repositoryIf.hpp:552
Provides macros and utilities for exception handling.
FitsRecorder allows to write ColumnData to into fits files in a specified directory.
RtctkException() noexcept
Definition: exceptions.cpp:99
Definition: commandReplier.cpp:20
FitsRecorder allows to write ColumnData to into fits files in a specified directory.
void Update() override
Update settings from RuntimeRepo.
This Exception is raised when the ipc queue returns an error that cannot be handled by the RecordingT...
Definition: ipcqRecordingUnit.hpp:29
IpcqRecordingUnit(std::string const &comp_id, std::string const &unit_id, RepositoryIf &rtr, RepositoryIf &oldb)
Create a new Ipcq Recorder reading from a given queue and outputting to the given output stage.
Definition: ipcqRecordingUnit.hpp:52
The RtctkException class is the base class for all Rtctk exceptions.
Definition: exceptions.hpp:207
Definition: recordingInfo.hpp:21
Recording Unit that can record from shared memory queue.
Definition: ipcqRecordingUnit.hpp:42
void Start() override
Start the recording.
Abstract base class for all sources that can be recorded by the MetadataCollector and TelemetryRecord...
Definition: recordingUnit.hpp:65
Abstract interface providing basic read and write facilities to a repository.
Definition: repositoryIf.hpp:34
IpcqError(const std::string &message)
Definition: ipcqRecordingUnit.hpp:32
Abstract base class defining functionality common to all recording units.
int int32_t
Definition: mudpi.h:17
This class provides a wrapper for a data point path.
Definition: dataPointPath.hpp:65
virtual ~IpcqRecordingUnit()
Definition: ipcqRecordingUnit.hpp:81