hik-hfp-t
v0.0.8
Published
HIK HFP-T communication protocol
Readme
HIK hfp-t protocol
示例
import { HFPTServer, Decoder, IDecoded } from 'hik-hfp-t'
const port = 8651
const hfptServer = new HFPTServer()
hfptServer.listen(port)
hfptServer.collectEmitter.listens(1001, (property: IDecoded) => {
/** property handle */
})
hfptServer.collectEmitter.listens(1000, (property: IDecoded) => {
/** event handle */
})
const IMEI = '123456789012345'
const devId = hfptServer.IMEIDevIdMap.get(IMEI)
const packet = Decoder.buildDeviceOperatePacket(devId, 3)
hfptServer.send(imei, packet)