sft.h

Go to the documentation of this file.
00001 
00012 #define TAMMSG 1100
00013 #define SFT_PORT 45
00014 #define SFTD_BUFFER_DATA 1000
00015 
00016 int s1, i, gif;
00017 int id_stc; //id do pacote atual que esta sendo processado.
00018 
00019 char msg_rec[TAMMSG];
00020 char msg_send[TAMMSG];
00021 char buff[TAMMSG];
00022 
00027 typedef enum {
00028         CMD_SEND =0,
00029         CMD_SEND_WAIT,
00030         CMD_STOP,
00031         CMD_SEND_SEQ,
00032         CMD_FINISHED,
00033         CMD_SEND_X,
00034         CMD_SENDU,
00035         CMD_ERROR,
00036         CMD_MSG
00037 } cmd_sft;
00038 
00044 struct sft_hdr{
00045         char cmd[3];
00046         char len[5];
00047         char mf[2];
00048         char nro_pkt[3];
00049         char id[4];
00050         char buff_send[SFTD_BUFFER_DATA+1];
00051 
00052 };
00053 
00054 
00055 
00056 //declaração ;-)
00057 int main(int argc, char *argv[]);
00058 int sft_send_x(char* data);
00059 int sft_sendu(char* data);
00060 int sft_send_seq(char * data);
00061 int sft_send_loop(char * data);
00062 
00063 int send_pkt(void);
00064 int sft_send(char* data);
00065 int send_stop(void);
00066 int trata_sft();