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_ A time interval, with usecond accuracy.
Definition: Clock.h:138
The constants for DMX source priorities.
Definition: DmxSource.h:36
Used to hold a single universe of DMX data.
Definition: DmxBuffer.h:49
A class used to hold a single universe of DMX data.
static const uint8_t SOURCE_PRIORITY_MIN
The minimum priority for a source.
Definition: SourcePriorities.h:36
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
Represents a point in time with microsecond accuracy.
Definition: Clock.h:191