- This topic has 14 replies, 8 voices, and was last updated 7 years, 11 months ago by .
-
Topic
-
I am having trouble getting a tcl alert properly configured and compiled. I am using Cloverleaf 6.0.2. The tcl proc I’ve written for my experiment is the tclalert template stripped down to bare bones. It does not use any arguments.
Code:proc alert_test { args } {
set retval {}
lappend retval “VALUE 0”
lappend retval “MESSAGE {Tcl alert ‘alert_test’ has fired.}”
return $retval
}I created a tcl alert with the above proc as the source with no arguments. It looks like this in default.alrt.
Code:# Alert config: default.alrt
#
prologue
who: blubkeman
date: January 15, 2016 1:39:51 PM CST
type: alrt
version: 3.0
end_prologue
#
{ALERT
{ NAME Alert_1 }
{ VALUE tcl }
{ SOURCE {
{ TCL alert_test }
} }
{ WITH -1 }
{ COMP {== 0} }
{ FOR once }
{ WINDOW */*/*/* }
{ ACTION {
{ notify {} }
} }
}
After saving the default.alrt file, I reviewed hcimonitord.log and found an error stating, ‘Tcl Alert Script Error: invalid command name “alert_test”‘.I next tried putting an argument in the source of the alert just to see if that helped. It did get me past the invalid command name. Apparently, a tcl alert requires the presence of an argument even if the procedure called doesn’t use it. Does that sound right?
My default.alrt now looks like this.
Code:# Alert config: default.alrt
#
prologue
who: blubkeman
date: January 15, 2016 1:46:41 PM CST
type: alrt
version: 3.0
end_prologue
#
{ALERT
{ NAME Alert_1 }
{ VALUE tcl }
{ SOURCE {
{ TCL {alert_test {NONE empty}} }
} }
{ WITH -1 }
{ COMP {== 0} }
{ FOR once }
{ WINDOW */*/*/* }
{ ACTION {
{ notify {} }
} }
}
After saving the default.alrt file, I reviewed hcimonitord.log again and found an error stating, ‘Tcl Alert Script Error: missing close-brace’.Between the tcl proc code and the default.alrt file, I cannot find a single missing close-brace.
Can anybody point out what I’m missing?
Brian Lubkeman
Technical Analyst III - Integrations
McFarland Clinic, Ames, Iowa
- The forum ‘Cloverleaf’ is closed to new topics and replies.