4#define BOOST_TEST_DYN_LINK
5#define BOOST_TEST_MODULE RebotConnectionCloseOnResetTest
7#include <boost/test/unit_test.hpp>
8using namespace boost::unit_test_framework;
24 std::this_thread::sleep_for(std::chrono::milliseconds(1));
36 std::string
uri(std::string ip) {
45 Device d1(uri(
"localhost"));
54 Device d2(uri(
"127.0.0.1"));
71 BOOST_CHECK_NO_THROW(d2.
close());
72 BOOST_CHECK_NO_THROW(d1.
close());
78 Device d(uri(
"localhost"));
85 rebotServer.resetConnection();
92 BOOST_CHECK_NO_THROW(d.
close());
Class allows to read/write registers from device.
void close()
Close the device.
bool isFunctional() const
Return wether a device is working as intended, usually this means it is opened and does not have any ...
UserType read(const RegisterPath ®isterPathName, const AccessModeFlags &flags=AccessModeFlags({})) const
Inefficient convenience function to read a single-word register without obtaining an accessor.
void open(std::string const &aliasName)
Open a device by the given alias name from the DMAP file.
unsigned int port() const
Exception thrown when a runtime error has occured.
This header collects some conversion routines which should be useful both for ApplicationCore Python ...
std::string to_string(const std::string &v)
RebotDummyServer rebotServer
boost::thread serverThread
std::string uri(std::string ip)
BOOST_FIXTURE_TEST_CASE(testSecondConnectionReset, F)