class Roby::StateEvent

A state event is an event which emits when some parameters over the state are reached. See DeltaEvent and TimePointEvent.

Public Class Methods

new(*args, &block) click to toggle source
Calls superclass method Roby::EventGenerator::new
# File lib/roby/state/events.rb, line 112
def initialize(*args, &block)
    @disabled = nil
    @armed = true
    super
end

Public Instance Methods

disable() click to toggle source

Call to disable this event. When the state events are disabled, they will no more emit.

# File lib/roby/state/events.rb, line 145
def disable; @disabled = true end
disabled?() click to toggle source

True if this event is currently disabled

# File lib/roby/state/events.rb, line 136
def disabled?; @disabled end
enable(reset = true) click to toggle source

Call to reenable this event. If reset is true, the event is reset at the same time.

# File lib/roby/state/events.rb, line 139
def enable(reset = true)
    @disabled = false
    self.reset if reset
end
enabled?() click to toggle source

True if this event is currently active

# File lib/roby/state/events.rb, line 134
def enabled?; !@disabled end
reset() click to toggle source

After this call, the event will be emitted the next time its state condition is met, regardless of the fact that it has already been emitted or not

See also armed?

# File lib/roby/state/events.rb, line 129
def reset
    @armed = true
end