Last active
October 26, 2021 17:20
-
-
Save OsvaldoFrias/1e00df537449bc5821ab3fad11226a27 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const securos = require("securos"); | |
securos.connect(function (core) { | |
const recording = core.registerEventHandler( | |
`MACRO`, | |
`1.1`, | |
`RUN`, | |
function (e) { | |
//Printing on console | |
console.log(`DATA: ${e.date}`); | |
console.log(`Object type ${core.selfType}, Object ID [${core.selfId}]`); | |
//Sending a react to start recording | |
core.doReact(`CAM`, `1`, `REC`); | |
} | |
); | |
//Creating more than one handler | |
const tester = core.registerEventHandler(`MACRO`, `1.2`, `RUN`, function (e) { | |
//Sending an event with some parameters | |
console.log("Sending and Event"); | |
let param = { comment: "Test Event" }; | |
core.sendEvent(`CAM`, `2`, `VCA_EVENT`, param); | |
}); | |
const stopRecord = core.registerEventHandler( | |
`MACRO`, | |
`1.3`, | |
`RUN`, | |
function (e) { | |
core.doReact(`CAM`, `1`, `REC_STOP`); | |
} | |
); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment