-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoscmessagedecoder.h
More file actions
33 lines (26 loc) · 963 Bytes
/
Copy pathoscmessagedecoder.h
File metadata and controls
33 lines (26 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef OSCMESSAGEDECODER_H
#define OSCMESSAGEDECODER_H
#include <memory>
#include <boost/asio.hpp>
#include <boost/thread.hpp>
#include "oscpkt.hh"
class MessageHandler;
class OSCMessageDecoder : public std::enable_shared_from_this<OSCMessageDecoder>
{
public:
OSCMessageDecoder(const oscpkt::Message& Message,
boost::asio::io_service& IOService,
MessageHandler& MessageHandler);
static void AsyncDecode(const oscpkt::Message& Message,
boost::asio::io_service& IOService,
MessageHandler& MessageHandler);
private:
oscpkt::Message m_Message;
boost::shared_lock<boost::shared_mutex> m_MessageHandlerSharedLock;
boost::asio::io_service& m_IOService;
MessageHandler &m_MessageHandler;
void BeginDecode();
void DoDecode();
void DecodeDeviceMessage(std::istringstream& AddressPatternStream);
};
#endif // OSCMESSAGEDECODER_H