Download Software Environment Programmer`s Manual

Transcript
Section 7 Host Utilities
7.3
s7_play
Description
s7_play is a utility, primarily intended for diagnostic purposes, which takes text based
representation of messages and sends them to the DSI software environment. It can
optionally wait for a response to a message, insert a delay between messages or pause
until a specific message type is received.
Typically s7_play is used to prototype configuration sequences, or to generate status
requests or statistics gathering messages from a live system.
Syntax
s7_play –v –m<module_id> -f<filename>
Parameters
-v
Show version information.
-m<module_id>
Set the module_id that s7_play will use. By default this is 0x5d but may need to be
changed depending on the manner in which s7_play is being used. If s7_play is simply
generating messages then it can run with the default module_id. If it is also receiving
responses then it is important that there is a corresponding LOCAL entry in the
system.txt file and that module_id is not in use by other processes. Also it is important
that the correct module_id is entered in the src field of messages in the command file
so that the responses come back to the correct message queue.
-f<filename>
The filename of the text file containing the commands to be executed by s7_play.
Optionally a space may be inserted between –f and the file name. By convention the
filename suffix .ms7 is used.
Example
For example, to run s7_play as module ID 0x2d and take commands from a file
cmd.ms7.
s7_play –m0x2d –f cmd.ms7
7.3.1
s7_play Command File Format
The s7_play utility takes commands from a user-supplied text file and generates
messages into the DSI software environment. This section details the format of the file
and the syntax of all commands used within the file.
The s7_play command file is a text file with each line in the file representing a single
command. The first character on the line determines the command type. Inserting a *
or # character as the first character of a line causes the remainder of the line to be
ignored by s7_play.
The following commands are supported:
90