packetHandleHost.h

Go to the documentation of this file.
00001 #ifndef PACKET_HANDLER_HOST_H
00002 #define PACKET_HANDLER_HOST_H
00003 
00013 #ifdef __cplusplus
00014 #include "connectionDevice.h"
00015 #else
00016 #define ConnectionDevice int
00017 #endif
00018 #include "structTables.h"
00019 #include "nodeAccess.h"
00020 
00021 
00022 #define WRITE_PACKET_INIT \
00023   packetInfo_t pa; \
00024   ++unique_id; \
00025   initPacketInfo(&pa, (unsigned char *)send_packet, \
00026                  (unsigned char *)tbl, PACKET_WRITE_REQUEST, \
00027                  getStructId(node, (unsigned char *)tbl), unique_id);
00028 
00029 #define READ_PACKET_INIT \
00030   char send_packet[SEND_PACKET_SIZE]; \
00031   int send_size = 0; \
00032   packetInfo_t pa; \
00033   ++unique_id; \
00034   initPacketInfo(&pa, (unsigned char *)send_packet, \
00035                  (unsigned char *)tbl, PACKET_READ_REQUEST, \
00036                  getStructId(node, (unsigned char *)tbl), unique_id);
00037 
00038 extern int waitPacketResponse(ConnectionDevice* con, runCtrl_t* tbl,
00039                               char* send_packet, int send_size, int unique_id);
00040 extern void set_runRetryTimes(int times);
00041 extern void set_runRecvTimeout(int timeout);
00042 
00043 #endif /* !PACKET_HANDLER_HOST_H */
00044 

Generated on Mon Apr 13 22:52:04 2009 by  doxygen 1.5.7.1