eRIC-linux Library
util.h
1
//#include "readLine.h"
2
#include "
packet.h
"
3
#include "safe_handle.h"
4
5
#include <assert.h>
6
#include <errno.h>
7
#include <fcntl.h>
8
#include <unistd.h>
9
#include <string.h>
10
15
typedef
struct
Radio
{
16
17
int
fd;
18
char
* ID;
19
char
* destAddr;
20
//String operations
21
//void sendMsg(char**);
22
//Operations
23
void (*setDestination)(
struct
Radio
*,
char
*);
24
void (*getTemp)(
struct
Radio
*,
char
*);
25
void (*listen)(
struct
Radio
*);
26
int (*init_connection)();
27
28
//Send/Receive
29
int (*send)();
30
int (*receive)();
31
}
Radio
;
32
33
34
void
setDestination(
Radio
*,
char
*);
35
42
int
init_connection(
Radio
*);
43
49
int
send(
Radio
*,
Packet
);
50
void
listen(
Radio
*);
51
Radio
* init_Radio(
char
* name);
52
int
setup_interface(
Radio
* r,
int
* fd,
char
* portname,
int
BAUD_RATE);
53
int
getTemp(
Radio
*,
char
*);
54
55
56
Radio
Definition:
util.h:15
Packet
Definition:
packet.h:37
packet.h
Description of Packet structure.
Generated by
1.8.15