Skip to content

Commit

Permalink
feat: startup state commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed May 30, 2021
1 parent 19c0a72 commit 7d54c00
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/commands/StartupStateCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import { BasicWritableCommand } from './CommandBase'

export class StartupStateSaveCommand extends BasicWritableCommand<unknown> {
public static readonly rawName = 'SRsv'

constructor() {
super({})
}

public serialize(): Buffer {
const buffer = Buffer.alloc(4)
// 0 is the 'mode' parameter, which is always 0 for now
return buffer
}
}

export class StartupStateClearCommand extends BasicWritableCommand<unknown> {
public static readonly rawName = 'SRcl'

constructor() {
super({})
}

public serialize(): Buffer {
const buffer = Buffer.alloc(4)
// 0 is the 'mode' parameter, which is always 0 for now
return buffer
}
}
1 change: 1 addition & 0 deletions src/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ export * from './CommandBase'
export * from './AuxSourceCommand'
export * from './InitCompleteCommand'
export * from './PowerStatusCommand'
export * from './StartupStateCommand'
export * from './TallyBySourceCommand'
export * from './TimeCommand'

0 comments on commit 7d54c00

Please sign in to comment.