kb_lrf.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define LRF_DATA_NB   682

Functions

int kb_lrf_Init (char *LRF_DeviceName)
int kb_lrf_GetDistances (int LRF_DeviceHandle)
int kb_lrf_GetDistances_Averaged (int LRF_DeviceHandle, int average)
void kb_lrf_Power_On (void)
void kb_lrf_Power_Off (void)
void kb_lrf_Laser_On (int LRF_DeviceHandle)
void kb_lrf_Laser_Off (int LRF_DeviceHandle)
void kb_lrf_Close (int LRF_DeviceHandle)
long kb_lrf_Get_Timestamp (void)

Variables

long kb_lrf_DistanceData [LRF_DATA_NB]

Define Documentation

#define LRF_DATA_NB   682

Definition at line 11 of file kb_lrf.h.

Referenced by kb_lrf_GetDistances(), kb_lrf_GetDistances_Averaged(), lrfmeasure(), and main().


Function Documentation

void kb_lrf_Close ( int  LRF_DeviceHandle  ) 

kb_lrf_Close does powering off the LRF, the close the port device

Parameters:
LRF_DeviceHandle Handle to the lrf port which as been openned by kb_lrf_openComPort or kb_lrf_init

Definition at line 737 of file kb_lrf.c.

References kb_lrf_Laser_Off().

Referenced by ctrlc_handler(), handle_kill(), main(), and poweroff().

Here is the call graph for this function:

long kb_lrf_Get_Timestamp ( void   ) 

kb_lrf_get_timestamp : get the last timestep in [ms]

Returns:
the timestamp of last set of data

Definition at line 628 of file kb_lrf.c.

References urg_state_t::last_timestamp.

Referenced by lrfmeasure().

int kb_lrf_GetDistances ( int  LRF_DeviceHandle  ) 

kb_lrf_GetDistances is a high level function that does whole mechanism certify the link, get some distances.

Parameters:
LRF_DeviceHandle Handle to the lrf port which as been openned by kb_lrf_openComPort or kb_lrf_init
Returns:
  • 0 : Sucess
  • -1 : serial port not open
  • -2 : could not send command capture
    • -3 : could not received data

Definition at line 761 of file kb_lrf.c.

References kb_lrf_DistanceData, LRF_DATA_NB, urg_captureByMD(), and urg_receiveData().

Referenced by kb_lrf_GetDistances_Averaged(), koa_lrf_task(), lrfmeasure(), and main().

Here is the call graph for this function:

int kb_lrf_GetDistances_Averaged ( int  LRF_DeviceHandle,
int  average 
)

kb_lrf_GetDistances is a high level function that does whole mechanism certify the link, get some distances, averages then receive back the data from LRF,

Parameters:
LRF_DeviceHandle Handle to the lrf port which as been openned by kb_lrf_openComPort or kb_lrf_init
average number of acquisitions needed for averaging
Returns:
  • 0 : Sucess
  • -1 : serial port not open
  • -2 : could not send command capture
    • -3 : could not received data

Definition at line 797 of file kb_lrf.c.

References kb_lrf_DistanceData, kb_lrf_DistanceDataSum, kb_lrf_DistanceGoodCounter, kb_lrf_GetDistances(), and LRF_DATA_NB.

Referenced by lrfmeasure().

Here is the call graph for this function:

int kb_lrf_Init ( char *  LRF_DeviceName  ) 

kb_lrf_Init does openning port, turn power on the LRF then certify the link,

Parameters:
LRF_DeviceName String name of the serial port device where the laser is connected
Returns:
- < 0 : Any error code
  • > 0 : Handle to the device

Definition at line 701 of file kb_lrf.c.

References BAUDRATE, ErrorMessage, HComm, KB_ERROR, KB_ERROR_OPENLRF, kb_lrf_Laser_On(), and urg_connect().

Referenced by koa_lrf_task(), lrfinit(), and main().

Here is the call graph for this function:

void kb_lrf_Laser_Off ( int  LRF_DeviceHandle  ) 

kb_lrf_Laser_Off : set LRF laser beam OFF

Definition at line 652 of file kb_lrf.c.

References Timeout, and urg_sendMessage().

Referenced by kb_lrf_Close(), laseroff(), and poweroff().

Here is the call graph for this function:

void kb_lrf_Laser_On ( int  LRF_DeviceHandle  ) 

kb_lrf_Laser_On : set LRF laser beam ON

Definition at line 639 of file kb_lrf.c.

References Timeout, and urg_sendMessage().

Referenced by kb_lrf_Init(), and laseron().

Here is the call graph for this function:

void kb_lrf_Power_Off ( void   ) 

kb_lrf_Power_Off : power off the LRF battery supply module

Definition at line 682 of file kb_lrf.c.

References GPIO_POWER, kb_gpio_cleanup(), kb_gpio_clear(), kb_gpio_dir(), kb_gpio_function(), and kb_gpio_init().

Referenced by poweroff().

Here is the call graph for this function:

void kb_lrf_Power_On ( void   ) 

kb_lrf_Power_On : power on the LRF battery supply module

Definition at line 665 of file kb_lrf.c.

References GPIO_POWER, kb_gpio_cleanup(), kb_gpio_dir(), kb_gpio_function(), kb_gpio_init(), and kb_gpio_set().

Referenced by main(), and poweron().

Here is the call graph for this function:


Variable Documentation

long kb_lrf_DistanceData[LRF_DATA_NB]
Generated on Mon Dec 3 09:43:48 2012 for KoreBot Library by  doxygen 1.6.3