Class: Syskit::Coordination::DataMonitoringError

Inherits:
Roby::LocalizedError
  • Object
show all
Defined in:
lib/syskit/coordination/data_monitoring_error.rb

Overview

Exception issued by the data monitors in Syskit::Coordination::DataMonitor#poll when predicate#finalize returns true

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(task, monitor, time, samples) ⇒ DataMonitoringError

Returns a new instance of DataMonitoringError



10
11
12
13
14
15
# File 'lib/syskit/coordination/data_monitoring_error.rb', line 10

def initialize(task, monitor, time, samples)
    super(task)
    @monitor = monitor
    @time = time
    @samples = samples
end

Instance Attribute Details

#monitorObject (readonly)

Returns the value of attribute monitor



6
7
8
# File 'lib/syskit/coordination/data_monitoring_error.rb', line 6

def monitor
  @monitor
end

#samplesObject (readonly)

Returns the value of attribute samples



8
9
10
# File 'lib/syskit/coordination/data_monitoring_error.rb', line 8

def samples
  @samples
end

#timeObject (readonly)

Returns the value of attribute time



7
8
9
# File 'lib/syskit/coordination/data_monitoring_error.rb', line 7

def time
  @time
end

Instance Method Details

#pretty_print(pp) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/syskit/coordination/data_monitoring_error.rb', line 17

def pretty_print(pp)
    pp.text "data monitor #{monitor} triggered at #{time}, with data samples "
    pp.seplist(samples) do |s|
        s.pretty_print(pp)
    end
    pp.breakable
    super
end