UNPKG

@br8kppooint/visca

Version:

Advanced nodejs library for working with VISCA-based PTZ cameras over IP and over serial connections.

56 lines (51 loc) 2.29 kB
"use strict"; // INSPIRED BY https://github.com/benelgiac/PyVisca3/blob/master/pyviscalib/visca.py // // For this JavaScript version, we eliminate all synchronous reads to the socket // in favor of using callbacks. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __exportStar = (this && this.__exportStar) || function(m, exports) { for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); }; Object.defineProperty(exports, "__esModule", { value: true }); __exportStar(require("./camera"), exports); __exportStar(require("./command"), exports); __exportStar(require("./constants"), exports); __exportStar(require("./controller"), exports); __exportStar(require("./enums"), exports); __exportStar(require("./parsers"), exports); __exportStar(require("./transport"), exports); __exportStar(require("./visca-ip"), exports); __exportStar(require("./visca-serial"), exports); // export ViscaController; /* typescript help... // interfaces are only for type checking // any object that has name:string and toppings:string[] will qualify as a Pizza interface Pizza { name: string, toppings: string[] } // classes work exactly the same as an interface but can // create instances and have static methods // again, objects that support this class interface will satisfy type checks class Pizza { constructor(public name: string, public toppings: string[]) {}; } // we can call this with a Pizza to get a new pizza with the same data function PizzaMaker(example: Pizza) { // if we went with a class, we do this return new Pizza(example.name, example.toppings); // if we went with an interface only, we do this return {name: example.name, toppings: example.toppings}; } // we can call the PizzaMaker with a plain object as long as it satisfies the Pizza interface const pizza = PizzaMaker({ name: 'Inferno', toppings: ['cheese', 'peppers'] }); */ //# sourceMappingURL=visca.js.map