Class: RUPNP::Event
- Inherits:
-
EM::Channel
- Object
- EM::Channel
- RUPNP::Event
- Defined in:
- lib/rupnp/event.rb
Overview
TODO:
Renewal and cancellation of subscription are not coded
Event class to handle events from devices
Instance Attribute Summary collapse
-
#sid ⇒ Integer
readonly
Get service ID.
Instance Method Summary collapse
-
#cancel_subscription ⇒ Object
Cancel subscription to event.
-
#initialize(sid, timeout) ⇒ Event
constructor
A new instance of Event.
-
#renew_subscription ⇒ Object
Renew subscription to event.
Constructor Details
#initialize(sid, timeout) ⇒ Event
Returns a new instance of Event.
14 15 16 17 18 |
# File 'lib/rupnp/event.rb', line 14 def initialize(sid, timeout) @sid, @timeout = sid, timeout @timeout_timer = EM.add_timer(@timeout) { self << :timeout } end |
Instance Attribute Details
#sid ⇒ Integer (readonly)
Get service ID
10 11 12 |
# File 'lib/rupnp/event.rb', line 10 def sid @sid end |
Instance Method Details
#cancel_subscription ⇒ Object
Cancel subscription to event
26 27 28 |
# File 'lib/rupnp/event.rb', line 26 def cancel_subscription raise NotImplementedError end |
#renew_subscription ⇒ Object
Renew subscription to event
21 22 23 |
# File 'lib/rupnp/event.rb', line 21 def renew_subscription raise NotImplementedError end |