User Manual

SDK - SCR API
________________________________
____________
Boomer II User Manual & Integrator’s Guide
Wavenet Technology 64 BM210012WT09
SCR Functions
q 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
#i n c l ude <s c r a p i . h >
ma i n( )
{
i nt l r c ;
l r c = s c r _I ni t ( SCR_DATATAC_40 0 0) ;
i f ( l r c == SCR_ERROR) {
e xi t ( 0 ) ;
}
/ * pe r f o r m o t he r SCR op e r a t i on s */
. . .
}