%%HP: T(3)A(D)F(.); \<< @ copyright : (C) 1996, 2004 by Ramón Díaz-Uriarte @ @ email : rdiaz@ligarto.org @ @ @ @ This program is free software; you can redistribute it and/or modify @ @ it under the terms of the GNU General Public License as published by @ @ the Free Software Foundation; either version 2 of the License, or @ @ (at your option) any later version. @ @ @ @ This program is distributed in the hope that it will be useful, @ @ but WITHOUT ANY WARRANTY; without even the implied warranty of @ @ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @ @ GNU General Public License for more details. @ @ @ @ You should have received a copy of the GNU General Public License @ @ along with this program; if not, write to the Free Software @ @ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,USA @ \-> alind @takes care of the alarm index, returned by the execution of the alarm@ \<< \<< 500 .05 BEEP 4000 .05 BEEP 500 .05 BEEP BEH6 \>> @ALC: The alarm for end of control and attack; no calculation of TCONTR in this program@ \<< 500 .05 BEEP 1000 .05 BEEP 2000 .05 BEEP 500 .05 BEEP BEH6 \>> @AL1: The "main" alarm for antipred and focal. Used in intruder to signal start of antipred. part @ \<<200 .51 BEEP 50 .51 BEEP BEH6 \>> @ALR: Executed when animal does not attack within tatck in approach 1@ @*************CONSTANT FOR FOCAL PART**********@ .15 @ttf: Total time focal; note, now it is in HMS format; used to be in ticks format @ @******CONSTANTS FOR ANTIPREDATOR PART****************@ .00132 @ttmm: Time from lizard move to my move, in antipred.@ .20 @tl: Time I wait after the animal is lost or no acces in antipred part (i.e., duration of focal post-antipr) @ @***************CONSTANTS FOR INTRUDER PART********@ .04 @tatck: Max. time I wait for an attack after I place intruder @ .03 @datck: duration of attack; this is different from BEH4! @ .02 @taae: time after attack ends till antipred; actually, time since intruder is back @ .0345 @TCONTR; this is different from the field version (beh5) @ \-> ALC AL1 ALR ttf ttmm tl tatck datck taae TCONTR \<< WHILE 2 FS? REPEAT 0 WAIT TIME 2 PICK CASE DUP 92.1 == THEN DROP IF 20 FS? 21 FC? AND 22 FC? AND THEN 4000 .1 BEEP "My move" 4 DISP END IF 20 FS? 21 FC? AND THEN 4 SF END IF 20 FC? 21 FC? AND 22 FS? AND THEN 4000 .1 BEEP "Start" 4 DISP END IF 20 FC? 21 FC? AND 22 FC? AND THEN 4000 .1 BEEP "Start" 4 DISP DATE TIME ttf HMS+ AL1 3 \->LIST STOALARM DROP END END DUP 41.1 == THEN DROP 200 .1 BEEP "Bobs" 4 DISP END DUP 31.1 == THEN DROP 700 .1 BEEP "Gular Bob" 4 DISP END DUP 21.1 == THEN DROP 1100 .1 BEEP "High-Intens Displ" 4 DISP END DUP 42.1 == THEN DROP 2000 .1 BEEP "Movement" 4 DISP IF 4 FS? 20 FS? AND 21 FC? AND THEN 'C' INCR DROP 4 CF 0 DELALARM DATE TIME ttmm HMS+ AL1 3 \->LIST STOALARM DROP END END DUP 22.1 == THEN DROP 4000 .1 BEEP "Orientation" 4 DISP END DUP 53.1 == THEN DROP 80 .25 BEEP "Lost lizard" 4 DISP IF 4 FS? 20 FS? AND 21 FC? AND THEN 'C' INCR DROP END IF 20 FS? 21 FC? AND THEN 4 CF 0 DELALARM DATE TIME tl HMS+ AL1 3 \->LIST STOALARM DROP END END DUP 94.1 == THEN DROP 80 .25 BEEP "No acces." 4 DISP IF 20 FS? 21 FC? AND 4 FS? AND THEN 5 SF 4 CF 0 DELALARM DATE TIME tl HMS+ AL1 3 \->LIST STOALARM DROP END END DUP 44.1 == THEN DROP "Tail Flip" 4 DISP END DUP 24.1 == THEN DROP "Tail Move" 4 DISP END DUP 72.1 == THEN DROP "4 Legs" 4 DISP END DUP 45.1 == THEN DROP 1000 0.1 BEEP "Attack" 4 DISP IF 20 FC? 21 FC? AND 22 FS? AND 31 FC? AND THEN 31 SF 0 DELALARM DATE TIME datck HMS+ ALC 3 \->LIST STOALARM DROP END END @ An attack (or bite, or poke) can be the first one after I leave the intruder; if it is, I set the alarm for @ @maximum duration of attack; if it is not (flag 31 is set), then nothing needs to happen. @ DUP 15.1 == THEN DROP "Courtship" 4 DISP END DUP 11.1 == THEN DROP "Arching back" 4 DISP END DUP 16.1 == THEN DROP "Arching + Tail" 4 DISP END DUP 12.1 == THEN DROP "Caudal present." 4 DISP END DUP 62.1 == THEN DROP "Eating" 4 DISP END DUP 63.1 == THEN DROP "Shiting" 4 DISP END DUP 84.1 == THEN DROP "3 Legs" 4 DISP END DUP 32.1 == THEN DROP "Normal posture" 4 DISP END DUP 64.1 == THEN DROP "Lost" 4 DISP @ IF 20 FC? 21 FC? AND 22 FC? AND 6 FC? AND THEN 0 DELALARM TICKS @ @ TS - TE + 'TE' STO 6 SF @ @ END @ END DUP 65.1 == THEN DROP "Found" 4 DISP @ IF 20 FC? 21 FC? AND 22 FC? AND 6 FS? AND THEN 0 DELALARM DATE TIME ttf@ @ TE B\->R - 29491200 / \->HMS HMS+ AL1 3 \->LIST STOALARM DROP @ @ TICKS 'TS' STO 6 CF @ @ END @ END @ The arrobas are to eliminate the code for the net focal; here, the focal session is of total (not net) time@ DUP 14.1 == THEN DROP "Basking" 4 DISP END DUP 13.1 == THEN DROP "Copulation" 4 DISP END DUP 46.1 == THEN DROP 500 0.1 BEEP "Poke" 4 DISP IF 20 FC? 21 FC? AND 22 FS? AND 31 FC? AND THEN 31 SF 0 DELALARM DATE TIME datck HMS+ ALC 3 \->LIST STOALARM DROP END END DUP 26.1 == THEN DROP 200 0.1 BEEP "Lick" 4 DISP END DUP 25.1 == THEN DROP 4000 0.1 BEEP "Bite" 4 DISP IF 20 FC? 21 FC? AND 22 FS? AND 31 FC? AND THEN 31 SF 0 DELALARM DATE TIME datck HMS+ ALC 3 \->LIST STOALARM DROP END END DUP 82.1 == THEN DROP IF 20 FC? 21 FC? AND 22 FS? AND THEN "Bicho dentro" 4 DISP IF 30 FC? THEN TIME 'TIP1' STO 0 DELALARM DATE TIME tatck HMS+ ALR 3 \->LIST STOALARM DROP END IF 30 FS? THEN 0 DELALARM DATE TIME TCONTR HMS+ ALC 3 \->LIST STOALARM DROP END ELSE "Move back" 4 DISP END END DUP 83.1 == THEN DROP "Intruder Back" 4 DISP IF 20 FC? 21 FC? AND 22 FS? AND THEN 0 DELALARM DATE TIME taae HMS+ AL1 3 \->LIST STOALARM DROP END END DUP 93.1 == THEN DROP "Start remove intr" 4 DISP END DUP 95.1 == THEN DROP "Perdido en appr1" 4 DISP END DUP 85.1 == THEN DROP "Exposed" 4 DISP END @This should only be used in antipred, to signal when the animal is exposed after it reeemerges@ DUP 65.3 == THEN DROP 0 DELALARM 1000 .05 BEEP 2000 .05 BEEP 3000 .05 BEEP 2 CF IF 20 FS? 21 FC? AND THEN 21 SF END IF 20 FC? 21 FC? AND 22 FS? AND THEN 'TIP1' PURGE 20 SF 22 CF 21 CF END IF 20 FC? 21 FC? AND 22 FC? AND THEN 22 SF END @ I have used if's instead of if-else's, so I need to place the conditions in that order (if the order @ @ is changed, you'll get an infinite loop).@ END DROP END @Any other key; avoids duplications of keys in the output@ END DEPTH \->LIST 'PROV' STO PROV 'TS' PURGE 'TE' PURGE EXP6 \>> \>> \>>