Class: Syskit::PortAccessor

Inherits:
Object show all
Defined in:
lib/syskit/port.rb

Overview

Base class for output reader/input writer

Direct Known Subclasses

InputWriter, OutputReader

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(port, policy = Hash.new) ⇒ PortAccessor

Returns a new instance of PortAccessor



215
216
217
218
219
220
221
222
# File 'lib/syskit/port.rb', line 215

def initialize(port, policy = Hash.new)
    @port = port.to_component_port
    @policy = policy
    @disconnected = false
    schedule_resolution(@port) do |resolved_port, _|
        @resolved_port = resolved_port
    end
end

Instance Attribute Details

#actual_portSyskit::OutputPort (readonly)

The actual port, when resolved. This is the port on the TaskContext object that actually serves the data

Returns:



211
212
213
# File 'lib/syskit/port.rb', line 211

def actual_port
  @actual_port
end

#policyObject (readonly)

The connection policy



213
214
215
# File 'lib/syskit/port.rb', line 213

def policy
  @policy
end

#portSyskit::OutputPort (readonly)

The port for which this is a writer

Returns:



203
204
205
# File 'lib/syskit/port.rb', line 203

def port
  @port
end

#resolved_portSyskit::OutputPort (readonly)

The port actually resolved. This is different from #port if #port is on an abstract task that got replaced

Returns:



207
208
209
# File 'lib/syskit/port.rb', line 207

def resolved_port
  @resolved_port
end