シリアル用の補助関数 More...
#include "urg_c/urg_serial_utils.h"#include "urg_c/urg_detect_os.h"#include <windows.h>#include <setupapi.h>#include <string.h>#include <stdio.h>
Go to the source code of this file.
| Enumerations | |
| enum | { MAX_PORTS = 16, DEVICE_NAME_SIZE = 7 } | 
| Functions | |
| static void | sort_ports (void) | 
| static void | swap_item (int from_index, int to_index) | 
| int | urg_serial_find_port (void) | 
| シリアルポートを検索する  More... | |
| int | urg_serial_is_urg_port (int index) | 
| ポートが URG かどうか  More... | |
| const char * | urg_serial_port_name (int index) | 
| 検索したシリアルポート名を返す  More... | |
| Variables | |
| static char | found_ports [MAX_PORTS][DEVICE_NAME_SIZE] | 
| static int | found_ports_size = 0 | 
| static int | is_urg_ports [MAX_PORTS] | 
| static char * | search_driver_names [] | 
シリアル用の補助関数
変数名を '_' 区切りの形式に変更する
C90 相当で動作するように調整する。ただし、"//" コメントは使う
Definition in file urg_serial_utils_windows.c.
| anonymous enum | 
| Enumerator | |
|---|---|
| MAX_PORTS | |
| DEVICE_NAME_SIZE | |
Definition at line 26 of file urg_serial_utils_windows.c.
| 
 | static | 
Definition at line 61 of file urg_serial_utils_windows.c.
| 
 | static | 
Definition at line 42 of file urg_serial_utils_windows.c.
| int urg_serial_find_port | ( | void | ) | 
シリアルポートを検索する
Definition at line 75 of file urg_serial_utils_windows.c.
| int urg_serial_is_urg_port | ( | int | index | ) | 
ポートが URG かどうか
| 1 | URG のポート | 
| 0 | 不明 | 
| <0 | エラー | 
Definition at line 170 of file urg_serial_utils_windows.c.
| const char* urg_serial_port_name | ( | int | index | ) | 
検索したシリアルポート名を返す
Definition at line 160 of file urg_serial_utils_windows.c.
| 
 | static | 
Definition at line 32 of file urg_serial_utils_windows.c.
| 
 | static | 
Definition at line 34 of file urg_serial_utils_windows.c.
| 
 | static | 
Definition at line 33 of file urg_serial_utils_windows.c.
| 
 | static | 
Definition at line 36 of file urg_serial_utils_windows.c.