Describes a certain Event. More...
Header: | #include <EventDescriptor> |
enum | Type { TypeDevice, TypeInterface } |
EventDescriptor() | |
EventDescriptor(const EventTypeId & eventTypeId, const DeviceId & deviceId, const QList<ParamDescriptor> & paramDescriptors = QList<ParamDescriptor> ()) | |
EventDescriptor(const QString & interface, const QString & interfaceEvent, const QList<ParamDescriptor> & paramDescriptors = QList<ParamDescriptor> ()) | |
DeviceId | deviceId() const |
EventTypeId | eventTypeId() const |
QString | interface() const |
QString | interfaceEvent() const |
bool | isValid() const |
ParamDescriptor | paramDescriptor(const ParamTypeId & paramTypeId) const |
QList<ParamDescriptor> | paramDescriptors() const |
void | setParamDescriptors(const QList<ParamDescriptor> & paramDescriptors) |
Type | type() const |
bool | operator==(const EventDescriptor & other) const |
Describes a certain Event.
An EventDescriptor describes an Event in order to match it with a nymeaserver::Rule.
An EventDescriptor can either be bound to a certain device/eventtype, or to an interface. If an event is bound to a device, it will only match when the given device fires the given event. If an event is bound to an interface, it will match the given event for all the devices implementing the given interface.
See also Event, EventType, and nymeaserver::Rule.
Constant | Value | Description |
---|---|---|
EventDescriptor::TypeDevice | 0 | The EventDescriptor describes a device Event. |
EventDescriptor::TypeInterface | 1 | The EventDescriptor describes an interface based Event. |
Constructs an EventDescriptor describing an Event with the given eventTypeId, deviceId and the given paramDescriptors.
Constructs an EventDescriptor describing an Event with the given interface, interfaceEvent and the given paramDescriptors.
Returns the id of the Device associated with this Event.
Returns the id of the EventType which describes this Event.
Returns the interface associated with this EventDescriptor.
Returns the interface's event name associated with this EventDescriptor.
Returns true if the EventDescriptor is valid, that is, when it has either enough data to describe a device/eventType or an interface/interfaceEvent pair.
Returns the ParamDescriptor with the given paramTypeId, otherwise an invalid ParamDescriptor.
Returns the parameters of this Event.
See also setParamDescriptors().
Set the parameters of this Event to paramDescriptors.
See also paramDescriptors().
Returns true Type of this descriptor.
Compare this Event to the Event given by other. Events are equal (returns true) if eventTypeId, deviceId and params match.