next up previous
Next: Sample Motif Browser: cmlog Up: Browser APIs Previous: A Simple Java Monitor

Query Messages from Browser

Applications may send a selection rule to the server to filter out messages that do not qualify. A selection rule is specified as a character string with syntax of C logic expressions using known tag names as variables of expressions. For example the following selection specifies that a caller wants messages to have facility ``epics'' and severity with value 3:

facility=='epics' && severity==3

In addition pattern match can be performed similar to SQL such as ``text like 'error message'''. If applications provide wrong syntax, the server will send CMLOG_QUERYMSG_ERR back. The following is the definition of syntax for query messages:


messages : message 
	| messages && messages 
	| messages || messages
	| ! messages
	| (message)

message : tagname logicop tagvalue

where logicop could be $==$, $<$, $>$, $!=$, $<=$, $>=$ and like, and tagvalue can be data of type of int, double, float, and single quoted char string.



Jie chen
2001-10-22