User Manual

Boomer II User Manual & Integrator’s Guide
________________________________
____________
SDK – SCR API
BM210012WT09 67 Wavenet Technology
q scr_Decode()
Prototype:
int scr_Decode(int l_len, byte *l_buf, SCRMsg *l_msg)
Description
This routine is used to decode an SCR message from a received buffer
and produce an SCRMsg structure representing the received message.
When this routine returns successfully, some memory may have been
allocated within the SCRMsg structure. scr_FreeDecoding() should
always be called after a successful scr_Decode() to free any memory
that may have been allocated. When scr_Decode() returns
SCR_ERROR or 0, scr_FreeDecoding() should not be called.
Input:
Ø l_len The length of the data contained in l_buf.
Ø *l_buf The buffer containing received SCR data
Ø *l_msg The decoded SCRMsg is returned is l_msg. When calling this
function, this parameter must point to an allocated SCRMsg
structure. Refer to "SCR Structures".
Output:
× Return value = 0 Operation was successful but the buffer contains only a partial
SCR message in l_msg.
× Return value < 0 Operation failed. Value SCR_ERROR is returned to indicate an
error
× Return value > 0 Operation was successful .and the decoded message is returned
in l_msg.