40 m_conn(
Connection::retrieveConnection(m_context->getParent())),
41 m_analogIface(nullptr), m_buttonIface(nullptr), m_tracker(false) {}
43 OSVR_DeviceInitObject::OSVR_DeviceInitObject(
45 : m_context(nullptr), m_conn(conn), m_tracker(false) {}
50 m_qualifiedName = m_context->getName() +
"/" + m_name;
52 m_qualifiedName = m_name;
58 boost::optional<OSVR_ChannelCount> &dest) {
59 if (0 == input ||
nullptr == ptr) {
69 if (setOptional(num, iface, m_analogs)) {
70 m_analogIface = iface;
72 m_analogIface =
nullptr;
78 *m_analogIface = &iface;
83 if (setOptional(num, iface, m_buttons)) {
84 m_buttonIface = iface;
86 m_buttonIface =
nullptr;
92 *m_buttonIface = &iface;
97 if (
nullptr != iface) {
102 m_trackerIface = iface;
106 osvr::connection::ServerInterfacePtr
const &iface) {
107 m_serverInterfaces.push_back(iface);
110 osvr::common::DeviceComponentPtr
const &comp) {
111 m_components.push_back(comp);
115 *m_trackerIface = &iface;
119 return m_qualifiedName;
typekeyed_detail::ref_type_at_key< Derived, Key >::type get(TypeKeyedBase< Derived > &c)
uint32_t OSVR_ChannelCount
The integer type specifying a number of channels/sensors or a channel/sensor index.
osvr::connection::ConnectionPtr getConnection()
Retrieve the connection pointer.
Interface for external access to generating tracker reports.
void returnTrackerInterface(osvr::connection::TrackerServerInterface &iface)
Returns a tracker interface through the pointer-pointer.
std::string getQualifiedName() const
Get device name qualified by plugin name.
Class providing the external interface of a registration context backing a single plugin...
shared_ptr< Connection > ConnectionPtr
How one must hold a Connection.
Class wrapping a messaging transport (server or internal) connection.
void setName(std::string const &n)
Set the (unqualified) name of the device to create.
Interface for external access to generating analog reports.
void returnAnalogInterface(osvr::connection::AnalogServerInterface &iface)
Returns an analog interface through the pointer-pointer.
void setAnalogs(OSVR_ChannelCount num, osvr::connection::AnalogServerInterface **iface)
Set analogs: clears the boost::optional if 0 is passed.
void addServerInterface(osvr::connection::ServerInterfacePtr const &iface)
Add a server interface pointer to our list, which will get registered when the device is created...
void addComponent(osvr::common::DeviceComponentPtr const &comp)
Add a device component to our list, which will get added to the device when created.
OSVR_EXTERN_C_BEGIN typedef void * OSVR_PluginRegContext
A context pointer passed in to your plugin's entry point and other locations of control flow transfer...
void returnButtonInterface(osvr::connection::ButtonServerInterface &iface)
Returns a button interface through the pointer-pointer.
osvr::pluginhost::PluginSpecificRegistrationContext * getContext()
Retrieves the plugin context.
void setButtons(OSVR_ChannelCount num, osvr::connection::ButtonServerInterface **iface)
Set buttons: clears the boost::optional if 0 is passed.
void setTracker(osvr::connection::TrackerServerInterface **iface)
Enables tracker interface.