-
Notifications
You must be signed in to change notification settings - Fork 6
/
Ssdp.h
39 lines (33 loc) · 790 Bytes
/
Ssdp.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
#ifndef SSDP_H__
#define SSDP_H__
#include <Arduino.h>
#include <WiFiUdp.h>
#include "Timer.h"
#include "UpnpDevice.h"
#include "DateTime.h"
#include "HttpRequest.h"
#include "MSearchInfo.h"
#include "NotifyType.h"
#include "LinkedList.h"
class Ssdp
{
public:
Ssdp(IPAddress ip);
~Ssdp();
void begin();
void loop();
inline DateTime* getDateTime() { return m_dateTime; }
inline void setDateTime(DateTime* dateTime) { m_dateTime = dateTime; }
inline void setUdpSendCount(uint8 count) { _udpSendCount = count; }
inline void setIPAddress(IPAddress ip) { _localIP = ip; }
void addDevice(UpnpDevice* device);
private:
WiFiUDP _multicast;
IPAddress _localIP;
uint8 _ttl;
DateTime* m_dateTime;
Timer m_timer;
uint8 _udpSendCount;
LinkedList<UpnpDevice*> m_devices;
};
#endif