Go to documentation repository
...
| Code Block | ||
|---|---|---|
| ||
if (Event.SourceType == "CAM" && Event.Action == "MD_START")
{
var msgevent = CreateMsg();
msgevent.SourceType = "REGION";
msgevent.Action = "PANIC_LOCK";
if (Event.SourceId <=4)
{
msgevent.SourceId = "1";
}
if ((Event.SourceId > 4) && (Event.SourceId < 10))
{
msgevent.SourceId = "2";
}
NotifyEvent(msgevent);
} |
...
| Code Block | ||
|---|---|---|
| ||
if (Event.SourceType == "TIMER" && Event.SourceId == "1" && Event.Action == "TRIGGER")
{
var msg = CreateMsg();
msg.StringToMsg(GetObjectParams("TIMER", "1"));
if(msg.GetParam("s") == "1")
{
DoReactStr("MACRO", "1", "RUN", "");
SetObjectParam("TIMER","1","s","30");
DoReactStr("TIMER","1", "DISABLE", "");
DoReactStr("TIMER","1", "ENABLE", "");
}
if(msg.GetParam("s") == "30")
{
DoReactStr("MACRO", "1", "RUN", "");
SetObjectParam("TIMER","1","s","1");
DoReactStr("TIMER","1", "DISABLE", "");
DoReactStr("TIMER","1", "ENABLE", "");
}
} |
...