25 #ifndef INCLUDED_ConnectionDevice_h_GUID_C04223D7_51D1_49BE_91AB_73FCA9C88515 26 #define INCLUDED_ConnectionDevice_h_GUID_C04223D7_51D1_49BE_91AB_73FCA9C88515 29 #include <osvr/Connection/Export.h> 36 #include <boost/noncopyable.hpp> 43 namespace connection {
51 typedef std::vector<std::string> NameList;
54 OSVR_CONNECTION_EXPORT std::string
const &
getName()
const;
66 const char *bytestream,
size_t len);
75 OSVR_CONNECTION_EXPORT
void 105 std::string m_descriptor;
109 #endif // INCLUDED_ConnectionDevice_h_GUID_C04223D7_51D1_49BE_91AB_73FCA9C88515 Header forward declaring MessageType and specifying a smart pointer.
OSVR_CONNECTION_EXPORT void setDeviceDescriptor(std::string const &jsonString)
Send new/updated JSON device descriptor.
Definition: ConnectionDevice.cpp:68
A DeviceToken connects the generic device interaction code in PluginKit's C API with the workings of ...
Definition: DeviceToken.h:56
virtual void m_sendData(util::time::TimeValue const ×tamp, MessageType *type, const char *bytestream, size_t len)=0
(Subclass implementation) Send message.
Header forward-declaring ConnectionDevice and specifying the desired pointer to hold a ConnectionDevi...
bool m_hasDeviceToken() const
Does this connection device have a device token? Should be true in nearly every case.
Definition: ConnectionDevice.cpp:77
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
OSVR_CONNECTION_EXPORT ConnectionDevice(std::string const &name)
Constructor for use by derived classes only.
Definition: ConnectionDevice.cpp:48
NameList const & getNames() const
accessor for device names
Definition: ConnectionDevice.cpp:44
DeviceToken & m_getDeviceToken()
accessor for device token
Definition: ConnectionDevice.cpp:81
Base class for connection-specific message type registration.
Definition: MessageType.h:38
virtual OSVR_CONNECTION_EXPORT ~ConnectionDevice()
destructor
Definition: ConnectionDevice.cpp:38
void setDeviceToken(DeviceToken &token)
For use only by DeviceToken.
Definition: ConnectionDevice.cpp:63
void process()
Process messages.
Definition: ConnectionDevice.cpp:54
OSVR_CONNECTION_EXPORT std::string const & getDeviceDescriptor() const
Get the most current JSON device descriptor.
Definition: ConnectionDevice.cpp:73
Base class for connection-specific device data, owned by a DeviceToken.
Definition: ConnectionDevice.h:46
Header providing a C++ wrapper around TimeValueC.h.
void sendData(util::time::TimeValue const ×tamp, MessageType *type, const char *bytestream, size_t len)
Send message (as primary device name)
Definition: ConnectionDevice.cpp:56
OSVR_CONNECTION_EXPORT std::string const & getName() const
accessor for (primary) device name
Definition: ConnectionDevice.cpp:40
Standardized, portable parallel to struct timeval for representing both absolute times and time inter...
Definition: TimeValueC.h:81
virtual void m_process()=0
(Subclass implementation) Process messages.