22 #ifndef INCLUDE_OLAD_DMXSOURCE_H_
23 #define INCLUDE_OLAD_DMXSOURCE_H_
26 #include <ola/Clock.h>
48 m_timestamp(timestamp),
49 m_priority(priority) {
53 m_buffer = other.m_buffer;
54 m_timestamp = other.m_timestamp;
55 m_priority = other.m_priority;
64 m_buffer = other.m_buffer;
65 m_timestamp = other.m_timestamp;
66 m_priority = other.m_priority;
74 bool operator==(
const DmxSource &other)
const {
75 return (m_buffer == other.m_buffer &&
76 m_timestamp == other.m_timestamp &&
77 m_priority == other.m_priority);
87 m_timestamp = timestamp;
88 m_priority = priority;
95 const DmxBuffer &Data()
const {
return m_buffer; }
101 const TimeStamp &Timestamp()
const {
return m_timestamp; }
107 bool IsActive(
const TimeStamp &now)
const {
108 TimeStamp timeout = m_timestamp + TIMEOUT_INTERVAL;
109 return now < timeout;
117 return m_timestamp.IsSet();
124 uint8_t Priority()
const {
return m_priority; }
134 #endif // INCLUDE_OLAD_DMXSOURCE_H_