Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/Deprecated/old_18mar_diff/nto/BoardClient.cpp File Reference

#include "BoardDef.hpp"

Go to the source code of this file.

Functions

int client ()
int main (int argc, char **argv)


Function Documentation

int client  
 

Definition at line 7 of file BoardClient.cpp.

Referenced by main().

00007              {
00008     board_data_t msg, rmsg;
00009 
00010     register int fd = name_open( ATTACH_POINT, NAME_FLAG_ATTACH_GLOBAL );
00011     if ( fd == -1 )
00012     {
00013    printf( "Couldn't find the Board Server !\n" );
00014         return EXIT_FAILURE;
00015     }
00016 
00017     /* We would have pre-defined data to stuff here */
00018     msg.hdr.type    = 0x00;
00019     msg.hdr.subtype = 0x00;
00020     msg.serialMsgID = BOARD_SerialMsgID;
00021 
00022     /* Do whatever work you wanted with server connection */
00023     for (msg.data=0; msg.data < 5; msg.data++) 
00024     {
00025         memset(  msg.string, 0, 80 );
00026         memset( rmsg.string, 0, 80 );
00027         sprintf( msg.string, "Hi %d", msg.data );
00028 
00029         if ( MsgSend(fd, &msg, sizeof(msg), &rmsg, sizeof(rmsg) ) == -1) 
00030         {
00031             break;
00032         }
00033 
00034         /* Received a reply from server... */
00035     }
00036 
00037     /* Close the connection */
00038     name_close( fd );
00039     return EXIT_SUCCESS;
00040 }

int main int    argc,
char **    argv
 

Definition at line 42 of file BoardClient.cpp.

00042                                 {
00043   return client();
00044 }


Generated on Sun Oct 14 18:47:15 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001