Class: Roby::Interface::V2::Protocol::Task

Inherits:
Struct
  • Object
show all
Defined in:
lib/roby/interface/v2/protocol.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments

Returns:

  • (Object)

    the current value of arguments



67
68
69
# File 'lib/roby/interface/v2/protocol.rb', line 67

def arguments
  @arguments
end

#idObject

Returns the value of attribute id

Returns:

  • (Object)

    the current value of id



67
68
69
# File 'lib/roby/interface/v2/protocol.rb', line 67

def id
  @id
end

#modelObject

Returns the value of attribute model

Returns:

  • (Object)

    the current value of model



67
68
69
# File 'lib/roby/interface/v2/protocol.rb', line 67

def model
  @model
end

#started_sinceObject

Returns the value of attribute started_since

Returns:

  • (Object)

    the current value of started_since



67
68
69
# File 'lib/roby/interface/v2/protocol.rb', line 67

def started_since
  @started_since
end

#stateObject

Returns the value of attribute state

Returns:

  • (Object)

    the current value of state



67
68
69
# File 'lib/roby/interface/v2/protocol.rb', line 67

def state
  @state
end

Instance Method Details

#pp_arguments(pp) ⇒ Object



80
81
82
83
84
85
86
87
88
89
90
# File 'lib/roby/interface/v2/protocol.rb', line 80

def pp_arguments(pp)
    pp.text "Arguments"
    pp.nest(2) do
        arguments.each do |name, arg|
            pp.breakable
            pp.text name.to_s
            pp.text ": "
            arg.pretty_print(pp)
        end
    end
end

#pretty_print(pp) ⇒ Object



70
71
72
73
74
75
76
77
78
# File 'lib/roby/interface/v2/protocol.rb', line 70

def pretty_print(pp)
    pp.text "#{model}<id:#{id}> #{state}"
    if started_since
        pp.breakable
        pp.text "Started for: #{started_since}"
    end
    pp.breakable
    pp_arguments(pp)
end