Hello Guys,
I am having a problem with a trigger that has multiple conditions. I am not sure if I am doig the right thing or at least less complicated.
The trigger should check the last two colected values and if both are true , then the trigger will alarm.
Here is my code. Any sugestions ? This is not working according to what I expect.
Thanks !!!
\\If two last values are lower than 10000 and the time is between 00 and 06AM or 18 and 2359PM \\
{test_traff_tx.sh.last(#2)} < 10000 and
{test_traff_tx.sh.last(#1)} < 10000 and
{test_traff_tx.sh.time()} > 000001 and
{test_traff_tx.sh.time()} < 060000 or
{test_traff_tx.sh.time()} > 180000 and
{test_traff_tx.sh.time()} < 235959
or
\\If two last values are lower than 450000 and the time is between 08 and 12PM or 14 and 18PM from monday to saturday \\
{test_traff_tx.sh.last(#2)} < 450000 and
{test_traff_tx.sh.last(#1)} < 450000 and
{test_traff_tx.sh.time()} > 080000 and
{test_traff_tx.sh.time()} < 120000 or
{test_traff_tx.sh.time()} > 140000 and
{test_traff_tx.sh.time()} < 180000 and
{test_traff_tx.sh.dayofweek()} < 7
or
\\If two last values are lower than 250000 and the time is in lunch time from monday to saturday \\
{test_traff_tx.sh.last(#2)} < 250000 and
{test_traff_tx.sh.last(#1)} < 250000 and
{test_traff_tx.sh.time()} > 115959 and
{test_traff_tx.sh.time()} < 133000 and
{test_traff_tx.sh.dayofweek()} < 7
or
\\If two last values are lower than 10000 and the day of week is Sunday \\
{test_traff_tx.sh.last(#2)} < 10000 and
{test_traff_tx.sh.last(#1)} < 10000 and
{test_traff_tx.sh.dayofweek()} = 7
I am having a problem with a trigger that has multiple conditions. I am not sure if I am doig the right thing or at least less complicated.
The trigger should check the last two colected values and if both are true , then the trigger will alarm.
Here is my code. Any sugestions ? This is not working according to what I expect.
Thanks !!!
\\If two last values are lower than 10000 and the time is between 00 and 06AM or 18 and 2359PM \\
{test_traff_tx.sh.last(#2)} < 10000 and
{test_traff_tx.sh.last(#1)} < 10000 and
{test_traff_tx.sh.time()} > 000001 and
{test_traff_tx.sh.time()} < 060000 or
{test_traff_tx.sh.time()} > 180000 and
{test_traff_tx.sh.time()} < 235959
or
\\If two last values are lower than 450000 and the time is between 08 and 12PM or 14 and 18PM from monday to saturday \\
{test_traff_tx.sh.last(#2)} < 450000 and
{test_traff_tx.sh.last(#1)} < 450000 and
{test_traff_tx.sh.time()} > 080000 and
{test_traff_tx.sh.time()} < 120000 or
{test_traff_tx.sh.time()} > 140000 and
{test_traff_tx.sh.time()} < 180000 and
{test_traff_tx.sh.dayofweek()} < 7
or
\\If two last values are lower than 250000 and the time is in lunch time from monday to saturday \\
{test_traff_tx.sh.last(#2)} < 250000 and
{test_traff_tx.sh.last(#1)} < 250000 and
{test_traff_tx.sh.time()} > 115959 and
{test_traff_tx.sh.time()} < 133000 and
{test_traff_tx.sh.dayofweek()} < 7
or
\\If two last values are lower than 10000 and the day of week is Sunday \\
{test_traff_tx.sh.last(#2)} < 10000 and
{test_traff_tx.sh.last(#1)} < 10000 and
{test_traff_tx.sh.dayofweek()} = 7
utcoming.last(#2)}<30000 and
Comment