Skip to content

Sofie MOS Connection: A Part of the Sofie TV Studio Automation System

License

Notifications You must be signed in to change notification settings

nrkno/sofie-mos-connection

Repository files navigation

MOS-Connection

Tests codecov Quality Gate Status

@mos-connection/connector NPM Version @mos-connection/helper NPM Version @mos-connection/model NPM Version

MOS-Connection is a Node.js library to communicate, using the MOS Protocol, with systems such as Newsroom Computer Systems (NRCS) or other MOS devices.

Features include:

  • Acting as a MOS Device (ie a client), connecting to an NRCS.
  • Acting as a NRCS (ie a server), allowing other MOS Devices to connect to it.
  • Helpful tools for developing MOS Plugins and parsing MOS data.
  • A simple tool for testing MOS connections, called Quick-MOS.

This library is developed as a part of the Sofie TV Automation System.

General Sofie System Information


Packages

MOS-Connection consists of 4 packages:

  • @mos-connection/connector is a Node.js library is used to connect to MOS devices or act as a MOS Server/NCS. The helper and model functionality is included in this library as well.
  • @mos-connection/helper is a library that provides various functions useful for those that prepare/handle data that will be sent to (or has been received by) the MOS-connection. The model functionality is included in this library as well.
  • @mos-connection/model is a library that contains types and enums, useful for applications that handles MOS-data.
  • There is also a helper application QuickMos designed to be a minimal mock MOS server for testing client applications.

Getting Started

Installation

npm install @mos-connection/connector

Usage

_See more examples in the examples folder, or the QuickMos implementation!

import { MosConnection } from '@mos-connection/connector'

let mos = new MosConnection(new ConnectionConfig({
	mosID: 'my.mos.application',
	acceptsConnections: true,
	profiles: {
		'0': true,
        '1': true,
        '2': true,
        '4': true
	},
	openRelay: true
	debug: false
}))
mos.onConnection((device: MosDevice) => { // called whenever there is a new connection to a mos-device
	if (device.hasConnection) { // true if we can send messages to the mos-server
	    device.getMachineInfo().then((lm) => {
			console.log('Machineinfo', lm)
		})
	}
	// Setup callbacks to pipe data:
	device.onRequestMachineInfo(() => {})
	device.onCreateRunningOrder((ro) => {})
	device.onDeleteRunningOrder((RunningOrderID: MosString128) => {})
	device.onReadyToAir(() => {})
	// ...
})

Quick-MOS

"Quick-MOS" is a simple MOS application that can be used to test the MOS-connection library.

It reads data-files from disk and pretends to be an NRCS, so you can connect other MOS-clients to it.

See Quick-MOS for more information.

MOS Support

The MOS-Connection library currently supports the MOS Protocol version 2.8.5.

Supported MOS Profiles

Profile Status
Profile 0 Implemented
Profile 1 Implemented
Profile 2 Implemented
Profile 3 Implemented
Profile 4 Implemented
Profile 5 Not implemented (yet)
Profile 6 Not implemented (yet)
Profile 7 Not implemented (yet)

Pull Requests for the remaining profiles would be happily accepted!


The NRK logo is a registered trademark of Norsk rikskringkasting AS. The license does not grant any right to use, in any way, any trademarks, service marks or logos of Norsk rikskringkasting AS.

About

Sofie MOS Connection: A Part of the Sofie TV Studio Automation System

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages