Class: OroGen::Loaders::RTT
- Defined in:
- lib/orogen/loaders/rtt.rb
Constant Summary collapse
- DIR =
File.join(File.(File.dirname(__FILE__)), 'rtt')
- STANDARD_PROJECT_SPECS =
{ "RTT" => DIR, "OCL" => DIR }
- STANDARD_TYPEKIT_SPECS =
{ "orocos" => DIR }
Instance Attribute Summary
Attributes inherited from PkgConfig
#available_deployed_tasks, #available_deployments, #available_projects, #available_task_models, #available_typekits, #available_types, #orocos_target
Attributes inherited from Base
#interface_typelist, #loaded_deployment_models, #loaded_projects, #loaded_task_models, #loaded_typekits, #project_load_callbacks, #registry, #root_loader, #typekit_load_callbacks, #typekits_by_type_name
Class Method Summary collapse
- .loader ⇒ Object
- .setup_loader(loader) ⇒ Object
- .standard_projects ⇒ Object
- .standard_typekits ⇒ Object
Instance Method Summary collapse
- #clear ⇒ Object
-
#initialize(orocos_target = ENV['OROCOS_TARGET'], root_loader = self) ⇒ RTT
constructor
A new instance of RTT.
Methods inherited from PkgConfig
#add_project_from, #each_available_deployed_task, #each_available_deployed_task_name, #each_available_deployment_name, #each_available_project_name, #each_available_task_model_name, #each_available_type_name, #each_available_typekit_name, #find_basic_deployed_task_info, #find_deployment_binfile, #find_deployments_from_deployed_task_name, #find_pkgconfig, #find_project_from_deployment_name, #find_task_library_from_task_model_name, #has_pkgconfig?, #has_project?, #has_typekit?, #load_available_deployed_tasks, #load_available_types, #project_model_text_from_name, #resolve_package_library, #resolve_task_library_package, #resolve_transport_package, #resolve_typekit_package, #task_library_path_from_name, #to_s, #transport_library_path_from_name, #typekit_for, #typekit_library_path_from_name, #typekit_model_text_from_name
Methods inherited from Base
#added_child, #define_dummy_types=, #define_dummy_types?, #deployed_task_model_from_name, #deployment_model_from_name, #each_available_project_name, #find_deployments_from_deployed_task_name, #find_project_from_deployment_name, #find_task_library_from_task_model_name, #has_loaded_project?, #has_loaded_typekit?, #has_project?, #has_typekit?, #imported_typekits_for, #inspect, #interface_type?, #intermediate_type?, #intermediate_type_for, #m_type?, #on_project_load, #on_typekit_load, #opaque_type_for, #project_model_from_name, #project_model_from_text, #project_model_text_from_name, #register_deployment_model, #register_project_model, #register_task_context_model, #register_type_model, #register_typekit_model, #remove_project_load_callback, #resolve_interface_type, #resolve_type, #task_library_model_from_name, #task_model_from_name, #typekit_model_from_name, #typekit_model_text_from_name, #typelib_type_for
Constructor Details
#initialize(orocos_target = ENV['OROCOS_TARGET'], root_loader = self) ⇒ RTT
Returns a new instance of RTT
18 19 20 |
# File 'lib/orogen/loaders/rtt.rb', line 18 def initialize(orocos_target = ENV['OROCOS_TARGET'], root_loader = self) super end |
Class Method Details
.loader ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/orogen/loaders/rtt.rb', line 7 def self.loader loader = Files.new STANDARD_PROJECT_SPECS.each do |name, dir| loader.register_orogen_file(File.join(dir, "#{name}.orogen"), name) end STANDARD_TYPEKIT_SPECS.each do |name, dir| loader.register_typekit(dir, name) end loader end |
.setup_loader(loader) ⇒ Object
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/orogen/loaders/rtt.rb', line 50 def self.setup_loader(loader) standard_typekits.each do |tk| loader.register_typekit_model(tk) # One additional step for us: register the types in # tk.typelist manually. This is needed as we use the # typelist to register non-normalized names tk.typelist.each do |typename| loader.typekits_by_type_name[typename] ||= Array.new loader.typekits_by_type_name[typename] << tk end end standard_projects.each do |proj| loader.register_project_model(proj) end end |
.standard_projects ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/orogen/loaders/rtt.rb', line 22 def self.standard_projects if !@standard_projects loader = self.loader @standard_projects = STANDARD_PROJECT_SPECS.map do |name, dir| loader.project_model_from_name(name) end end @standard_projects end |
.standard_typekits ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/orogen/loaders/rtt.rb', line 32 def self.standard_typekits if !@standard_typekits loader = self.loader @standard_typekits = STANDARD_TYPEKIT_SPECS.map do |name, _| typekit = loader.typekit_model_from_name(name) typekit.virtual = true # Some fine-tuning :( Super-HACK if name == 'orocos' type = typekit.registry.create_container '/std/string', '/std/string' type..set 'orogen_include', 'string' typekit.registry.alias '/string', '/std/string' end typekit end end return @standard_typekits end |
Instance Method Details
#clear ⇒ Object
66 67 68 69 |
# File 'lib/orogen/loaders/rtt.rb', line 66 def clear super RTT.setup_loader(self) end |