zigbee-herdsman
Version:
An open source ZigBee gateway solution with node.js.
11 lines (8 loc) • 363 B
text/typescript
import {Type} from "../unpi/constants";
import type {MtCmd, MtCmdAreqZdo, MtCmdSreqZdo} from "./tstype";
export function isMtCmdAreqZdo(cmd: MtCmd): cmd is MtCmdAreqZdo {
return cmd.type === Type.AREQ && "zdoClusterId" in cmd;
}
export function isMtCmdSreqZdo(cmd: MtCmd): cmd is MtCmdSreqZdo {
return cmd.type === Type.SREQ && "zdoClusterId" in cmd;
}