Class: Bundesstrasse::Device

Inherits:
Object
  • Object
show all
Includes:
Errors
Defined in:
lib/bundesstrasse/device.rb

Direct Known Subclasses

ForwarderDevice, QueueDevice, StreamerDevice

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Errors

#errno, #error_string

Constructor Details

#initialize(type, frontend, backend) ⇒ Device

Returns a new instance of Device.



7
8
9
10
11
# File 'lib/bundesstrasse/device.rb', line 7

def initialize(type, frontend, backend)
  @type = type
  @frontend = frontend
  @backend = backend
end

Instance Attribute Details

#backendObject (readonly)

Returns the value of attribute backend.



6
7
8
# File 'lib/bundesstrasse/device.rb', line 6

def backend
  @backend
end

#frontendObject (readonly)

Returns the value of attribute frontend.



6
7
8
# File 'lib/bundesstrasse/device.rb', line 6

def frontend
  @frontend
end

Instance Method Details

#startObject



13
14
15
16
17
# File 'lib/bundesstrasse/device.rb', line 13

def start
  error_check do
    ZMQ::LibZMQ.zmq_device(@type, @frontend.pointer, @backend.pointer)
  end
end