You can subscribe to this list here.
| 2008 |
Jan
|
Feb
(58) |
Mar
(15) |
Apr
(23) |
May
(8) |
Jun
(92) |
Jul
(66) |
Aug
(6) |
Sep
(9) |
Oct
(44) |
Nov
(8) |
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2009 |
Jan
(10) |
Feb
(8) |
Mar
(2) |
Apr
(8) |
May
(19) |
Jun
(11) |
Jul
(8) |
Aug
(6) |
Sep
(5) |
Oct
(4) |
Nov
(26) |
Dec
(4) |
| 2010 |
Jan
(5) |
Feb
(3) |
Mar
(4) |
Apr
(3) |
May
(4) |
Jun
|
Jul
(1) |
Aug
(16) |
Sep
(7) |
Oct
(3) |
Nov
(7) |
Dec
|
| 2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <gb...@us...> - 2009-07-10 02:10:14
|
Revision: 432
http://gearbox.svn.sourceforge.net/gearbox/?rev=432&view=rev
Author: gbiggs
Date: 2009-07-10 02:10:13 +0000 (Fri, 10 Jul 2009)
Log Message:
-----------
Tagging release 9.07
Added Paths:
-----------
gearbox/tags/RELEASE_9.07/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-07-10 02:07:14
|
Revision: 431
http://gearbox.svn.sourceforge.net/gearbox/?rev=431&view=rev
Author: gbiggs
Date: 2009-07-10 02:07:05 +0000 (Fri, 10 Jul 2009)
Log Message:
-----------
Version debump, fixed history
Modified Paths:
--------------
gearbox/trunk/CMakeLists.txt
gearbox/trunk/doc/history.dox
Modified: gearbox/trunk/CMakeLists.txt
===================================================================
--- gearbox/trunk/CMakeLists.txt 2009-07-10 02:02:55 UTC (rev 430)
+++ gearbox/trunk/CMakeLists.txt 2009-07-10 02:07:05 UTC (rev 431)
@@ -13,7 +13,7 @@
#
set( GBX_PROJECT_VERSION_MAJOR "9" )
set( GBX_PROJECT_VERSION_MINOR "07" )
-set( GBX_PROJECT_VERSION_PATCH "+" )
+set( GBX_PROJECT_VERSION_PATCH "0" )
set( GBX_PROJECT_VERSION
${GBX_PROJECT_VERSION_MAJOR}.${GBX_PROJECT_VERSION_MINOR}.${GBX_PROJECT_VERSION_PATCH} )
Modified: gearbox/trunk/doc/history.dox
===================================================================
--- gearbox/trunk/doc/history.dox 2009-07-10 02:02:55 UTC (rev 430)
+++ gearbox/trunk/doc/history.dox 2009-07-10 02:07:05 UTC (rev 431)
@@ -27,28 +27,18 @@
@par Project wide
-- Build system
- - Added a hook in the CMake setup to allow building Gearbox as part of a bigger "super-project". Default behavior is not modified. (tobie,alexm)
- - Changed format style of CMake files. Standard functions are low-case. Custom macros are upper case. "Local" variables are low-case. "Global"
- and cache variables are upper-case. (alexm)
- - Added 4 advanced CMake variables to let user control what gets installed and what not. All are set to TRUE by default.
- To disable installation, set a variable to FALSE on the command line: 'cmake -DGBX_INSTALL_HEADERS=false'. The
- variables are:
- - GBX_INSTALL_HEADERS
- - GBX_INSTALL_SHARED_FILES
- - GBX_INSTALL_EXAMPLES
- - GBX_INSTALL_PKGCONFIGS
-
@par New libraries
@par Updated libraries
-- libGbxUtilAcfr:
- - Status class: removed SubsystemStalled from the list of health types for a subsystem. The stall condition
- now needs to be defined as part of the state of the monitor. (alexm)
- - Added SubHealth class: a delegator which has access to health function of one subsystem. (alexm)
- - Added Stoppable class: a light interface class representing stoppable activities. (alexm)
+@section gbx_doc_history_907 Changes in Release 9.07
+@par Updated libraries
+
+- libflexiport
+ - The UDP port type now properly supports sending and receiving broadcast packets on all operating systems.
+ (GeoffB)
+
- libGbxIceUtilAcfr:
- Changed names in buffer.h to make it more intuitive, fixed comments (AlexB).
- Timer class: added constructor with non-zero elapsed time (alexm)
@@ -57,34 +47,35 @@
No changes in user code are required. (alexm)
- Implemented store::peek() (AlexB)
-@section gbx_doc_history_907 Changes in Release 9.07
+- libGbxUtilAcfr:
+ - Status class: removed SubsystemStalled from the list of health types for a subsystem. The stall condition
+ now needs to be defined as part of the state of the monitor. (alexm)
+ - Added SubHealth class: a delegator which has access to health function of one subsystem. (alexm)
+ - Added Stoppable class: a light interface class representing stoppable activities. (alexm)
-@par Updated libraries
-
-- libflexiport
- - The UDP port type now properly supports sending and receiving broadcast packets on all operating systems.
- (GeoffB)
-
-- libGbxSmartBatteryAcfr
- - Now produces a pkg-config file.
-
-- libGbxSickAcfr
- - Added a peek function.
-
- libhokuyo_aist
- New known-to-work models. The full list is now: URG-04LX, UBG-04LX, UHG-08LX and UTM-30LX. As usual, other
models that conform to the protocol should also work. (GeoffB)
- Improvements to the SCIP protocol version checks, giving faster and more reliable startups. (GeoffB)
- Implemented a workaround for a bug in the UTM-30LX firmware. (GeoffB)
- - Better baud rate support.
+ - Better baud rate support. (GeoffB)
-@par Project-wide updates
+@par Project Wide
-- New versioning scheme for libraries. Each individual library has its own so version, which can be incremented
- independently of other libraries at the project as a whole. This allows users to check the API version of the
- library they are interested in, improving dependency checks for users of Gearbox.
-- Monolithic builds are now possible.
-- Compiles with GCC 4.4.
+- Build system
+ - Added a hook in the CMake setup to allow building Gearbox as part of a bigger "super-project". Default behavior is not modified. (tobie,alexm)
+ - Changed format style of CMake files. Standard functions are low-case. Custom macros are upper case. "Local" variables are low-case. "Global"
+ and cache variables are upper-case. (alexm)
+ - Added 4 advanced CMake variables to let user control what gets installed and what not. All are set to TRUE by default.
+ To disable installation, set a variable to FALSE on the command line: 'cmake -DGBX_INSTALL_HEADERS=false'. The
+ variables are:
+ - GBX_INSTALL_HEADERS
+ - GBX_INSTALL_SHARED_FILES
+ - GBX_INSTALL_EXAMPLES
+ - GBX_INSTALL_PKGCONFIGS
+ - New versioning scheme for libraries. Each individual library has its own so version, which can be incremented
+ independently of other libraries at the project as a whole. This allows users to check the API version of the
+ library they are interested in, improving dependency checks for users of Gearbox.
@section gbx_doc_history_902 Changes in Release 9.02
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-07-10 02:02:55
|
Revision: 430
http://gearbox.svn.sourceforge.net/gearbox/?rev=430&view=rev
Author: gbiggs
Date: 2009-07-10 02:02:55 +0000 (Fri, 10 Jul 2009)
Log Message:
-----------
Untagging to fix history
Removed Paths:
-------------
gearbox/tags/RELEASE_9.07/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-07-10 01:53:33
|
Revision: 429
http://gearbox.svn.sourceforge.net/gearbox/?rev=429&view=rev
Author: gbiggs
Date: 2009-07-10 01:53:29 +0000 (Fri, 10 Jul 2009)
Log Message:
-----------
Tagging release 9.07
Added Paths:
-----------
gearbox/tags/RELEASE_9.07/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-07-10 01:51:21
|
Revision: 428
http://gearbox.svn.sourceforge.net/gearbox/?rev=428&view=rev
Author: gbiggs
Date: 2009-07-10 01:51:12 +0000 (Fri, 10 Jul 2009)
Log Message:
-----------
Version bump for release
Modified Paths:
--------------
gearbox/trunk/CMakeLists.txt
gearbox/trunk/doc/history.dox
gearbox/trunk/doc/index.dox
Modified: gearbox/trunk/CMakeLists.txt
===================================================================
--- gearbox/trunk/CMakeLists.txt 2009-07-10 01:20:48 UTC (rev 427)
+++ gearbox/trunk/CMakeLists.txt 2009-07-10 01:51:12 UTC (rev 428)
@@ -12,7 +12,7 @@
# project version
#
set( GBX_PROJECT_VERSION_MAJOR "9" )
-set( GBX_PROJECT_VERSION_MINOR "02" )
+set( GBX_PROJECT_VERSION_MINOR "07" )
set( GBX_PROJECT_VERSION_PATCH "+" )
set( GBX_PROJECT_VERSION
Modified: gearbox/trunk/doc/history.dox
===================================================================
--- gearbox/trunk/doc/history.dox 2009-07-10 01:20:48 UTC (rev 427)
+++ gearbox/trunk/doc/history.dox 2009-07-10 01:51:12 UTC (rev 428)
@@ -57,6 +57,35 @@
No changes in user code are required. (alexm)
- Implemented store::peek() (AlexB)
+@section gbx_doc_history_907 Changes in Release 9.07
+
+@par Updated libraries
+
+- libflexiport
+ - The UDP port type now properly supports sending and receiving broadcast packets on all operating systems.
+ (GeoffB)
+
+- libGbxSmartBatteryAcfr
+ - Now produces a pkg-config file.
+
+- libGbxSickAcfr
+ - Added a peek function.
+
+- libhokuyo_aist
+ - New known-to-work models. The full list is now: URG-04LX, UBG-04LX, UHG-08LX and UTM-30LX. As usual, other
+ models that conform to the protocol should also work. (GeoffB)
+ - Improvements to the SCIP protocol version checks, giving faster and more reliable startups. (GeoffB)
+ - Implemented a workaround for a bug in the UTM-30LX firmware. (GeoffB)
+ - Better baud rate support.
+
+@par Project-wide updates
+
+- New versioning scheme for libraries. Each individual library has its own so version, which can be incremented
+ independently of other libraries at the project as a whole. This allows users to check the API version of the
+ library they are interested in, improving dependency checks for users of Gearbox.
+- Monolithic builds are now possible.
+- Compiles with GCC 4.4.
+
@section gbx_doc_history_902 Changes in Release 9.02
@par New libraries
Modified: gearbox/trunk/doc/index.dox
===================================================================
--- gearbox/trunk/doc/index.dox 2009-07-10 01:20:48 UTC (rev 427)
+++ gearbox/trunk/doc/index.dox 2009-07-10 01:51:12 UTC (rev 428)
@@ -45,6 +45,7 @@
@section gbx_doc_index_news News
+- 10-Jul-09 Release 9.07. Several bug fixes in the libraries, and the new ability for the flexiport library's UDP port type to handle broadcast data. (@ref gbx_doc_history_907)
- 18-Feb-09 Release 9.02. One new driver and a few updates in other libraries. (@ref gbx_doc_history_902)
- 25-Jul-08 Release 8.07. Includes 5 new libraries and a re-write of the Hokuyo driver. (@ref gbx_doc_history_807)
- 21-Apr-08 First release, version 1.0 (@ref gbx_doc_history_100)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-07-10 01:20:55
|
Revision: 427
http://gearbox.svn.sourceforge.net/gearbox/?rev=427&view=rev
Author: gbiggs
Date: 2009-07-10 01:20:48 +0000 (Fri, 10 Jul 2009)
Log Message:
-----------
Fixed comment typo
Modified Paths:
--------------
gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
Modified: gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2009-07-02 07:15:57 UTC (rev 426)
+++ gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2009-07-10 01:20:48 UTC (rev 427)
@@ -1808,7 +1808,7 @@
// Empty lines (i.e. a line that is just the line feed, as at the end of the message) will result in
// a return value of zero and no checksum check will be performed. Otherwise the number of actual
// data bytes (i.e. excluding the checksum and semicolon) will be returned.
-// BIG NOTE: The URG-30LX has a probable bug in its response to the II code whereby it does not
+// BIG NOTE: The UTM-30LX has a probable bug in its response to the II code whereby it does not
// include anything after and including "<-" in the checksum calculation. A workaround is enabled
// in this function when _sensorIsUTM30LX is true. In this case, if the checksum fails normally, it
// scans the line for "<-" and recalculates the checksum on the bytes up to that point. This only
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bo...@us...> - 2009-07-02 07:16:03
|
Revision: 426
http://gearbox.svn.sourceforge.net/gearbox/?rev=426&view=rev
Author: borax00
Date: 2009-07-02 07:15:57 +0000 (Thu, 02 Jul 2009)
Log Message:
-----------
MR changes
Modified Paths:
--------------
gearbox/trunk/src/gbxsickacfr/sickdefines.h
gearbox/trunk/src/gbxsmartbatteryacfr/oceanserver.cpp
gearbox/trunk/src/gbxsmartbatteryacfr/oceanserver.h
gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverreader.cpp
gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverreader.h
gearbox/trunk/src/gbxsmartbatteryacfr/test/longtest.cpp
gearbox/trunk/src/gbxutilacfr/tracer.h
gearbox/trunk/src/gbxutilacfr/trivialtracer.cpp
gearbox/trunk/src/gbxutilacfr/trivialtracer.h
Added Paths:
-----------
gearbox/trunk/cmake/StringToCapital.cmake
Added: gearbox/trunk/cmake/StringToCapital.cmake
===================================================================
--- gearbox/trunk/cmake/StringToCapital.cmake (rev 0)
+++ gearbox/trunk/cmake/StringToCapital.cmake 2009-07-02 07:15:57 UTC (rev 426)
@@ -0,0 +1,20 @@
+# GBX_STRING_TO_CAPITAL( input_string OUTPUT_VAR )
+#
+# E.g. converts "gearbox" to "Gearbox"
+#
+macro( GBX_STRING_TO_CAPITAL input_string OUTPUT_VAR )
+
+ # jump through the hoops to construct project name string with the first character capitalized
+ string( LENGTH ${input_string} string_length )
+
+ math( EXPR string_length_minus_one "${string_length} - 1" )
+
+ string( SUBSTRING ${input_string} 0 1 output_start )
+ string( SUBSTRING ${input_string} 1 ${string_length_minus_one} output_rest )
+
+ string( TOUPPER ${output_start} output_start_upper )
+ string( TOLOWER ${output_rest} output_rest_lower )
+
+ set( ${OUTPUT_VAR} "${output_start_upper}${output_rest_lower}" )
+
+endmacro( GBX_STRING_TO_CAPITAL input_string OUTPUT_VAR )
Modified: gearbox/trunk/src/gbxsickacfr/sickdefines.h
===================================================================
--- gearbox/trunk/src/gbxsickacfr/sickdefines.h 2009-06-13 12:30:47 UTC (rev 425)
+++ gearbox/trunk/src/gbxsickacfr/sickdefines.h 2009-07-02 07:15:57 UTC (rev 426)
@@ -11,6 +11,7 @@
#define SICK_ACFR_DRIVER_SICKDEFINES_H
#include <string>
+#include <stdint.h>
namespace gbxsickacfr {
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/oceanserver.cpp
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/oceanserver.cpp 2009-06-13 12:30:47 UTC (rev 425)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/oceanserver.cpp 2009-07-02 07:15:57 UTC (rev 426)
@@ -13,13 +13,15 @@
#include "oceanserver.h"
namespace gbxsmartbatteryacfr {
-
-static const int MAX_EXCEPTIONS_ROW = 10;
+static const int MAX_EXCEPTIONS_BEFORE_RESET = 10;
+static const int MAX_EXCEPTIONS_BEFORE_CRITICAL = 20;
+
OceanServer::OceanServer( const std::string &port,
gbxutilacfr::Tracer &tracer)
: tracer_(tracer),
- exceptionCounter_(0)
+ exceptionCounter_(0),
+ exceptionString_("")
{
reader_.reset(new gbxsmartbatteryacfr::OceanServerReader( port, tracer_ ));
}
@@ -27,14 +29,16 @@
const gbxsmartbatteryacfr::OceanServerSystem&
OceanServer::getData()
{
+ gbxsmartbatteryacfr::OceanServerSystem data;
+
try
{
// read new data, this may throw
- gbxsmartbatteryacfr::OceanServerSystem data;
reader_->read(data);
- // if successful, reset counter
+ // if successful, reset counter and string
exceptionCounter_ = 0;
+ exceptionString_ = "";
// update internal (full) record
gbxsmartbatteryacfr::updateWithNewData( data, data_ );
@@ -48,11 +52,28 @@
tracer_.debug( ss.str(), 3 );
exceptionCounter_++;
- if (exceptionCounter_ >= MAX_EXCEPTIONS_ROW)
+ stringstream ssEx;
+ ssEx << e.what() << endl;
+ for (unsigned int i=0; i<data.rawRecord.size(); i++)
+ ssEx << data.rawRecord[i] << endl;
+ ssEx << endl;
+ exceptionString_ = exceptionString_ + ssEx.str();
+
+ if (exceptionCounter_ >= MAX_EXCEPTIONS_BEFORE_RESET)
{
+ stringstream ss;
+ ss << "OceanServer: " << __func__ << ": Caught " << MAX_EXCEPTIONS_BEFORE_RESET
+ << " ParsingExceptions in a row. Resetting the reader now...";
+ tracer_.warning( ss.str() );
+ reader_->reset();
+ }
+
+ if (exceptionCounter_ >= MAX_EXCEPTIONS_BEFORE_CRITICAL)
+ {
ss.str("");
- ss << "OceanServer: " << __func__ << ": Caught " << MAX_EXCEPTIONS_ROW
- << " ParsingExceptions in a row. Something must be wrong";
+ ss << "OceanServer: " << __func__ << ": Caught " << MAX_EXCEPTIONS_BEFORE_CRITICAL
+ << " ParsingExceptions in a row. Something must be wrong. Here's the history: " << endl
+ << exceptionString_;
throw gbxutilacfr::Exception( ERROR_INFO, ss.str() );
}
}
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/oceanserver.h
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/oceanserver.h 2009-06-13 12:30:47 UTC (rev 425)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/oceanserver.h 2009-07-02 07:15:57 UTC (rev 426)
@@ -47,6 +47,7 @@
auto_ptr<gbxsmartbatteryacfr::OceanServerReader> reader_;
int exceptionCounter_;
+ std::string exceptionString_;
};
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverreader.cpp
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverreader.cpp 2009-06-13 12:30:47 UTC (rev 425)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverreader.cpp 2009-07-02 07:15:57 UTC (rev 426)
@@ -64,13 +64,25 @@
tracer_(tracer),
parser_(tracer),
firstTime_(true)
-{
+{
checkConnection();
+ reset();
+}
- // send the command to start reading data
+void
+OceanServerReader::reset()
+{
serial_.flush();
- const char startReading = 'X';
- serial_.write(&startReading, 1);
+
+ // send the command to get into menu mode
+ const char menuMode = ' ';
+ serial_.write(&menuMode, 1);
+
+ // send the command to start sending hex data
+ const char startSendingHex = 'X';
+ serial_.write(&startSendingHex, 1);
+
+ firstTime_ = true;
}
void
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverreader.h
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverreader.h 2009-06-13 12:30:47 UTC (rev 425)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverreader.h 2009-07-02 07:15:57 UTC (rev 426)
@@ -41,6 +41,12 @@
//! May throw HardwareReadingExceptions and ParsingExceptions
void read( OceanServerSystem &system );
+ //! Resets the reader:
+ //! - tells the OceanServer system to spit out hex data
+ //! - tries to find the beginning of a new record
+ void reset();
+
+
private:
gbxserialacfr::Serial serial_;
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/test/longtest.cpp
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/test/longtest.cpp 2009-06-13 12:30:47 UTC (rev 425)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/test/longtest.cpp 2009-07-02 07:15:57 UTC (rev 426)
@@ -49,8 +49,8 @@
gbxsmartbatteryacfr::BatteryHealthWarningConfig config;
config.expectedNumBatteries = 2;
config.numCyclesThreshhold = 300;
- config.chargeTempThreshhold = 54.0;
- config.dischargeTempThreshhold = 70.0;
+ config.chargeTempThreshhold = 40.0;
+ config.dischargeTempThreshhold = 45.0;
config.chargeWarnThreshhold = 10;
config.chargeDeviationThreshold = 10;
Modified: gearbox/trunk/src/gbxutilacfr/tracer.h
===================================================================
--- gearbox/trunk/src/gbxutilacfr/tracer.h 2009-06-13 12:30:47 UTC (rev 425)
+++ gearbox/trunk/src/gbxutilacfr/tracer.h 2009-07-02 07:15:57 UTC (rev 426)
@@ -118,22 +118,34 @@
//! Routing is determined by InfoToXxx parameter.
//! If localOnly is set to TRUE, messages are not sent over the network (useful when traces
//! is caused by network errors).
- virtual void info( const std::string &message, int level=1, bool localOnly=false ) = 0;
+ virtual void info( const std::string &message, int level=1, bool localOnly=false )
+ { info("",message,level,localOnly); }
+ //! This version gives the Tracer some hints about a specific subsytem which generated the message
+ virtual void info( const std::string &subsystem, const std::string &message, int level=1, bool localOnly=false ) = 0;
//! Routing is determined by WarningToXxx parameter.
//! If localOnly is set to TRUE, messages are not sent over the network (useful when traces
//! is caused by network errors).
- virtual void warning( const std::string &message, int level=1, bool localOnly=false ) = 0;
+ virtual void warning( const std::string &message, int level=1, bool localOnly=false )
+ { warning("",message,level,localOnly); }
+ //! This version gives the Tracer some hints about a specific subsytem which generated the message
+ virtual void warning( const std::string &subsystem, const std::string &message, int level=1, bool localOnly=false ) = 0;
//! Routing is determined by ErrorToXxx parameter.
//! If localOnly is set to TRUE, messages are not sent over the network (useful when traces
//! is caused by network errors).
- virtual void error( const std::string &message, int level=1, bool localOnly=false ) = 0;
+ virtual void error( const std::string &message, int level=1, bool localOnly=false )
+ { error("",message,level,localOnly); }
+ //! This version gives the Tracer some hints about a specific subsytem which generated the message
+ virtual void error( const std::string &subsystem, const std::string &message, int level=1, bool localOnly=false ) = 0;
//! Routing is determined by DebugToXxx parameter.
//! If localOnly is set to TRUE, messages are not sent over the network (useful when traces
//! is caused by network errors).
- virtual void debug( const std::string &message, int level=1, bool localOnly=false ) = 0;
+ virtual void debug( const std::string &message, int level=1, bool localOnly=false )
+ { debug("",message,level,localOnly); }
+ //! This version gives the Tracer some hints about a specific subsytem which generated the message
+ virtual void debug( const std::string &subsystem, const std::string &message, int level=1, bool localOnly=false ) = 0;
//! Returns the verbosity level for traceType to destType. This test is performed
//! internally by all tracing functions, e.g. error(). You may want to call this
@@ -144,12 +156,12 @@
//! @b EXPERIMENTAL. Sets debug level for an individual subsystem.
//! Only debug-to-display is supported.
- virtual void setLevel( const std::string &subsystem, int level=0 ) {};
+ virtual void setSubsystemDebugLevel( const std::string &subsystem, int level=0 ) {};
//! @b EXPERIMENTAL. Debug tracing for an individual subsystem.
//! Only debug-to-display is supported.
//! The maximum traceable level is set per-subsystem with setLevel().
- virtual void debug( const std::string &subsystem, const std::string &message, int level=1 )
+ virtual void subsystemDebug( const std::string &subsystem, const std::string &message, int level=1 )
{
debug( message, level );
};
Modified: gearbox/trunk/src/gbxutilacfr/trivialtracer.cpp
===================================================================
--- gearbox/trunk/src/gbxutilacfr/trivialtracer.cpp 2009-06-13 12:30:47 UTC (rev 425)
+++ gearbox/trunk/src/gbxutilacfr/trivialtracer.cpp 2009-07-02 07:15:57 UTC (rev 426)
@@ -31,31 +31,51 @@
}
void
-TrivialTracer::info( const std::string &message, int level, bool localOnly )
+TrivialTracer::info( const std::string &subsystem, const std::string &message, int level, bool localOnly )
{
if ( traceLevels_[InfoTrace] >= level )
- cout << "info: " << message << endl;
+ {
+ cout << "info: ";
+ if ( subsystem != "" )
+ cout << subsystem << ": ";
+ cout << message << endl;
+ }
}
void
-TrivialTracer::warning( const std::string &message, int level, bool localOnly )
+TrivialTracer::warning( const std::string &subsystem, const std::string &message, int level, bool localOnly )
{
if ( traceLevels_[WarningTrace] >= level )
- cout << "warn: " << message << endl;
+ {
+ cout << "warn: ";
+ if ( subsystem != "" )
+ cout << subsystem << ": ";
+ cout << message << endl;
+ }
}
void
-TrivialTracer::error( const std::string &message, int level, bool localOnly )
+TrivialTracer::error( const std::string &subsystem, const std::string &message, int level, bool localOnly )
{
if ( traceLevels_[ErrorTrace] >= level )
- cout << "error: " << message << endl;
+ {
+ cout << "error: ";
+ if ( subsystem != "" )
+ cout << subsystem << ": ";
+ cout << message << endl;
+ }
}
void
-TrivialTracer::debug( const std::string &message, int level, bool localOnly )
+TrivialTracer::debug( const std::string &subsystem, const std::string &message, int level, bool localOnly )
{
if ( traceLevels_[DebugTrace] >= level )
- cout << "debug: " << message << endl;
+ {
+ cout << "debug: ";
+ if ( subsystem != "" )
+ cout << subsystem << ": ";
+ cout << message << endl;
+ }
}
int
Modified: gearbox/trunk/src/gbxutilacfr/trivialtracer.h
===================================================================
--- gearbox/trunk/src/gbxutilacfr/trivialtracer.h 2009-06-13 12:30:47 UTC (rev 425)
+++ gearbox/trunk/src/gbxutilacfr/trivialtracer.h 2009-07-02 07:15:57 UTC (rev 426)
@@ -33,12 +33,21 @@
int error=9 );
virtual void print( const std::string &message );
- virtual void info( const std::string &message, int level=1, bool localOnly=false );
- virtual void warning( const std::string &message, int level=1, bool localOnly=false );
- virtual void error( const std::string &message, int level=1, bool localOnly=false );
- virtual void debug( const std::string &message, int level=1, bool localOnly=false );
+ virtual void info( const std::string &message, int level=1, bool localOnly=false )
+ { info("",message,level,localOnly); }
+ virtual void warning( const std::string &message, int level=1, bool localOnly=false )
+ { warning("",message,level,localOnly); }
+ virtual void error( const std::string &message, int level=1, bool localOnly=false )
+ { error("",message,level,localOnly); }
+ virtual void debug( const std::string &message, int level=1, bool localOnly=false )
+ { debug("",message,level,localOnly); }
virtual int verbosity( TraceType traceType, DestinationType destType=ToAny ) const;
+ virtual void info( const std::string &subsystem, const std::string &message, int level=1, bool localOnly=false );
+ virtual void warning( const std::string &subsystem, const std::string &message, int level=1, bool localOnly=false );
+ virtual void error( const std::string &subsystem, const std::string &message, int level=1, bool localOnly=false );
+ virtual void debug( const std::string &subsystem, const std::string &message, int level=1, bool localOnly=false );
+
private:
int traceLevels_[NumberOfTraceTypes];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-06-13 13:14:42
|
Revision: 424
http://gearbox.svn.sourceforge.net/gearbox/?rev=424&view=rev
Author: gbiggs
Date: 2009-06-13 12:25:55 +0000 (Sat, 13 Jun 2009)
Log Message:
-----------
Made it actually work, and enabled broadcast sending and receiving
Modified Paths:
--------------
gearbox/trunk/src/flexiport/udpport.cpp
Modified: gearbox/trunk/src/flexiport/udpport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/udpport.cpp 2009-06-12 13:21:47 UTC (rev 423)
+++ gearbox/trunk/src/flexiport/udpport.cpp 2009-06-13 12:25:55 UTC (rev 424)
@@ -109,6 +109,19 @@
#endif
#endif
+void SetBroadcastFlag (int sock)
+{
+ int broadcastFlag = 1;
+ if (setsockopt (sock, SOL_SOCKET, SO_BROADCAST,
+ &broadcastFlag, sizeof (broadcastFlag)) < 0)
+ {
+ stringstream ss;
+ ss << __func__ << "() setsockopt() error: (" << ErrNo () << ") " <<
+ StrError (ErrNo ());
+ throw PortException (ss.str ());
+ }
+}
+
////////////////////////////////////////////////////////////////////////////////////////////////////
// Constructor/destructor
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -195,9 +208,9 @@
ssize_t receivedBytes = 0;
struct sockaddr_storage from;
#if defined (WIN32)
- int fromLen = 0;
+ int fromLen = sizeof (from);
#else
- socklen_t fromLen = 0;
+ socklen_t fromLen = sizeof (from);
#endif
CheckPort (true);
@@ -268,7 +281,7 @@
{
// General error
stringstream ss;
- ss << "UDPPort::" << __func__ << "() recv() error: (" << ErrNo () << ") " <<
+ ss << "UDPPort::" << __func__ << "() recvfrom() error: (" << ErrNo () << ") " <<
StrError (ErrNo ());
throw PortException (ss.str ());
}
@@ -321,13 +334,13 @@
{
// Timed out (which probably shouldn't happen)
throw PortException (string ("UDPPort::") + __func__ +
- string ("() recv() timed out, probably shouldn't happen."));
+ string ("() recvfrom() timed out, probably shouldn't happen."));
}
else
{
// General error
stringstream ss;
- ss << "UDPPort::" << __func__ << "() recv() error: (" << ErrNo () << ") " <<
+ ss << "UDPPort::" << __func__ << "() recvfrom() error: (" << ErrNo () << ") " <<
StrError (ErrNo ());
throw PortException (ss.str ());
}
@@ -536,25 +549,28 @@
return -1;
}
}
+
#if defined (WIN32)
if ((numSent = sendto (_sendSock, reinterpret_cast<const char*> (buffer), count, 0,
- reinterpret_cast<struct sockaddr*> (&_destSockAddr), sizeof (_destSockAddr))) < 0)
+ reinterpret_cast<struct sockaddr*> (&_destSockAddr),
+ sizeof (_destSockAddr))) < 0)
#else
if ((numSent = sendto (_sendSock, buffer, count, 0,
- reinterpret_cast<struct sockaddr*> (&_destSockAddr), sizeof (_destSockAddr))) < 0)
+ reinterpret_cast<struct sockaddr*> (&_destSockAddr),
+ sizeof (_destSockAddr))) < 0)
#endif
{
if (ErrNo () == ERRNO_EAGAIN)
{
if (_debug >= 2)
- cerr << "UDPPort::" << __func__ << "() Timed out while in send()" << endl;
+ cerr << "UDPPort::" << __func__ << "() Timed out while in sendto()" << endl;
return -1; // Timed out
}
else
{
// General error
stringstream ss;
- ss << "UDPPort::" << __func__ << "() send() error: (" << ErrNo () << ") " <<
+ ss << "UDPPort::" << __func__ << "() sendto() error: (" << ErrNo () << ") " <<
StrError (ErrNo ());
throw PortException (ss.str ());
}
@@ -588,7 +604,7 @@
if (numRead < 0 && ErrNo () != ERRNO_EAGAIN)
{
stringstream ss;
- ss << "UDPPort::" << __func__ << "() recv() error: (" << ErrNo () << ") " <<
+ ss << "UDPPort::" << __func__ << "() recvfrom() error: (" << ErrNo () << ") " <<
StrError (ErrNo ());
throw PortException (ss.str ());
}
@@ -698,7 +714,7 @@
// If getaddrinfo() is available, much less stuff needs to be hard-coded or copied around.
#if defined (FLEXIPORT_HAVE_GETADDRINFO)
- struct addrinfo *res = NULL, hints;
+ struct addrinfo *res = NULL, *goodAI = NULL, hints;
memset (&hints, 0, sizeof (hints));
hints.ai_family = AF_UNSPEC;
@@ -722,26 +738,37 @@
throw PortException (ss.str ());
}
- _sendSock = socket (res->ai_family, res->ai_socktype, res->ai_protocol);
+ stringstream ss;
+ ss << "UDPPort::" << __func__ << "() socket() errors on all interfaces:";
+ for (goodAI = res; goodAI != NULL; goodAI = goodAI->ai_next)
+ {
+ _sendSock = socket (goodAI->ai_family, goodAI->ai_socktype, goodAI->ai_protocol);
#if defined (WIN32)
- if (_sendSock == INVALID_SOCKET)
+ if (_sendSock == INVALID_SOCKET)
#else
- if (_sendSock < 0)
+ if (_sendSock < 0)
#endif
+ {
+ ss << " (" << ErrNo () << ") " << StrError (ErrNo ()) << ";";
+ }
+ else
+ break;
+ }
+ if (goodAI == NULL)
{
- stringstream ss;
- ss << "UDPPort::" << __func__ << "() socket() error: (" << ErrNo () << ") " <<
- StrError (ErrNo ());
+ freeaddrinfo (res);
throw PortException (ss.str ());
}
+ SetBroadcastFlag (_sendSock);
+
if (_debug >= 1)
{
cerr << "UDPPort::" << __func__ << "() Socket created, will send to " << _destIP << ":" <<
_destPort << "." << endl;
}
- memcpy (&_destSockAddr, res, sizeof (*res));
+ memcpy (&_destSockAddr, goodAI->ai_addr, goodAI->ai_addrlen);
freeaddrinfo (res);
#else // defined (FLEXIPORT_HAVE_GETADDRINFO)
// Do it the ugly old way.
@@ -761,6 +788,8 @@
throw PortException (ss.str ());
}
+ SetBroadcastFlag (_sendSock);
+
struct hostent *hp = NULL;
if ((hp = gethostbyname (_destIP.c_str ())) == NULL)
{
@@ -804,7 +833,7 @@
CloseReceiver (); // To make sure
#if defined (FLEXIPORT_HAVE_GETADDRINFO)
- struct addrinfo *res = NULL, hints;
+ struct addrinfo *res = NULL, *goodAI = NULL, hints;
memset (&hints, 0, sizeof (hints));
hints.ai_family = AF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM;
@@ -846,28 +875,39 @@
}
}
- _recvSock = socket (res->ai_family, res->ai_socktype, res->ai_protocol);
+ stringstream ss;
+ ss << "UDPPort::" << __func__ << "() Errors on all interfaces:";
+ for (goodAI = res; goodAI != NULL; goodAI = goodAI->ai_next)
+ {
+ _recvSock = socket (goodAI->ai_family, goodAI->ai_socktype, goodAI->ai_protocol);
#if defined (WIN32)
- if (_recvSock == INVALID_SOCKET)
+ if (_sendSock == INVALID_SOCKET)
#else
- if (_recvSock < 0)
+ if (_sendSock < 0)
#endif
- {
- stringstream ss;
- ss << "UDPPort::" << __func__ << "() socket() error: (" << ErrNo () << ") " <<
- StrError (ErrNo ());
- throw PortException (ss.str ());
+ {
+ ss << "socket(): (" << ErrNo () << ") " << StrError (ErrNo ()) << ";";
+ continue;
+ }
+
+ if (bind (_recvSock, goodAI->ai_addr, goodAI->ai_addrlen) < 0)
+ {
+ CloseReceiver ();
+ stringstream ss;
+ ss << "bind(): (" << ErrNo () << ") " << StrError (ErrNo ()) << ";";
+ continue;
+ }
+
+ break;
}
-
- if (bind (_recvSock, res->ai_addr, res->ai_addrlen) < 0)
+ if (goodAI == NULL)
{
- CloseReceiver ();
- stringstream ss;
- ss << "UDPPort::" << __func__ << "() bind() error: (" << ErrNo () << ") " <<
- StrError (ErrNo ());
+ freeaddrinfo (res);
throw PortException (ss.str ());
}
+ SetBroadcastFlag (_recvSock);
+
freeaddrinfo (res);
#else // defined (FLEXIPORT_HAVE_GETADDRINFO)
char hostName[HOST_NAME_MAX + 1] = {'\0'};
@@ -928,6 +968,8 @@
StrError (ErrNo ());
throw PortException (ss.str ());
}
+
+ SetBroadcastFlag (_recvSock);
#endif // defined (FLEXIPORT_HAVE_GETADDRINFO)
if (_debug >= 1)
@@ -1021,7 +1063,7 @@
{
// General error
stringstream ss;
- ss << "UDPPort::" << __func__ << "() recv() error: (" << ErrNo () << ") " <<
+ ss << "UDPPort::" << __func__ << "() recvfrom() error: (" << ErrNo () << ") " <<
StrError (ErrNo ());
throw PortException (ss.str ());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-06-13 13:14:40
|
Revision: 425
http://gearbox.svn.sourceforge.net/gearbox/?rev=425&view=rev
Author: gbiggs
Date: 2009-06-13 12:30:47 +0000 (Sat, 13 Jun 2009)
Log Message:
-----------
Fixed windows includes
Modified Paths:
--------------
gearbox/trunk/src/flexiport/udpport.cpp
gearbox/trunk/src/flexiport/udpport.h
Modified: gearbox/trunk/src/flexiport/udpport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/udpport.cpp 2009-06-13 12:25:55 UTC (rev 424)
+++ gearbox/trunk/src/flexiport/udpport.cpp 2009-06-13 12:30:47 UTC (rev 425)
@@ -33,7 +33,6 @@
#include <netdb.h>
#endif
#include <sys/types.h>
-#include <arpa/inet.h>
#include <fcntl.h>
#include <string.h>
#include <sstream>
@@ -50,6 +49,7 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netdb.h>
+ #include <arpa/inet.h>
#endif
#if !defined (HOST_NAME_MAX)
@@ -113,7 +113,11 @@
{
int broadcastFlag = 1;
if (setsockopt (sock, SOL_SOCKET, SO_BROADCAST,
+#if defined (WIN32)
+ reinterpret_cast<const char*> (&broadcastFlag), sizeof (broadcastFlag)) < 0)
+#else
&broadcastFlag, sizeof (broadcastFlag)) < 0)
+#endif
{
stringstream ss;
ss << __func__ << "() setsockopt() error: (" << ErrNo () << ") " <<
Modified: gearbox/trunk/src/flexiport/udpport.h
===================================================================
--- gearbox/trunk/src/flexiport/udpport.h 2009-06-13 12:25:55 UTC (rev 424)
+++ gearbox/trunk/src/flexiport/udpport.h 2009-06-13 12:30:47 UTC (rev 425)
@@ -33,7 +33,9 @@
#include <map>
#include <string>
-#include <netinet/in.h>
+#if !defined (WIN32)
+ #include <netinet/in.h>
+#endif
/** @ingroup gbx_library_flexiport
@{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-06-12 13:21:59
|
Revision: 423
http://gearbox.svn.sourceforge.net/gearbox/?rev=423&view=rev
Author: gbiggs
Date: 2009-06-12 13:21:47 +0000 (Fri, 12 Jun 2009)
Log Message:
-----------
Fixed compile errors on *nix
Modified Paths:
--------------
gearbox/trunk/src/flexiport/udpport.cpp
gearbox/trunk/src/flexiport/udpport.h
Modified: gearbox/trunk/src/flexiport/udpport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/udpport.cpp 2009-06-12 12:19:14 UTC (rev 422)
+++ gearbox/trunk/src/flexiport/udpport.cpp 2009-06-12 13:21:47 UTC (rev 423)
@@ -33,6 +33,7 @@
#include <netdb.h>
#endif
#include <sys/types.h>
+#include <arpa/inet.h>
#include <fcntl.h>
#include <string.h>
#include <sstream>
Modified: gearbox/trunk/src/flexiport/udpport.h
===================================================================
--- gearbox/trunk/src/flexiport/udpport.h 2009-06-12 12:19:14 UTC (rev 422)
+++ gearbox/trunk/src/flexiport/udpport.h 2009-06-12 13:21:47 UTC (rev 423)
@@ -33,6 +33,7 @@
#include <map>
#include <string>
+#include <netinet/in.h>
/** @ingroup gbx_library_flexiport
@{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-06-12 13:03:40
|
Revision: 421
http://gearbox.svn.sourceforge.net/gearbox/?rev=421&view=rev
Author: gbiggs
Date: 2009-06-12 12:18:44 +0000 (Fri, 12 Jun 2009)
Log Message:
-----------
Changed UDPPort to be less connection-oriented.
Modified Paths:
--------------
gearbox/trunk/src/flexiport/udpport.cpp
gearbox/trunk/src/flexiport/udpport.h
Modified: gearbox/trunk/src/flexiport/udpport.cpp
===================================================================
--- gearbox/trunk/src/flexiport/udpport.cpp 2009-06-10 06:45:09 UTC (rev 420)
+++ gearbox/trunk/src/flexiport/udpport.cpp 2009-06-12 12:18:44 UTC (rev 421)
@@ -27,7 +27,6 @@
#include "flexiport.h"
#include "udpport.h"
-#include "flexiport_config.h"
#if defined (FLEXIPORT_HAVE_GETADDRINFO)
#include <sys/socket.h>
@@ -82,12 +81,33 @@
#endif
}
+// Yay Beej's!
+inline void* GetInAddr (struct sockaddr *sa)
+{
+ if (sa->sa_family == AF_INET)
+ return &(reinterpret_cast<struct sockaddr_in*>(sa)->sin_addr);
+ else
+ return &(reinterpret_cast<struct sockaddr_in6*>(sa)->sin6_addr);
+}
+
#if defined (WIN32)
const int ERRNO_EAGAIN = WSAEWOULDBLOCK;
#else
const int ERRNO_EAGAIN = EAGAIN;
#endif
+#if defined (WIN32)
+ // Unfortunately, Windows has a fit if these are made class variables due to the inclusion
+ // of winsock2.h in udpport.h. No idea why, but it somehow drags in winsock.h, which really
+ // doesn't play nice with winsock2.h (despite guards that supposedly prevent it being included
+ // at the same time).
+ #if defined (FLEXIPORT_HAVE_GETADDRINFO)
+ struct sockaddr _destSockAddr;
+ #else
+ struct sockaddr_in _destSockAddr;
+ #endif
+#endif
+
////////////////////////////////////////////////////////////////////////////////////////////////////
// Constructor/destructor
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -172,6 +192,12 @@
ssize_t UDPPort::Read (void * const buffer, size_t count)
{
ssize_t receivedBytes = 0;
+ struct sockaddr_storage from;
+#if defined (WIN32)
+ int fromLen = 0;
+#else
+ socklen_t fromLen = 0;
+#endif
CheckPort (true);
@@ -182,9 +208,11 @@
{
// Socket is blocking, so just read
#if defined (WIN32)
- receivedBytes = recv (_recvSock, reinterpret_cast<char*> (buffer), count, 0);
+ receivedBytes = recvfrom (_recvSock, reinterpret_cast<char*> (buffer), count, 0,
+ reinterpret_cast<struct sockaddr*> (&from), &fromLen);
#else
- receivedBytes = recv (_recvSock, buffer, count, 0);
+ receivedBytes = recvfrom (_recvSock, buffer, count, 0,
+ reinterpret_cast<struct sockaddr*> (&from), &fromLen);
#endif
}
else
@@ -192,9 +220,11 @@
// Socket is non-blocking, so try to read, see if we get any data (if there is none, this
// will return immediately, and is much faster than ioctl() and select() calls)
#if defined (WIN32)
- receivedBytes = recv (_recvSock, reinterpret_cast<char*> (buffer), count, 0);
+ receivedBytes = recvfrom (_recvSock, reinterpret_cast<char*> (buffer), count, 0,
+ reinterpret_cast<struct sockaddr*> (&from), &fromLen);
#else
- receivedBytes = recv (_recvSock, buffer, count, 0);
+ receivedBytes = recvfrom (_recvSock, buffer, count, 0,
+ reinterpret_cast<struct sockaddr*> (&from), &fromLen);
#endif
// Check if that call "timed out"
if (receivedBytes < 0 && ErrNo () == ERRNO_EAGAIN)
@@ -203,16 +233,31 @@
if (WaitForDataOrTimeout () == TIMED_OUT)
return -1;
#if defined (WIN32)
- receivedBytes = recv (_recvSock, reinterpret_cast<char*> (buffer), count, 0);
+ receivedBytes = recvfrom (_recvSock, reinterpret_cast<char*> (buffer), count, 0,
+ reinterpret_cast<struct sockaddr*> (&from), &fromLen);
#else
- receivedBytes = recv (_recvSock, buffer, count, 0);
+ receivedBytes = recvfrom (_recvSock, buffer, count, 0,
+ reinterpret_cast<struct sockaddr*> (&from), &fromLen);
#endif
}
// If first call doesn't return a timeout, fall through to the result/error checking below
}
if (_debug >= 2)
- cerr << "UDPPort::" << __func__ << "() Read " << receivedBytes << " bytes" << endl;
+ {
+#if defined (WIN32)
+ // This will probably go boom and print a weird source IP if IPv6 is used on Windows,
+ // but since there's no inet_ntop() on Windows, we have no choice but to use inet_ntoa().
+ cerr << "UDPPort::" << __func__ << "() Read " << receivedBytes << " bytes from " <<
+ inet_ntoa (reinterpret_cast<struct sockaddr_in*>(&from)->sin_addr) << endl;
+#else
+ char s[INET6_ADDRSTRLEN];
+ cerr << "UDPPort::" << __func__ << "() Read " << receivedBytes << " bytes from " <<
+ inet_ntop (from.ss_family, GetInAddr (reinterpret_cast<struct sockaddr*> (&from)),
+ s, sizeof (s))
+ << endl;
+#endif
+ }
if (receivedBytes < 0)
{
@@ -261,11 +306,11 @@
while (receivedBytes < count)
{
#if defined (WIN32)
- numReceived = recv (_recvSock, &(reinterpret_cast<char*> (buffer)[receivedBytes]),
- count - receivedBytes, 0); // No MSG_WAITALL on older versions of visual c, it seems
+ numReceived = recvfrom (_recvSock, &(reinterpret_cast<char*> (buffer)[receivedBytes]),
+ count - receivedBytes, 0, NULL, 0); // No MSG_WAITALL on older versions of visual c, it seems
#else
- numReceived = recv (_recvSock, &(reinterpret_cast<char*> (buffer)[receivedBytes]),
- count - receivedBytes, MSG_WAITALL);
+ numReceived = recvfrom (_recvSock, &(reinterpret_cast<char*> (buffer)[receivedBytes]),
+ count - receivedBytes, MSG_WAITALL, NULL, 0);
#endif
if (_debug >= 2)
cerr << "UDPPort::" << __func__ << "() Received " << numReceived << " bytes" << endl;
@@ -491,9 +536,11 @@
}
}
#if defined (WIN32)
- if ((numSent = send (_sendSock, reinterpret_cast<const char*> (buffer), count, 0)) < 0)
+ if ((numSent = sendto (_sendSock, reinterpret_cast<const char*> (buffer), count, 0,
+ reinterpret_cast<struct sockaddr*> (&_destSockAddr), sizeof (_destSockAddr))) < 0)
#else
- if ((numSent = send (_sendSock, buffer, count, 0)) < 0)
+ if ((numSent = sendto (_sendSock, buffer, count, 0,
+ reinterpret_cast<struct sockaddr*> (&_destSockAddr), sizeof (_destSockAddr))) < 0)
#endif
{
if (ErrNo () == ERRNO_EAGAIN)
@@ -533,9 +580,9 @@
#if defined (WIN32)
if (!IsDataAvailable ())
break;
- numRead = recv (_sendSock, dump, 128, 0);
+ numRead = recvfrom (_sendSock, dump, 128, 0, NULL, 0);
#else
- numRead = recv (_sendSock, dump, 128, MSG_DONTWAIT);
+ numRead = recvfrom (_sendSock, dump, 128, MSG_DONTWAIT, NULL, 0);
#endif
if (numRead < 0 && ErrNo () != ERRNO_EAGAIN)
{
@@ -553,7 +600,7 @@
{
// Since we can't force the write buffer to send, we can't do anything here.
if (_debug >= 1)
- cerr << "UDPPort::" << __func__ << "() Can't drain output buffer of TCP port." << endl;
+ cerr << "UDPPort::" << __func__ << "() Can't drain output buffer of UDP port." << endl;
}
////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -689,24 +736,18 @@
if (_debug >= 1)
{
- cerr << "UDPPort::" << __func__ << "() Connecting to " << _destIP << ":" << _destPort <<
- "." << endl;
+ cerr << "UDPPort::" << __func__ << "() Socket created, will send to " << _destIP << ":" <<
+ _destPort << "." << endl;
}
- if (connect (_sendSock, res->ai_addr, res->ai_addrlen) < 0)
- {
- CloseSender ();
- stringstream ss;
- ss << "Failed to connect to " << _destIP << ": (" << ErrNo () << ") " << StrError (ErrNo ());
- throw PortException (ss.str ());
- }
+ memcpy (&_destSockAddr, res, sizeof (*res));
freeaddrinfo (res);
#else // defined (FLEXIPORT_HAVE_GETADDRINFO)
// Do it the ugly old way.
sockaddr_in sockAddr;
memset (&sockAddr, 0, sizeof (sockAddr));
- _sendSock = socket (PF_INET, SOCK_DGRAM, 0);
+ _sendSock = socket (AF_UNSPEC, SOCK_DGRAM, IPPROTO_UDP);
#if defined (WIN32)
if (_sendSock == INVALID_SOCKET)
#else
@@ -730,14 +771,11 @@
sockAddr.sin_port = htons (_destPort);
if (_debug >= 1)
- cerr << "UDPPort::" << __func__ << "() Connecting to " << _destIP << ":" << _destPort << "." << endl;
- if (connect (_sendSock, reinterpret_cast<struct sockaddr*> (&sockAddr), sizeof (sockAddr)) < 0)
{
- CloseSender ();
- stringstream ss;
- ss << "Failed to connect to " << _destIP << ": (" << ErrNo () << ") " << StrError (ErrNo ());
- throw PortException (ss.str ());
+ cerr << "UDPPort::" << __func__ << "() Socket created, will send to " << _destIP << ":" <<
+ _destPort << "." << endl;
}
+ memcpy (&_destSockAddr, &sockAddr, sizeof (sockAddr));
#endif // defined (FLEXIPORT_HAVE_GETADDRINFO)
}
@@ -834,7 +872,7 @@
char hostName[HOST_NAME_MAX + 1] = {'\0'};
struct hostent *hp = NULL;
- _recvSock = socket (PF_INET, SOCK_STREAM, IPPROTO_TCP);
+ _recvSock = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP);
#if defined (WIN32)
if (_recvSock == INVALID_SOCKET)
#else
@@ -966,14 +1004,14 @@
char buffer;
ssize_t receivedBytes = 0;
#if defined (WIN32)
- receivedBytes = recv (_recvSock, &buffer, 1, MSG_PEEK);
+ receivedBytes = recvfrom (_recvSock, &buffer, 1, MSG_PEEK, NULL, 0);
#else
- receivedBytes = recv (_recvSock, reinterpret_cast<void*> (&buffer), 1, MSG_PEEK);
+ receivedBytes = recvfrom (_recvSock, reinterpret_cast<void*> (&buffer), 1, MSG_PEEK, NULL, 0);
#endif
if (receivedBytes > 0)
{
if (_debug >= 3)
- cerr << "TCPPort::" << __func__ << "() Found data waiting." << endl;
+ cerr << "UDPPort::" << __func__ << "() Found data waiting." << endl;
return DATA_AVAILABLE;
}
else if (receivedBytes < 0)
@@ -982,7 +1020,7 @@
{
// General error
stringstream ss;
- ss << "TCPPort::" << __func__ << "() recv() error: (" << ErrNo () << ") " <<
+ ss << "UDPPort::" << __func__ << "() recv() error: (" << ErrNo () << ") " <<
StrError (ErrNo ());
throw PortException (ss.str ());
}
@@ -992,18 +1030,18 @@
{
// Peer disconnected cleanly, do the same at this end
if (_debug >= 1)
- cerr << "TCPPort::" << __func__ << "() Peer disconnected cleanly." << endl;
+ cerr << "UDPPort::" << __func__ << "() Peer disconnected cleanly." << endl;
Close ();
if (_alwaysOpen)
{
if (_debug >= 1)
- cerr << "TCPPort::" << __func__ << "() Trying to reconnect." << endl;
+ cerr << "UDPPort::" << __func__ << "() Trying to reconnect." << endl;
Open ();
}
// Fall through to return no data
}
if (_debug >= 3)
- cerr << "TCPPort::" << __func__ << "() Found no data waiting." << endl;
+ cerr << "UDPPort::" << __func__ << "() Found no data waiting." << endl;
return false;
}
Modified: gearbox/trunk/src/flexiport/udpport.h
===================================================================
--- gearbox/trunk/src/flexiport/udpport.h 2009-06-10 06:45:09 UTC (rev 420)
+++ gearbox/trunk/src/flexiport/udpport.h 2009-06-12 12:18:44 UTC (rev 421)
@@ -29,6 +29,7 @@
#define __UDPPORT_H
#include "port.h"
+#include "flexiport_config.h"
#include <map>
#include <string>
@@ -117,6 +118,13 @@
bool IsOpen () const { return _open; }
private:
+#if !defined (WIN32)
+ #if defined (FLEXIPORT_HAVE_GETADDRINFO)
+ struct sockaddr _destSockAddr;
+ #else
+ struct sockaddr_in _destSockAddr;
+ #endif
+#endif // !defined (WIN32)
int _sendSock; // Socket to send data from.
int _recvSock; // Socket to receive data on.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-06-12 13:03:34
|
Revision: 422
http://gearbox.svn.sourceforge.net/gearbox/?rev=422&view=rev
Author: gbiggs
Date: 2009-06-12 12:19:14 +0000 (Fri, 12 Jun 2009)
Log Message:
-----------
Removed -Wall on Windows. See comment in the file as to why.
Modified Paths:
--------------
gearbox/trunk/cmake/UseBasicRules.cmake
Modified: gearbox/trunk/cmake/UseBasicRules.cmake
===================================================================
--- gearbox/trunk/cmake/UseBasicRules.cmake 2009-06-12 12:18:44 UTC (rev 421)
+++ gearbox/trunk/cmake/UseBasicRules.cmake 2009-06-12 12:19:14 UTC (rev 422)
@@ -24,5 +24,8 @@
#
# add_definitions( "-Wall -Wconversion" )
else( NOT GBX_OS_WIN )
- add_definitions( "-Wall -D_CRT_SECURE_NO_DEPRECATE" )
+ # With Visual C++, -Wall causes the compiler to spew thousands upon
+ # thousands (I'm not kidding here) of warnings in the standard lib
+ # headers that are supplied with the compiler. Woo.
+ add_definitions( "-D_CRT_SECURE_NO_DEPRECATE" )
endif( NOT GBX_OS_WIN )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2009-06-10 06:46:14
|
Revision: 420
http://gearbox.svn.sourceforge.net/gearbox/?rev=420&view=rev
Author: russo2503v
Date: 2009-06-10 06:45:09 +0000 (Wed, 10 Jun 2009)
Log Message:
-----------
removed obsolete commented out stuff
Modified Paths:
--------------
gearbox/trunk/cmake/DependencyUtils.cmake
Modified: gearbox/trunk/cmake/DependencyUtils.cmake
===================================================================
--- gearbox/trunk/cmake/DependencyUtils.cmake 2009-06-10 06:44:20 UTC (rev 419)
+++ gearbox/trunk/cmake/DependencyUtils.cmake 2009-06-10 06:45:09 UTC (rev 420)
@@ -37,21 +37,6 @@
endmacro( GBX_UTIL_MAKE_OPTION_NAME option_name module_name )
#
-# This is a utility macro for internal use.
-# (there's another copy of this simple macro in TargetUtils.cmake)
-#
-# macro( GBX_UTIL_MAKE_MANIFEST_NAME manifest_name module_name )
-# # message( STATUS "GBX_UTIL_MAKE_MANIFEST_NAME [ manifest_name=${manifest_name}, MOD_NAME=${module_name} ]" )
-#
-# string( TOUPPER ${module_name} module_name_upper )
-# # dereference the variable name once, so that we are setting the variable in the calling context!
-# set( ${manifest_name} ${module_name_upper}_INSTALLED )
-#
-# # message( STATUS "GBX_UTIL_MAKE_MANIFEST_NAME output: manifest_name=${${manifest_name}}" )
-# endmacro( GBX_UTIL_MAKE_MANIFEST_NAME manifest_name module_name )
-
-
-#
# GBX_REQUIRE_OPTION( cumulative_var [EXE | LIB] module_name default_option_value [option_name] [OPTION DESCRIPTION] )
#
# E.g.
@@ -137,56 +122,7 @@
endmacro( GBX_REQUIRE_VAR cumulative_var module_type module_name test_var reason )
-# OBSOLETE! CONVERTED FROM HOME-MADE MANIFESTS TO FIND_PACKAGE()
#
-# GBX_REQUIRE_install( cumulative_var [EXE | LIB] module_name installed_module [reason] )
-#
-# A special case of REQUIRE_VAR. Checks whether a manifest variable is defined
-# for the module with a name "installed_module".
-# E.g.
-# Initialize a variable first
-# set( build TRUE )
-# Now test the variable value
-# REQUIRE_install( build LIB HydroStuff GbxStuff )
-# will check if GBXSTUFF_INSTALLED is defined.
-# This example is equivalent to
-# REQUIRE_VAR( build LIB HydroStuff GBXSTUFF_INSTALLED "GbxStuff was not installed" )
-#
-# macro( GBX_REQUIRE_INSTALL cumulative_var module_type module_name installed_module )
-#
-# # debug
-# # message( STATUS "GBX_REQUIRE_INSTALL [ CUM_VAR=${cumulative_var}, MOD_TYPE=${module_type}, MOD_NAME=${module_name}, installed_module=${installed_module} ]" )
-#
-# GBX_UTIL_MAKE_MANIFEST_NAME( test_var ${installed_module} )
-#
-# if( ${ARGC} GREATER 5 )
-# set( reason ${ARGV6} )
-# else( ${ARGC} GREATER 5 )
-# set( reason "${installed_module} was not installed" )
-# endif( ${ARGC} GREATER 5 )
-#
-# # must dereference both var names once (!)
-# GBX_REQUIRE_VAR( ${cumulative_var} ${module_type} ${module_name} ${test_var} ${reason} )
-#
-# endmacro( GBX_REQUIRE_INSTALL cumulative_var module_type module_name installed_module )
-
-# OBSOLETE! CONVERTED FROM HOME-MADE MANIFESTS TO FIND_PACKAGE()
-#
-# GBX_REQUIRE_INSTALLS( cumulative_var [EXE | LIB] module_name target0 [targe1 target2 ...] )
-#
-# macro( GBX_REQUIRE_INSTALLS cumulative_var module_type module_name )
-#
-# if( ${ARGC} LESS 4 )
-# message( FATAL_ERROR "GBX_REQUIRE_INSTALLS macro needs to at least one target name (${ARGC} params were given)." )
-# endif( ${ARGC} LESS 4 )
-#
-# foreach( trgt ${ARGN} )
-# GBX_REQUIRE_install( ${cumulative_var} ${module_type} ${module_name} ${trgt} )
-# endforeach( trgt ${ARGN} )
-#
-# endmacro( GBX_REQUIRE_INSTALLS cumulative_var module_type module_name )
-
-#
# GBX_REQUIRE_LIB( cumulative_var [EXE | LIB] module_name target_name [reason] )
#
# Despite the name, this macro can enforce dependence on any target, not just a library.
@@ -217,13 +153,10 @@
if( NOT target_location )
set( ${cumulative_var} FALSE )
GBX_UTIL_MAKE_OPTION_NAME( option_name ${module_type} ${module_name} )
- # alexm: disabling dependency caching
if( is_exe )
GBX_NOT_ADD_EXECUTABLE( ${module_name} ${reason} )
-# set( ${option_name} OFF CACHE BOOL "Try to build ${module_name}" FORCE )
else( is_exe )
GBX_NOT_add_library( ${module_name} ${reason} )
-# set( ${option_name} OFF CACHE BOOL "Try to build lib${module_name} library" FORCE )
endif( is_exe )
endif( NOT target_location )
@@ -250,75 +183,7 @@
endmacro( GBX_REQUIRE_LIBS cumulative_var module_type module_name )
-# OBSOLETE! Use GBX_REQUIRE_LIB instead.
#
-# GBX_REQUIRE_LIB( cumulative_var [EXE | LIB] module_name depend_name [reason] )
-#
-# This is a convenience macro which combines the functionality of GBX_REQUIRE_INSTALL and GBX_REQUIRE_LIB.
-# It can be used to require executables despite the name.
-#
-# First checks if a target called ${depend_name} exists, i.e. a library or executable with this name
-# is part of the same project and is enabled. If it exists, sets ${cumulative_var} to TRUE and exits.
-#
-# Otherwise, checks if a library or executable called ${depend_name} is installed, i.e. a manifest
-# variable is defined.
-#
-# E.g.
-# Initialize a variable first
-# set( build TRUE )
-# Now set up and test option value
-# GBX_REQUIRE_LIB ( build EXE localiser HydroStuff )
-# GBX_REQUIRE_LIB ( build LIB MyStuff HydroStuff )
-#
-# macro( GBX_REQUIRE_LIB cumulative_var module_type module_name depend_name )
-# # message( STATUS "GBX_REQUIRE_LIB [ CUM_VAR=${${cumulative_var}}, MOD_TYPE=${module_type}, MOD_NAME=${module_name}, depend_name=${depend_name} ]" )
-#
-# if( ${cumulative_var} )
-#
-# GBX_UTIL_CHECK_MODULE_TYPE( ${module_type} is_exe is_lib )
-#
-# if( ${ARGC} GREATER 5 )
-# set( reason ${ARGV6} )
-# else( ${ARGC} GREATER 5 )
-# set( reason "${depend_name} is not being built and was not installed" )
-# endif( ${ARGC} GREATER 5 )
-#
-# # first, look for a target
-# GET_TARGET_PROPERTY( target_location ${depend_name} LOCATION )
-#
-# # must dereference both var and option names once (!) and IF will evaluate their values
-# if( NOT target_location )
-#
-# # target not found, look for an install
-# GBX_UTIL_MAKE_MANIFEST_NAME( test_var ${depend_name} )
-#
-# # must dereference both var names once (!)
-# GBX_REQUIRE_VAR( ${cumulative_var} ${module_type} ${module_name} ${test_var} ${reason} )
-#
-# endif( NOT target_location )
-#
-# endif( ${cumulative_var} )
-#
-# endmacro( GBX_REQUIRE_LIB cumulative_var module_type module_name target_name )
-
-# OBSOLETE! Use GBX_REQUIRE_LIBS instead.
-#
-# GBX_REQUIRE_LIBS( cumulative_var [EXE | LIB] module_name LIB0 [LIB1 LIB2 ...] )
-#
-# macro( GBX_REQUIRE_LIBS cumulative_var module_type module_name )
-# # message( STATUS "GBX_REQUIRE_LIBS [ CUM_VAR=${${cumulative_var}}, MOD_TYPE=${module_type}, MOD_NAME=${module_name}, target_names=${ARGN} ]" )
-#
-# if( ${ARGC} LESS 4 )
-# message( FATAL_ERROR "GBX_REQUIRE_LIBS macro needs to at least one library name (${ARGC} params were given)." )
-# endif( ${ARGC} LESS 4 )
-#
-# foreach( lib ${ARGN} )
-# GBX_REQUIRE_LIB( ${cumulative_var} ${module_type} ${module_name} ${lib} )
-# endforeach( lib ${ARGN} )
-#
-# endmacro( GBX_REQUIRE_LIBS cumulative_var module_type module_name )
-
-#
# This is a utility macro for internal use.
#
macro( GBX_WRITE_OPTIONS )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2009-06-10 06:45:05
|
Revision: 419
http://gearbox.svn.sourceforge.net/gearbox/?rev=419&view=rev
Author: russo2503v
Date: 2009-06-10 06:44:20 +0000 (Wed, 10 Jun 2009)
Log Message:
-----------
debug statements and formatting
Modified Paths:
--------------
gearbox/trunk/cmake/TargetUtils.cmake
Modified: gearbox/trunk/cmake/TargetUtils.cmake
===================================================================
--- gearbox/trunk/cmake/TargetUtils.cmake 2009-06-08 23:11:52 UTC (rev 418)
+++ gearbox/trunk/cmake/TargetUtils.cmake 2009-06-10 06:44:20 UTC (rev 419)
@@ -69,12 +69,15 @@
if( ${type} STREQUAL SHARED )
set( libType SHARED )
- ELSEIF( ${type} STREQUAL STATIC )
+ elseif( ${type} STREQUAL STATIC )
set( libType STATIC )
else( ${type} STREQUAL SHARED )
set( libType ${GBX_DEFAULT_LIB_TYPE} )
endif( ${type} STREQUAL SHARED )
+# message( STATUS "DEBUG: adding library '${name}' of type '${type}' (resolved to '${libType}') with version '${soversion}'" )
+# message( STATUS "DEBUG: from source files: ${ARGN}" )
+
add_library( ${name} ${libType} ${ARGN} )
SET_TARGET_PROPERTIES( ${name} PROPERTIES
VERSION ${soversion}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-06-08 23:11:55
|
Revision: 418
http://gearbox.svn.sourceforge.net/gearbox/?rev=418&view=rev
Author: gbiggs
Date: 2009-06-08 23:11:52 +0000 (Mon, 08 Jun 2009)
Log Message:
-----------
Added includes necessary to keep GCC 4.4 happy
Modified Paths:
--------------
gearbox/trunk/src/gbxgarminacfr/driver.cpp
gearbox/trunk/src/gbxnovatelacfr/driver.cpp
gearbox/trunk/src/gbxnovatelacfr/gbxnovatelutilacfr/novatelmessages.h
gearbox/trunk/src/gbxnovatelacfr/gbxnovatelutilacfr/test/crc32test.cpp
gearbox/trunk/src/gbxserialacfr/lockfile/lockfile.cpp
gearbox/trunk/src/gbxsmartbatteryacfr/smartbattery.h
gearbox/trunk/src/gbxsmartbatteryacfr/smartbatteryparsing.h
gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
gearbox/trunk/src/hokuyo_aist/test/example.cpp
Modified: gearbox/trunk/src/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/driver.cpp 2009-06-08 07:48:51 UTC (rev 417)
+++ gearbox/trunk/src/gbxgarminacfr/driver.cpp 2009-06-08 23:11:52 UTC (rev 418)
@@ -18,6 +18,7 @@
#include <sys/time.h>
#include <time.h>
#include <errno.h>
+#include <stdio.h>
#include "driver.h"
Modified: gearbox/trunk/src/gbxnovatelacfr/driver.cpp
===================================================================
--- gearbox/trunk/src/gbxnovatelacfr/driver.cpp 2009-06-08 07:48:51 UTC (rev 417)
+++ gearbox/trunk/src/gbxnovatelacfr/driver.cpp 2009-06-08 23:11:52 UTC (rev 418)
@@ -31,6 +31,7 @@
#include <math.h>
#include <errno.h>
#include <limits.h>
+#include <stdio.h>
#include <sys/time.h>
#include <time.h>
Modified: gearbox/trunk/src/gbxnovatelacfr/gbxnovatelutilacfr/novatelmessages.h
===================================================================
--- gearbox/trunk/src/gbxnovatelacfr/gbxnovatelutilacfr/novatelmessages.h 2009-06-08 07:48:51 UTC (rev 417)
+++ gearbox/trunk/src/gbxnovatelacfr/gbxnovatelutilacfr/novatelmessages.h 2009-06-08 23:11:52 UTC (rev 418)
@@ -9,6 +9,9 @@
*/
#ifndef GBX_NOVATEL_MESSAGES_H
#define GBX_NOVATEL_MESSAGES_H
+
+#include <stdint.h> // for uint8_t and friends
+
namespace gbxnovatelutilacfr{
enum BinaryLogType{
RawImuSBLogType = 325,
Modified: gearbox/trunk/src/gbxnovatelacfr/gbxnovatelutilacfr/test/crc32test.cpp
===================================================================
--- gearbox/trunk/src/gbxnovatelacfr/gbxnovatelutilacfr/test/crc32test.cpp 2009-06-08 07:48:51 UTC (rev 417)
+++ gearbox/trunk/src/gbxnovatelacfr/gbxnovatelutilacfr/test/crc32test.cpp 2009-06-08 23:11:52 UTC (rev 418)
@@ -15,6 +15,7 @@
#include <sys/time.h>
#include <time.h>
#include <string.h>
+#include <stdio.h>
#include <gbxnovatelacfr/gbxnovatelutilacfr/crc32.h>
using namespace std;
Modified: gearbox/trunk/src/gbxserialacfr/lockfile/lockfile.cpp
===================================================================
--- gearbox/trunk/src/gbxserialacfr/lockfile/lockfile.cpp 2009-06-08 07:48:51 UTC (rev 417)
+++ gearbox/trunk/src/gbxserialacfr/lockfile/lockfile.cpp 2009-06-08 23:11:52 UTC (rev 418)
@@ -16,6 +16,7 @@
#include <errno.h>
#include <sstream>
#include <libgen.h>
+#include <stdio.h>
using namespace std;
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/smartbattery.h
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/smartbattery.h 2009-06-08 07:48:51 UTC (rev 417)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/smartbattery.h 2009-06-08 23:11:52 UTC (rev 418)
@@ -11,6 +11,8 @@
#ifndef GBX_SMARTBATTERY_H
#define GBX_SMARTBATTERY_H
+#include <stdint.h>
+
#include <vector>
#include <string>
#include <assert.h>
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/smartbatteryparsing.h
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/smartbatteryparsing.h 2009-06-08 07:48:51 UTC (rev 417)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/smartbatteryparsing.h 2009-06-08 23:11:52 UTC (rev 418)
@@ -11,6 +11,8 @@
#ifndef GBX_SMARTBATTERY_PARSING_H
#define GBX_SMARTBATTERY_PARSING_H
+#include <stdint.h>
+
#include <vector>
#include <map>
Modified: gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2009-06-08 07:48:51 UTC (rev 417)
+++ gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2009-06-08 23:11:52 UTC (rev 418)
@@ -35,6 +35,7 @@
#include <cstring>
#include <stdarg.h>
#include <stdlib.h>
+#include <stdio.h>
#include <errno.h>
#include <math.h>
#include <sstream>
Modified: gearbox/trunk/src/hokuyo_aist/test/example.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/test/example.cpp 2009-06-08 07:48:51 UTC (rev 417)
+++ gearbox/trunk/src/hokuyo_aist/test/example.cpp 2009-06-08 23:11:52 UTC (rev 418)
@@ -25,6 +25,7 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
+#include <stdio.h>
#include <math.h>
#include <iostream>
using namespace std;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-06-08 07:49:01
|
Revision: 417
http://gearbox.svn.sourceforge.net/gearbox/?rev=417&view=rev
Author: gbiggs
Date: 2009-06-08 07:48:51 +0000 (Mon, 08 Jun 2009)
Log Message:
-----------
Fixed bug #2802501: All libraries now have their own individual API versions which can be incremented independently of the Gearbox version. Libraries all start at 1.0.0.
Modified Paths:
--------------
gearbox/trunk/cmake/TargetUtils.cmake
gearbox/trunk/cmake/pkgconfig.in
gearbox/trunk/src/basicexample/CMakeLists.txt
gearbox/trunk/src/flexiport/CMakeLists.txt
gearbox/trunk/src/gbxadvancedexample/CMakeLists.txt
gearbox/trunk/src/gbxgarminacfr/CMakeLists.txt
gearbox/trunk/src/gbxnovatelacfr/CMakeLists.txt
gearbox/trunk/src/gbxnovatelacfr/gbxnovatelutilacfr/CMakeLists.txt
gearbox/trunk/src/gbxserialacfr/CMakeLists.txt
gearbox/trunk/src/gbxserialacfr/lockfile/CMakeLists.txt
gearbox/trunk/src/gbxsickacfr/CMakeLists.txt
gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/CMakeLists.txt
gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/CMakeLists.txt
gearbox/trunk/src/gbxsmartbatteryacfr/CMakeLists.txt
gearbox/trunk/src/gbxutilacfr/CMakeLists.txt
gearbox/trunk/src/hokuyo_aist/CMakeLists.txt
Modified: gearbox/trunk/cmake/TargetUtils.cmake
===================================================================
--- gearbox/trunk/cmake/TargetUtils.cmake 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/cmake/TargetUtils.cmake 2009-06-08 07:48:51 UTC (rev 417)
@@ -57,9 +57,12 @@
# The second parameter specifies the library type to build: SHARED, STATIC, or DEFAULT.
# If the default is used, the library type will depend on the gearbox-wide value as set
# by the user (or SHARED if the user hasn't changed it from the original setting).
+# The soversion parameter sets the library's API version. This will typically be
+# distinct from the Gearbox distribution version, as each library will change its
+# API independently.
# All extra parameters are passed to ADD_LIBRARY as source files.
#
-macro( GBX_ADD_LIBRARY name type )
+macro( GBX_ADD_LIBRARY name type soversion )
if( COMMAND cmake_policy )
cmake_policy( SET CMP0003 NEW )
endif( COMMAND cmake_policy )
@@ -73,7 +76,9 @@
endif( ${type} STREQUAL SHARED )
add_library( ${name} ${libType} ${ARGN} )
-# SET_TARGET_PROPERTIES( ${name} PROPERTIES
+ SET_TARGET_PROPERTIES( ${name} PROPERTIES
+ VERSION ${soversion}
+ SOVERSION ${soversion} )
# INSTALL_RPATH "${INSTALL_RPATH};${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}"
# BUILD_WITH_INSTALL_RPATH TRUE )
install( TARGETS ${name}
@@ -81,7 +86,7 @@
EXPORT ${PROJECT_NAME}-targets )
set( templist ${LIB_LIST} )
- list( APPEND templist ${name} )
+ list( APPEND templist ${name}-${soversion} )
set( LIB_LIST ${templist} CACHE INTERNAL "Global list of libraries to build" FORCE )
if( libType STREQUAL SHARED )
@@ -89,7 +94,7 @@
else( libType STREQUAL SHARED )
set( libTypeDesc "static" )
endif( libType STREQUAL SHARED )
- message( STATUS "Planning to build ${libTypeDesc} library: ${name}" )
+ message( STATUS "Planning to build ${libTypeDesc} library: ${name}-${soversion}" )
endmacro( GBX_ADD_LIBRARY name )
#
@@ -140,15 +145,17 @@
# int_deps is a list containing all the internal libraries this library depends on (pass by reference).
# cflags is appended to the "Cflags" value.
# libflags is appended to the "Libs" value.
+# version is the soversion of the library.
# that should be linked with at the same time as linking to this library.
#
-macro( GBX_ADD_PKGCONFIG name desc ext_deps int_deps cflags libflags )
+macro( GBX_ADD_PKGCONFIG name desc ext_deps int_deps cflags libflags version )
set( PKG_NAME ${name} )
set( PKG_DESC ${desc} )
set( PKG_CFLAGS ${cflags} )
set( PKG_LIBFLAGS ${libflags} )
set( PKG_EXTERNAL_DEPS ${${ext_deps}} )
set( PKG_INTERNAL_DEPS "" )
+ set( PKG_VERSION ${version} )
if( ${int_deps} )
foreach( item ${${int_deps}} )
set( PKG_INTERNAL_DEPS "${PKG_INTERNAL_DEPS} -l${item}" )
Modified: gearbox/trunk/cmake/pkgconfig.in
===================================================================
--- gearbox/trunk/cmake/pkgconfig.in 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/cmake/pkgconfig.in 2009-06-08 07:48:51 UTC (rev 417)
@@ -2,7 +2,7 @@
Name: @PKG_NAME@
Description: @PKG_DESC@
-Version: @GBX_PROJECT_VERSION@
+Version: @PKG_VERSION@
Requires: @PKG_EXTERNAL_DEPS@
Libs: -L@CMAKE_INSTALL_PREFIX@/lib/gearbox @PKG_LIBFLAGS@ -l@PKG_NAME@ @PKG_INTERNAL_DEPS@
-Cflags: -I@CMAKE_INSTALL_PREFIX@/include/gearbox @PKG_CFLAGS@
\ No newline at end of file
+Cflags: -I@CMAKE_INSTALL_PREFIX@/include/gearbox @PKG_CFLAGS@
Modified: gearbox/trunk/src/basicexample/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/basicexample/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/basicexample/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,4 +1,5 @@
set( lib_name basicexample )
+set( libVersion 1.0.0 )
GBX_ADD_LICENSE( LGPL )
set( build TRUE )
@@ -11,7 +12,7 @@
file( GLOB hdrs *.h )
file( GLOB srcs *.cpp )
- GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${srcs} )
+ GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${libVersion} ${srcs} )
GBX_ADD_HEADERS( basicexample ${hdrs} )
# the custom command above is equivalent to this
Modified: gearbox/trunk/src/flexiport/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/flexiport/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/flexiport/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,69 +1,71 @@
-SET (libName flexiport)
+set (libName flexiport)
+set (libDesc "FlexiPort generic comms library")
+set (libVersion 1.0.0)
GBX_ADD_LICENSE (LGPL)
-SET (build TRUE)
+set (build TRUE)
GBX_REQUIRE_OPTION (build LIB ${libName} ON)
-if(build)
- INCLUDE (${GBX_CMAKE_DIR}/UseBasicRules.cmake)
+if (build)
+ include (${GBX_CMAKE_DIR}/UseBasicRules.cmake)
- OPTION (FLEXIPORT_INCLUDE_SERIAL "Include the serial port in FlexiPort" ON)
- OPTION (FLEXIPORT_INCLUDE_TCP "Include the TCP network port in FlexiPort" ON)
- OPTION (FLEXIPORT_INCLUDE_UDP "Include the UDP network port in FlexiPort" ON)
- OPTION (FLEXIPORT_INCLUDE_LOGGING "Include the log reader/writer ports in FlexiPort" ON)
- MARK_AS_ADVANCED (FLEXIPORT_INCLUDE_SERIAL FLEXIPORT_INCLUDE_TCP FLEXIPORT_INCLUDE_UDP)
+ option (FLEXIPORT_INCLUDE_SERIAL "Include the serial port in FlexiPort" ON)
+ option (FLEXIPORT_INCLUDE_TCP "Include the TCP network port in FlexiPort" ON)
+ option (FLEXIPORT_INCLUDE_UDP "Include the UDP network port in FlexiPort" ON)
+ option (FLEXIPORT_INCLUDE_LOGGING "Include the log reader/writer ports in FlexiPort" ON)
+ mark_as_advanced (FLEXIPORT_INCLUDE_SERIAL FLEXIPORT_INCLUDE_TCP FLEXIPORT_INCLUDE_UDP)
- if(GBX_OS_QNX)
- SET (CMAKE_REQUIRED_LIBRARIES socket)
- endif(GBX_OS_QNX)
- CHECK_FUNCTION_EXISTS (getaddrinfo FLEXIPORT_HAVE_GETADDRINFO)
- SET (CMAKE_REQUIRED_LIBRARIES)
+ if (GBX_OS_QNX)
+ set (CMAKE_REQUIRED_LIBRARIES socket)
+ endif (GBX_OS_QNX)
+ check_function_exists (getaddrinfo FLEXIPORT_HAVE_GETADDRINFO)
+ set (CMAKE_REQUIRED_LIBRARIES)
- SET (flexiport_config_h_in ${CMAKE_CURRENT_SOURCE_DIR}/flexiport_config.h.in)
- SET (flexiport_config_h ${CMAKE_CURRENT_BINARY_DIR}/flexiport_config.h)
- CONFIGURE_FILE (${flexiport_config_h_in} ${flexiport_config_h})
- INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR})
+ set (flexiport_config_h_in ${CMAKE_CURRENT_SOURCE_DIR}/flexiport_config.h.in)
+ set (flexiport_config_h ${CMAKE_CURRENT_BINARY_DIR}/flexiport_config.h)
+ configure_file (${flexiport_config_h_in} ${flexiport_config_h})
+ include_directories (${CMAKE_CURRENT_BINARY_DIR})
- SET (hdrs flexiport.h port.h timeout.h flexiport_types.h ${flexiport_config_h})
- SET (srcs flexiport.cpp port.cpp timeout.cpp ${flexiport_config_h})
- if(FLEXIPORT_INCLUDE_SERIAL)
- SET (hdrs ${hdrs} serialport.h)
- SET (srcs ${srcs} serialport.cpp)
- endif(FLEXIPORT_INCLUDE_SERIAL)
- if(FLEXIPORT_INCLUDE_TCP)
- SET (hdrs ${hdrs} tcpport.h)
- SET (srcs ${srcs} tcpport.cpp)
- endif(FLEXIPORT_INCLUDE_TCP)
- if(FLEXIPORT_INCLUDE_UDP)
- SET (hdrs ${hdrs} udpport.h)
- SET (srcs ${srcs} udpport.cpp)
- endif(FLEXIPORT_INCLUDE_UDP)
- if(FLEXIPORT_INCLUDE_LOGGING)
- SET (hdrs ${hdrs} logwriterport.h logreaderport.h)
- SET (srcs ${srcs} logwriterport.cpp logreaderport.cpp logfile.cpp)
- endif(FLEXIPORT_INCLUDE_LOGGING)
+ set (hdrs flexiport.h port.h timeout.h flexiport_types.h ${flexiport_config_h})
+ set (srcs flexiport.cpp port.cpp timeout.cpp ${flexiport_config_h})
+ if (FLEXIPORT_INCLUDE_SERIAL)
+ set (hdrs ${hdrs} serialport.h)
+ set (srcs ${srcs} serialport.cpp)
+ endif (FLEXIPORT_INCLUDE_SERIAL)
+ if (FLEXIPORT_INCLUDE_TCP)
+ set (hdrs ${hdrs} tcpport.h)
+ set (srcs ${srcs} tcpport.cpp)
+ endif (FLEXIPORT_INCLUDE_TCP)
+ if (FLEXIPORT_INCLUDE_UDP)
+ set (hdrs ${hdrs} udpport.h)
+ set (srcs ${srcs} udpport.cpp)
+ endif (FLEXIPORT_INCLUDE_UDP)
+ if (FLEXIPORT_INCLUDE_LOGGING)
+ set (hdrs ${hdrs} logwriterport.h logreaderport.h)
+ set (srcs ${srcs} logwriterport.cpp logreaderport.cpp logfile.cpp)
+ endif (FLEXIPORT_INCLUDE_LOGGING)
- if(WIN32)
- if(GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
- ADD_DEFINITIONS (-DFLEXIPORT_EXPORTS)
- else(GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
- ADD_DEFINITIONS (-DFLEXIPORT_STATIC)
- endif(GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
- endif(WIN32)
- GBX_ADD_LIBRARY(${libName} DEFAULT ${srcs})
- GBX_ADD_PKGCONFIG (${libName} "FlexiPort generic comms library" "" "" "" "")
+ if (WIN32)
+ if (GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
+ add_definitions (-DFLEXIPORT_EXPORTS)
+ else (GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
+ add_definitions (-DFLEXIPORT_STATIC)
+ endif (GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
+ endif (WIN32)
+ GBX_ADD_LIBRARY (${libName} DEFAULT ${libVersion} ${srcs})
+ GBX_ADD_PKGCONFIG (${libName} ${libDesc} "" "" "" "" ${libVersion})
GBX_ADD_HEADERS (${libName} ${hdrs})
- if(WIN32)
- TARGET_LINK_LIBRARIES (${libName} Ws2_32)
- endif(WIN32)
+ if (WIN32)
+ target_link_libraries (${libName} Ws2_32)
+ endif (WIN32)
- ADD_SUBDIRECTORY (utils)
- if(GBX_BUILD_TESTS)
- ADD_SUBDIRECTORY (test)
- endif(GBX_BUILD_TESTS)
+ add_subdirectory (utils)
+ if (GBX_BUILD_TESTS)
+ add_subdirectory (test)
+ endif (GBX_BUILD_TESTS)
- OPTION (FLEXIPORT_BUILD_BINDINGS "Build the Python bindings for Flexiport" OFF)
- if(FLEXIPORT_BUILD_BINDINGS)
- ADD_SUBDIRECTORY (python)
- endif(FLEXIPORT_BUILD_BINDINGS)
-endif(build)
+ option (FLEXIPORT_BUILD_BINDINGS "Build the Python bindings for Flexiport" OFF)
+ if (FLEXIPORT_BUILD_BINDINGS)
+ add_subdirectory (python)
+ endif (FLEXIPORT_BUILD_BINDINGS)
+endif (build)
Modified: gearbox/trunk/src/gbxadvancedexample/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxadvancedexample/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/gbxadvancedexample/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,4 +1,5 @@
set( lib_name GbxAdvancedExample )
+set( libVersion 1.0.0 )
GBX_ADD_LICENSE( GPL )
set( build TRUE )
@@ -15,7 +16,7 @@
file( GLOB hdrs *.h )
file( GLOB srcs *.cpp )
- GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${srcs} )
+ GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${libVersion} ${srcs} )
target_link_libraries( ${lib_name} ${dep_libs} )
GBX_ADD_HEADERS( gbxadvancedexample ${hdrs} )
Modified: gearbox/trunk/src/gbxgarminacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxgarminacfr/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/gbxgarminacfr/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,4 +1,5 @@
set( lib_name GbxGarminAcfr )
+set( lib_version 1.0.0 )
GBX_ADD_LICENSE( LGPL )
set( build TRUE )
@@ -15,9 +16,9 @@
file( GLOB hdrs *.h )
file( GLOB srcs *.cpp )
- GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${srcs} )
+ GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${lib_version} ${srcs} )
target_link_libraries( ${lib_name} ${dep_libs} )
- GBX_ADD_PKGCONFIG( ${lib_name} "Garmin GPS driver" "" dep_libs "" "" )
+ GBX_ADD_PKGCONFIG( ${lib_name} "Garmin GPS driver" "" dep_libs "" "" ${lib_version} )
GBX_ADD_HEADERS( gbxgarminacfr ${hdrs} )
Modified: gearbox/trunk/src/gbxnovatelacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxnovatelacfr/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/gbxnovatelacfr/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,4 +1,5 @@
set( lib_name GbxNovatelAcfr )
+set( lib_version 1.0.0 )
GBX_ADD_LICENSE( LGPL )
set( build TRUE )
@@ -19,9 +20,9 @@
file( GLOB hdrs *.h )
file( GLOB srcs *.cpp )
- GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${srcs} )
+ GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${lib_version} ${srcs} )
target_link_libraries( ${lib_name} ${dep_libs} )
- GBX_ADD_PKGCONFIG( ${lib_name} "Drives NOVATEL hardware, directly connected to the computer." proj_libs dep_libs "" "" )
+ GBX_ADD_PKGCONFIG( ${lib_name} "Drives NOVATEL hardware, directly connected to the computer." proj_libs dep_libs "" "" ${lib_version} )
GBX_ADD_HEADERS( gbxnovatelacfr ${hdrs} )
Modified: gearbox/trunk/src/gbxnovatelacfr/gbxnovatelutilacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxnovatelacfr/gbxnovatelutilacfr/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/gbxnovatelacfr/gbxnovatelutilacfr/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,4 +1,5 @@
set( lib_name GbxNovatelUtilAcfr )
+set( lib_version 1.0.0 )
GBX_ADD_LICENSE( LGPL )
set( build TRUE )
@@ -25,7 +26,7 @@
# for config.h
include_directories( ${PROJECT_BINARY_DIR} )
- GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${srcs} )
+ GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${lib_version} ${srcs} )
target_link_libraries( ${lib_name} ${dep_libs} )
GBX_ADD_HEADERS( gbxnovatelacfr/gbxnovatelutilacfr ${hdrs} )
Modified: gearbox/trunk/src/gbxserialacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxserialacfr/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/gbxserialacfr/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,4 +1,5 @@
set( lib_name GbxSerialAcfr )
+set( lib_version 1.0.0 )
GBX_ADD_LICENSE( LGPL )
set( build TRUE )
@@ -21,9 +22,9 @@
file( GLOB hdrs *.h )
file( GLOB srcs *.cpp )
- GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${srcs} )
+ GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${lib_version} ${srcs} )
target_link_libraries( ${lib_name} ${dep_libs} )
- GBX_ADD_PKGCONFIG( ${lib_name} "C++ class wrapping a serial port." "" dep_libs "" "" )
+ GBX_ADD_PKGCONFIG( ${lib_name} "C++ class wrapping a serial port." "" dep_libs "" "" ${lib_version})
GBX_ADD_HEADERS( gbxserialacfr ${hdrs} )
Modified: gearbox/trunk/src/gbxserialacfr/lockfile/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxserialacfr/lockfile/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/gbxserialacfr/lockfile/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,4 +1,5 @@
set( lib_name GbxLockFileAcfr )
+set( lib_version 1.0.0 )
GBX_ADD_LICENSE( LGPL )
set( build TRUE )
@@ -14,7 +15,7 @@
file( GLOB hdrs *.h )
file( GLOB srcs *.cpp )
- GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${srcs} )
+ GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${lib_version} ${srcs} )
target_link_libraries( ${lib_name} ${dep_libs} )
GBX_ADD_HEADERS( gbxserialacfr/lockfile ${hdrs} )
Modified: gearbox/trunk/src/gbxsickacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxsickacfr/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/gbxsickacfr/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,4 +1,5 @@
set( lib_name GbxSickAcfr )
+set( lib_version 1.0.0 )
GBX_ADD_LICENSE( LGPL )
set( build TRUE )
@@ -23,9 +24,9 @@
file( GLOB hdrs *.h )
file( GLOB srcs *.cpp )
- GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${srcs} )
+ GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${lib_version} ${srcs} )
target_link_libraries( ${lib_name} ${dep_libs} )
- GBX_ADD_PKGCONFIG( ${lib_name} "Drives SICK hardware, directly connected to the computer." proj_libs dep_libs "" "" )
+ GBX_ADD_PKGCONFIG( ${lib_name} "Drives SICK hardware, directly connected to the computer." proj_libs dep_libs "" "" ${lib_version} )
GBX_ADD_HEADERS( gbxsickacfr ${hdrs} )
Modified: gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,4 +1,5 @@
set( lib_name GbxIceUtilAcfr )
+set( lib_version 1.0.0 )
GBX_ADD_LICENSE( LGPL )
set( build TRUE )
@@ -23,7 +24,7 @@
# for config.h
include_directories( ${PROJECT_BINARY_DIR} )
- GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${srcs} )
+ GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${lib_version} ${srcs} )
target_link_libraries( ${lib_name} ${dep_libs} )
GBX_ADD_HEADERS( gbxsickacfr/gbxiceutilacfr ${hdrs} )
Modified: gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,4 +1,5 @@
set( lib_name GbxSerialDeviceAcfr )
+set( lib_version 1.0.0 )
GBX_ADD_LICENSE( LGPL )
set( build TRUE )
@@ -17,7 +18,7 @@
file( GLOB hdrs *.h )
file( GLOB srcs *.cpp )
- GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${srcs} )
+ GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${lib_version} ${srcs} )
target_link_libraries( ${lib_name} ${dep_libs} )
GBX_ADD_HEADERS( gbxsickacfr/gbxserialdeviceacfr ${hdrs} )
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,4 +1,5 @@
set( lib_name GbxSmartBatteryAcfr )
+set( lib_version 1.0.0 )
GBX_ADD_LICENSE( LGPL )
set( build TRUE )
@@ -15,9 +16,9 @@
file( GLOB hdrs *.h )
file( GLOB srcs *.cpp )
- GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${srcs} )
+ GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${lib_version} ${srcs} )
target_link_libraries( ${lib_name} ${dep_libs} )
- GBX_ADD_PKGCONFIG( ${lib_name} "Interface library for Ocean Server battery systems" proj_libs dep_libs "" "" )
+ GBX_ADD_PKGCONFIG( ${lib_name} "Interface library for Ocean Server battery systems" proj_libs dep_libs "" "" ${lib_version} )
GBX_ADD_HEADERS( gbxsmartbatteryacfr ${hdrs} )
Modified: gearbox/trunk/src/gbxutilacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxutilacfr/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/gbxutilacfr/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,4 +1,5 @@
set( lib_name GbxUtilAcfr )
+set( lib_version 1.0.0 )
GBX_ADD_LICENSE( LGPL )
set( build TRUE )
@@ -14,7 +15,7 @@
# for config.h
include_directories( ${PROJECT_BINARY_DIR} )
- GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${srcs} )
+ GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${lib_version} ${srcs} )
GBX_ADD_HEADERS( gbxutilacfr ${hdrs} )
Modified: gearbox/trunk/src/hokuyo_aist/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/hokuyo_aist/CMakeLists.txt 2009-06-08 06:36:54 UTC (rev 416)
+++ gearbox/trunk/src/hokuyo_aist/CMakeLists.txt 2009-06-08 07:48:51 UTC (rev 417)
@@ -1,38 +1,39 @@
-SET (libName hokuyo_aist)
+set (libName hokuyo_aist)
set (libDesc "Hokuyo laser scanner driver")
+set (libVersion 1.0.0)
GBX_ADD_LICENSE (LGPL)
-SET (build TRUE)
+set (build TRUE)
GBX_REQUIRE_OPTION (build LIB ${libName} ON)
-SET (reqLibs flexiport)
+set (reqLibs flexiport)
GBX_REQUIRE_LIBS (build LIB ${libName} ${reqLibs})
-if(build)
- INCLUDE (${GBX_CMAKE_DIR}/UseBasicRules.cmake)
+if (build)
+ include (${GBX_CMAKE_DIR}/UseBasicRules.cmake)
- SET (hdrs hokuyo_aist.h)
- SET (srcs hokuyo_aist.cpp)
+ set (hdrs hokuyo_aist.h)
+ set (srcs hokuyo_aist.cpp)
- if(WIN32)
- if(GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
- ADD_DEFINITIONS (-DHOKUYO_AIST_EXPORTS)
- else(GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
- ADD_DEFINITIONS (-DHOKUYO_AIST_STATIC -DFLEXIPORT_STATIC)
- endif(GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
- endif(WIN32)
- GBX_ADD_LIBRARY(${libName} DEFAULT ${srcs})
- TARGET_LINK_LIBRARIES (${libName} ${reqLibs})
- GBX_ADD_PKGCONFIG (${libName} ${libDesc} ${reqLibs} "" "" "")
+ if (WIN32)
+ if (GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
+ add_definitions (-DHOKUYO_AIST_EXPORTS)
+ else (GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
+ add_definitions (-DHOKUYO_AIST_STATIC -DFLEXIPORT_STATIC)
+ endif (GBX_DEFAULT_LIB_TYPE STREQUAL SHARED)
+ endif (WIN32)
+ GBX_ADD_LIBRARY (${libName} DEFAULT ${libVersion} ${srcs})
+ target_link_libraries (${libName} ${reqLibs})
+ GBX_ADD_PKGCONFIG (${libName} ${libDesc} ${reqLibs} "" "" "" ${libVersion})
GBX_ADD_HEADERS (${libName} ${hdrs})
- if(GBX_BUILD_TESTS)
- ADD_SUBDIRECTORY (test)
- endif(GBX_BUILD_TESTS)
+ if (GBX_BUILD_TESTS)
+ add_subdirectory (test)
+ endif (GBX_BUILD_TESTS)
- OPTION (HOKUYO_AIST_BUILD_BINDINGS "Build the Python bindings for Hokuyo_aist" ON)
- if(HOKUYO_AIST_BUILD_BINDINGS)
- ADD_SUBDIRECTORY (python)
- endif(HOKUYO_AIST_BUILD_BINDINGS)
-endif(build)
+ option (HOKUYO_AIST_BUILD_BINDINGS "Build the Python bindings for Hokuyo_aist" ON)
+ if (HOKUYO_AIST_BUILD_BINDINGS)
+ add_subdirectory (python)
+ endif (HOKUYO_AIST_BUILD_BINDINGS)
+endif (build)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-06-08 06:37:10
|
Revision: 416
http://gearbox.svn.sourceforge.net/gearbox/?rev=416&view=rev
Author: gbiggs
Date: 2009-06-08 06:36:54 +0000 (Mon, 08 Jun 2009)
Log Message:
-----------
Include stdio.h where necessary
Modified Paths:
--------------
gearbox/trunk/src/flexiport/logfile.cpp
Modified: gearbox/trunk/src/flexiport/logfile.cpp
===================================================================
--- gearbox/trunk/src/flexiport/logfile.cpp 2009-06-05 02:03:16 UTC (rev 415)
+++ gearbox/trunk/src/flexiport/logfile.cpp 2009-06-08 06:36:54 UTC (rev 416)
@@ -34,6 +34,7 @@
#include <arpa/inet.h>
#include <unistd.h>
#endif
+#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-06-05 03:15:01
|
Revision: 415
http://gearbox.svn.sourceforge.net/gearbox/?rev=415&view=rev
Author: gbiggs
Date: 2009-06-05 02:03:16 +0000 (Fri, 05 Jun 2009)
Log Message:
-----------
Fixed a typo
Modified Paths:
--------------
gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
Modified: gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2009-05-29 06:58:49 UTC (rev 414)
+++ gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2009-06-05 02:03:16 UTC (rev 415)
@@ -528,7 +528,7 @@
ss << "Serial: " << serial << endl;
ss << "Model: " << model << endl;
- ss << "Mininum range: " << minRange << "mm\tMaximum range: " << maxRange << "mm" << endl;
+ ss << "Minimum range: " << minRange << "mm\tMaximum range: " << maxRange << "mm" << endl;
ss << "Steps in 360 degrees: " << steps << "\tScanable steps: " << scanableSteps << endl;
ss << "First step: " << firstStep << "\tFront step: " << frontStep << "\tLast step: " <<
lastStep << endl;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bo...@us...> - 2009-05-29 06:58:59
|
Revision: 414
http://gearbox.svn.sourceforge.net/gearbox/?rev=414&view=rev
Author: borax00
Date: 2009-05-29 06:58:49 +0000 (Fri, 29 May 2009)
Log Message:
-----------
MR Changes
Modified Paths:
--------------
gearbox/trunk/cmake/DependencyUtils.cmake
gearbox/trunk/src/gbxserialacfr/test/serialloopbacktest.cpp
gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/timer.cpp
gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/timer.h
gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverhealthchecks.cpp
gearbox/trunk/src/gbxsmartbatteryacfr/smartbatteryparsing.cpp
gearbox/trunk/src/hokuyo_aist/python/test/CMakeLists.txt
Modified: gearbox/trunk/cmake/DependencyUtils.cmake
===================================================================
--- gearbox/trunk/cmake/DependencyUtils.cmake 2009-05-28 04:17:24 UTC (rev 413)
+++ gearbox/trunk/cmake/DependencyUtils.cmake 2009-05-29 06:58:49 UTC (rev 414)
@@ -216,15 +216,14 @@
# must dereference both var and option names once (!) and IF will evaluate their values
if( NOT target_location )
set( ${cumulative_var} FALSE )
- # force ENABLE_* variables to off in ccmake UI if dependencies aren't met.
GBX_UTIL_MAKE_OPTION_NAME( option_name ${module_type} ${module_name} )
-
+ # alexm: disabling dependency caching
if( is_exe )
GBX_NOT_ADD_EXECUTABLE( ${module_name} ${reason} )
- set( ${option_name} OFF CACHE BOOL "Try to build ${module_name}" FORCE )
+# set( ${option_name} OFF CACHE BOOL "Try to build ${module_name}" FORCE )
else( is_exe )
- GBX_NOT_ADD_LIBRARY( ${module_name} ${reason} )
- set( ${option_name} OFF CACHE BOOL "Try to build lib${module_name} library" FORCE )
+ GBX_NOT_add_library( ${module_name} ${reason} )
+# set( ${option_name} OFF CACHE BOOL "Try to build lib${module_name} library" FORCE )
endif( is_exe )
endif( NOT target_location )
Modified: gearbox/trunk/src/gbxserialacfr/test/serialloopbacktest.cpp
===================================================================
--- gearbox/trunk/src/gbxserialacfr/test/serialloopbacktest.cpp 2009-05-28 04:17:24 UTC (rev 413)
+++ gearbox/trunk/src/gbxserialacfr/test/serialloopbacktest.cpp 2009-05-29 06:58:49 UTC (rev 414)
@@ -41,9 +41,9 @@
gbxserialacfr::Serial serial( argv[1], atoi(argv[2]), gbxserialacfr::Serial::Timeout(1,0) );
- const int NUM_CHARS = 1000;
+ const int NUM_TIMES = 10;
std::vector<std::string> stringList = getStringList();
- for ( int i=0; i < NUM_CHARS; i++ )
+ for ( int i=0; i < NUM_TIMES; i++ )
{
int stringI = i % (stringList.size());
std::string sendString = stringList[stringI]+"\n";
Modified: gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/timer.cpp
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/timer.cpp 2009-05-28 04:17:24 UTC (rev 413)
+++ gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/timer.cpp 2009-05-29 06:58:49 UTC (rev 414)
@@ -13,33 +13,33 @@
namespace gbxiceutilacfr {
Timer::Timer() :
- time_( IceUtil::Time::now() )
+ startTime_( IceUtil::Time::now() )
{
}
Timer::Timer( const IceUtil::Time& elapsedTime ) :
- time_( IceUtil::Time::now()-elapsedTime )
+ startTime_( IceUtil::Time::now()-elapsedTime )
{
}
void Timer::restart()
{
- time_ = IceUtil::Time::now();
+ startTime_ = IceUtil::Time::now();
}
IceUtil::Time Timer::elapsed() const
{
- return IceUtil::Time::now() - time_;
+ return IceUtil::Time::now() - startTime_;
}
double Timer::elapsedMs() const
{
- return ( (IceUtil::Time::now() - time_).toMilliSecondsDouble() );
+ return ( (IceUtil::Time::now() - startTime_).toMilliSecondsDouble() );
}
double Timer::elapsedSec() const
{
- return ( (IceUtil::Time::now() - time_).toSecondsDouble() );
+ return ( (IceUtil::Time::now() - startTime_).toSecondsDouble() );
}
} // namespace
Modified: gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/timer.h
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/timer.h 2009-05-28 04:17:24 UTC (rev 413)
+++ gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/timer.h 2009-05-29 06:58:49 UTC (rev 414)
@@ -51,7 +51,7 @@
double elapsedSec() const;
private:
- IceUtil::Time time_;
+ IceUtil::Time startTime_;
};
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverhealthchecks.cpp
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverhealthchecks.cpp 2009-05-28 04:17:24 UTC (rev 413)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/oceanserverhealthchecks.cpp 2009-05-29 06:58:49 UTC (rev 414)
@@ -99,9 +99,7 @@
int numCycles = bat.cycleCount();
- // There's a bug in the Oceanserver system which sometimes produces an FFFF record for this field.
- // According to Kevin Ludlam (lu...@oc...), "caused by a collision on the SMBus"
- if ( (numCycles > numCyclesThreshhold) && (numCycles!=65535) )
+ if ( numCycles > numCyclesThreshhold )
{
haveWarning = true;
stringstream ssWarnShort;
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/smartbatteryparsing.cpp
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/smartbatteryparsing.cpp 2009-05-28 04:17:24 UTC (rev 413)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/smartbatteryparsing.cpp 2009-05-29 06:58:49 UTC (rev 414)
@@ -47,6 +47,11 @@
{
if (str.size()!=4)
throw ParsingException( ERROR_INFO, "readUnsignedInt16 called with string size != 4" );
+
+ // There's a known bug in the Oceanserver system which sometimes produces an FFFF record
+ // According to Kevin Ludlam (lu...@oc...), "caused by a collision on the SMBus"
+ if (str=="FFFF")
+ throw ParsingException( ERROR_INFO, "Read FFFF as a value. May be caused by a collision on the SMBus" );
return readUnsignedInt( str );
}
@@ -55,6 +60,11 @@
{
if (str.size()!=2)
throw ParsingException( ERROR_INFO, "readUnsignedInt8 called with string size != 2" );
+
+ // There's a known bug in the Oceanserver system which sometimes produces an FF record
+ // According to Kevin Ludlam (lu...@oc...), "caused by a collision on the SMBus"
+ if (str=="FF")
+ throw ParsingException( ERROR_INFO, "Read FF as a value. May be caused by a collision on the SMBus" );
return readUnsignedInt( str );
}
@@ -63,6 +73,11 @@
{
if (str.size()!=4)
throw ParsingException( ERROR_INFO, "readSignedInt16 called with string size != 4" );
+
+ // There's a known bug in the Oceanserver system which sometimes produces an FFFF record
+ // According to Kevin Ludlam (lu...@oc...), "caused by a collision on the SMBus"
+ if (str=="FFFF")
+ throw ParsingException( ERROR_INFO, "Read FFFF as a value. May be caused by a collision on the SMBus" );
stringstream ss(str);
int value;
Modified: gearbox/trunk/src/hokuyo_aist/python/test/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/hokuyo_aist/python/test/CMakeLists.txt 2009-05-28 04:17:24 UTC (rev 413)
+++ gearbox/trunk/src/hokuyo_aist/python/test/CMakeLists.txt 2009-05-29 06:58:49 UTC (rev 414)
@@ -1 +1 @@
-install(FILES hokuyo_aist_example.py DESTINATION share/${PROJECT_NAME}/hokuyo_aist/example)
+GBX_ADD_SHARED_FILES(hokuyo_aist hokuyo_aist_example.py)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-05-28 04:17:41
|
Revision: 413
http://gearbox.svn.sourceforge.net/gearbox/?rev=413&view=rev
Author: gbiggs
Date: 2009-05-28 04:17:24 +0000 (Thu, 28 May 2009)
Log Message:
-----------
Forgot the name...
Modified Paths:
--------------
gearbox/trunk/src/hokuyo_aist/doc.dox
Modified: gearbox/trunk/src/hokuyo_aist/doc.dox
===================================================================
--- gearbox/trunk/src/hokuyo_aist/doc.dox 2009-05-28 04:16:45 UTC (rev 412)
+++ gearbox/trunk/src/hokuyo_aist/doc.dox 2009-05-28 04:17:24 UTC (rev 413)
@@ -9,7 +9,7 @@
This library provides a driver for Hokuyo laser scanner devices using the SCIP protocol version 1 or
2. It has been tested with the Hokuyo URG-04LX, UBG-04LX, UHG-08LX and UTM-30LX but it should work
with any scanner that conforms to these protocol versions, including the URG-04LX-F01,
-the URG-04LX-UG01, and the UXM-30LX (Tough-URG).
+the URG-04LX-UG01 (Simple-URG), and the UXM-30LX (Tough-URG).
For a full list of classes and functions, see @ref hokuyo_aist.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-05-28 04:16:56
|
Revision: 412
http://gearbox.svn.sourceforge.net/gearbox/?rev=412&view=rev
Author: gbiggs
Date: 2009-05-28 04:16:45 +0000 (Thu, 28 May 2009)
Log Message:
-----------
Added new laser models to list of probably supported models.
Modified Paths:
--------------
gearbox/trunk/src/hokuyo_aist/doc.dox
Modified: gearbox/trunk/src/hokuyo_aist/doc.dox
===================================================================
--- gearbox/trunk/src/hokuyo_aist/doc.dox 2009-05-19 23:12:32 UTC (rev 411)
+++ gearbox/trunk/src/hokuyo_aist/doc.dox 2009-05-28 04:16:45 UTC (rev 412)
@@ -8,7 +8,8 @@
This library provides a driver for Hokuyo laser scanner devices using the SCIP protocol version 1 or
2. It has been tested with the Hokuyo URG-04LX, UBG-04LX, UHG-08LX and UTM-30LX but it should work
-with any scanner that conforms to these protocol versions, including the URG-04LX-F01.
+with any scanner that conforms to these protocol versions, including the URG-04LX-F01,
+the URG-04LX-UG01, and the UXM-30LX (Tough-URG).
For a full list of classes and functions, see @ref hokuyo_aist.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-05-19 23:12:48
|
Revision: 411
http://gearbox.svn.sourceforge.net/gearbox/?rev=411&view=rev
Author: gbiggs
Date: 2009-05-19 23:12:32 +0000 (Tue, 19 May 2009)
Log Message:
-----------
Added a pkgconfig file for gbxsmartbatteryacfr
Modified Paths:
--------------
gearbox/trunk/src/gbxsmartbatteryacfr/CMakeLists.txt
Modified: gearbox/trunk/src/gbxsmartbatteryacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxsmartbatteryacfr/CMakeLists.txt 2009-05-19 23:09:18 UTC (rev 410)
+++ gearbox/trunk/src/gbxsmartbatteryacfr/CMakeLists.txt 2009-05-19 23:12:32 UTC (rev 411)
@@ -17,6 +17,7 @@
GBX_ADD_LIBRARY( ${lib_name} DEFAULT ${srcs} )
target_link_libraries( ${lib_name} ${dep_libs} )
+ GBX_ADD_PKGCONFIG( ${lib_name} "Interface library for Ocean Server battery systems" proj_libs dep_libs "" "" )
GBX_ADD_HEADERS( gbxsmartbatteryacfr ${hdrs} )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2009-05-19 23:09:30
|
Revision: 410
http://gearbox.svn.sourceforge.net/gearbox/?rev=410&view=rev
Author: gbiggs
Date: 2009-05-19 23:09:18 +0000 (Tue, 19 May 2009)
Log Message:
-----------
Corrected number of baud rates
Modified Paths:
--------------
gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
Modified: gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp
===================================================================
--- gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2009-05-06 21:01:01 UTC (rev 409)
+++ gearbox/trunk/src/hokuyo_aist/hokuyo_aist.cpp 2009-05-19 23:09:18 UTC (rev 410)
@@ -970,7 +970,7 @@
// Failed at the default baud rate, so try again at the other rates
// Note that a baud rate of 750000 or 250000 doesn't appear to be supported on any common OS
const unsigned int bauds[] = {500000, 115200, 57600, 38400, 19200};
- const unsigned int numBauds = 7;
+ const unsigned int numBauds = 5;
for (unsigned int ii = 0; ii < numBauds; ii++)
{
reinterpret_cast<SerialPort*> (_port)->SetBaudRate (bauds[ii]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2009-05-06 21:01:09
|
Revision: 409
http://gearbox.svn.sourceforge.net/gearbox/?rev=409&view=rev
Author: russo2503v
Date: 2009-05-06 21:01:01 +0000 (Wed, 06 May 2009)
Log Message:
-----------
comments only
Modified Paths:
--------------
gearbox/trunk/cmake/internal/gearbox-config.cmake
Modified: gearbox/trunk/cmake/internal/gearbox-config.cmake
===================================================================
--- gearbox/trunk/cmake/internal/gearbox-config.cmake 2009-05-06 20:48:19 UTC (rev 408)
+++ gearbox/trunk/cmake/internal/gearbox-config.cmake 2009-05-06 21:01:01 UTC (rev 409)
@@ -6,10 +6,12 @@
# this is the installed location of <package>-config.cmake file
get_filename_component( _found_dir "${CMAKE_CURRENT_LIST_FILE}" PATH )
+
+# load all exported Gearbox targets
include( ${_found_dir}/gearbox-targets.cmake )
-# assume that <package>-config.cmake was installed into
-# <install-root>/lib/<package>/
+# assume that gearbox-config.cmake was installed into
+# <install-root>/lib/gearbox/
set( _install_dir "${_found_dir}/../../" )
get_filename_component(
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2009-05-06 20:48:27
|
Revision: 408
http://gearbox.svn.sourceforge.net/gearbox/?rev=408&view=rev
Author: russo2503v
Date: 2009-05-06 20:48:19 +0000 (Wed, 06 May 2009)
Log Message:
-----------
fixed recent bugs with not marking exe and libs properly
Modified Paths:
--------------
gearbox/trunk/cmake/DependencyUtils.cmake
Modified: gearbox/trunk/cmake/DependencyUtils.cmake
===================================================================
--- gearbox/trunk/cmake/DependencyUtils.cmake 2009-05-06 20:39:25 UTC (rev 407)
+++ gearbox/trunk/cmake/DependencyUtils.cmake 2009-05-06 20:48:19 UTC (rev 408)
@@ -2,7 +2,8 @@
# This is a utility macro for internal use.
# If module_type is not equal "EXE" or "LIB", prints error message and quits.
#
-macro( GBX_UTIL_CHECK_MODULE_TYPE type )
+# Have not tested this macro when the variables is_* are not same in the calling context.
+macro( GBX_UTIL_CHECK_MODULE_TYPE type is_exe is_lib )
# message( STATUS "GBX_UTIL_CHECK_MODULE_TYPE type=${type}" )
string( COMPARE EQUAL ${type} "EXE" is_exe )
@@ -14,7 +15,7 @@
message( FATAL_ERROR "In GBX_REQUIRE_* macros, module_type must be either 'EXE' or 'LIB'" )
endif( is_exe AND is_lib )
-endmacro( GBX_UTIL_CHECK_MODULE_TYPE type )
+endmacro( GBX_UTIL_CHECK_MODULE_TYPE type is_exe is_lib )
#
# This is a utility macro for internal use.
@@ -22,10 +23,8 @@
macro( GBX_UTIL_MAKE_OPTION_NAME option_name module_type module_name )
# message( STATUS "GBX_UTIL_MAKE_OPTION_NAME [ option_name=${option_name}, MOT_TYPE=${module_type}, MOD_NAME=${module_name} ]" )
- GBX_UTIL_CHECK_MODULE_TYPE( ${module_type} )
+ GBX_UTIL_CHECK_MODULE_TYPE( ${module_type} is_exe is_lib )
- string( COMPARE EQUAL ${module_type} "EXE" is_exe )
- string( COMPARE EQUAL ${module_type} "LIB" is_lib )
string( TOUPPER ${module_name} module_name_upper )
# dereference the variable name once, so that we are setting the variable in the calling context!
if( is_exe )
@@ -65,6 +64,8 @@
#
macro( GBX_REQUIRE_OPTION cumulative_var module_type module_name default_option_value )
+ GBX_UTIL_CHECK_MODULE_TYPE( ${module_type} is_exe is_lib )
+
if( ${ARGC} GREATER 5 )
set( option_name ${ARGV6} )
else( ${ARGC} GREATER 5 )
@@ -102,7 +103,7 @@
if( is_exe )
GBX_NOT_ADD_EXECUTABLE( ${module_name} ${option_descr} )
else( is_exe )
- GBX_NOT_add_library( ${module_name} ${option_descr} )
+ GBX_NOT_ADD_LIBRARY( ${module_name} ${option_descr} )
endif( is_exe )
endif( ${cumulative_var} AND NOT ${option_name} )
@@ -122,7 +123,7 @@
# debug
# message( STATUS "GBX_REQUIRE_VAR [ CUM_VAR=${cumulative_var}, MOD_TYPE=${module_type}, MOD_NAME=${module_name}, test_var=${${test_var}}, reason=${reason} ]" )
- GBX_UTIL_CHECK_MODULE_TYPE( ${module_type} )
+ GBX_UTIL_CHECK_MODULE_TYPE( ${module_type} is_exe is_lib )
# must dereference both var names once (!) and IF will evaluate their values
if( ${cumulative_var} AND NOT ${test_var} )
@@ -130,7 +131,7 @@
if( is_exe )
GBX_NOT_ADD_EXECUTABLE( ${module_name} ${reason} )
else( is_exe )
- GBX_NOT_add_library( ${module_name} ${reason} )
+ GBX_NOT_ADD_LIBRARY( ${module_name} ${reason} )
endif( is_exe )
endif( ${cumulative_var} AND NOT ${test_var} )
@@ -202,7 +203,7 @@
if( ${cumulative_var} )
- GBX_UTIL_CHECK_MODULE_TYPE( ${module_type} )
+ GBX_UTIL_CHECK_MODULE_TYPE( ${module_type} is_exe is_lib )
if( ${ARGC} GREATER 5 )
set( reason ${ARGV6} )
@@ -217,13 +218,12 @@
set( ${cumulative_var} FALSE )
# force ENABLE_* variables to off in ccmake UI if dependencies aren't met.
GBX_UTIL_MAKE_OPTION_NAME( option_name ${module_type} ${module_name} )
- string( COMPARE EQUAL ${type} "EXE" is_exe )
- string( COMPARE EQUAL ${type} "LIB" is_lib )
+
if( is_exe )
GBX_NOT_ADD_EXECUTABLE( ${module_name} ${reason} )
set( ${option_name} OFF CACHE BOOL "Try to build ${module_name}" FORCE )
else( is_exe )
- GBX_NOT_add_library( ${module_name} ${reason} )
+ GBX_NOT_ADD_LIBRARY( ${module_name} ${reason} )
set( ${option_name} OFF CACHE BOOL "Try to build lib${module_name} library" FORCE )
endif( is_exe )
endif( NOT target_location )
@@ -276,7 +276,7 @@
#
# if( ${cumulative_var} )
#
-# GBX_UTIL_CHECK_MODULE_TYPE( ${module_type} )
+# GBX_UTIL_CHECK_MODULE_TYPE( ${module_type} is_exe is_lib )
#
# if( ${ARGC} GREATER 5 )
# set( reason ${ARGV6} )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|