52 std::string
const &deviceName,
53 boost::optional<OSVR_ChannelCount> sensor,
54 common::InterfaceList &ifaces)
56 m_internals(ifaces), m_all(!sensor.is_initialized()),
59 m_dev->addComponent(imaging);
60 imaging->registerImageHandler(
63 m_handleImage(data, timestamp);
65 OSVR_DEV_VERBOSE(
"Constructed an ImagingHandler for "
76 virtual void update() { m_dev->update(); }
81 if (!m_all && *m_sensor != data.sensor) {
87 report.sensor = data.sensor;
88 report.state.metadata = data.metadata;
89 report.state.data = data.buffer.get();
92 [×tamp, &report, &data](common::ClientInterface &iface) {
94 auto n = iface.getNumCallbacksFor(report);
95 for (std::size_t i = 0; i < n; ++i) {
98 iface.getContext().acquireObject(data.buffer);
100 iface.triggerCallbacks(timestamp, report);
104 common::BaseDevicePtr m_dev;
105 RemoteHandlerInternals m_internals;
107 boost::optional<OSVR_ChannelCount> m_sensor;
110 ImagingRemoteFactory::ImagingRemoteFactory(
111 VRPNConnectionCollection
const &conns)
118 shared_ptr<RemoteHandler> ret;
120 if (source.hasTransform()) {
122 "Ignoring transform found on route for Imaging data!");
125 auto const &devElt = source.getDeviceElement();
129 m_conns.getConnection(devElt), devElt.getFullDeviceName(),
130 source.getSensorNumberAsChannelCount(), ifaces));
virtual ~ImagingRemoteHandler()
The result of resolving a tree node to a device: either an original source to connect to...
BaseDevicePtr createClientDevice(std::string const &name, vrpn_ConnectionPtr const &conn)
Factory function for a bare client device with no components/interfaces registered by default...
Header including PathTree.h and all additional headers needed to define related types.
Header to bring unique_ptr into the osvr namespace.
static shared_ptr< ImagingComponent > create(OSVR_ChannelCount numSensor=0)
Factory method.
void forEachInterface(F &&f)
Do something with every client interface object, if the above options don't suit your needs...
shared_ptr< RemoteHandler > operator()(common::OriginalSource const &source, common::InterfaceList &ifaces, common::ClientContext &ctx)
Internal, configured header file for verbosity macros.
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
Base class for remote device handler classes.
ImagingRemoteHandler & operator=(ImagingRemoteHandler const &)=delete
Deleted assignment operator.