Enumerations | Functions | Variables
urg_serial_utils_windows.c File Reference

シリアル用の補助関数 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>
Include dependency graph for urg_serial_utils_windows.c:

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 []
 

Detailed Description

シリアル用の補助関数

Author
Satofumi KAMIMURA
Id
urg_serial_utils_windows.c,v faa71b0113fd 2011/01/17 12:00:22 Satofumi
Todo:

変数名を '_' 区切りの形式に変更する

C90 相当で動作するように調整する。ただし、"//" コメントは使う

Definition in file urg_serial_utils_windows.c.

Enumeration Type Documentation

anonymous enum
Enumerator
MAX_PORTS 
DEVICE_NAME_SIZE 

Definition at line 26 of file urg_serial_utils_windows.c.

Function Documentation

static void sort_ports ( void  )
static

Definition at line 61 of file urg_serial_utils_windows.c.

static void swap_item ( int  from_index,
int  to_index 
)
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 かどうか

Return values
1URG のポート
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.

Variable Documentation

char found_ports[MAX_PORTS][DEVICE_NAME_SIZE]
static

Definition at line 32 of file urg_serial_utils_windows.c.

int found_ports_size = 0
static

Definition at line 34 of file urg_serial_utils_windows.c.

int is_urg_ports[MAX_PORTS]
static

Definition at line 33 of file urg_serial_utils_windows.c.

char* search_driver_names[]
static
Initial value:
= {
"URG Series USB Device Driver",
"URG-X002 USB Device Driver",
}

Definition at line 36 of file urg_serial_utils_windows.c.



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