Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This script is written for a camera with ID number 1 and for a Sensor object whose ID number is 1 as well.  With this script, we can set the Post-alarm time value to 7 seconds.

 

Code Block
OnEvent("GRAY","1","ALARM")
{
[
    if( !CheckState("CAM","1","DETACHED") )
    {
        DoReact("CAM","1","REC_ROLLBACK");
        Wait(5);
        DoReact("CAM","1","REC_STOP");
    }
]
}
OnEvent("GRAY","1","ALARM")
{
[
    Wait(2);
    DoReact("GRAY","1","CONFIRM");
    Wait(2);
    DoReact("GRAY","1","ARM");
]
}

 

...

For constant recording mode, do not perform any commands for starting or stopping camera recording (REC_ROLLBACK иREC_STOP). In this case the following script variations can be used:

 

  1. Variation 1: when captioning is disabled in sensors settings. In this case ATM-Intellect Pro does not stop recording and the program shall be as follows:

 

...

  1. Code Block
    OnEvent("GRAY","1","ALARM")
    {
    [
        Wait(5); // Specifies the time after which the recording should be stopped in order to get the required clip length or number of frames
        DoReact("CAM","1","REC_STOP");
        Wait(2); // Pre-alarm record time in the camera settings = 2 sec.
        DoReact("CAM","1","REC_ROLLBACK"); // Start recording with pre-alarm recording of 2 seconds. This allows us not to lose data in the archive.
    ]
    }

...

 

...

  1. Variation 2: when captoning is enabled in sensors settings. In this case ATM-Intellect Pro stops recording in specified time after captions are put onto video image. The program shall be as follows:

 

...

Code Block
OnEvent("GRAY","1","ALARM")
{
[
    Wait(7); // This time equals to captions displaying time + 2 seconds of pre-alarm recording
    DoReact("CAM","1","REC_ROLLBACK"); // Start recording with pre-alarm recording of 2 seconds. This allows us not to lose data in the archive.
]
}