An implementation of an AMWA NMOS IS-04 Node API.
Package providing a basic NMOS Node API implementation. It takes the form of a "Node Facade" which accepts data from private back-end data providers.
- Linux (untested on Windows and Mac)
- Python 2.7 (also Python 3.6.9 on Ubuntu 18.04)
- Python Pip
- NMOS Common
# Install Python setuptools
$ pip install setuptools
# Install the service
$ sudo python setup.py install
The Node API makes use of a configuration file provided by the NMOS Common Library. Please see that repository for configuration details.
The following code snippet demonstrates registering a service and its resources with the Node API.
from nmosnode.facade import Facade
# Initialise service name to use for Node API interactions
nodeapi = Facade("myservice/v1.0")
# Register the service with the Node API including its own API endpoint
nodeapi.register_service("http://127.0.0.1", "myservice/v1.0")
# Heartbeat with the Node API - You'll need to call this every 5 seconds from another thread
nodeapi.heartbeat_service()
# Register your resources with the Node API
nodeapi.addResource("device", "my-device-uuid", "my-device-json-here")
Run the following script to start the Node Facade in a non-blocking manner, and then stop it again at a later point:
from nmosnode.nodefacadeservice import NodeFacadeService
service = NodeFacadeService()
service.start()
# Do something else until ready to stop
service.stop()
It is also possible to run Node Facade in a blocking manner:
from nmosnode.nodefacadeservice import NodeFacadeService
service = NodeFacadeService()
service.run() # Runs forever
# Run the tests
$ make test
Packaging files are provided for internal BBC R&D use. These packages depend on packages only available from BBC R&D internal mirrors, and may not work in other environments. For use outside the BBC please use python installation method.
# Debian packaging
$ make deb
# RPM packaging
$ make rpm
We use Semantic Versioning for this repository
See CHANGELOG.md
See CONTRIBUTING.md
Please ensure you have run the test suite before submitting a Pull Request, and include a version bump in line with our Versioning policy.
See LICENSE.md