AMWA NMOS Device Control Mock Application
About NC-DEVICE-MOCK
This is a mock NMOS device written in Typescript and running on the NodeJS stack.
It has support for the NMOS Control & Monitoring suite:
- MS-05-02
- IS-12
- BCP-008-01
- BCP-008-02
It also has support for the IS-14 NMOS Device Configuration specification.
It has support for IS-04 and IS-05 with some limitations:
- It does not support DND-SD discovery (the NMOS registry endpoint has to be configured in the config.json file)
- It does not support the IS-05 bulk API as it currently only runs 1 receiver and 1 sender
- It does not support absolute or relative IS-05 activations (only immediate activations are implemented)
Installation
Note
: npm commands need to be executed from the /code
subfolder.
First install dependencies with
npm install
Modify the config.json properties for your configuration.
At the very least point registry_address
and registry_port
to the NMOS registry on your network.
Usage
Build and run with:
npm run build-and-start
If you plan to make changes and want the app to recompile and run whenever you save run with:
npm run serve
Configuration
These are the configuration keys which can be specified in the configuration file (config.json):
- notify_without_subscriptions - boolean flag which is set to false by default, but it can be set to true if you would like to get all notifications on all sessions without subscribing (for debugging purposes only).
- work_without_registry - boolean flag which is set to false by default, but it can be set to true if you would like the mock device not to attempt to register with an NMOS registry.
- streaming_profile - enum option
[RTP_RAW, RTP_MPEG_TS]
specifying the streaming profile of senders and receivers (default isRTP_RAW
) - outside_port - allows users to configure the port used in the NMOS APIs which might be different than the server binding port when running inside a container due to port mappings
Docker support
The application has Docker support using the provided Dockerfile and the docker-compose.yml example file.
Building a Docker image is achieved using the build command ran from the same folder where the Dockerfile is located:
docker build -t nmos-device-control-mock .
We map our config
subfolder as a volume to our container when running. This needs to have the config.json
file with suitable values for address
(the address of your Docker host as this will be avertised in the NMOS APIs) and registry_address
as 127.0.0.1 is not a suitable address when running in Docker. You also need to change the outside_port
to the port you will map from your host to your container (we use 49999 in the following examples).
Then we can run our nmos-device-control-mock
Docker image directly:
docker run --name=nmos-device-control-mock -v ./code/config:/app/dist/server/config -p 49999:8080 nmos-device-control-mock
or through the provided docker-compose.yml which refers to the image:
docker compose -p nmos-control up -d
Specifications supported
- AMWA IS-04 NMOS Discovery and Registration
- AMWA IS-05 NMOS Device Connection Management
- AMWA IS-12 NMOS Control Protocol
- AMWA IS-14 NMOS Device Configuration
- AMWA MS-05-01 NMOS Control Architecture
- AMWA MS-05-02 NMOS Control Framework
- AMWA BCP-002-02 NMOS Asset Distinguishing Information
- AMWA BCP-008-01 NMOS Receiver Status
- AMWA BCP-008-02 NMOS Sender Status
- AMWA BCP-006-04 NMOS Support for MPEG Transport Streams
NC-DEVICE-MOCK has been developed by the Advanced Media Workflow Association as part of the Networked Media Open Specifications initiative. See here for an overview of NMOS specifications.
The NMOS Testing Tool creates a simple web service for testing implementations of all NMOS APIs.
The links to documentation, API and examples below, and for SPEC links in the page menu bar are for this release or branch: branches/main. Links to other published releases and other live branches appear later in the page, or in the VERSIONS menu.
Documentation
Published Releases
Live Branches
These pages are rendered from the source of the specification, which is in this GitHub repository.
Repository | Default Branch | Lint (default) | Render (all) |
---|---|---|---|
nmos-device-control-mock | main |