/* * plugintest.h * * Created on: 8 Apr 2015 * Author: Ulrik Kofoed Pedersen, Diamond Light Source */ #ifndef ADAPP_PLUGINTESTS_TESTINGUTILITIES_H_ #define ADAPP_PLUGINTESTS_TESTINGUTILITIES_H_ // Newer version of boost requires this: #if BOOST_VERSION > 105300 #define BOOST_MESSAGE(msg) BOOST_TEST_MESSAGE(msg) #endif #include #include #include #include #include void fillNDArrays(const std::vector& dimensions, NDDataType_t dataType, std::vector& arrays); void fillNDArraysFromPool(const std::vector& dimensions, NDDataType_t dataType, std::vector& arrays, NDArrayPool *pNDArrayPool); void uniqueAsynPortName(std::string& name); // Mock simply stores all received NDArrays and provides them to a client on request. class TestingPlugin : public asynGenericPointerClient { public: TestingPlugin (const char *portName, int addr); ~TestingPlugin(); void callback(NDArray *pArray); std::deque arrays; }; #endif /* ADAPP_PLUGINTESTS_TESTINGUTILITIES_H_ */