OSVR-Core
Public Member Functions | Protected Member Functions | List of all members
osvr::connection::vrpn_BaseFlexServer Class Reference

Basic implementation of a vrpn_BaseClass server. More...

#include <VrpnBaseFlexServer.h>

Inheritance diagram for osvr::connection::vrpn_BaseFlexServer:
osvr::common::BaseDevice

Public Member Functions

 vrpn_BaseFlexServer (DeviceConstructionData &init)
 
virtual void mainloop ()
 
void sendData (util::time::TimeValue const &timestamp, vrpn_uint32 msgID, const char *bytestream, size_t len)
 
- Public Member Functions inherited from osvr::common::BaseDevice
virtual OSVR_COMMON_EXPORT ~BaseDevice ()
 Virtual destructor. More...
 
template<typename T >
TaddComponent (shared_ptr< T > component)
 Adds a component to a base device. More...
 
void registerHandler (vrpn_MESSAGEHANDLER handler, void *userdata, RawMessageType const &msgType)
 
void unregisterHandler (vrpn_MESSAGEHANDLER handler, void *userdata, RawMessageType const &msgType)
 
template<typename T >
void registerMessageType (MessageRegistration< T > &messageReg)
 Call with a MessageRegistration object, and the message type will be registered and stored in the type field. More...
 
RawSenderType getSender ()
 
OSVR_COMMON_EXPORT void update ()
 Called from the outside to run the mainloop on the device and its components. More...
 
OSVR_COMMON_EXPORT void sendPending ()
 Called from a component to send pending messages instead of waiting for next time. More...
 
template<typename T , typename ClassOfService >
void packMessage (Buffer< T > const &buf, RawMessageType const &msgType, util::time::TimeValue const &timestamp, class_of_service::ClassOfServiceBase< ClassOfService > const &)
 
template<typename T >
void packMessage (Buffer< T > const &buf, RawMessageType const &msgType, util::time::TimeValue const &timestamp)
 
template<typename T , typename ClassOfService >
void packMessage (Buffer< T > const &buf, RawMessageType const &msgType, class_of_service::ClassOfServiceBase< ClassOfService > const &)
 
template<typename T >
void packMessage (Buffer< T > const &buf, RawMessageType const &msgType)
 
std::string const & getDeviceName () const
 

Protected Member Functions

virtual int register_types ()
 
virtual void m_update ()
 Implementation-specific update (call client_mainloop() or server_mainloop() in it!)
 
- Protected Member Functions inherited from osvr::common::BaseDevice
OSVR_COMMON_EXPORT BaseDevice ()
 Constructor.
 
OSVR_COMMON_EXPORT void m_setup (vrpn_ConnectionPtr conn, RawSenderType sender, std::string const &name)
 Should be called by derived class to set the connection, etc.
 
vrpn_ConnectionPtr m_getConnection () const
 Accessor for underlying connection.
 

Detailed Description

Basic implementation of a vrpn_BaseClass server.

Member Function Documentation

§ mainloop()

virtual void osvr::connection::vrpn_BaseFlexServer::mainloop ( )
inlinevirtual
Todo:
service device here? Some device parts end up being serviced in this object's owner, the VrpnConnectionDevice.

Service device components in the BaseDevice.


The documentation for this class was generated from the following file: