15#ifndef RTCTK_COMPONENTFRAMEWORK_TEST_RUNTIMEREPOTESTSUITE_HPP
16#define RTCTK_COMPONENTFRAMEWORK_TEST_RUNTIMEREPOTESTSUITE_HPP
24 int initial_value = 0;
27 md[
"timestamp"] = t_start;
32 repo->SendRequest(req).Wait();
34 ASSERT_TRUE(md.
Contains(
"timestamp"));
35 ASSERT_TRUE(md.
Contains(
"sequence_id"));
37 EXPECT_EQ(md[
"timestamp"].Cast<RepositoryIf::Timestamp>(), t_start);
38 EXPECT_EQ(md[
"sequence_id"].Cast<RtcUInt64>(), 1);
46 int initial_value = 0;
50 repo->SendRequest(req).Wait();
52 ASSERT_TRUE(metadata_read.
Contains(
"timestamp"));
53 EXPECT_GT(metadata_read[
"timestamp"].Cast<RepositoryIf::Timestamp>(), t_start);
64 repo->SendRequest(req).Wait();
66 ASSERT_TRUE(metadata_read.
Contains(
"timestamp"));
67 EXPECT_GT(metadata_read[
"timestamp"].Cast<RepositoryIf::Timestamp>(), t_start);
75 int initial_value = 0;
79 repo->SendRequest(req).Wait();
81 ASSERT_TRUE(metadata_read.
Contains(
"sequence_id"));
82 EXPECT_EQ(metadata_read[
"sequence_id"].Cast<RtcUInt64>(), 0);
92 repo->SendRequest(req).Wait();
94 ASSERT_TRUE(metadata_read.
Contains(
"sequence_id"));
95 EXPECT_EQ(metadata_read[
"sequence_id"].Cast<RtcUInt64>(), 1);
104 repo->SendRequest(req).Wait();
106 ASSERT_TRUE(metadata_write.
Contains(
"sequence_id"));
107 EXPECT_EQ(metadata_write[
"sequence_id"].Cast<RtcUInt64>(), 2);
125 repo->SendRequest(req).Wait();
127 ASSERT_EQ(metadata[
"sequence_id"].Cast<RtcUInt64>(), 2);
135 repo->SendRequest(req).Wait();
136 EXPECT_EQ(int_read, 5);
155 repo->SendRequest(req).Wait();
157 ASSERT_EQ(metadata[
"sequence_id"].Cast<RtcUInt64>(), 2);
An object representing one or more asynchronous I/O requests to a repository.
Definition repositoryIf.hpp:638
void WriteDataPoint(const DataPointPath &path, const T &buffer, std::optional< std::reference_wrapper< MetaData > > metadata=std::nullopt, const CallbackType &callback=nullptr)
Add request to write a datapoint.
Definition repositoryIf.ipp:1557
void ReadDataPoint(const DataPointPath &path, T &buffer, std::optional< std::reference_wrapper< MetaData > > metadata=std::nullopt, const CallbackType &callback=nullptr) const
Definition repositoryIf.ipp:1459
void ReadMetaData(const DataPointPath &path, MetaData &metadata, const CallbackType &callback=nullptr) const
Definition repositoryIf.cpp:372
void CreateDataPoint(const DataPointPath &path, const T &initial_value, std::optional< std::reference_wrapper< const MetaData > > metadata=std::nullopt, const CallbackType &callback=nullptr)
Add a request to create a new datapoint.
Definition repositoryIf.ipp:1400
Clock::time_point Timestamp
Definition repositoryIf.hpp:57
The RtctkException class is the base class for all Rtctk exceptions.
Definition exceptions.hpp:220
Definition fakeClock.cpp:14
TEST_F(Callbacks, CreateDataPointCallback)
Definition repositoryIfTestSuite.hpp:1668
std::uint64_t RtcUInt64
Definition basicTypes.hpp:44
Header file declaring type parameterised tests for RepositoryIf.