/
ValetudoSensor.js
44 lines (39 loc) · 976 Bytes
/
ValetudoSensor.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
const SerializableEntity = require("../SerializableEntity");
class ValetudoSensor extends SerializableEntity {
/**
* @param {object} options
* @param {ValetudoSensorType} options.type
* @param {ValetudoSensorSubType} [options.subType]
* @param {any} options.value
* @param {object} [options.metaData]
* @class
*/
constructor(options) {
super(options);
this.type = options.type;
this.subType = options.subType;
this.value = options.value;
this.metadata = options.metaData;
}
}
/**
* @typedef {string} ValetudoSensorType
* @enum {string}
*
*/
ValetudoSensor.TYPE = Object.freeze({
ALL: "all",
ACCELEROMETER: "accelerometer",
GYROSCOPE: "gyroscope",
BUMPER: "bumper",
CLIFF: "cliff",
LIDAR: "lidar",
});
/**
* @typedef {string} ValetudoSensorSubType
* @enum {string}
*
*/
ValetudoSensor.SUB_TYPE = Object.freeze({
});
module.exports = ValetudoSensor;