UNPKG

@joergmittaglawo/dmvconfig

Version:

DMV Configuration scripts for Lawo V__matrix Distributed Multiviewers.

559 lines (558 loc) 20.5 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Enums = exports.All = exports.SyncOutputAsTableRow = exports.SyncOutput = exports.OutputAsTableRow = exports.Output = exports.InputAsTableRow = exports.Input = exports.MergerAsTableRow = exports.Merger = exports.ConfigurationAsTableRow = exports.Configuration = exports.MADIOutput = exports.SDIOutput = exports.MADIInput = exports.SDIInput = exports.HwStatus = exports.Constraints = exports.SDIPayload = exports.BncMode = exports.lower = exports.lift = void 0; const VScript = require("vscript"); const _Time = require("./Time"); const _Definitions = require("./Definitions"); const _MetadataProcessor = require("./MetadataProcessor"); const _PTP = require("./PTP"); const _Audio = require("./Audio"); const _Video = require("./Video"); exports.lift = { SyncOutput: (kwl, socket) => kwl ? (new SyncOutput(new VScript.Subtree(socket, kwl))) : null, Output: (kwl, socket) => kwl ? (new Output(new VScript.Subtree(socket, kwl))) : null, Input: (kwl, socket) => kwl ? (new Input(new VScript.Subtree(socket, kwl))) : null, Merger: (kwl, socket) => kwl ? (new Merger(new VScript.Subtree(socket, kwl))) : null, MergerOutput: (kwl, socket) => kwl ? (new MergerOutput(new VScript.Subtree(socket, kwl))) : null, MergerConnectedTo: (kwl, socket) => kwl ? (new MergerConnectedTo(new VScript.Subtree(socket, kwl))) : null, Configuration: (kwl, socket) => kwl ? (new Configuration(new VScript.Subtree(socket, kwl))) : null, MADIOutput: (kwl, socket) => kwl ? (new MADIOutput(new VScript.Subtree(socket, kwl))) : null, SDIOutput: (kwl, socket) => kwl ? (new SDIOutput(new VScript.Subtree(socket, kwl))) : null, MADIInput: (kwl, socket) => kwl ? (new MADIInput(new VScript.Subtree(socket, kwl))) : null, SDIInput: (kwl, socket) => kwl ? (new SDIInput(new VScript.Subtree(socket, kwl))) : null, SDIInputGroup96KhzMode: (kwl, socket) => kwl ? (new SDIInputGroup96KhzMode(new VScript.Subtree(socket, kwl))) : null, HwStatus: (kwl, socket) => kwl ? (new HwStatus(new VScript.Subtree(socket, kwl))) : null, HwStatusEye: (kwl, socket) => kwl ? (new HwStatusEye(new VScript.Subtree(socket, kwl))) : null, EyeShape: (x, _) => { return x ? { width: x[0], height: x[1] } : null; }, Constraints: (kwl, socket) => kwl ? (new Constraints(new VScript.Subtree(socket, kwl))) : null, SDIPayload: (kwl, socket) => kwl ? (new SDIPayload(new VScript.Subtree(socket, kwl))) : null, BncMode: (kwl, socket) => kwl ? (new BncMode(new VScript.Subtree(socket, kwl))) : null, BncModeBnc: (kwl, socket) => kwl ? (new BncModeBnc(new VScript.Subtree(socket, kwl))) : null }; exports.lower = { SyncOutput: (ref) => ref ? ref.raw.kwl : null, Output: (ref) => ref ? ref.raw.kwl : null, Input: (ref) => ref ? ref.raw.kwl : null, Merger: (ref) => ref ? ref.raw.kwl : null, MergerOutput: (ref) => ref ? ref.raw.kwl : null, MergerConnectedTo: (ref) => ref ? ref.raw.kwl : null, Configuration: (ref) => ref ? ref.raw.kwl : null, MADIOutput: (ref) => ref ? ref.raw.kwl : null, SDIOutput: (ref) => ref ? ref.raw.kwl : null, MADIInput: (ref) => ref ? ref.raw.kwl : null, SDIInput: (ref) => ref ? ref.raw.kwl : null, SDIInputGroup96KhzMode: (ref) => ref ? ref.raw.kwl : null, HwStatus: (ref) => ref ? ref.raw.kwl : null, HwStatusEye: (ref) => ref ? ref.raw.kwl : null, EyeShape: (x) => x ? [x.width, x.height] : null, Constraints: (ref) => ref ? ref.raw.kwl : null, SDIPayload: (ref) => ref ? ref.raw.kwl : null, BncMode: (ref) => ref ? ref.raw.kwl : null, BncModeBnc: (ref) => ref ? ref.raw.kwl : null }; class BncModeBnc { constructor(raw) { this.raw = raw; } get board() { return new VScript.rKeyword(this, "board"); } get chip_type() { return new VScript.rKeyword(this, "chip_type"); } get direction() { return new VScript.rKeyword(this, "direction"); } get frequency() { return new VScript.rKeyword(this, "frequency"); } } class BncModeBncAsArrayRow extends BncModeBnc { constructor(st, index, parent) { super(st); this.index = index; this.parent = parent; } } class BncMode { constructor(raw) { this.raw = raw; } get version() { return new VScript.rKeyword(this, "version"); } get install_version() { return new VScript.rKeyword(this, "install_version"); } get bnc() { return new VScript.StronglyTypedArray(this, "bnc", (st, index, parent) => new BncModeBncAsArrayRow(st, index, parent)); } } exports.BncMode = BncMode; class SDIPayload { constructor(raw) { this.raw = raw; } get afd() { return new VScript.rKeyword(this, "afd", { lift: _Video.lift.AFD, lower: _Video.lower.AFD }); } get video() { return new _Video.Essence(this.raw.find("video")); } get audio() { return new _Audio.Essence(this.raw.find("audio")); } get cc() { return new _Video.ClosedCaption(this.raw.find("cc")); } get ptp_traits() { return new _PTP.Traits(this.raw.find("ptp_traits")); } } exports.SDIPayload = SDIPayload; class Constraints { constructor(raw) { this.raw = raw; } get standard() { return new VScript.duplexKeyword(this, "standard"); } } exports.Constraints = Constraints; class HwStatusEye { constructor(raw) { this.raw = raw; } get eye_measure_time() { return new VScript.rwKeyword(this, "eye_measure_time"); } /** Generate eye diagram */ get generate() { return new VScript.wKeyword(this, "generate"); } get progress() { return new VScript.rKeyword(this, "progress"); } /** @brief URL of the eye diagram @desc An update to this keyword signals a new eye diagram has been generated */ get url() { return new VScript.rKeyword(this, "url"); } /** @brief Measure eye opening only @desc Only measure horizontal eye opening (much faster than a full eye) */ get measure_ui() { return new VScript.wKeyword(this, "measure_ui"); } get ui_measure_time() { return new VScript.rwKeyword(this, "ui_measure_time"); } get ui() { return new VScript.rKeyword(this, "ui", { lift: exports.lift.EyeShape, lower: exports.lower.EyeShape }); } } class HwStatus { constructor(raw) { this.raw = raw; } get signature() { return new VScript.rKeyword(this, "signature", { lift: _Video.lift.TimestampedSignature, lower: _Video.lower.TimestampedSignature }); } get irq_index() { return new VScript.rKeyword(this, "irq_index"); } get deemb_read_overflow() { return new VScript.rKeyword(this, "deemb_read_overflow"); } get deemb_read_underflow() { return new VScript.rKeyword(this, "deemb_read_underflow"); } get deemb_read_running() { return new VScript.rKeyword(this, "deemb_read_running"); } get phy_rx_locked_to_ref() { return new VScript.rKeyword(this, "phy_rx_locked_to_ref"); } get phy_rx_locked_to_data() { return new VScript.rKeyword(this, "phy_rx_locked_to_data"); } get phy_rx_ready() { return new VScript.rKeyword(this, "phy_rx_ready"); } get phy_rx_calibrate_busy() { return new VScript.rKeyword(this, "phy_rx_calibrate_busy"); } get phy_rx_locked_to_ref_changed() { return new VScript.rKeyword(this, "phy_rx_locked_to_ref_changed"); } get phy_rx_locked_to_data_changed() { return new VScript.rKeyword(this, "phy_rx_locked_to_data_changed"); } get phy_rx_ready_changed() { return new VScript.rKeyword(this, "phy_rx_ready_changed"); } get smpte_352_c() { return new VScript.rKeyword(this, "smpte_352_c"); } get smpte_352_y() { return new VScript.rKeyword(this, "smpte_352_y"); } get h_blank() { return new VScript.rKeyword(this, "h_blank"); } get h_blank_changed() { return new VScript.rKeyword(this, "h_blank_changed"); } get h_active() { return new VScript.rKeyword(this, "h_active"); } get h_active_changed() { return new VScript.rKeyword(this, "h_active_changed"); } get f_period() { return new VScript.rKeyword(this, "f_period"); } get interlace() { return new VScript.rKeyword(this, "interlace"); } get standard() { return new VScript.rKeyword(this, "standard"); } get substream_2_s_i() { return new VScript.rKeyword(this, "substream_2_s_i"); } get input_substream() { return new VScript.rKeyword(this, "input_substream"); } get eye() { return new HwStatusEye(this.raw.find("eye")); } } exports.HwStatus = HwStatus; class SDIInputGroup96KhzMode { constructor(raw) { this.raw = raw; } get mode() { return new VScript.duplexKeyword(this, "mode"); } } class SDIInputGroup96KhzModeAsArrayRow extends SDIInputGroup96KhzMode { constructor(st, index, parent) { super(st); this.index = index; this.parent = parent; } } class SDIInput { constructor(raw) { this.raw = raw; } get sub_stream() { return new VScript.duplexKeyword(this, "sub_stream"); } get audio_timing() { return new VScript.duplexKeyword(this, "audio_timing"); } /** How to deembed audio from 12G SDI inputs */ get audio_12g_mode() { return new VScript.rwKeyword(this, "audio_12g_mode"); } /** Which closed caption format to decode on input */ get cc_mode() { return new VScript.rwKeyword(this, "cc_mode"); } get cc_channel() { return new VScript.rwKeyword(this, "cc_channel"); } get mode() { return new VScript.rKeyword(this, "mode"); } get hw_status() { return new HwStatus(this.raw.find("hw_status")); } get output() { return new SDIPayload(this.raw.find("output")); } get group96_khz_mode() { return new VScript.StronglyTypedArray(this, "group96_khz_mode", (st, index, parent) => new SDIInputGroup96KhzModeAsArrayRow(st, index, parent)); } get metadata_extractor() { return new VScript.StronglyTypedTable(new VScript.Table(this.raw.socket, this.raw.full_kwl("metadata_extractor")), (row, enclosing_table) => new _MetadataProcessor.MetadataExtractorAsTableRow(row, enclosing_table)); } } exports.SDIInput = SDIInput; class MADIInput { constructor(raw) { this.raw = raw; } get audio_timing() { return new VScript.rwKeyword(this, "audio_timing"); } get running() { return new VScript.rKeyword(this, "running"); } get fifo_underflow_counter() { return new VScript.rKeyword(this, "fifo_underflow_counter"); } get fifo_overflow_counter() { return new VScript.rKeyword(this, "fifo_overflow_counter"); } get clear_fifo_error_counters() { return new VScript.wKeyword(this, "clear_fifo_error_counters"); } get output() { return new _Audio.Essence(this.raw.find("output")); } } exports.MADIInput = MADIInput; class SDIOutput { constructor(raw) { this.raw = raw; } get sub_stream() { return new VScript.rKeyword(this, "sub_stream"); } get standard() { return new VScript.rKeyword(this, "standard"); } /** standard mismatch */ get status_std_mismatch() { return new VScript.rKeyword(this, "status_std_mismatch"); } /** Time when the SDI output was last enabled. Changing the standards or disconnecting the video source counts as disabling. */ get last_enable_time() { return new VScript.rKeyword(this, "last_enable_time"); } get constraints() { return new Constraints(this.raw.find("constraints")); } get vid_src() { return new _Definitions.VideoSource(this.raw.find("vid_src")); } get vanc_control() { return new _Definitions.VancControl(this.raw.find("vanc_control")); } get audio_control() { return new _Definitions.AudioControlSdi(this.raw.find("audio_control")); } } exports.SDIOutput = SDIOutput; class MADIOutput { constructor(raw) { this.raw = raw; } get channels() { return new VScript.duplexKeyword(this, "channels"); } get source() { return new VScript.duplexKeyword(this, "source", { lift: _Audio.lift.Essence, lower: _Audio.lower.Essence }); } } exports.MADIOutput = MADIOutput; class Configuration { constructor(raw) { this.raw = raw; } get direction() { return new VScript.rwKeyword(this, "direction"); } } exports.Configuration = Configuration; class ConfigurationAsTableRow extends Configuration { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.enclosing_table = enclosing_table; this.index = raw_row.index; } } exports.ConfigurationAsTableRow = ConfigurationAsTableRow; class MergerConnectedTo { constructor(raw) { this.raw = raw; } get inputs() { return new VScript.rKeyword(this, "inputs"); } get input_identifier() { return new VScript.rKeyword(this, "input_identifier"); } } class MergerOutput { constructor(raw) { this.raw = raw; } get video() { return new _Video.Essence(this.raw.find("video")); } get audio() { return new VScript.StronglyTypedArray(this, "audio", (st, index, parent) => new _Audio.EssenceAsArrayRow(st, index, parent)); } get ptp_traits() { return new _PTP.Traits(this.raw.find("ptp_traits")); } } class MergerOutputAsTableRow extends MergerOutput { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.enclosing_table = enclosing_table; this.index = raw_row.index; } } class Merger { constructor(raw) { this.raw = raw; } /** Merger: combines quad-link-2si signals to a single-link 4k. The corresponding SDI inputs are declared in connected_to. The order of the substream is adjusted by the information of the payload identifier. To set or reorder the substream, use the sub_stream parameter */ get substream_2_s_i() { return new VScript.rwKeyword(this, "substream_2_s_i"); } get connected_to() { return new MergerConnectedTo(this.raw.find("connected_to")); } get output() { return new VScript.StronglyTypedTable(new VScript.Table(this.raw.socket, this.raw.full_kwl("output")), (row, enclosing_table) => new MergerOutputAsTableRow(row, enclosing_table)); } } exports.Merger = Merger; class MergerAsTableRow extends Merger { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.enclosing_table = enclosing_table; this.index = raw_row.index; } } exports.MergerAsTableRow = MergerAsTableRow; class Input { constructor(raw) { this.raw = raw; } get mode() { return new VScript.duplexKeyword(this, "mode"); } get sdi() { return new SDIInput(this.raw.find("sdi")); } get madi() { return new MADIInput(this.raw.find("madi")); } get audio_source_slices() { return new VScript.StronglyTypedArray(this, "audio_source_slices", (st, index, parent) => new _Audio.SignalSourceSliceAsArrayRow(st, index, parent)); } } exports.Input = Input; class InputAsTableRow extends Input { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.enclosing_table = enclosing_table; this.index = raw_row.index; } } exports.InputAsTableRow = InputAsTableRow; class Output { constructor(raw) { this.raw = raw; } get mode() { return new VScript.duplexKeyword(this, "mode"); } /** Number of times since last enable the output FIFO had to resync (sampled only every 100ms) */ get resync_counter() { return new VScript.rKeyword(this, "resync_counter"); } /** Output FIFO latency */ get fifo_latency() { return new VScript.rKeyword(this, "fifo_latency"); } get sdi() { return new SDIOutput(this.raw.find("sdi")); } get madi() { return new MADIOutput(this.raw.find("madi")); } get peak_meter() { return new VScript.StronglyTypedArray(this, "peak_meter", (st, index, parent) => new _Definitions.PeaksAsArrayRow(st, index, parent)); } } exports.Output = Output; class OutputAsTableRow extends Output { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.enclosing_table = enclosing_table; this.index = raw_row.index; } } exports.OutputAsTableRow = OutputAsTableRow; class SyncOutput { constructor(raw) { this.raw = raw; } get standard() { return new VScript.rwKeyword(this, "standard"); } get t_src() { return new VScript.duplexKeyword(this, "t_src", { lift: _Time.lift.Source, lower: _Time.lower.Source }); } get phase_rst_counter() { return new VScript.rKeyword(this, "phase_rst_counter"); } /** Number of times since last enable the output FIFO had to resync (sampled only every 100ms) */ get resync_counter() { return new VScript.rKeyword(this, "resync_counter"); } /** Output FIFO latency */ get fifo_latency() { return new VScript.rKeyword(this, "fifo_latency"); } } exports.SyncOutput = SyncOutput; class SyncOutputAsTableRow extends SyncOutput { constructor(raw_row, enclosing_table) { super(new VScript.Subtree(raw_row.socket, raw_row.kwl)); this.enclosing_table = enclosing_table; this.index = raw_row.index; } } exports.SyncOutputAsTableRow = SyncOutputAsTableRow; class All { constructor(raw) { this.raw = raw; } get info() { return new BncMode(this.raw.find("info")); } get analog_ref() { return new VScript.StronglyTypedTable(new VScript.Table(this.raw.socket, this.raw.full_kwl("analog_ref")), (row, enclosing_table) => new _Time.SourceAsTableRow(row, enclosing_table)); } get analog_ref_traits() { return new _PTP.Traits(this.raw.find("analog_ref_traits")); } get configuration() { return new VScript.StronglyTypedTable(new VScript.Table(this.raw.socket, this.raw.full_kwl("configuration")), (row, enclosing_table) => new ConfigurationAsTableRow(row, enclosing_table)); } get merger() { return new VScript.StronglyTypedTable(new VScript.Table(this.raw.socket, this.raw.full_kwl("merger")), (row, enclosing_table) => new MergerAsTableRow(row, enclosing_table)); } get output() { return new VScript.StronglyTypedTable(new VScript.Table(this.raw.socket, this.raw.full_kwl("output")), (row, enclosing_table) => new OutputAsTableRow(row, enclosing_table)); } get input() { return new VScript.StronglyTypedTable(new VScript.Table(this.raw.socket, this.raw.full_kwl("input")), (row, enclosing_table) => new InputAsTableRow(row, enclosing_table)); } get sync_output() { return new VScript.StronglyTypedTable(new VScript.Table(this.raw.socket, this.raw.full_kwl("sync_output")), (row, enclosing_table) => new SyncOutputAsTableRow(row, enclosing_table)); } } exports.All = All; exports.Enums = { SyncOutputStandard: ["PAL", "NTSC", "HD720p50", "HD720p59_94", "HD720p60", "HD1080p23_98", "HD1080p24", "HD1080p25", "HD1080p29_97", "HD1080p30", "HD1080i50", "HD1080i59_94", "HD1080i60"], ClosedCaptionDeembedMode: ["NONE", "CEA708", "OP47"], ConfigDirection: ["Input", "Output"], MADIChannels: ["CH28", "CH32", "CH56", "CH64"], SDIMADIMode: ["SDI", "MADI"], Audio12GMode: ["st299_2_stream_0", "st299_1_stream_0_1"], DecoderGroupPhyRxCalibrateBusy: ["cePhyRxNormal", "cePhyRxCalibrate"], DecoderGroupPhyRxReady: ["ceNotReady", "ceReady"], DecoderGroupPhyRxLockedToData: ["ceNotLocked", "ceLocked"], DecoderGroupPhyRxLockedToRef: ["ceNotLocked", "ceLocked"], DecoderGroup96KhzMode: ["ce48Khz", "ce96Khz"], BNCDirection: ["ceDisable", "ceIn", "ceOut", "ceInOut"] };