Module: OroGen::Gen::RTT_CPP::OutputPortGeneration
- Defined in:
- lib/orogen/gen/tasks.rb
Overview
Module that is used to add code generation functionality to Spec::OutputPort
Instance Method Summary collapse
-
#orocos_class ⇒ Object
Returns the name of the RTT class for this port (i.e. one of ReadDataPort, WriteDataPort, DataPort, ReadBufferPort, …).
- #register_for_generation ⇒ Object
Instance Method Details
#orocos_class ⇒ Object
Returns the name of the RTT class for this port (i.e. one of ReadDataPort, WriteDataPort, DataPort, ReadBufferPort, …)
140 |
# File 'lib/orogen/gen/tasks.rb', line 140 def orocos_class; "RTT::OutputPort" end |
#register_for_generation ⇒ Object
142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 |
# File 'lib/orogen/gen/tasks.rb', line 142 def register_for_generation super setup = [] if keep_last_written_value == :initial setup << "_#{name}.keepLastWrittenValue(false);" setup << "_#{name}.keepNextWrittenValue(true);" elsif keep_last_written_value setup << "_#{name}.keepLastWrittenValue(true);" setup << "_#{name}.keepNextWrittenValue(false);" else setup << "_#{name}.keepLastWrittenValue(false);" setup << "_#{name}.keepNextWrittenValue(false);" end type..get('orogen:cxx_port_codegen:constructor').each do |code| setup << code % [name] end task.add_base_construction("output_port", "_#{name}", setup.join("\n")) end |