Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BCP-008-02 support (NcSenderMonitor) #43

Merged
merged 18 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ 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 IS-04 and IS-05 with some limitations:

* It does not support DND-SD discovery and the NMOS registry endpoint has to be configured in the config.json file
* It does not support the IS-05 bulk API as it only has 1 receiver currently.
* It does not support the IS-05 bulk API as it currently only runs 1 receiver and 1 sender

## Installation

Expand Down Expand Up @@ -61,5 +62,6 @@ These are the configuration keys which can be specified in the configuration fil
* [MS-05-02 NMOS Control Framework](https://specs.amwa.tv/ms-05-02)
* [BCP-002-02 NMOS Asset Distinguishing Information](https://specs.amwa.tv/bcp-002-02)
* [BCP-008-01 NMOS Receiver Status](https://specs.amwa.tv/bcp-008-01/)
* [BCP-008-02 NMOS Sender Status](https://specs.amwa.tv/bcp-008-02/)

<!-- INTRO-END -->
29 changes: 28 additions & 1 deletion code/src/Configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ export class Configuration implements IConfiguration
public node_id: string;
public device_id: string;
public receiver_id: string;
public source_id: string;
public flow_id: string;
public sender_id: string;
public address: string;
public port: number;
public base_label: string;
Expand All @@ -30,6 +33,9 @@ export class Configuration implements IConfiguration
this.node_id = config.node_id;
this.device_id = config.device_id;
this.receiver_id = config.receiver_id;
this.source_id = config.source_id;
this.flow_id = config.flow_id;
this.sender_id = config.sender_id;
this.base_label = config.base_label;
this.address = config.address;
this.port = config.port;
Expand Down Expand Up @@ -71,6 +77,24 @@ export class Configuration implements IConfiguration
shouldWriteConfig = true;
}

if(this.source_id == null)
{
this.source_id = uuidv4().toString();
shouldWriteConfig = true;
}

if(this.flow_id == null)
{
this.flow_id = uuidv4().toString();
shouldWriteConfig = true;
}

if(this.sender_id == null)
{
this.sender_id = uuidv4().toString();
shouldWriteConfig = true;
}

if(shouldWriteConfig)
this.WriteConfig();
}
Expand Down Expand Up @@ -101,7 +125,7 @@ export class Configuration implements IConfiguration

if(this.function == null)
{
this.function = "UHD Decoder";
this.function = "UHD Encoder/Decoder";
shouldWriteConfig = true;
}

Expand Down Expand Up @@ -137,6 +161,9 @@ export interface IConfiguration
node_id: string;
device_id: string;
receiver_id: string;
source_id: string;
flow_id: string;
sender_id: string;
address: string;
port: number;
base_label: string;
Expand Down
Loading