Class: Syskit::ROS::Node

Inherits:
TaskContext show all
Extended by:
Logger::Hierarchy
Includes:
Logger::Hierarchy
Defined in:
lib/syskit/ros/node.rb

Defined Under Namespace

Classes: Start, Stop

Constant Summary

Constants inherited from TaskContext

TaskContext::D_DIFFERENT_HOSTS, TaskContext::D_SAME_HOST, TaskContext::D_SAME_PROCESS

Constants included from Models::Component

Models::Component::PROVIDES_ARGUMENTS

Instance Attribute Summary

Attributes inherited from TaskContext

#last_orogen_state, #orocos_task, #orogen_model, #orogen_state, #properties, #property_overrides, #r tid, #state_reader

Attributes included from Models::TaskContext

#configuration_manager, #extension_file, #orogen_model

Attributes included from Models::Component

#concrete_model

Attributes inherited from Component

#dynamics, #required_host, #requirements

Task Events collapse

Instance Method Summary collapse

Methods inherited from TaskContext

#aborted?, #aborted_event, #added_sink, #apply_configuration, #can_be_deployed_by?, #can_finalize?, #can_merge?, #clean_dynamic_port_connections, #clear_property_overrides, #commit_properties, #commit_properties_if_needed, #conf, #conf=, #create_fresh_copy, #deployment_hints, #distance_to, #distance_to_syskit, #dynamic_input_port_connections, #dynamic_output_port_connections, #each_property, #exception_event, #executable?, #fatal_error_event, #find_property, #find_through_method_missing, #handle_state_changes, #has_property?, #has_through_method_missing?, #in_process?, #initialize_remote_handles, #instanciate_dynamic_input_port, #instanciate_dynamic_output_port, #interrupt?, #interrupt_event, #kill_execution_agent_if_alone, #merge, #needs_reconfiguration?, #on_localhost?, #operation, #orocos_name, #orocos_name=, #perform_setup, #properties_updated?, #properties_updated_event, #property, #queue_property_update_if_needed, #read_current_state, #ready_to_start!, #removed_sink, #reusable?, #running_event, #runtime_error_event, #self_port_to_orocos_port, #setting_up!, #setup?, #setup_failed!, #setup_successful!, #state_event, #stop_orocos_task, #stub!, #tid, #trigger_latency, #updated_sink, #validate_orogen_state_from_rtt_state, #validate_orogen_states=, #validate_orogen_states?, #will_never_setup?, #would_use_property_update?

Methods included from Models::TaskContext

#all_state_event, #apply_block, #clear_registration_as_constant, #define_from_orogen, #each_event_port, #each_state_event, #make_state_events, #merge_service_model, #needs_stub?, #new_submodel, #root_model, #setup_submodel, #state_events, #worstcase_processing_time

Methods included from Models::OrogenBase

#find_model_by_orogen, #find_model_from_orogen_name, #has_model_for?, #model_for

Methods included from Models::PortAccess

#each_input_port, #each_output_port, #each_port, #find_input_port, #find_output_port, #find_port, #find_through_method_missing, #has_dynamic_input_port?, #has_dynamic_output_port?, #has_input_port?, #has_output_port?, #has_port?, #has_through_method_missing?, #port_by_name

Methods included from Models::Component

#all_data_service, #all_dynamic_service, #all_stub_module, #apply_missing_dynamic_services_from, #as, #as_plan, #bind, #can_merge?, #clear_model, #component_model?, #compute_port_mappings, #concrete_model?, #connected?, #create_dynamic_instantiation_context, #create_private_specialization, #create_proxy_task, #create_proxy_task_model, #data_service, #data_services, #deregister_placeholder_model, #deregister_submodels, #driver_for, #dynamic_service, #dynamic_services, #each_com_bus_driver_service, #each_data_service, #each_dynamic_service, #each_input_port, #each_master_driver_service, #each_output_port, #each_port, #each_required_dynamic_service, #each_required_model, #each_root_data_service, #each_slave_data_service, #each_stub_module, #ensure_model_is_specialized, #find_all_data_services_from_type, #find_data_service_from_type, #find_directional_port_mapping, #find_input_port, #find_matching_service, #find_output_port, #find_placeholder_model, #find_port, #find_through_method_missing, #fullfills?, #has_through_method_missing?, #if_already_present, #implicit_fullfilled_model, #instanciate, #instanciate_dynamic_input_port, #instanciate_dynamic_output_port, #merge, #merge_service_model, #method_missing, #needs_stub?, #placeholder?, #port_mappings_for, #port_mappings_for_task, #prefer_deployed_tasks, #prepare_stub, #private_specialization=, #private_specialization?, #promote_data_service, #promote_dynamic_service, #provides, #provides_dynamic, #proxy_task_model, #register_placeholder_model, #require_dynamic_service, #resolve, #selected_for, #self_port?, #self_port_to_component_port, #specialization_counter, #specialize, #stub, #stub_module, #supermodel, #to_component_model, #try_bind, #try_resolve, #use_conf, #use_deployments, #with_arguments, #with_conf, #with_dynamic_service

Methods included from DataService

#using_data_service?

Methods included from Models::Base

#dependency_injection_names, #pretty_print, #short_name, #to_instance_requirements, #to_s

Methods inherited from Component

#added_dynamic_service, #added_input_port_connection, #added_output_port_connection, #adding_input_port_connection, #adding_output_port_connection, #as, #bind, #can_be_deployed_by?, #can_finalize?, #can_merge?, #concrete_model, #connect_to, #create_fresh_copy, #data_accessor, #data_reader, #data_writer, #dependency_context, #deployment_hints, #duplicate_missing_services_from, #each_data_service, #each_dynamic_service, #each_fullfilled_model, #each_required_dynamic_service, #find_data_service, #find_data_service_from_type, #find_through_method_missing, #has_data_service?, #has_through_method_missing?, #initialize_copy, #meets_configurationg_precedence_constraints?, #merge, #perform_setup, #placeholder?, #removed_input_port_connection, #removed_output_port_connection, #removing_input_port_connection, #removing_output_port_connection, #require_dynamic_service, #self_port_to_actual_port, #self_port_to_component_port, #setting_up!, #setting_up?, #setup=, #setup?, #setup_failed!, #setup_successful!, #should_configure_after, #specialize, #specialized_model?, #start_only_when_connected?, #to_instance_requirements, #update_requirements, #will_never_setup?

Methods included from PortAccess

#each_input_port, #each_output_port, #each_port, #find_input_port, #find_output_port, #find_port, #find_through_method_missing, #has_input_port?, #has_output_port?, #has_port?, #has_through_method_missing?

Constructor Details

#initialize(arguments = Hash.new) ⇒ Node

Returns a new instance of Node



7
8
9
# File 'lib/syskit/ros/node.rb', line 7

def initialize(arguments = Hash.new)
    super
end

Instance Method Details

#configureObject



42
43
# File 'lib/syskit/ros/node.rb', line 42

def configure
end

#needs_reconfiguration!Object

Raises:

  • (NotImplementedError)


27
28
29
# File 'lib/syskit/ros/node.rb', line 27

def needs_reconfiguration!
    raise NotImplementedError, "cannot reconfigure a Syskit::ROS::Node"
end

#prepare_for_setup(state = nil) ⇒ Object



11
12
13
# File 'lib/syskit/ros/node.rb', line 11

def prepare_for_setup(state = nil)
    true
end

#ready_for_setup?(state = nil) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/syskit/ros/node.rb', line 15

def ready_for_setup?(state = nil)
    super(:PRE_OPERATIONAL)
end

#setupObject



19
20
21
22
23
24
25
# File 'lib/syskit/ros/node.rb', line 19

def setup
    if Orocos::ROS.rosnode_running?(orocos_name)
        setup_successful!
    else
        raise InternalError, "#setup called but ROS node '#{orocos_name}' is not running"
    end
end

#start?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/syskit/ros/node.rb', line 31

event :start do |context|
    emit :start
end

#start_eventEventGenerator

Returns:

  • (EventGenerator)


31
32
33
# File 'lib/syskit/ros/node.rb', line 31

event :start do |context|
    emit :start
end

#stop?Boolean

Returns:

  • (Boolean)


35
36
37
# File 'lib/syskit/ros/node.rb', line 35

event :stop do |context|
    emit :stop
end

#stop_eventEventGenerator

Returns:

  • (EventGenerator)


35
36
37
# File 'lib/syskit/ros/node.rb', line 35

event :stop do |context|
    emit :stop
end

#update_orogen_stateObject



39
40
# File 'lib/syskit/ros/node.rb', line 39

def update_orogen_state
end