Command Interface
Some functions can be commanded by writing a command string in the COMMAND item of the SYSTEM topic or transmitting the same string through an EXECUTE transaction or through the "ALERT" command line.
The available commands are:
| Command identifier | Command string | Definition |
|---|---|---|
| ALERT_SZCREATEALARM | "CreateAlarm" | Creation of an alarm |
| ALERT_SZSETINSTRUCTIONS | "SetInstructions" | Attachment of an instruction file |
| ALERT_SZSETPRIORITY | "SetPriority" | Modifies the alarm priority |
| ALERT_SZSETALARM | "SetAlarm" | Activates/Deactivates an alarm |
| ALERT_SZACKALARM | "AckAlarm" | Alarm acknowledgment |
| ALERT_SZMASKALARM | "MaskAlarm" | Masks/Unmasks an alarm |
| ALERT_SZACKCALL | "AckCall" | Call acknowledgment |
| ALERT_SZCALLGROUP | "CallGroup" | Group call |
| ALERT_SZCALLUSER | "CallUser" | Call for service message |
| ALERT_SZVALIDUSER | "ValidUser" | Validates/Invalidates an operator |
| ALERT_SZSENDCONSOLE | "SendConsole" | Sends a message to the remote console |
| ALERT_SZACKCONSOLE | "AckConsole" | Acknowledges a console message |
| ALERT_SZRESTORELINKS | "RestoreLinks" | Reinitializes the DDE and OPC connections |
| ALERT_SZSHOWWINDOW | "ShowWindow" | Selects the display of ALERT window |
| ALERT_SZPLAYTEXT | "PlayText" | Synthesizes and plays a message on the local |
A) DDE command
If the command is denied, the POKE or EXECUTE command returns an error. The error cause can be read in the REPORT item of the SYSTEM topic.
The REPORT item can be read by a simple request (REQUEST) or by a request for advise (ADVISE). It returns the report value of the last executed command:
| Report label | Value | Definition |
|---|---|---|
| ALERT_ERR_NOERROR | 00 | Command accepted |
| ALERT_ERR_INVALIDCOMMAND | 02 | Invalid function |
| ALERT_ERR_SYNTAXERROR | 03 | Syntax error |
| ALERT_ERR_LOWMEMORY | 04 | Memory overflow |
| ALERT_ERR_INVALIDGROUP | 05 | Invalid group name |
| ALERT_ERR_INVALIDALARM | 06 | Invalid alarm identifier |
| ALERT_ERR_ACKNOWLEDGED | 07 | Alarm already acknowledged |
| ALERT_ERR_INVALIDUSER | 08 | Invalid user name |
| ALERT_ERR_NOCONSOLE | 09 | No console defined |
The report for execution of a command that needs a delay to be completed (call command) should be interpreted by analysis of the events sent back in the TRACE item of the SYSTEM topic.
The commands are transmitted under the form of character strings (upper or lower case) including a command label followed by a parameter list, each parameter being separated from the previous by a tab character.
B) Command by command line
The commands are transmitted under the form of character strings (upper or lower case) including the name of the ALERT application (with full path), a command label followed by a parameter list, each parameter being separated from the previous by a tab or a space character. If a parameter includes spaces or tabulations, it must be transformed in a quoted string (").
1) CreateAlarm
Object: Creation of an entry in the event list
Parameters:
1st parameter: alarm identifier
2nd parameter: attached on call group
3rd parameter: associated alphanumeric alarm message
4th parameter: associated numerical alarm message (optional)
5th parameter: name of audio file containing the associated vocal message (optional)
Example:
DDE command:
CreateAlarm <Tab> Pressure <Tab> Technical <Tab> Boiler overpressure <Tab> 00835 <Tab> C:\Message\Pressure.wav
Command line:
ALERT CreateAlarm Pressure Technical "Boiler overpressure" 00835 "C:\Message\Pressure.wav"
2) SetInstructions
Object: Attachment of an instruction file to an alarm
Parameters:
1st parameter: alarm identifier
2nd parameter: Nom of text file containing the instructions
3rd parameter: 1 = demand to delete the file upon deletion of alarm (by default: 0 = file never deleted)
Example:
DDE command:
SetInstructions <Tab> Pressure<Tab> c:\inst\pressure.txt
Command line:
ALERT SetInstructions Pressure "c:\inst\pressure.txt"
(Attach the file "c:\inst\pressure.txt" to the alarm "Pressure")
3) SetPriority
Object: Modifies the priority of an alarm
Parameters:
1st parameter: alarm identifier
2nd parameter: Priority level (0 to 99)
Example:
DDE command:
SetPriority <Tab> Pressure<Tab> 3
Command line:
ALERT SetPriority Pressure 3
(set the priority level of alarm "Pressure" to 3)
4) SetAlarm
Object: Activates/deactivates an alarm
Parameters:
1st parameter: alarm identifier
2nd parameter: "1" to activate, "0" to deactivate (optional, 1 by default)
3rd parameter: alarm value (optional)
Example:
DDE command:
SetAlarm <Tab> Pressure<Tab> 1
Command line:
ALERT SetAlarm Pressure 1
(activate "Pressure" alarm, and start a call to the "Technical" group, following the configuration set by CreateAlarm)
5) AckAlarm
Object: Acknowledgment of an alarm (suspend pending calls for this alarm)
Parameters:
1st parameter: alarm identifier
2nd parameter: name of user who acknowledges the alarm (optional)
Example:
DDE command:
AckAlarm <Tab> Pressure
Command line:
ALERT AckAlarm Pressure
6) MaskAlarm
Object: Masks or unmasks an alarm
Parameters:
1st parameter: alarm identifier
2nd parameter: "1" to mask, "0" to unmask (optional, 1 by default)
3rd parameter: name of user who masks the alarm (optional)
Example:
DDE command:
MaskAlarm <Tab> Pressure
Command line:
ALERT MaskAlarm Pressure
7) AckCall
Object: Acknowledgment of a call
Parameters:
1st parameter: name of called user
2nd parameter: name of user who acknowledges the call (optional)
3rd parameter: "1" to require disconnection , "0" else (optional, 0 by default)
Example:
DDE command:
AckCall <Tab> Bob
Command line:
ALERT AckCall Bob
8) CallGroup
Object: Creation of a temporary alarm, alarm activation and calling the associated group. This alarm will be deleted after acknowledgment.
Parameters:
1st parameter: destination of on-call group
2nd parameter: alarm identifier
3rd parameter: associated alphanumeric alarm message
4th parameter: associated numerical alarm message(optional)
5th parameter: name of audio file containing the associated vocal message (optional)
Example:
DDE command:
CallGroup <Tab> Technical <Tab> Pressure <Tab> Boiler overheating <Tab> 00835 <Tab> C:\Message\Pressure.wav
Command line:
ALERT CallGroup Technical Pressure "Boiler overheating" 00835 "C:\Message\Pressure.wav"
9) CallUser
Object: Call of a user for transmission of a message
Parameters:
1st parameter: name of user
2nd parameter: alphanumerical message to transmit
3rd parameter: numerical message to transmit (optional)
4th parameter: name of SOUND file containing the associated vocal message (optional)
5th parameter: name of associated TEXT file (optional)
Example:
DDE command:
CallUser <Tab> Bob <Tab> Call Alert station
Command line:
ALERT CallUser Bob "Call Alert station"
10) ValidUser
Object: Set an user on-duty or off-duty
Parameters:
1st parameter: name of user
2nd parameter: "0" = off-duty, "1" = on-duty (optionnal: "1" by default)
Example:
DDE command:
ValidUser <Tab> Bob <Tab> 0
Command line:
ALERT ValidUser Bob 0
11) SendConsole
Object: Send a message to the operators defined with the console attribute (see programmed calls).
Parameters:
1st parameter: alphanumerical message to transmit
2nd parameter: message identifier (optional)
The message identifier is used to identify the message upon acknowledgment (AckConsole). If this identifier is defined, the message will only be transmitted during the on call period of the remote console, this message being hold until that period. If the identifier is not defined (no 2nd parameter), the message is systematically transmitted, whether or not the remote console is on call.
Example:
DDE command:
SendConsole <Tab> Battery fault
(message forced)
SendConsole <Tab> Battery fault <Tab> A001
(message transmitted if on call)
Command line:
ALERT SendConsole Battery fault
(message forced)
ALERT SendConsole Battery fault A001
(message transmitted if on call)
12) AckConsole
Object: Acknowledgment of a console message
Parameters:
1st parameter: identifier of message to acknowledge
Example:
DDE command:
AckConsole <Tab> A001
Command line:
ALERT AckConsole A001
13) RestoreLinks
Object: Reinitialize the DDE and OPC links
Parameters:
none
Example:
DDE command:
RestoreLinks
Command line:
ALERT RestoreLinks
14) ShowWindow
Object: Selection of ALERT window displaying
Parameters:
1st parameter: display mode
"0" - Hide the Alert window
"1" - Display of the Alert window with normal size
"2" - Display of the Alert window as icon
"3" - Display of the Alert window as maximized (full screen)
"4" - Alert window always visible (topmost window)
Example:
DDE command:
ShowWindow <Tab> 2
Command line:
ALERT ShowWindow 2
Set the ALERT window as icon
15) PlayText
Object: Synthesizes and plays a message on the local station (require TTS option)
Parameters:
1st parameter message to synthesize
Example:
DDE command:
PlayText <Tab> Full alert
Command line:
ALERT PlayText "Full alert"
16) SendDataToScript
Object: Transmits a string command to the Message Processor
Parameters:
1st parameter message to process
Example:
DDE command:
SendDataToScrip <Tab> AAAA XXX ZZZZ
Command line:
ALERT SendDataToScrip "AAAA XXX ZZZZ"