Module: OroGen::Gen::RTT_CPP::TaskDeploymentGeneration

Included in:
OroGen::Gen::RTT_CPP
Defined in:
lib/orogen/gen/deployment.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(*args, &block) ⇒ Object



46
47
48
49
50
51
# File 'lib/orogen/gen/deployment.rb', line 46

def method_missing(*args, &block)
    if project.deffile && File.file?(project.deffile)
        OroGen.check_for_stray_dots(project.deffile, name, args)
    end
    super
end

Instance Method Details

#generate_activity_setupObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/orogen/gen/deployment.rb', line 7

def generate_activity_setup
    if @activity_setup
        @activity_setup.call
    else
        result = <<-EOD
#{activity_type.class_name}* activity_#{name} = new #{activity_type.class_name}(
#{rtt_scheduler},
#{rtt_priority},
task_#{name}->engine(),
"#{name}");
        EOD
    end
end

#rtt_priorityObject

Returns the Orocos value for this task's priority



35
36
37
38
39
40
41
42
43
44
# File 'lib/orogen/gen/deployment.rb', line 35

def rtt_priority
    case @priority
    when :highest
        'RTT::os::HighestPriority'
    when :lowest
        'RTT::os::LowestPriority'
    when Integer
        @priority
    end
end

#rtt_schedulerObject

Returns the scheduler constant name for this task's scheduler class. Call #realtime and #non_realtime to change the task scheduling class



28
29
30
31
32
# File 'lib/orogen/gen/deployment.rb', line 28

def rtt_scheduler
    if @realtime then 'ORO_SCHED_RT'
    else 'ORO_SCHED_OTHER'
    end
end

#to_deployer_xmlObject



21
22
23
# File 'lib/orogen/gen/deployment.rb', line 21

def to_deployer_xml
    @activity_xml.call
end