Main Page | Data Structures | File List | Data Fields | Globals

cctalk-operations.h

Go to the documentation of this file.
00001
00015 #ifndef CCTALK_OPERATION_H
00016 #define CCTALK_OPERATION_H
00017 
00023 enum eCCT_OPERATION
00024 {
00025     eCCT_CSUM_SIZE = 1,
00026     eCCT_HEADER_SIZE = 4,
00027     eCCT_MAX_PACKET_SIZE = 256
00028 };
00029
00030
00038 #define CCT_PKT_OVERHEAD ((eCCT_HEADER_SIZE)+(eCCT_CSUM_SIZE))
00039 
00040
00048 typedef struct
00049 {
00050     unsigned char bDestAddr;
00052     unsigned char bSizeOfData;
00053     unsigned char bSourceAddr;
00055     unsigned char bHeader;
00056     unsigned char abData[ 1 ];
00058 } __attribute__((packed)) tsCCTALK_STANDARD_PACKET;
00059
00068 #define CHECKSUM_HI_BYTE(x) ((x)->abData[(x)->bSizeOfData])
00069 #define bCrc16Lsb bSourceAddr
00070 #define CRC16(x) ((CHECKSUM_HI_BYTE((x))<<8)|(x)->bCrc16Lsb)
00071 
00072
00073
00083 typedef struct sCCTALK_OPERATION
00084 {
00085     struct sCCTALK_OPERATION *psNext;
00086     int zlCctalkSockHdl;
00087     teCCTALK_CHANNEL eCctalkChannel;
00088     unsigned long lTimeout;
00089     unsigned long lTxPacketSize;
00090     unsigned long lRxPacketSize;
00091     unsigned long lMaxReplySize;
00093     unsigned char abTxPacket[ eCCT_MAX_PACKET_SIZE ];
00094     unsigned char abRxPacket[ eCCT_MAX_PACKET_SIZE ];
00096 } __attribute__((packed)) tsCCTALK_OPERATION;
00097
00098
00099
00106 typedef enum
00107 {
00108     eCCTALK_SPEED_SLOW,
00109     eCCTALK_SPEED_NORMAL
00110 } teCCTALK_SPEED;
00111
00112
00113 #endif /* CCTALK_OPERATION_H */

Generated on Thu Jan 20 16:10:44 2005 for Axis cctalk sub-system by doxygen 1.3.6