mos-connection
Advanced tools
Comparing version 1.0.5-nightly-latest-20211118-065914-90db528.0 to 1.0.5-nightly-latest-20211118-081133-434af7d.0
@@ -5,2 +5,11 @@ # Changelog | ||
### [1.0.5-1](https://github.com/nrkno/tv-automation-mos-connection/compare/1.0.5-0...1.0.5-1) (2021-11-18) | ||
### Bug Fixes | ||
* bug fix ([8f420d9](https://github.com/nrkno/tv-automation-mos-connection/commit/8f420d9fde1521c87ee35715139ad104df3b231e)) | ||
* improve error message for if function isn't supported ([5218fcb](https://github.com/nrkno/tv-automation-mos-connection/commit/5218fcb140174c43026956f82b3f7d26b831e53c)) | ||
* supress heartbeat debug messages. ([8144671](https://github.com/nrkno/tv-automation-mos-connection/commit/81446716f0d7d15f101242752e3b89ba03265270)) | ||
### [1.0.5-0](https://github.com/nrkno/tv-automation-mos-connection/compare/1.0.3...1.0.5-0) (2021-11-18) | ||
@@ -7,0 +16,0 @@ |
@@ -72,5 +72,9 @@ "use strict"; | ||
} | ||
debugTrace(...strs) { | ||
if (this.debug) | ||
console.log(...strs); | ||
debugTrace(str) { | ||
if (this.debug) { | ||
// Supress console spam: | ||
if (!`${str}`.match(/<heartbeat>/)) { | ||
console.log(str); | ||
} | ||
} | ||
} | ||
@@ -77,0 +81,0 @@ } |
@@ -119,3 +119,3 @@ "use strict"; | ||
else { | ||
if (!this._sentMessage) { | ||
if (!this._sentMessage && this._queueMessages.length > 0) { | ||
if (Date.now() - this._queueMessages[0].time > this._commandTimeout) { | ||
@@ -130,10 +130,8 @@ const msg = this._queueMessages.shift(); | ||
else { | ||
if (this._queueMessages.length > 0) { | ||
// Try again later: | ||
if (this.processQueueTimeout) | ||
clearTimeout(this.processQueueTimeout); | ||
this.processQueueTimeout = setTimeout(() => { | ||
this.processQueue(); | ||
}, 200); | ||
} | ||
// Try again later: | ||
if (this.processQueueTimeout) | ||
clearTimeout(this.processQueueTimeout); | ||
this.processQueueTimeout = setTimeout(() => { | ||
this.processQueue(); | ||
}, 200); | ||
} | ||
@@ -366,3 +364,3 @@ } | ||
// dispatch error!!!!! | ||
this.emit('error', `Socket event error: ${error.message}`); | ||
this.emit('error', `Socket ${this._description} ${this._port} event error: ${error.message}`); | ||
this.debugTrace(`Socket event error: ${error.message}`); | ||
@@ -369,0 +367,0 @@ } |
@@ -151,5 +151,7 @@ "use strict"; | ||
data = data['mos']; | ||
this.debugTrace('parsedData', data); | ||
// this.debugTrace('parsedTest', keys) | ||
this.debugTrace('keys', Object.keys(data)); | ||
// Suppress console spam: | ||
if (!lib_1.has(data, 'heartbeat')) { | ||
this.debugTrace('parsedData', data); | ||
// this.debugTrace('keys', Object.keys(data)) | ||
} | ||
// Route and format data: | ||
@@ -472,10 +474,11 @@ // Profile 0: | ||
else { | ||
this.debugTrace('Unsupported function'); | ||
this.debugTrace(data); | ||
const keys = Object.keys(data).filter((key) => ['ncsID', 'mosID', 'messageID'].indexOf(key) === -1); | ||
return new mosModel_1.MOSAck({ | ||
ID: new mosString128_1.MosString128(0), | ||
Revision: 0, | ||
Description: new mosString128_1.MosString128('Unsupported function'), | ||
Description: new mosString128_1.MosString128(`Unsupported function: "${keys.join(', ')}"`), | ||
Status: api_1.IMOSAckStatus.NACK, | ||
}); | ||
// resolve('<mos><mosID>test2.enps.mos</mosID><ncsID>2012R2ENPS8VM</ncsID><messageID>99</messageID><roAck><roID>2012R2ENPS8VM;P_ENPSMOS\W\F_HOLD ROs;DEC46951-28F9-4A11-8B0655D96B347E52</roID><roStatus>Unknown object M000133</roStatus><storyID>5983A501:0049B924:8390EF2B</storyID><itemID>0</itemID><objID>M000224</objID><status>LOADED</status><storyID>3854737F:0003A34D:983A0B28</storyID><itemID>0</itemID><objID>M000133</objID><itemChannel>A</itemChannel><status>UNKNOWN</status></roAck></mos>') | ||
} | ||
@@ -482,0 +485,0 @@ } |
{ | ||
"name": "mos-connection", | ||
"version": "1.0.5-nightly-latest-20211118-065914-90db528.0", | ||
"version": "1.0.5-nightly-latest-20211118-081133-434af7d.0", | ||
"description": "MOS compliant TCP/IP Socket connection.", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
# Sofie: The Modern TV News Studio Automation System (MOS Connection library) | ||
[![CircleCI](https://circleci.com/gh/nrkno/tv-automation-mos-connection/tree/master.svg?style=svg)](https://circleci.com/gh/nrkno/tv-automation-mos-connection/tree/master) | ||
[![Tests](https://github.com/nrkno/tv-automation-mos-connection/actions/workflows/node.yaml/badge.svg)](https://github.com/nrkno/tv-automation-mos-connection/actions/workflows/node.yaml) | ||
[![codecov](https://codecov.io/gh/nrkno/tv-automation-mos-connection/branch/master/graph/badge.svg)](https://codecov.io/gh/nrkno/tv-automation-mos-connection) | ||
@@ -9,3 +10,2 @@ | ||
## Getting started | ||
@@ -45,9 +45,9 @@ | ||
| Profile | Status | | ||
| -- | -- | | ||
| Profile 0 | Implemented | | ||
| Profile 1 | Implemented | | ||
| Profile 2 | Implemented | | ||
| Profile 3 | Implemented | | ||
| Profile 4 | Implemented | | ||
| Profile | Status | | ||
| --------- | --------------------- | | ||
| Profile 0 | Implemented | | ||
| Profile 1 | Implemented | | ||
| Profile 2 | Implemented | | ||
| Profile 3 | Implemented | | ||
| Profile 4 | Implemented | | ||
| Profile 5 | Not implemented (yet) | | ||
@@ -54,0 +54,0 @@ | Profile 6 | Not implemented (yet) | |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
574551
6987