mirror of
https://github.com/stagehacks/Cue-View.git
synced 2026-08-15 10:43:39 +00:00
groundwork for posistagenet protocol
This commit is contained in:
Generated
+30
@@ -9,6 +9,7 @@
|
||||
"version": "1.0.1",
|
||||
"license": "CC BY-SA 4.0",
|
||||
"dependencies": {
|
||||
"@jwetzell/posistagenet": "^0.0.1",
|
||||
"atem-connection": "^3.3.0",
|
||||
"bonjour": "^3.5.0",
|
||||
"electron-updater": "^6.1.1",
|
||||
@@ -307,6 +308,14 @@
|
||||
"node": ">=14.15"
|
||||
}
|
||||
},
|
||||
"node_modules/@jwetzell/posistagenet": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@jwetzell/posistagenet/-/posistagenet-0.0.1.tgz",
|
||||
"integrity": "sha512-fYghe5oNVZo1cXcH4ifvsUV56YCiEcxNWYTOna+1rs9HN5xEiqzFLZWnVKhJ9FQFxIHNsdiiZoD7G4oZ61DrGg==",
|
||||
"dependencies": {
|
||||
"binary-parser": "^2.2.1"
|
||||
}
|
||||
},
|
||||
"node_modules/@malept/cross-spawn-promise": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz",
|
||||
@@ -1129,6 +1138,14 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/binary-parser": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/binary-parser/-/binary-parser-2.2.1.tgz",
|
||||
"integrity": "sha512-5ATpz/uPDgq5GgEDxTB4ouXCde7q2lqAQlSdBRQVl/AJnxmQmhIfyxJx+0MGu//D5rHQifkfGbWWlaysG0o9NA==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
},
|
||||
"node_modules/bitdepth": {
|
||||
"version": "7.0.2",
|
||||
"resolved": "https://registry.npmjs.org/bitdepth/-/bitdepth-7.0.2.tgz",
|
||||
@@ -5348,6 +5365,14 @@
|
||||
"pkg-prebuilds": "^0.2.1"
|
||||
}
|
||||
},
|
||||
"@jwetzell/posistagenet": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@jwetzell/posistagenet/-/posistagenet-0.0.1.tgz",
|
||||
"integrity": "sha512-fYghe5oNVZo1cXcH4ifvsUV56YCiEcxNWYTOna+1rs9HN5xEiqzFLZWnVKhJ9FQFxIHNsdiiZoD7G4oZ61DrGg==",
|
||||
"requires": {
|
||||
"binary-parser": "^2.2.1"
|
||||
}
|
||||
},
|
||||
"@malept/cross-spawn-promise": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz",
|
||||
@@ -5943,6 +5968,11 @@
|
||||
"integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==",
|
||||
"dev": true
|
||||
},
|
||||
"binary-parser": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/binary-parser/-/binary-parser-2.2.1.tgz",
|
||||
"integrity": "sha512-5ATpz/uPDgq5GgEDxTB4ouXCde7q2lqAQlSdBRQVl/AJnxmQmhIfyxJx+0MGu//D5rHQifkfGbWWlaysG0o9NA=="
|
||||
},
|
||||
"bitdepth": {
|
||||
"version": "7.0.2",
|
||||
"resolved": "https://registry.npmjs.org/bitdepth/-/bitdepth-7.0.2.tgz",
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
"prettier": "^3.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@jwetzell/posistagenet": "^0.0.1",
|
||||
"atem-connection": "^3.3.0",
|
||||
"bonjour": "^3.5.0",
|
||||
"electron-updater": "^6.1.1",
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
@@ -0,0 +1 @@
|
||||
<p><em>PosiStageNet</em> requires no configuration.</p>
|
||||
@@ -0,0 +1,51 @@
|
||||
const { Decoder } = require('@jwetzell/posistagenet');
|
||||
|
||||
exports.config = {
|
||||
defaultName: 'PosiStageNet',
|
||||
connectionType: 'multicast',
|
||||
port: 56565,
|
||||
remotePort: 56565,
|
||||
mayChangePorts: false,
|
||||
heartbeatInterval: 5000,
|
||||
heartbeatTimeout: 15000,
|
||||
searchOptions: {
|
||||
type: 'multicast',
|
||||
address: getMulticastGroup(1),
|
||||
port: 56565,
|
||||
validateResponse(msg, info) {
|
||||
return true;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
exports.ready = function ready(_device) {
|
||||
console.log('posistagenet is ready');
|
||||
const device = _device;
|
||||
device.psn = new Decoder();
|
||||
|
||||
const networkInterfaces = device.getNetworkInterfaces();
|
||||
|
||||
Object.keys(networkInterfaces).forEach((networkInterfaceID) => {
|
||||
const networkInterface = networkInterfaces[networkInterfaceID];
|
||||
device.connection.addMembership(getMulticastGroup(1), networkInterface[0].address);
|
||||
});
|
||||
};
|
||||
|
||||
exports.data = function data(_device, buf) {
|
||||
const device = _device;
|
||||
if (device.psn) {
|
||||
device.psn.decode(buf);
|
||||
device.data = {
|
||||
data: device.psn.data,
|
||||
info: device.psn.info,
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
exports.heartbeat = function heartbeat(device) {};
|
||||
|
||||
exports.update = function update(_device, doc, updateType, updateData) {};
|
||||
|
||||
function getMulticastGroup(universe) {
|
||||
return `236.10.10.10`;
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
[id^='tracker-'] {
|
||||
color: white;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
<header>
|
||||
<h1><%= data.info.system_name ? data.info.system_name : '' %> PosiStageNet</h1>
|
||||
</header>
|
||||
|
||||
<div>
|
||||
<h2>Tracker Count: <%= Object.keys(data.data.trackers).length %></h2>
|
||||
<% Object.entries(data.info.trackers).forEach(([trackerId,trackerInfo]) => {
|
||||
|
||||
%>
|
||||
|
||||
<div id="tracker-<%= trackerId %>">
|
||||
<%= trackerInfo.name %>
|
||||
</div>
|
||||
|
||||
<% }); %>
|
||||
</div>
|
||||
Reference in New Issue
Block a user