network.h

An application used to vote, for example in the school, where a teacher have a lot of student and want to know their respons to a question. The teacher using a PC can see the answer of all student on his PC. every student have one of this box and they are connected through RS422 and the PC using a rs232/rs422 converter make a polling for each one of this box and can see the key pressed. (by Gianni Franchi).




// Definition for various return code

#define NET_WAKE_UP        0xFF

#define NET_SEND_MASTER    0xFE



#define NET_OK       0x1000

#define NET_NONE     0x1001

#define NET_CHK         0x1002

#define NET_TIMEOUT     0x1003



// Timeout for packet receiving

#define NET_PAKET_TIMEOUT  1000  // 1 sec timeout



// Buffer for Packet

char NetBuf[5];





// Function definitio for packet communication

void Net_Init ();

int Net_Receive (unsigned long TimeOut);

void Net_Send (char Add,char Code);






http://www.sourceboost.com/home.html

Copyright © 2002-2006 SourceBoost Technologies