diff --git a/src/commands/index.ts b/src/commands/index.ts index aeb442c..6f0250e 100644 --- a/src/commands/index.ts +++ b/src/commands/index.ts @@ -5,6 +5,7 @@ export * from './configuration' export * from './deviceInfo' export * from './format' export * from './goTo' +export * from './jog' export * from './notify' export * from './playCommand' export * from './record' diff --git a/src/commands/jog.ts b/src/commands/jog.ts new file mode 100644 index 0000000..93834fd --- /dev/null +++ b/src/commands/jog.ts @@ -0,0 +1,25 @@ +import { NamedMessage } from '../message' +import { AbstractCommandNoResponse } from './abstractCommand' + +export class JogCommand extends AbstractCommandNoResponse { + timecode?: string + + constructor (timecode?: string) { + super() + + this.timecode = timecode + } + + serialize () { + const res: NamedMessage = { + name: 'jog', + params: {} + } + + if (this.timecode === undefined) throw new Error('JogCommand needs timecode') + + res.params.timecode = this.timecode + + return res + } +}