Sha256: faabde753f6deac5ca986226af90f59a99c6add34e01d3efe3c9d577b347b553
Contents?: true
Size: 1.09 KB
Versions: 9
Compression:
Stored size: 1.09 KB
Contents
module Qcmd class Context attr_accessor :machine, :workspace, :workspace_connected, :cue, :cue_connected, :qlab def reset disconnect_machine disconnect_workspace disconnect_cue end def disconnect_machine self.qlab.close unless self.qlab.nil? self.machine = nil end def disconnect_workspace self.workspace = nil self.workspace_connected = false end def disconnect_cue self.cue = nil self.cue_connected = false end def machine_connected? !machine.nil? end def workspace_connected? !!workspace_connected end def cue_connected? !!cue_connected end def connection_state if !machine_connected? :none elsif !workspace_connected? :machine elsif !cue_connected? :workspace else :cue end end def connect_to_qlab handler=nil # get an open connection with the default handler handler ||= Qcmd::Handler self.qlab = OSC::TCPClient.new(machine.address, machine.port, handler) end end end
Version data entries
9 entries across 9 versions & 1 rubygems