wotpy.wot.events
Classes that represent events that are emitted by Things.
Classes
Event triggered to indicate an action invocation. |
|
|
Represents the data contained in an action invocation event. |
|
Base event class. |
Event triggered to indicate a property change. |
|
|
Represents the data contained in a property update event. |
Event triggered to indicate a thing description change. |
|
|
Represents the data contained in a thing description update event. |
- class wotpy.wot.events.ActionInvocationEmittedEvent(init)
Bases:
EmittedEventEvent triggered to indicate an action invocation. Should be initialized with a ActionInvocationEventInit instance.
- class wotpy.wot.events.ActionInvocationEventInit(action_name, return_value)
Bases:
objectRepresents the data contained in an action invocation event.
- Parameters:
action_name (str) – Name of the property.
return_value – Result returned by the action invocation.
- class wotpy.wot.events.EmittedEvent(init, name)
Bases:
objectBase event class. Represents a generic event defined in a TD.
- property data
Data property.
- class wotpy.wot.events.PropertyChangeEmittedEvent(init)
Bases:
EmittedEventEvent triggered to indicate a property change. Should be initialized with a PropertyChangeEventInit instance.
- class wotpy.wot.events.PropertyChangeEventInit(name, value)
Bases:
objectRepresents the data contained in a property update event.
- Parameters:
name (str) – Name of the property.
value – Value of the property.
- class wotpy.wot.events.ThingDescriptionChangeEmittedEvent(init)
Bases:
EmittedEventEvent triggered to indicate a thing description change. Should be initialized with a ThingDescriptionChangeEventInit instance.
- class wotpy.wot.events.ThingDescriptionChangeEventInit(td_change_type, method, name, data=None, description=None)
Bases:
objectRepresents the data contained in a thing description update event.
- Parameters:
td_change_type (str) – An item of enumeration
TDChangeType.method (str) – An item of enumeration
TDChangeMethod.name (str) – Name of the Interaction.
data – An instance of
ThingPropertyInit,ThingActionInitorThingEventInit(orNoneif the change did not add a new interaction).description (dict) – A dict that represents a TD serialized to JSON-LD.