Class: Orocos::Log::OutputPort::CodeBlockConnection
- Inherits:
-
Object
- Object
- Orocos::Log::OutputPort::CodeBlockConnection
show all
- Defined in:
- lib/orocos/log/task_context.rb
Overview
Defines a connection which is set through connect_to
Defined Under Namespace
Classes: OnData, OnRawData
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
Returns a new instance of CodeBlockConnection
258
259
260
261
|
# File 'lib/orocos/log/task_context.rb', line 258
def initialize(port,code_block)
@code_block = code_block
@port = port
end
|
Instance Attribute Details
#port ⇒ Object
Returns the value of attribute port
252
253
254
|
# File 'lib/orocos/log/task_context.rb', line 252
def port
@port
end
|
Instance Method Details
#disable ⇒ Object
271
272
273
|
# File 'lib/orocos/log/task_context.rb', line 271
def disable
port.remove_connection(self)
end
|
#enable ⇒ Object
267
268
269
|
# File 'lib/orocos/log/task_context.rb', line 267
def enable
port.add_connection(self)
end
|
#enabled? ⇒ Boolean
263
264
265
|
# File 'lib/orocos/log/task_context.rb', line 263
def enabled?
port.has_connection?(self)
end
|
#port_name ⇒ Object
254
255
256
|
# File 'lib/orocos/log/task_context.rb', line 254
def port_name
port.name
end
|