RCOM PROJ
File transfer via serial port
|
Go to the documentation of this file.
43 void parseFileInfo(
unsigned char *controlpackage,
int packagesize);
60 int main(
int argc,
char** argv);
void clearProgressBar()
Clears progress bar from terminal.
Definition: logs.c:43
void log_bitsPerSecond(double nbytes, struct timespec start_time)
Definition: logs.c:77
#define RECEIVER
Definition: macros.h:45
char destinationArg[255]
Definition: application.h:16
void log_caution(char *arr)
Outputs a message in yellow.
Definition: logs.c:13
#define T_SIZE
Definition: macros.h:55
char filenameArg[255]
Definition: application.h:17
int type
Definition: application.h:18
#define MAX_SIZE
Definition: macros.h:12
#define END
Definition: macros.h:52
int gate
Definition: application.h:19
void log_elapsedTime(char *message, struct timespec start_time)
starts counting time
Definition: logs.c:67
int receiverApp(int fd)
Receiver part of the application.
Definition: application.c:137
char filename[255]
Definition: application.h:15
void startTime(struct timespec *start_time)
starts counting time
Definition: logs.c:63
#define START
Definition: macros.h:51
int llclose(int fd)
Closes the connection to the serial port.
Definition: dcp.c:141
off_t filesize
Definition: application.h:14
void log_error(char *arr)
Outputs a message in red.
Definition: logs.c:7
int llopen(int porta, int type)
Opens a data connection with the serial port.
Definition: dcp.c:9
Struct to save data relative to the Application.
Definition: application.h:13
int transmitterApp(int fd)
Transmitter part of the application.
Definition: application.c:34
#define TRANSMITTER
Definition: macros.h:44
void parseFileInfo(unsigned char *controlpackage, int packagesize)
Parses the info of a Control Package to the Application Layer Struct.
Definition: application.c:110
#define DATA
Definition: macros.h:50
void log_success(char *arr)
Outputs a message in green.
Definition: logs.c:19
void printProgressBar(int progress, int total)
Prints progress bar on terminal.
Definition: logs.c:50
int main(int argc, char **argv)
Definition: application.c:206
void parseArgs(int argc, char **argv)
Função para dar parse dos argumentos da linah de comandos.
Definition: application.c:8
int llread(int fd, unsigned char *buffer)
Reads from fd to buffer.
Definition: dcp.c:109
#define T_NAME
Definition: macros.h:56
static struct applicationLayer applayer
Definition: application.c:6
int llwrite(int fd, char *buffer, int lenght)
Writes the content of buffer to fd.
Definition: dcp.c:47