|
ChimeraTK-DeviceAccess
03.18.00
|
Go to the documentation of this file.
4 #define BOOST_TEST_DYN_LINK
5 #define BOOST_TEST_MODULE testExceptionsDummy
11 #include <boost/test/unit_test.hpp>
13 using namespace boost::unit_test_framework;
23 device.
open(
"(ExceptionDummy:1?map=test3.map)");
32 BOOST_CHECK(devI1.dataValidity() == ctk::DataValidity::faulty);
33 BOOST_CHECK(devI2.dataValidity() == ctk::DataValidity::ok);
41 BOOST_CHECK_NO_THROW(
device.
open(
"(ExceptionDummy:1?map=test3.map)"));
50 BOOST_CHECK_NO_THROW(
device.
open(
"(ExceptionDummy:1?map=test3.map)"));
60 device.
open(
"(ExceptionDummy:1?map=test3.map)");
static BackendFactory & getInstance()
Static function to get an instance of factory.
UserType read(const RegisterPath ®isterPathName, const AccessModeFlags &flags=AccessModeFlags({})) const
Inefficient convenience function to read a single-word register without obtaining an accessor.
BOOST_AUTO_TEST_CASE(testExceptionsDummyDevice)
Exception thrown when a runtime error has occured.
Class allows to read/write registers from device.
void open(std::string const &aliasName)
Open a device by the given alias name from the DMAP file.
ScalarRegisterAccessor< UserType > getScalarRegisterAccessor(const RegisterPath ®isterPathName, size_t wordOffsetInRegister=0, const AccessModeFlags &flags=AccessModeFlags({})) const
Get a ScalarRegisterObject object for the given register.
void write(const RegisterPath ®isterPathName, UserType value, const AccessModeFlags &flags=AccessModeFlags({}))
Inefficient convenience function to write a single-word register without obtaining an accessor.
bool isFunctional() const
Return wether a device is working as intended, usually this means it is opened and does not have any ...