Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@onbright/hardware-suit

Package Overview
Dependencies
Maintainers
3
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@onbright/hardware-suit - npm Package Compare versions

Comparing version 1.10.0 to 1.10.1

2

build/main/entity/MeterReaderStatus.d.ts

@@ -11,2 +11,4 @@ import { Status } from './Status';

setStatus(state: string): MeterReadertatus;
getPowerStatus(): string;
setPowerStatus(state: string): MeterReadertatus;
}

20

build/main/entity/MeterReaderStatus.js

@@ -5,4 +5,4 @@ "use strict";

* @Date: 2021-07-09 14:45:34
* @Last Modified by: mikey.zhaopeng
* @Last Modified time: 2022-01-18 18:37:51
* @Last Modified by: sanda
* @Last Modified time: 2022-03-01 11:22:11
*/

@@ -23,10 +23,20 @@ Object.defineProperty(exports, "__esModule", { value: true });

getStatus() {
return this.state.toEvenHex();
return this.state;
}
setStatus(state) {
this.state = state.toEvenHex();
this.state = state;
return this;
}
getPowerStatus() {
return this.state.slice(2, 4);
}
setPowerStatus(state) {
const hexState = state.toEvenHex();
const stateList = this.state.split('');
stateList.splice(2, 2, hexState[0], hexState[1]);
this.state = stateList.join('');
return this;
}
}
exports.MeterReadertatus = MeterReadertatus;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWV0ZXJSZWFkZXJTdGF0dXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvZW50aXR5L01ldGVyUmVhZGVyU3RhdHVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQTs7Ozs7R0FLRzs7O0FBRUgscUNBQWtDO0FBRWxDLE1BQWEsZ0JBQWlCLFNBQVEsZUFBTTtJQUcxQzs7O09BR0c7SUFDSCxZQUFhLE1BQWM7UUFDekIsS0FBSyxDQUFDLE1BQU0sQ0FBQyxDQUFBO1FBU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BQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFBO0lBQy9CLENBQUM7SUFDRCxjQUFjLENBQUUsS0FBYTtRQUMzQixNQUFNLFFBQVEsR0FBRyxLQUFLLENBQUMsU0FBUyxFQUFFLENBQUE7UUFDbEMsTUFBTSxTQUFTLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxLQUFLLENBQUMsRUFBRSxDQUFDLENBQUE7UUFDdEMsU0FBUyxDQUFDLE1BQU0sQ0FBQyxDQUFDLEVBQUMsQ0FBQyxFQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsRUFBRSxRQUFRLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQTtRQUM5QyxJQUFJLENBQUMsS0FBSyxHQUFHLFNBQVMsQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDLENBQUE7UUFDL0IsT0FBTyxJQUFJLENBQUE7SUFDYixDQUFDO0NBQ0Y7QUE1QkQsNENBNEJDIn0=

@@ -26,2 +26,4 @@ import { BaseEquip } from './BaseEquip';

getReportTime(): Number;
getPowerInt(): Number[];
setPowerInt(state: string): MeterReaderEquip;
}

@@ -17,3 +17,3 @@ "use strict";

getbytes() {
return this.bytes.format(this.meterReadertatus.getStatus());
return this.meterReadertatus.getStatus();
}

@@ -98,4 +98,15 @@ /**

}
// 获取开关列表
getPowerInt() {
const state = converter_1.fillLength(converter_1.toBinary(this.meterReadertatus.getPowerStatus(), 16), 8)[7];
return [parseInt(state)];
}
setPowerInt(state) {
const stateList = converter_1.fillLength(converter_1.toBinary(this.meterReadertatus.getPowerStatus(), 16), 8).split('');
stateList[7] = state;
this.meterReadertatus.setPowerStatus(converter_1.toHex(stateList.join(''), 2));
return this;
}
}
exports.MeterReaderEquip = MeterReaderEquip;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTWV0ZXJSZWFkZXJFcXVpcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIj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sQ0FBQyxDQUFDLENBQUMsQ0FBQTtRQUNwRixPQUFPLENBQUMsUUFBUSxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUE7SUFDMUIsQ0FBQztJQUNELFdBQVcsQ0FBQyxLQUFhO1FBQ3ZCLE1BQU0sU0FBUyxHQUFHLHNCQUFVLENBQUMsb0JBQVEsQ0FBQyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsY0FBYyxFQUFFLEVBQUUsRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLEVBQUUsQ0FBQyxDQUFBO1FBQy9GLFNBQVMsQ0FBQyxDQUFDLENBQUMsR0FBRyxLQUFLLENBQUE7UUFDcEIsSUFBSSxDQUFDLGdCQUFnQixDQUFDLGNBQWMsQ0FBQyxpQkFBSyxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsRUFBRSxDQUFDLEVBQUUsQ0FBQyxDQUFDLENBQUMsQ0FBQTtRQUNsRSxPQUFPLElBQUksQ0FBQTtJQUNiLENBQUM7Q0FDSDtBQWhHRCw0Q0FnR0MifQ==

@@ -0,3 +1,5 @@

import { BaseEquip } from './BaseEquip';
import { SensorHumanBeingStatus } from "../entity/SensorHumanBeing";
export declare class SensorHumanBeingEquip extends SensorHumanBeingStatus {
export declare class SensorHumanBeingEquip extends BaseEquip {
readonly SensorHumanBeingStatus: SensorHumanBeingStatus;
/**

@@ -9,3 +11,3 @@ * 光线传感器

*/
constructor(status: string);
constructor(status: string, deviceType?: string, deviceChildType?: string);
/**

@@ -12,0 +14,0 @@ * 根据状态获取联动条件字节串

@@ -8,4 +8,5 @@ "use strict";

* @Last Modified by: sanda
* @Last Modified time: 2022-02-28 17:22:35
* @Last Modified time: 2022-03-01 09:57:42
*/
const BaseEquip_1 = require("./BaseEquip");
const SensorHumanBeing_1 = require("../entity/SensorHumanBeing");

@@ -30,3 +31,3 @@ const converter_1 = require("../utils/converter");

};
class SensorHumanBeingEquip extends SensorHumanBeing_1.SensorHumanBeingStatus {
class SensorHumanBeingEquip extends BaseEquip_1.BaseEquip {
/**

@@ -38,4 +39,5 @@ * 光线传感器

*/
constructor(status) {
super(status);
constructor(status, deviceType, deviceChildType) {
super(status, deviceType, deviceChildType);
this.SensorHumanBeingStatus = new SensorHumanBeing_1.SensorHumanBeingStatus(status);
}

@@ -49,3 +51,3 @@ /**

getTime() {
const time = Number(converter_1.toDecimal(this.time, 16));
const time = Number(converter_1.toDecimal(this.SensorHumanBeingStatus.time, 16));
switch (time) {

@@ -65,7 +67,7 @@ case (0):

getStatusDescriptor() {
const eventCode = converter_1.fillLength(converter_1.toBinary(this.evenType, 16), 8);
const gearNumber = converter_1.toDecimal(this.gear, 16);
const isMotion = Number(converter_1.toDecimal(this.motion, 16));
const near = Number(converter_1.toDecimal(this.isNear, 16));
const checkNum = Number(converter_1.toDecimal(this.isCheck, 16));
const eventCode = converter_1.fillLength(converter_1.toBinary(this.SensorHumanBeingStatus.evenType, 16), 8);
const gearNumber = converter_1.toDecimal(this.SensorHumanBeingStatus.gear, 16);
const isMotion = Number(converter_1.toDecimal(this.SensorHumanBeingStatus.motion, 16));
const near = Number(converter_1.toDecimal(this.SensorHumanBeingStatus.isNear, 16));
const checkNum = Number(converter_1.toDecimal(this.SensorHumanBeingStatus.isCheck, 16));
return `${evnetMap[eventCode[7]]}${eventCode[6] === '1' ? ' | 定时上报' : ''}${eventCode[5] === '1' ? ' | 按键上报' : ''}| ${Number(gearNumber)}档 | 上报时间:${this.getTime()} | ${motionMap[isMotion]} | ${nearMap[near]} | 检查开关:${checkMap[checkNum]}`;

@@ -75,2 +77,2 @@ }

exports.SensorHumanBeingEquip = SensorHumanBeingEquip;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2Vuc29ySHVtYW5CZWluZ0VxdWlwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL21vZHVsZXMvU2Vuc29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ksQ0FBQyxPQUFPLEVBQUUsTUFBTSxTQUFTLENBQUMsUUFBUSxDQUFDLE1BQU0sT0FBTyxDQUFDLElBQUksQ0FBQyxXQUFXLFFBQVEsQ0FBQyxRQUFRLENBQUMsRUFBRSxDQUFBO0lBQzFPLENBQUM7Q0FDRjtBQTFDRCxzREEwQ0MifQ==

@@ -0,1 +1,8 @@

### [1.10.1](http://git.on-bright.com:8081/iweb/hardware-suit/compare/v1.10.0...v1.10.1) (2022-03-01)
### Bug Fixes
* 添加电表控制 ([91da01b](http://git.on-bright.com:8081/iweb/hardware-suit/commit/91da01b573b7d98b51be02c4645f459d23727a4b))
## [1.10.0](http://git.on-bright.com:8081/iweb/hardware-suit/compare/v1.9.2...v1.10.0) (2022-02-28)

@@ -2,0 +9,0 @@

{
"name": "@onbright/hardware-suit",
"version": "1.10.0",
"version": "1.10.1",
"description": "hardware-suit javascript library",

@@ -5,0 +5,0 @@ "main": "dist/hardware-suit.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc