Functions

SerialTest_eng.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <sys/termios.h>
#include <string.h>
Include dependency graph for SerialTest_eng.c:

Functions

speed_t bitrate (int aBR)
 : This is a demo program to obtain 10 scan data from URG-Series and save them into the file.
int setupSerial (int aFd, int aSpeed)
FILE * openSerial (char *aDevName, int aSpeed)
 Open and set up specified serial port.
int * urgGetScan (FILE *aPort, int aStart, int aEnd, int aSkip)
 Obtain scanned data.
 main (int argc, char **argv)

Function Documentation

speed_t bitrate ( int  aBR  ) 

: This is a demo program to obtain 10 scan data from URG-Series and save them into the file.

: This sample source is a referece for the user when creating his/her program and does not gurantee for users program : Hokuyo Automatic Co., Ltd does not bear responsibility for any loss or damage caused due to this demo program. : Mention the publisher's name when distributing this source or its part to the third party HOKUYO AUTOMATIC CO.,LTD.

Author:
Tomoaki Yoshida 2005/03/11 SPEED SETTINGS
Parameters:
aBR [in] Declared for communication speed (9600-500000)
Returns:
cfset[i|o] Returned value for speed function Returns B0 if failed

Here is the caller graph for this function:

main ( int  argc,
char **  argv 
)

Here is the call graph for this function:

FILE* openSerial ( char *  aDevName,
int  aSpeed 
)

Open and set up specified serial port.

Parameters:
aDevNme [in] Serial port device file name
aSpeed [in] Communication speed(bps)
Returns:
Serial port file handle Returns NULL when failed to open.

Here is the call graph for this function:

Here is the caller graph for this function:

int setupSerial ( int  aFd,
int  aSpeed 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int* urgGetScan ( FILE *  aPort,
int  aStart,
int  aEnd,
int  aSkip 
)

Obtain scanned data.

Parameters:
aPort [in] Serial port file handle where URG is connected
aStart [in] Starting scan step from (0-768)
aEnd [in] Ending scan step at (0-768)
aSkip [in] Number of steps to be merged when multiple points are combined(1-99)
Returns:
Obtained distance data memory pointer is malloc. Should be freed after use. Returns NULL when failed

Here is the caller graph for this function: