beautypg.com

3 protocol configuration – Dialogic DSI SPCI Network Interface Boards User Manual

Page 24

background image

4 Configuration and Operation

24

4.3

Protocol Configuration

The Development Package contains a protocol configuration utility, s7_mgt

which performs initialization of all the software modules running on the
signaling board. It reads the protocol configuration data from a text file called
config.txt and provides a quick and flexible method of configuring the

protocol modules without the need to write software for that purpose.

Alternatively, the protocol stack may be configured by sending individual

configuration messages documented in the per-module Programmer’s
Manuals to each protocol module. This approach is of particular use if the

application needs to reset the board and run a new configuration without

stopping the application program. It is described in section 4.3.2

Protocol

Configuration Using Individual Messages

.

4.3.1

Protocol Configuration using the s7_mgt utility

The default configuration file used by s7_mgt is config.txt. The -k option

allows the user to specify an alternative filename if required. For example:

s7_mgt -kmyconfig.txt

The format of the configuration commands is described in Appendix A.

s7_mgt can optionally be configured to send a message to a nominated
module on completion of the configuration sequence. This option is activated

using the –i option to specify the receiving module_id. For example:

s7_mgt –i0xef

To assist problem diagnosis, run s7_mgt using the –d option, and additional
diagnostic output will be generated. For example:

s7_mgt –i0xef -d

See section 4.4

Board Information Diagnostics

, for diagnostic output format.

4.3.2

Protocol Configuration Using Individual Messages

As an alternative to using the s7_mgt configuration utility it is possible to

carry out the protocol configuration by building and sending messages
directly to the board. This approach does mean that it is necessary to write
some application code to handle the configuration but has the advantage that

the application can, if required, re-configure the board without re starting the

application.

All communication with the board is in the form of sending and receiving
messages. The configuration sequence is described in the following section.

The application must allocate a message structure using the library function
getm() and send it to the board using the library function GCT_send(). The

application must periodically call the library function GCT_receive() or
GCT_grab() in order to receive messages from the board. GCT_receive() will
block until a message is available whilst GCT_grab() will return immediately.

Once the application has finished processing the received message, it must

release the message structure back to the system by calling the library

function relm(). The library functions are all described in the Software
Environment Programmer's Manual.