Class: Syskit::Actions::Profile::RobotDefinition

Inherits:
Robot::RobotDefinition show all
Defined in:
lib/syskit/actions/profile.rb

Overview

Robot definition class inside a profile

It is subclassed so that we can invalidate the cached dependency injection object whenever the robot gets modified

Instance Attribute Summary collapse

Attributes inherited from Robot::RobotDefinition

#devices

Instance Method Summary collapse

Methods inherited from Robot::RobotDefinition

#clear, #com_bus, #device, #each_device, #each_master_device, #each_slave_device, #empty?, #find_device, #find_through_method_missing, #has_device?, #has_through_method_missing?, #inject_di_context, #register_device, #through, #to_dependency_injection, #use_robot

Constructor Details

#initialize(profile) ⇒ RobotDefinition

Returns a new instance of RobotDefinition



176
177
178
179
# File 'lib/syskit/actions/profile.rb', line 176

def initialize(profile)
    @profile = profile
    super()
end

Instance Attribute Details

#profileProfile (readonly)

Returns the profile object this robot definition is part of

Returns:

  • (Profile)

    the profile object this robot definition is part of



174
175
176
# File 'lib/syskit/actions/profile.rb', line 174

def profile
  @profile
end

Instance Method Details

#invalidate_dependency_injectionObject



181
182
183
184
# File 'lib/syskit/actions/profile.rb', line 181

def invalidate_dependency_injection
    super
    profile.invalidate_dependency_injection
end

#to_sObject



186
187
188
# File 'lib/syskit/actions/profile.rb', line 186

def to_s
    "#{profile.name}.robot"
end