User's Manual

Table Of Contents
SDK SCR-API ______________________________________________ Boomer II User Manual & Integrator’s Guide
Wavenet Technology 154 BM210012WT27
application, it must set the first two characters of the data header to the
session number. For example, a data header of Al routes data on
session A1, and a data header of TEI routes data on session TE.
To simplify porting of applications between different network types,
the use 3-character data headers, such as TEI. Using a data header of
this format, DataTAC 4000 and 6000 networks look only at the last
character of the data header and route on host slot 1, while a DataTAC
5000 network will look at the first two characters and route on session
TE. This allows the same data header to be used on all network types.
It is recommended that the data header is also set for messages from
server to client. This is not critical for routing messages back to the
client, but it is useful for the client to know on which session or host
slot (and therefore from which host) the data came.
SCR Functions
scr_Init()
Prototype:
int scr_Init(byte l_network_type);
Description:
This routine initialises the library and sets the network type being used-
DataTAC
®
4000, 5000, or 6000. The network type affects the encoding
and decoding of messages by validating that the message type is
applicable to this network type. This network type is also used to
correctly encode/decode the network independent message types
SCR_FROM_NET, SCR_TO_NET, and SCR_ACK.
Note: This function must be called before any other SCR API functions.
The operation of all other functions depends on the network type given
to this function.
Input:
l_network_type The network type to be used.
Valid values are:
SCR_DATATAC_4000 SCR_DATATAC_5000
SCR_DATATAC_6000
Output:
Return value = 0 Operation was successful
Return value 0 Operation failed. Value SCR_ERROR is returned to indicate an
error
Example
#include <scrapi.h>
main()
{