51 lines
1.0 KiB
TypeScript
51 lines
1.0 KiB
TypeScript
import { hub } from "..";
|
|
|
|
export interface IMatrixProps {
|
|
inputs: Array<Input>,
|
|
outputs: Array<Output>,
|
|
deviceName: string,
|
|
hubType: hub
|
|
}
|
|
|
|
export interface Input {
|
|
inputNumber: string,
|
|
inputDevice: string,
|
|
}
|
|
|
|
export interface Output {
|
|
outputLetter: string,
|
|
outputDevice: string,
|
|
}
|
|
|
|
/**
|
|
* Data model to hold matrix information.
|
|
*/
|
|
export class Matrix {
|
|
private _inputs: Array<Input> = [];
|
|
private _outputs: Array<Output> = [];
|
|
private _deviceName: string;
|
|
private _hubType: hub = "Harmony";
|
|
|
|
constructor(props: IMatrixProps) {
|
|
this._inputs = props.inputs;
|
|
this._outputs = props.outputs;
|
|
this._deviceName = props.deviceName;
|
|
this._hubType = props.hubType;
|
|
}
|
|
|
|
public get inputs(): Array<Input> {
|
|
return this._inputs
|
|
}
|
|
|
|
public get outputs(): Array<Output> {
|
|
return this._outputs;
|
|
}
|
|
|
|
public get deviceName(): string {
|
|
return this._deviceName;
|
|
}
|
|
|
|
public get hubType(): hub {
|
|
return this._hubType;
|
|
}
|
|
} |