All Classes Namespaces Files Functions Variables Enumerations Enumerator
Enumerations | Functions
libs/range_sensor/c/scip_handler.h File Reference

Process SKIP commands. More...

#include "urg_parameter_t.h"
#include "serial_t.h"
Include dependency graph for scip_handler.h:

Go to the source code of this file.

Enumerations

enum  { ScipNoWaitReply = 0, ScipWaitReply = 1, ScipLineWidth = 64 + 1 + 1 }

Functions

int scip_send (serial_t *serial, const char *send_command)
 Send command.
int scip_recv (serial_t *serial, const char *command_first, int *return_code, int expected_ret[], int timeout)
 Receive command response.
int scip_scip20 (serial_t *serial)
 Transit to SCIP2.0 mode.
int scip_qt (serial_t *serial, int *return_code, int wait_reply)
 Stop measurement and turn off the laser.
int scip_pp (serial_t *serial, urg_parameter_t *parameters)
 Get Parameter information.
int scip_vv (serial_t *serial, char *lines[], int lines_max)
 Get version information.
int scip_ss (serial_t *serial, long baudrate)
 Change baudrate.

Detailed Description

Process SKIP commands.

Author:
Satofumi KAMIMURA
Id:
scip_handler.h 1948 2011-04-19 09:59:29Z satofumi

Definition in file scip_handler.h.


Enumeration Type Documentation

anonymous enum
Enumerator:
ScipNoWaitReply 

Dont wait for reply

ScipWaitReply 

Wait for reply

ScipLineWidth 

Maximum length of one line

Definition at line 17 of file scip_handler.h.


Function Documentation

int scip_send ( serial_t serial,
const char *  send_command 
)

Send command.

Parameters:
[out]serialStructure of serial control
[in]send_commandCommand to be sent
Return values:
0Normal
<0 Error

Definition at line 39 of file scip_handler.c.

int scip_recv ( serial_t serial,
const char *  command_first,
int *  return_code,
int  expected_ret[],
int  timeout 
)

Receive command response.

Store the response of the command if "ret" value is zero.

When the command response is included in expected_ret, the return value of this function becomes 0 (normality).

Parameters:
[out]serialStructure of serial control
[in]command_firstfirst command
[out]return_codeReturn value
[in]expected_retReturn value considered to be normal
[in]timeoutTime out [msec]
Return values:
0Normal
<0 Error

Receive command response.

Todo:
Test the checksum

Definition at line 51 of file scip_handler.c.

int scip_scip20 ( serial_t serial)

Transit to SCIP2.0 mode.

Return 0(Normal) when changed to SCIP2.0 mode

Parameters:
[in,out]serialStructure of serial control
Return values:
0Normal
<0 Error

Definition at line 100 of file scip_handler.c.

int scip_qt ( serial_t serial,
int *  return_code,
int  wait_reply 
)

Stop measurement and turn off the laser.

If the purpose is to stop MD, then send QT command without waiting for the response from MD command. Process the response of QT in urg_receiveData()

Parameters:
[in,out]serialStructure of serial control
[in]return_codeResponse from QT command
[in]wait_replyScipNoWaitReply when response is not waited. ScipWaitReply when response is waited.
Return values:
0Normal
<0 Error

Definition at line 115 of file scip_handler.c.

int scip_pp ( serial_t serial,
urg_parameter_t parameters 
)

Get Parameter information.

Parameters:
[in,out]serialStructure of serial control
[out]parametersurg_parameter_t Structure member
Return values:
0Normal
<0 Error

Definition at line 140 of file scip_handler.c.

int scip_vv ( serial_t serial,
char *  lines[],
int  lines_max 
)

Get version information.

Parameters:
[in,out]serialStructure of serial control
[out]linesStorage location of characters containing version information.
[in]lines_maxMaximum number of character string
Return values:
0Normal
<0 Error

Definition at line 202 of file scip_handler.c.

int scip_ss ( serial_t serial,
long  baudrate 
)

Change baudrate.

Parameters:
[in,out]serialStructure of serial control
[in]baudrateBaudrate
Return values:
0Normal
<0 Error

Definition at line 241 of file scip_handler.c.