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_c/urg_serial.h"
18 #include "urg_c/urg_tcpclient.h"
19 
20 
24 enum {
26 };
27 
28 
32 typedef enum {
36 
37 
41 typedef struct
42 {
43  urg_connection_type_t type;
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 */
シリアル通信用
Definition: urg_serial.h:40
void connection_close(urg_connection_t *connection)
切断
int connection_readline(urg_connection_t *connection, char *data, int max_size, int timeout)
改行文字までの受信
イーサーネット接続
urg_connection_type_t
通信タイプ
int connection_write(urg_connection_t *connection, const char *data, int size)
送信
タイムアウトが発生したときの戻り値
int connection_read(urg_connection_t *connection, char *data, int max_size, int timeout)
受信
シリアル通信
TCP/IP connection.
Definition: urg_tcpclient.h:44
int connection_set_baudrate(urg_connection_t *connection, long baudrate)
int connection_open(urg_connection_t *connection, urg_connection_type_t connection_type, const char *device, long baudrate_or_port)
接続
urg_serial_t serial
シリアル接続
urg_connection_type_t type
接続タイプ
通信リソース
TCP/IP read/write functions.
urg_tcpclient_t tcpclient
イーサーネット接続
シリアル, USB 接続


urg_c
Author(s): Satofumi Kamimura , Katsumi Kimoto, Adrian Boeing
autogenerated on Wed Jun 10 2020 03:48:10