10#ifndef HPP_RTI_RECORDING_STORAGE_SAMPLESELECTOR_HPP_
11#define HPP_RTI_RECORDING_STORAGE_SAMPLESELECTOR_HPP_
14#include "rti/core/NativeValueType.hpp"
15#include "rti/core/constants.hpp"
16#include "rti/apputils/util/Utils.hpp"
18#include "recordingservice/recordingservice_storagereader.h"
20namespace rti {
namespace recording {
namespace storage {
30 typedef RTI_RecordingServiceSelectorState native_type;
32 static void initialize(native_type& native_value)
34 RTI_RecordingServiceSelectorState native_state =
35 RTI_RecordingServiceSelectorState_INITIALIZER;
36 memcpy(&native_value, &native_state,
sizeof(native_state));
39 static void finalize(native_type&)
43 static void copy(native_type& destination,
const native_type& source)
45 destination.sample_state = source.sample_state;
46 destination.time_range_start = source.time_range_start;
47 destination.time_range_end = source.time_range_end;
48 destination.max_samples = source.max_samples;
49 destination.instance_history = source.instance_history;
52 static bool equals(
const native_type& first,
const native_type& second)
54 if (first.sample_state != second.sample_state) {
57 if (first.max_samples != second.max_samples) {
60 if (!DDS_Time_t_equals(
61 first.time_range_start,
62 second.time_range_start)) {
65 if (!DDS_Time_t_equals(
67 second.time_range_end)) {
70 return first.instance_history.depth == second.instance_history.depth;
84 typedef RTI_RecordingServiceSelectorState native_type;
89namespace recording {
namespace storage {
101 RTI_NATIVE_VALUE_TYPE_DEFINE_DEFAULT_MOVE_OPERATIONS(
SelectorState)
103 typedef rti::core::NativeValueType<SelectorState> Base;
109 SelectorState(
const RTI_RecordingServiceSelectorState &native) :
131 return dds::sub::status::SampleState(native().
sample_state);
140 static_cast<RTI_RecordingServiceSampleStateMask
>(
154 return dds::core::Time(
165 return rti::apputils::util::convert_uint64_into_int64(
175 native().time_range_start.nanosec =
188 return dds::core::Time(
199 return rti::apputils::util::convert_uint64_into_int64(
209 native().time_range_end.nanosec =
221 return native().max_samples;
234 inline int32_t instance_history_depth()
const
236 return native().instance_history.depth;
239 SelectorState& instance_history_depth(
const int32_t depth)
241 native().instance_history.depth = (int) depth;
Definition: SelectorState.hpp:28
This class is used by Replay Service or Converter when asking the storage plugin for data....
Definition: SelectorState.hpp:99
SelectorState & time_range_end(const dds::core::Time &time_range_end)
Sets the upper limit of the time range.
Definition: SelectorState.hpp:206
dds::core::Time time_range_start() const
Returns the time that represents the lower limit (inclusive) of the time range the retrieved data sam...
Definition: SelectorState.hpp:152
dds::core::Time time_range_end() const
Returns the time that represents the upper limit (inclusive) of the time range the retrieved samples ...
Definition: SelectorState.hpp:186
SelectorState & time_range_start(const dds::core::Time &time_range_start)
Sets the lower limit of the time range.
Definition: SelectorState.hpp:172
int32_t max_samples() const
Returns the maximum number of samples to be returned by a single read() call, when the value is posit...
Definition: SelectorState.hpp:219
SelectorState & sample_state(const dds::sub::status::SampleState &state)
Sets the sample state.
Definition: SelectorState.hpp:137
int64_t timestamp_range_start() const
Like the time_range_start() method, but returns the timestamp in long long (int-64) format.
Definition: SelectorState.hpp:163
int64_t timestamp_range_end() const
Like the time_range_end() method, but returns the timestamp in long long (int-64) format.
Definition: SelectorState.hpp:197
SelectorState & max_samples(const int32_t max_samples)
Sets the maximum number of samples to be returned by a single call to read().
Definition: SelectorState.hpp:228
dds::sub::status::SampleState sample_state() const
Returns the sample state. This is used to represent the state of the samples asked for,...
Definition: SelectorState.hpp:129
The RTI namespace.
Definition: RecordingServiceImpl.hpp:22