52 vrpn_ConnectionPtr
const &conn, 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(location);
60 location->registerLocationHandler(
63 m_handleLocation(data, timestamp);
65 OSVR_DEV_VERBOSE(
"Constructed an 2D-Location Handler for "
77 virtual void update() { m_dev->update(); }
82 if (!m_all && *m_sensor != data.sensor) {
88 report.sensor = data.sensor;
89 report.location = data.location;
93 common::BaseDevicePtr m_dev;
94 RemoteHandlerInternals m_internals;
96 boost::optional<OSVR_ChannelCount> m_sensor;
99 Location2DRemoteFactory::Location2DRemoteFactory(
100 VRPNConnectionCollection
const &conns)
107 shared_ptr<RemoteHandler> ret;
109 if (source.hasTransform()) {
111 "Ignoring transform found on route for 2D-Location data!");
114 auto const &devElt = source.getDeviceElement();
118 m_conns.getConnection(devElt), devElt.getFullDeviceName(),
119 source.getSensorNumberAsChannelCount(), ifaces));
The result of resolving a tree node to a device: either an original source to connect to...
NetworkLocation2DRemoteHandler & operator=(NetworkLocation2DRemoteHandler const &)=delete
Deleted assignment operator.
BaseDevicePtr createClientDevice(std::string const &name, vrpn_ConnectionPtr const &conn)
Factory function for a bare client device with no components/interfaces registered by default...
virtual ~NetworkLocation2DRemoteHandler()
Header including PathTree.h and all additional headers needed to define related types.
Header to bring unique_ptr into the osvr namespace.
Report type for 2D location.
void setStateAndTriggerCallbacks(const OSVR_TimeValue ×tamp, ReportType const &report)
Set state and call callbacks for a report type.
static shared_ptr< Location2DComponent > create(OSVR_ChannelCount numSensor=1)
Factory method.
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.
shared_ptr< RemoteHandler > operator()(common::OriginalSource const &source, common::InterfaceList &ifaces, common::ClientContext &ctx)