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 */
10namespace 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
23namespace gbxnovatelutilacfr{
24bool testConnectivity(
25 std::string &challenge,
26 std::string &ack,
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
41bool sendCmdWaitForResponse(
42 std::string &challenge,
43 std::string &ack,
44 std::string &errorResponse,
46 int timeOutMsec);
47}
Encapsulates a serial port.
Definition: serial.h:44
Simple serial port interface.
Definition: gbxnovatelacfr/driver.h:21
 

Generated for GearBox by  doxygen 1.4.5