User Manual

SDK - SCR API
________________________________
____________
Boomer II User Manual & Integrator’s Guide
Wavenet Technology 68 BM210012WT09
Example
#i n c l ude <s c r a p i . h >
{
SCRMs g l ms g; / * SCR me s s a ge s t r u c t
*/
by t e l bu f f e r [ SCR_MAX_ LEN] ; / * bu f f e r f o r r e c e i ve d SCR ms g
*/
i nt l l e n; / * l e ngt h o f r e c e i ve d SCR ms g
*/
i nt l us e d; / * r e t ur n c o de f r o m s c r _ De c od e
*/
. . .
/ * r e c e i ve d a t a i nt o l b uf f e r */
l l e n = x2 5 r e c v( . . . l bu f f e r , . . . ) ;
. . .
l us e d = s c r _ De c ode ( l l e n, l bu f f e r , &l ms g) ;
i f ( l us e d > 0 ) {
/ * pr o c e s s me s s a g e * /
. . .
s c r _ Fr e e De c o d i ng ( l ms g) ; / * f r e e de c od e d me s s a ge */
}
e l s e i f ( l u s e d == 0) {
/ * i nc omp l e t e me s s a g e r e c e i ve d */
}
e l s e {
/ * r e por t a n. e r r or */
. . .
}
}