Enumerations | Functions

scip_handler.c File Reference

Process SKIP commands. More...

#include "scip_handler.h"
#include "serial_errno.h"
#include "serial_ctrl.h"
#include "serial_utils.h"
#include "urg_errno.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
Include dependency graph for scip_handler.c:

Enumerations

enum  { ScipTimeout = 1000, EachTimeout = 100 }

Functions

int snprintf (char *, size_t, const char *,...)
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 the response from command.
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.c 1714 2010-02-21 20:53:28Z satofumi
Todo:

Check the checksum of acquired line

Add an argument to distinguish the line that contain version information.


Enumeration Type Documentation

anonymous enum
Todo:
Standardize with urg_ctrl.c
Enumerator:
ScipTimeout 

[msec]

EachTimeout 

[msec]


Function Documentation

int scip_pp ( serial_t serial,
urg_parameter_t parameters 
)

Get Parameter information.

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

Here is the call graph for this function:

Here is the caller graph for this function:

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] serial Structure of serial control
[in] return_code Response from QT command
[in] wait_reply ScipNoWaitReply when response is not waited. ScipWaitReply when response is waited.
Return values:
0 Normal
< 0 Error

Here is the call graph for this function:

Here is the caller graph for this function:

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

Receive the response from command.

Receive command response.

Todo:
Test the checksum

Here is the call graph for this function:

Here is the caller graph for this function:

int scip_scip20 ( serial_t serial  ) 

Transit to SCIP2.0 mode.

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

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

Here is the call graph for this function:

int scip_send ( serial_t serial,
const char *  send_command 
)

Send command.

Parameters:
[out] serial Structure of serial control
[in] send_command Command to be sent
Return values:
0 Normal
< 0 Error

Here is the call graph for this function:

Here is the caller graph for this function:

int scip_ss ( serial_t serial,
long  baudrate 
)

Change baudrate.

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

Here is the call graph for this function:

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

Get version information.

Parameters:
[in,out] serial Structure of serial control
[out] lines Storage location of characters containing version information.
[in] lines_max Maximum number of character string
Return values:
0 Normal
< 0 Error

Here is the call graph for this function:

Here is the caller graph for this function:

int snprintf ( char *  ,
size_t  ,
const char *  ,
  ... 
)

Here is the caller graph for this function: