Main Page
Related Pages
Classes
Files
Examples
File List
File Members
current
samples
find_port.c
Go to the documentation of this file.
1
10
#include "
urg_c/urg_serial_utils.h
"
11
#include <stdio.h>
12
13
14
int
main
(
void
)
15
{
16
int
found_port_size =
urg_serial_find_port
();
17
int
i;
18
19
if
(found_port_size == 0) {
20
printf(
"could not found ports.\n"
);
21
return
1;
22
}
23
24
for
(i = 0; i < found_port_size; ++i) {
25
printf(
"%s"
,
urg_serial_port_name
(i));
26
if
(
urg_serial_is_urg_port
(i)) {
27
printf(
" [URG]"
);
28
}
29
printf(
"\n"
);
30
}
31
32
return
0;
33
}
urg_serial_is_urg_port
int urg_serial_is_urg_port(int index)
ポートが URG かどうか
Definition:
urg_serial_utils_linux.c:85
urg_serial_utils.h
シリアル用の補助関数
urg_serial_port_name
const char * urg_serial_port_name(int index)
検索したシリアルポート名を返す
Definition:
urg_serial_utils_linux.c:75
main
int main(void)
Definition:
find_port.c:14
urg_serial_find_port
int urg_serial_find_port(void)
シリアルポートを検索する
Definition:
urg_serial_utils_linux.c:53
urg_c
Author(s): Satofumi Kamimura
, Katsumi Kimoto, Adrian Boeing
autogenerated on Thu Jun 6 2019 19:27:49