Skip to content

Commit

Permalink
feat(longrange): remove ResponseStatus
Browse files Browse the repository at this point in the history
  • Loading branch information
jtbraun committed Nov 15, 2023
1 parent 32c0c34 commit 25908de
Showing 1 changed file with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,6 @@ export interface SetLongRangeChannelResponseOptions extends MessageBaseOptions {
responseStatus: number;
}

// BUGBUG: move someplace common, see Spec 4.2.5
//
// Although, that section refers to a "callback message", and SetZWaveLongRangeChannel doesn't define a callback message...
export enum ResponseStatus {
FAILED = 0x00,
}

export class ResponseStatusMessageBase extends Message
implements SuccessIndicator
{
Expand All @@ -100,16 +93,13 @@ export class ResponseStatusMessageBase extends Message
options: MessageDeserializationOptions,
) {
super(host, options);
this._status = this.payload[0];
this.success = this.payload[0] !== 0;
}

private _status: ResponseStatus;
public get getStatus(): ResponseStatus {
return this._status;
}
public readonly success: boolean;

public isOK(): boolean {
return this._status != ResponseStatus.FAILED;
return this.success;
}
}

Expand Down

0 comments on commit 25908de

Please sign in to comment.