Porovnávané verzie
porovnané s
Kľúč
- Tento riadok sa pridal
- Riadok je odstránený.
- Formátovanie sa zmenilo.
COMMAND action
Function
Sending a text command to particular client process of the system.
Declaration
Blok kódu | ||||
---|---|---|---|---|
| ||||
COMMAND strExpression [ON procIdent[INSTANCE instanceExprInt]] |
or
Blok kódu | ||||
---|---|---|---|---|
| ||||
intIdent := COMMAND strExpression [ON procIdent[INSTANCE instanceExprInt]] |
Parameters
strExpression | in | Expression of String type - text command. |
procIdent | in | Reference to an object of Process type, to which the command will be sent. If not specified, command is intended for D2000 Server. |
intIdent | out | Command execution success. |
instanceExprInt | in | Expression, the value of which defines the instance number of process to which the TELL command will be sent (Redundant archiving, Redundancy of communication process). |
Description
A text command, which is generated as the value of the expression
strExpression
, is sent to the process procIdent
. There are two possibilities to send the command:- Asynchronously - the first possibility (with no assignment). The command is sent to the process and does not wait for the operation result.
- Synchronously - the second possibility. The result of the action execution is assigned to the identifier
intIdent
of Integer type. The result of the action COMMAND may acquire one of the following values:- _ERR_TRANS_ABORT
- _ERR_TRANS_ERROR
- _ERR_TRANS_IGNORED
- _ERR_NO_ERROR
If procIdent
is not stated, the command will be sent to D2000 Server process.
Note
The action acts the same function as the process D2000 Tell.
The list of currently implemented commands for individual processes may be obtained via the process D2000 Application Manager by the right-mouse click on the particular process and select Tell. The opened dialog box contains all implemented commands with a short description.
If the expression instanceExprInt
is not being used and the process is running as instance the TELL command will be sent to all running instances.
See also: Tell commands
Example
Blok kódu | ||||
---|---|---|---|---|
| ||||
INT _ret ; sending the TELL command to D2000 SERVERServer _ret := COMMAND "STOP SELF.KOM" ; sending the TELL command to process SELF.ARC _ret := COMMAND "DI ON" ON SELF.ARC ; if the instances of process SELF.ARC are running, for example: [1]_SELF.ARC [2]_SELF.ARC ; the previous action delivers the TELL command to both instances ; sending the TELL command to instance 2 of process SELF.ARC _ret := COMMAND "DI OFF" ON SELF.ARC INSTANCE 2 |