forked from xLightsSequencer/xLights
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSyncOSC.h
40 lines (32 loc) · 1.46 KB
/
SyncOSC.h
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
34
35
36
37
38
39
40
#pragma once
/***************************************************************
* This source files comes from the xLights project
* https://www.xlights.org
* https://github.com/smeighan/xLights
* See the github commit history for a record of contributing
* developers.
* Copyright claimed based on commit dates recorded in Github
* License: https://github.com/smeighan/xLights/blob/master/License.txt
**************************************************************/
#include "SyncManager.h"
#include "ScheduleOptions.h"
#include <wx/socket.h>
class ListenerManager;
class OSCPacket;
class SyncOSC : public SyncBase
{
wxDatagramSocket* _oscSocket = nullptr;
std::string _path = "";
bool _isTime = true;
OSCTIME _timeType = OSCTIME::TIME_MILLISECONDS;
OSCFRAME _frameCode = OSCFRAME::FRAME_DEFAULT;
wxIPV4address _remoteAddr;
void SendOSC(const OSCPacket& osc) const;
public:
SyncOSC(SYNCMODE mode, REMOTEMODE remoteMode, const ScheduleOptions& options, ListenerManager* listenerManager, const std::string& localIP);
SyncOSC(SyncOSC&& from);
virtual ~SyncOSC();
virtual void SendSync(uint32_t frameMS, uint32_t stepLengthMS, uint32_t stepMS, uint32_t playlistMS, const std::string& fseq, const std::string& media, const std::string& step, const std::string& timeItem, uint32_t stepno) const override;
virtual std::string GetType() const override { return "OSC"; }
virtual void SendStop() const override;
};