MCPcopy Create free account
hub / github.com/OSVR/OSVR-Core / m_packMessage

Method m_packMessage

src/osvr/Common/BaseDevice.cpp:92–104  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90 std::string const &BaseDevice::getDeviceName() const { return m_name; }
91
92 void BaseDevice::m_packMessage(size_t len, const char *buf,
93 RawMessageType const &msgType,
94 util::time::TimeValue const &timestamp,
95 uint32_t classOfService) {
96 struct timeval t;
97 util::time::toStructTimeval(t, timestamp);
98 auto ret = m_getConnection()->pack_message(
99 static_cast<uint32_t>(len), t, msgType.get(), getSender().get(),
100 buf, classOfService);
101 if (ret != 0) {
102 throw std::runtime_error("Could not pack message!");
103 }
104 }
105
106 void BaseDevice::m_setup(vrpn_ConnectionPtr conn, RawSenderType sender,
107 std::string const &name) {

Callers

nothing calls this directly

Calls 2

toStructTimevalFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected