Enumerations | Functions | Variables
urg_serial_utils_linux.c File Reference

シリアル用の補助関数 More...

#include "urg_c/urg_serial_utils.h"
#include <dirent.h>
#include <sys/stat.h>
#include <string.h>
#include <stdio.h>
Include dependency graph for urg_serial_utils_linux.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  { MAX_PORTS = 16, DEVICE_NAME_SIZE = 255 }

Functions

static void check_base_name (const char *dir_name, const char *file_name)
int urg_serial_find_port (void)
 シリアルポートを検索する
int urg_serial_is_urg_port (int index)
 ポートが URG かどうか
const char * urg_serial_port_name (int index)
 検索したシリアルポート名を返す

Variables

static char found_ports [MAX_PORTS][DEVICE_NAME_SIZE]
static int found_ports_size = 0
static const char * search_base_names []
static const char * search_dir_names []

Detailed Description

シリアル用の補助関数

Author:
Satofumi KAMIMURA
Id:
urg_serial_utils_linux.c,v 0caa22c18f6b 2010/12/30 03:36:32 Satofumi

Definition in file urg_serial_utils_linux.c.


Enumeration Type Documentation

anonymous enum
Enumerator:
MAX_PORTS 
DEVICE_NAME_SIZE 

Definition at line 17 of file urg_serial_utils_linux.c.


Function Documentation

static void check_base_name ( const char *  dir_name,
const char *  file_name 
) [static]

Definition at line 37 of file urg_serial_utils_linux.c.

int urg_serial_find_port ( void  )

シリアルポートを検索する

Definition at line 53 of file urg_serial_utils_linux.c.

int urg_serial_is_urg_port ( int  index)

ポートが URG かどうか

Return values:
1URG のポート
0不明
<0エラー

Definition at line 85 of file urg_serial_utils_linux.c.

const char* urg_serial_port_name ( int  index)

検索したシリアルポート名を返す

Definition at line 75 of file urg_serial_utils_linux.c.


Variable Documentation

Definition at line 23 of file urg_serial_utils_linux.c.

int found_ports_size = 0 [static]

Definition at line 24 of file urg_serial_utils_linux.c.

const char* search_base_names[] [static]
Initial value:
 {
    "ttyACM",
    "ttyUSB",
    "tty.usbmodem",
}

Definition at line 30 of file urg_serial_utils_linux.c.

const char* search_dir_names[] [static]
Initial value:
 {
    "/dev",
    "/dev/usb",
}

Definition at line 26 of file urg_serial_utils_linux.c.



urg_c
Author(s): Satofumi Kamimura , Katsumi Kimoto, Adrian Boeing
autogenerated on Wed Aug 26 2015 16:38:27