INTRODUCTION
Overview
Download and Install
Documentation
Publications

REPOSITORY
Libraries

DEVELOPER
Dev Guide
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         
serialconnectivity.h
1 /*
2  * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
3  * http://gearbox.sf.net/
4  * Copyright (c) 2004-2010 Michael Moser
5  *
6  * This distribution is licensed to you under the terms described in
7  * the LICENSE file included in this distribution.
8  *
9  */
10 namespace gbxserialacfr{
11  class Serial;
12 }
13 
14 // test connectivity to a [serial] device at a [baudrate];
15 // Assumes that you can figure out a [challenge] (command ...) to
16 // which the device will answer with a unique [ack] in [timeOutMsec] milliseconds.
17 // If [successThresh] or more [challenge]es are answered by an [ack]
18 //
19 // Limitations: amount of data expected before timeOutMsec should be
20 // reasonably small
21 //
22 // returns true for Success; false for failure
23 namespace gbxnovatelutilacfr{
24 bool testConnectivity(
25  std::string &challenge,
26  std::string &ack,
27  gbxserialacfr::Serial& serial,
28  int timeOutMsec,
29  int numTry,
30  int successThresh,
31  int baudrate);
32 
33 // send a [challenge] (command ...) to
34 // which the device will answer with a unique [ack] in [timeOutMsec] milliseconds.
35 //
36 // Limitations: amount of data expected before timeOutMsec should be
37 // reasonably small
38 //
39 // returns true for Success (i.e. ack received in time),
40 // false for failure, in case of failure errorResponse contains the reply from the receiver
41 bool sendCmdWaitForResponse(
42  std::string &challenge,
43  std::string &ack,
44  std::string &errorResponse,
45  gbxserialacfr::Serial& serial,
46  int timeOutMsec);
47 }
Encapsulates a serial port.
Definition: serial.h:43
Simple serial port interface.
Definition: gbxnovatelacfr/driver.h:21
Definition: gbxnovatelacfr/driver.h:27
 

Generated for GearBox by  doxygen 1.4.5