Beeper

Beeper

Use the beeper field to control the beeper of the device and the Zebra Integrated Multi-Function Light.
beeper?: IBeepBeeper | BeeperStatusResult;
Helper Object Beeper Properties
Value
Description
Beeper.beep()
This function triggers a beeper with a specified duration, tone, and volume. Helper objects, BeeperVolumeResult, BeeperToneResult, and BeeperDurationResult, can be used to specify these.
Beeper.off()
Does not trigger the beeper; it’s independent of job_success.
Beeper.device_settings()
Triggers the beeper with parameters specified in the General Settings tab in Aurora Focus.
The beeper must be enabled using the General Settings tab in Aurora Focus before being used on the device.
/** * Beep if the overall grade is not good enough. * @param {IMainArguments} input_result - object with results of the job. * @returns {IMainResult} - object defining outputs per interface. */ export function onResults(input_result) { const decodes = input_result.tool_results_by_names.Read_Barcode.decodes; const bad_decodes = decodes.filter(decode => decode.score === null || decode.score.overall_grade.grade < 3) const bad_values = bad_decodes.map(decode => decode.value + ", grade: " + decode.score?.overall_grade.grade); if (bad_values.length > 0) { console.error("Codes with bad grades: ", bad_values.join(" ")) return { beeper: Beeper.beep(BeeperVolumeResult.HIGH, BeeperToneResult.MEDIUM, BeeperDurationResult.MEDIUM) }; } else { return { beeper: Beeper.off() }; } }