All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Pages
urg_connection.h
Go to the documentation of this file.
1 #ifndef URG_CONNECTION_H
2 #define URG_CONNECTION_H
3 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 #include "urg_serial.h"
18 #include "urg_tcpclient.h"
19 
20 
24 enum {
26 };
27 
28 
32 typedef enum {
36 
37 
41 typedef struct
42 {
47 
48 
90 extern int connection_open(urg_connection_t *connection,
91  urg_connection_type_t connection_type,
92  const char *device, long baudrate_or_port);
93 
94 
107 extern void connection_close(urg_connection_t *connection);
108 
109 
111 extern int connection_set_baudrate(urg_connection_t *connection, long baudrate);
112 
113 
132 extern int connection_write(urg_connection_t *connection,
133  const char *data, int size);
134 
135 
164 extern int connection_read(urg_connection_t *connection,
165  char *data, int max_size, int timeout);
166 
167 
189 extern int connection_readline(urg_connection_t *connection,
190  char *data, int max_size, int timeout);
191 
192 #ifdef __cplusplus
193 }
194 #endif
195 
196 #endif /* !URG_CONNECTION_H */