Sensors

Agent.Peripherals. Sensors

Methods

(async) readBottomLevelSensor() → {Promise.<module:Sensors~BottomLevelSensor>}

Example
const sensorResult = await Agent.Peripherals.Sensors.readBottomLevelSensor();
if (sensorResult.BottomLevelSensor) console.log('Bottom level sensor is active');
else console.log('Botton level sensor is not active');

(async) readTamperSwitch() → {Promise.<module:Sensors~TamperSwitch>}

Example
const sensorResult = await Agent.Peripherals.Sensors.readTamperSwitch();
if (sensorResult.TamperSwitch) console.log('Tamper switch is active, the device has been tampered.');
else console.log('Tamper switch is not active, the device has not been tampered.');

(async) readTopLevelSensor() → {Promise.<module:Sensors~TopLevelSensor>}

Example
const sensorResult = await Agent.Peripherals.Sensors.readTopLevelSensor();
if (sensorResult.TopLevelSensor) console.log('Top level sensor is active');
else console.log('Top level sensor is not active');