class ATEM::Switcher::Input

Attributes

audio[RW]
id[R]
name[R]
quick_init[R]
short_name[R]
switcher[R]
type[RW]

Public Class Methods

from(packet, switcher, type) click to toggle source
# File lib/atem/switcher/input.rb, line 16
def self.from packet, switcher, type

        input = self.new switcher
        input.init_from packet

        input.type = type

        input

end
new(switcher) click to toggle source
# File lib/atem/switcher/input.rb, line 27
def initialize switcher

        @switcher = switcher

end

Public Instance Methods

init(id, name = nil, short_name = nil) click to toggle source
# File lib/atem/switcher/input.rb, line 40
def init id, name = nil, short_name = nil

        @id = id
        @name = name or "Input #{@id}"
        @short_name = short_name or "#{@id.to_s.rjust(4, "0")}"
        @quick_init = true

end
init_from(packet) click to toggle source
# File lib/atem/switcher/input.rb, line 33
def init_from packet 

        @id, @name, @short_name, @supported, @ext_port_type, @port_type, @availability = 
                packet.unpack("S>Z20Z4xCxCCxC")

end
preview() click to toggle source
# File lib/atem/switcher/input.rb, line 51
def preview
        @switcher.preview @id
end
program() click to toggle source
# File lib/atem/switcher/input.rb, line 55
def program
        @switcher.program @id
end