User Manual

SDK - SCR API
________________________________
____________
Boomer II User Manual & Integrator’s Guide
Wavenet Technology 66 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 da t a [ 2 0 0] ; / * da t a t o s e nd t o ho s t */
by t e l bu f f e r [ SCR_MAX_ LEN] ; / * b uf f e r f or e nc ode d SCR ms g
*/
i nt l l e n; / * l e ngt h o f e nc od e d SCR ms g
*/
. . .
s t r c py( ( c ha r * ) l d a t a , " He l l o wo r l d " )
/ * i ni t i a l i z e me s s a g e s t r u c t ur e * /
l ms g . ms g _ t yp e = SCR_TO_ NET; / * s e nd da t a t o c l i e nt
de v i c e */
l ms g . u. t on e t . l l i = 0 x EE0212 34; / * s e t de v i c e LLI t o
s e nd t o */
l ms g . u. t on e t . a c k = SCR_TONET_ ACK_NONE; / * no
a c kno wl e dg me nt
*/
l ms g . u. t on e t . da t a _he a de r = BB1 ;
/ * Not e : On a Da t a TAC 40 00 or 60 0 0 n e t wor k ,
t hi s me s s a g e * /
/ * wi l l b e r out e d on hos t s l ot 1 . On a
Da t a TAC 50 00 */
/ * ne t wor k , t he me s s a ge wi l l b e r ou t e d on
s e s s i on ' BB. ' */
/ * Se e Se c t i on Da t a He a de r f o r f u r t h e r
de t a i l s . */
l ms g . u. t on e t . da t a . da t a = l da t a ;
l ms g. u. t on e t . d a t a . l e n = s t r l e n( l da t a ) ;
l l e n = s c r _ Enc o de ( l b uf f e r , &l ms g) ;
i f ( l l e n ! = SCR_ERROR) {
/ * s e nd e nc od e d me s s a g e t o n e t wor k * /
x2 5 _s e nd( . . . [ bu f f e r , l i e n, . . . )
}
e l s e {
/ * r e po r t a n e r r or */
. . .
}
. . .
}