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: <bo...@us...> - 2008-04-30 05:42:38
|
Revision: 132
http://gearbox.svn.sourceforge.net/gearbox/?rev=132&view=rev
Author: borax00
Date: 2008-04-29 22:42:43 -0700 (Tue, 29 Apr 2008)
Log Message:
-----------
fixed readUntil, _changed_serial_API_ !!!
Modified Paths:
--------------
gearbox/trunk/src/gbxserialacfr/serial.cpp
gearbox/trunk/src/gbxserialacfr/serial.h
gearbox/trunk/src/gbxserialacfr/test/serialloopbacktest.cpp
gearbox/trunk/submitted/gbxgarminacfr/driver.cpp
Modified: gearbox/trunk/src/gbxserialacfr/serial.cpp
===================================================================
--- gearbox/trunk/src/gbxserialacfr/serial.cpp 2008-04-30 01:36:20 UTC (rev 131)
+++ gearbox/trunk/src/gbxserialacfr/serial.cpp 2008-04-30 05:42:43 UTC (rev 132)
@@ -64,10 +64,6 @@
namespace {
- //Used for calls to waitForDataOrTimeout()
- enum{TIMED_OUT=-1, GOT_DATA};
-
-
// Converts an integer baud-rate into a c-style '#define'd baudrate
int cBaudrate( int baudRate )
{
@@ -623,10 +619,8 @@
}
-
-
-int
-Serial::readUntil(void *buf, int count, char termchar)
+int
+Serial::readStringUntil( std::string &str, char termchar )
{
if ( debugLevel_ > 0 ){
cout<<"TRACE(serial.cpp): "<<__func__<<"(): ";
@@ -637,55 +631,109 @@
}
}
- // There must be at least room for a terminating char and NULL terminator!
- assert (count >= 2);
+ // clear the string
+ str="";
- char* dataPtr = static_cast<char*>(buf);
- const char* bufPtr = static_cast<char*>(buf);
- char nextChar = 0;
-
- do {
- // Check for buf overrun Must leave room for NULL terminator
- if ( dataPtr >= bufPtr + (count - 1) )
+ while ( true )
+ {
+ // Read at most a single character
+ char c;
+ int ret = ::read( portFd_, &c, 1 );
+ if ( ret == 1 )
{
- stringstream ss;
- ss << "Serial::"<<__func__<<": Not enough room in buffer";
- throw SerialException( ss.str() );
+ str += c;
+ if ( c == termchar )
+ return str.size();
}
-
- int ret = ::read( portFd_, &nextChar, 1 );
- if (ret == 1)
+ else if ( ret == 0 )
{
- *(dataPtr++) = nextChar; //got data let's store it...
+ // Nothing to read yet
+ if ( ( timeoutsEnabled() && waitForDataOrTimeout() == TIMED_OUT ) ||
+ !timeoutsEnabled() )
+ {
+ // Timed out
+ return -1;
+ }
}
- else
+ else // ret==-1: error
{
- // If timeouts enabled and no data, wait and then go again
- if( timeoutsEnabled() && (ret == -1) && (errno == EAGAIN) )
+ if ( timeoutsEnabled() && errno == EAGAIN )
{
- if(waitForDataOrTimeout() == GOT_DATA)
- {
- continue;
- }else{
- *dataPtr = 0x00; // Timed out. terminate string just incase it's used anyway
+ if ( waitForDataOrTimeout() == TIMED_OUT )
return -1;
- }
}
+ else
+ {
+ stringstream ss;
+ ss << "Serial::"<<__func__<<"(): "<<strerror(errno);
+ throw SerialException( ss.str() );
+ }
+ }
+ }
+ return str.size();
+}
- // If we get here then it was a more serious error
- stringstream ss;
- ss << "Serial::"<<__func__<<"(): "<<strerror(errno);
- throw SerialException( ss.str() );
- }
+// int
+// Serial::readUntil(void *buf, int count, char termchar)
+// {
+// if ( debugLevel_ > 0 ){
+// cout<<"TRACE(serial.cpp): "<<__func__<<"(): ";
+// if(timeoutsEnabled()){
+// cout << "timeouts enabled"<<endl;
+// }else{
+// cout << "timeouts not enabled"<<endl;
+// }
+// }
+
+// // There must be at least room for a terminating char and NULL terminator!
+// assert (count >= 2);
+
+// char* dataPtr = static_cast<char*>(buf);
+// const char* bufPtr = static_cast<char*>(buf);
+// char nextChar = 0;
+
+// do {
+// // Check for buf overrun Must leave room for NULL terminator
+// if ( dataPtr >= bufPtr + (count - 1) )
+// {
+// stringstream ss;
+// ss << "Serial::"<<__func__<<": Not enough room in buffer";
+// throw SerialException( ss.str() );
+// }
+
+// int ret = ::read( portFd_, &nextChar, 1 );
+// if (ret == 1)
+// {
+// *(dataPtr++) = nextChar; //got data let's store it...
+// }
+// else
+// {
+// // If timeouts enabled and no data, wait and then go again
+// if( timeoutsEnabled() && (ret == -1) && (errno == EAGAIN) )
+// {
+// if( waitForDataOrTimeout() == DATA_AVAILABLE )
+// {
+// continue;
+// }else{
+// *dataPtr = 0x00; // Timed out. terminate string just incase it's used anyway
+// return -1;
+// }
+// }
+
+// // If we get here then it was a more serious error
+// stringstream ss;
+// ss << "Serial::"<<__func__<<"(): "<<strerror(errno);
+// throw SerialException( ss.str() );
+// }
- } while (nextChar != termchar);
+// } while (nextChar != termchar);
- // It's a string. It must be NULL terminated...
- *dataPtr = 0x00;
+// // It's a string. It must be NULL terminated...
+// *dataPtr = 0x00;
- // Return the number of chars not including the NULL
- return ( (int) (dataPtr - bufPtr) );
-}
+// // Return the number of chars not including the NULL
+// return ( (int) (dataPtr - bufPtr) );
+// }
int
@@ -706,7 +754,8 @@
int
Serial::bytesAvailableWait()
{
- if ( waitForDataOrTimeout() == TIMED_OUT){
+ if ( waitForDataOrTimeout() == TIMED_OUT )
+ {
return -1;
}
@@ -714,7 +763,7 @@
}
-int
+Serial::WaitStatus
Serial::waitForDataOrTimeout()
{
fd_set rfds;
@@ -736,7 +785,7 @@
throw SerialException( ss.str() );
}
- return GOT_DATA;
+ return DATA_AVAILABLE;
}
Modified: gearbox/trunk/src/gbxserialacfr/serial.h
===================================================================
--- gearbox/trunk/src/gbxserialacfr/serial.h 2008-04-30 01:36:20 UTC (rev 131)
+++ gearbox/trunk/src/gbxserialacfr/serial.h 2008-04-30 05:42:43 UTC (rev 132)
@@ -94,16 +94,9 @@
//!
int readFull(void *buf, int count);
- //! Reads up to @c count bytes-1 (including @c termchar), terminated by @c termchar.
- //! Returns the number of bytes read.
- //! After reading the data, the string will be NULL terminated.
+ //! Reads a string into @str, up to and including the first instance of @termchar
+ //! Returns the number of bytes read (or '-1' on timeout).
//!
- //! Example: if you expect to read the string "1234\n", you need something like:
- //! char buf[6];
- //! serial.readUntil( buf, 6, '\n' );
- //!
- //! where the two extra characters are for the "\n" and the terminating "\0".
- //!
//! If timeouts are not enabled we might block forever, waiting for the number of bytes we want or an error.
//!
//! If timeouts are enabled we won't block more than the timeout specified.
@@ -111,12 +104,12 @@
//! NOTE: The timeout applies for each individual read() call. We might have to make lots of them,
//! so the total time for which this function blocks might be longer than the specified timeout.
//!
- int readUntil(void *buf, int count, char termchar);
+ int readStringUntil( std::string &str, char termchar );
//! Short-hand for "readUntil(buf,count,'\n');"
//! Reads everything up to and including the '\n'.
- int readLine(void *buf, int count)
- { return readUntil(buf,count,'\n'); }
+ int readLine( std::string &str )
+ { return readStringUntil(str,'\n'); }
//! Returns the number of bytes available for reading (non-blocking).
int bytesAvailable();
@@ -155,9 +148,11 @@
// Utility function to wait up to the timeout for data to appear.
// Returns:
- // TIMED_OUT: timed out
- // GOT_DATA : data available
- int waitForDataOrTimeout(void);
+ enum WaitStatus {
+ TIMED_OUT,
+ DATA_AVAILABLE,
+ };
+ WaitStatus waitForDataOrTimeout(void);
// Opens a device @c dev.
void open(int flags=0);
Modified: gearbox/trunk/src/gbxserialacfr/test/serialloopbacktest.cpp
===================================================================
--- gearbox/trunk/src/gbxserialacfr/test/serialloopbacktest.cpp 2008-04-30 01:36:20 UTC (rev 131)
+++ gearbox/trunk/src/gbxserialacfr/test/serialloopbacktest.cpp 2008-04-30 05:42:43 UTC (rev 132)
@@ -46,12 +46,12 @@
for ( uint i=0; i < NUM_CHARS; i++ )
{
int stringI = i % (stringList.size());
- std::string theString = stringList[stringI]+"\n";
+ std::string sendString = stringList[stringI]+"\n";
- serial.writeString( theString );
+ serial.writeString( sendString );
- char buf[ theString.size()+1 ];
- int ret = serial.readLine( buf, theString.size()+1 );
+ std::string receiveString;
+ int ret = serial.readLine( receiveString );
if ( ret < 0 )
{
cout << "ERROR(serialloopbacktest.cpp): Read timed out!" << endl;
@@ -66,15 +66,15 @@
exit(1);
}
- if ( !strcmp( buf, theString.c_str() ) )
+ if ( sendString == receiveString )
{
- cout<<"Wrote and read: " << theString << endl;
+ cout<<"Wrote and read: " << sendString << endl;
}
else
{
cout << "ERROR(serialloopbacktest.cpp): Strings didn't match!!" << endl;
- cout << "ERROR(serialloopbacktest.cpp): Wrote: '" << theString <<"'"<< endl;
- cout << "ERROR(serialloopbacktest.cpp): Read: '" << buf <<"'"<< endl;
+ cout << "ERROR(serialloopbacktest.cpp): Wrote: '" << sendString <<"'"<< endl;
+ cout << "ERROR(serialloopbacktest.cpp): Read: '" << receiveString <<"'"<< endl;
cout<<"TRACE(serialloopbacktest.cpp): test FAILED" << endl;
exit(1);
Modified: gearbox/trunk/submitted/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/driver.cpp 2008-04-30 01:36:20 UTC (rev 131)
+++ gearbox/trunk/submitted/gbxgarminacfr/driver.cpp 2008-04-30 05:42:43 UTC (rev 132)
@@ -150,7 +150,7 @@
Driver::readFrame(Data& GpsData)
{
- char serial_data[1024];
+ string serial_data;
int gpsMsgNotYetGotFrameCount = 0;
//How many messages are we looking for to make our frame
@@ -164,7 +164,7 @@
// This will block up to the timeout
tracer_.debug( "Driver::read(): calling serial_->readLine()", 10 );
- int ret = serial_->readLine(serial_data,1024);
+ int ret = serial_->readLine(serial_data);
tracer_.debug( serial_data, 10 );
// timeOfRead_ = IceUtil::Time::now();
@@ -193,7 +193,7 @@
static int nmeaExceptionCount =0;
try{
//This throws if it cannot find the * to deliminate the checksum field
- nmeaMessage_.setSentence(serial_data,gbxgpsutilacfr::TestChecksum);
+ nmeaMessage_.setSentence(serial_data.c_str(),gbxgpsutilacfr::TestChecksum);
}
catch (gbxgpsutilacfr::NmeaException &e){
//Don't throw if only occasional messages are missing the checksums
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bo...@us...> - 2008-04-30 01:36:18
|
Revision: 131
http://gearbox.svn.sourceforge.net/gearbox/?rev=131&view=rev
Author: borax00
Date: 2008-04-29 18:36:20 -0700 (Tue, 29 Apr 2008)
Log Message:
-----------
Modified Paths:
--------------
gearbox/trunk/src/gbxserialacfr/serial.h
Modified: gearbox/trunk/src/gbxserialacfr/serial.h
===================================================================
--- gearbox/trunk/src/gbxserialacfr/serial.h 2008-04-26 07:44:22 UTC (rev 130)
+++ gearbox/trunk/src/gbxserialacfr/serial.h 2008-04-30 01:36:20 UTC (rev 131)
@@ -114,6 +114,7 @@
int readUntil(void *buf, int count, char termchar);
//! Short-hand for "readUntil(buf,count,'\n');"
+ //! Reads everything up to and including the '\n'.
int readLine(void *buf, int count)
{ return readUntil(buf,count,'\n'); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bo...@us...> - 2008-04-26 07:44:14
|
Revision: 130
http://gearbox.svn.sourceforge.net/gearbox/?rev=130&view=rev
Author: borax00
Date: 2008-04-26 00:44:22 -0700 (Sat, 26 Apr 2008)
Log Message:
-----------
now compiles
Modified Paths:
--------------
gearbox/trunk/submitted/gbxgarminacfr/CMakeLists.txt
gearbox/trunk/submitted/gbxgarminacfr/test/test.cpp
Modified: gearbox/trunk/submitted/gbxgarminacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/CMakeLists.txt 2008-04-26 07:41:06 UTC (rev 129)
+++ gearbox/trunk/submitted/gbxgarminacfr/CMakeLists.txt 2008-04-26 07:44:22 UTC (rev 130)
@@ -9,6 +9,8 @@
# SET( int_libs GbxUtilAcfr GbxSerialAcfr GbxGpsUtilAcfr )
GBX_REQUIRE_TARGETS( build LIB ${lib_name} ${int_libs} )
+SET( private_libs GbxGpsUtilAcfr )
+
IF( build )
ADD_SUBDIRECTORY( gbxgpsutilacfr )
@@ -17,7 +19,7 @@
FILE( GLOB hdrs *.h )
FILE( GLOB srcs *.cpp )
- SET( dep_libs ${int_libs} )
+ SET( dep_libs ${int_libs} ${private_libs} )
GBX_ADD_LIBRARY( ${lib_name} SHARED ${srcs} )
TARGET_LINK_LIBRARIES( ${lib_name} ${dep_libs} )
Modified: gearbox/trunk/submitted/gbxgarminacfr/test/test.cpp
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/test/test.cpp 2008-04-26 07:41:06 UTC (rev 129)
+++ gearbox/trunk/submitted/gbxgarminacfr/test/test.cpp 2008-04-26 07:44:22 UTC (rev 130)
@@ -85,9 +85,6 @@
device->read( data );
cout<<"Test: Got data "<<i+1<<" of "<<numReads<<endl;
-
- if ( data.haveWarnings )
- cout << "got warnings: " << data.warnings << endl;
}
catch ( const std::exception& e )
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bo...@us...> - 2008-04-26 07:41:00
|
Revision: 129
http://gearbox.svn.sourceforge.net/gearbox/?rev=129&view=rev
Author: borax00
Date: 2008-04-26 00:41:06 -0700 (Sat, 26 Apr 2008)
Log Message:
-----------
Modified Paths:
--------------
gearbox/trunk/submitted/gbxgarminacfr/CMakeLists.txt
gearbox/trunk/submitted/gbxgarminacfr/driver.h
Added Paths:
-----------
gearbox/trunk/submitted/gbxgarminacfr/test/
gearbox/trunk/submitted/gbxgarminacfr/test/CMakeLists.txt
gearbox/trunk/submitted/gbxgarminacfr/test/example.cmake.in
gearbox/trunk/submitted/gbxgarminacfr/test/example.readme
gearbox/trunk/submitted/gbxgarminacfr/test/test.cpp
Modified: gearbox/trunk/submitted/gbxgarminacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/CMakeLists.txt 2008-04-26 07:15:32 UTC (rev 128)
+++ gearbox/trunk/submitted/gbxgarminacfr/CMakeLists.txt 2008-04-26 07:41:06 UTC (rev 129)
@@ -21,12 +21,12 @@
GBX_ADD_LIBRARY( ${lib_name} SHARED ${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 "" "" )
GBX_ADD_HEADERS( gbxgarminacfr ${hdrs} )
-# IF( GBX_BUILD_TESTS )
-# ADD_SUBDIRECTORY( test )
-# ENDIF( GBX_BUILD_TESTS )
+ IF( GBX_BUILD_TESTS )
+ ADD_SUBDIRECTORY( test )
+ ENDIF( GBX_BUILD_TESTS )
ENDIF( build )
Modified: gearbox/trunk/submitted/gbxgarminacfr/driver.h
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/driver.h 2008-04-26 07:15:32 UTC (rev 128)
+++ gearbox/trunk/submitted/gbxgarminacfr/driver.h 2008-04-26 07:41:06 UTC (rev 129)
@@ -12,6 +12,8 @@
#define GBXGARMINACFR_DRIVER_H
#include <gbxserialacfr/serial.h>
+#include <gbxsickacfr/gbxutilacfr/tracer.h>
+#include <gbxsickacfr/gbxutilacfr/status.h>
#include <gbxgarminacfr/gbxgpsutilacfr/nmea.h>
#include <memory>
Added: gearbox/trunk/submitted/gbxgarminacfr/test/CMakeLists.txt
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/test/CMakeLists.txt (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/test/CMakeLists.txt 2008-04-26 07:41:06 UTC (rev 129)
@@ -0,0 +1,6 @@
+INCLUDE( ${GBX_CMAKE_DIR}/UseBasicRules.cmake )
+
+GBX_ADD_EXECUTABLE( gbxgarminacfrtest test.cpp )
+TARGET_LINK_LIBRARIES( gbxgarminacfrtest GbxGarminAcfr )
+
+GBX_ADD_EXAMPLE( gbxgarminacfr example.cmake.in example.cmake test.cpp example.readme )
\ No newline at end of file
Added: gearbox/trunk/submitted/gbxgarminacfr/test/example.cmake.in
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/test/example.cmake.in (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/test/example.cmake.in 2008-04-26 07:41:06 UTC (rev 129)
@@ -0,0 +1,10 @@
+PROJECT( gbxgarminacfr_example )
+
+INCLUDE_DIRECTORIES( @CMAKE_INSTALL_PREFIX@/include/gearbox )
+
+ADD_EXECUTABLE( gbxgarminacfrtest test.cpp )
+TARGET_LINK_LIBRARIES( gbxgarminacfrtest GbxSickAcfr )
+SET_TARGET_PROPERTIES( gbxgarminacfrtest PROPERTIES
+ LINK_FLAGS "-L@CMAKE_INSTALL_PREFIX@/lib/gearbox"
+ INSTALL_RPATH "${INSTALL_RPATH};@CMAKE_INSTALL_PREFIX@/lib/gearbox"
+ BUILD_WITH_INSTALL_RPATH TRUE )
Added: gearbox/trunk/submitted/gbxgarminacfr/test/example.readme
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/test/example.readme (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/test/example.readme 2008-04-26 07:41:06 UTC (rev 129)
@@ -0,0 +1,12 @@
+Building
+--------
+
+The example can be built by making a directory (anywhere on your system where
+you have write permissions will do), changing to that directory and executing
+CMake with the example's source directory as an argument. For example, if you
+have installed GearBox into /usr/local, you could do the following:
+
+$ cd ~
+$ mkdir gbxgarminacfr_example
+$ cd gbxgarminacfr_example
+$ ccmake /usr/local/share/gearbox/gbxgarminacfr
Added: gearbox/trunk/submitted/gbxgarminacfr/test/test.cpp
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/test/test.cpp (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/test/test.cpp 2008-04-26 07:41:06 UTC (rev 129)
@@ -0,0 +1,100 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp
+ *
+ * This distribution is licensed to you under the terms described in
+ * the LICENSE file included in this distribution.
+ *
+ */
+
+#include <math.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include <iostream>
+#include <sstream>
+#include <gbxgarminacfr/driver.h>
+#include <gbxsickacfr/gbxutilacfr/trivialtracer.h>
+#include <gbxsickacfr/gbxutilacfr/trivialstatus.h>
+#include <gbxsickacfr/gbxutilacfr/mathdefs.h>
+
+using namespace std;
+
+//
+// Instantiates the laser driver, reads a few scans
+//
+int main( int argc, char **argv )
+{
+ int opt;
+ // defaults
+ string port = "/dev/ttyS0";
+
+ // Get some options from the command line
+ while ((opt = getopt(argc, argv, "p:b:")) != -1)
+ {
+ switch ( opt )
+ {
+ case 'p':
+ port = optarg;
+ break;
+ default:
+ cout << "Usage: " << argv[0] << " [-p port]" << endl << endl
+ << "-p port\tPort the laser scanner is connected to. E.g. /dev/ttyS0" << endl;
+ return 1;
+ }
+ }
+
+ // Set up the laser's configuration
+ gbxgarminacfr::Config config;
+ config.device = port;
+ if ( !config.isValid() ) {
+ cout << "Test: Invalid device configuration structure: " << config.toString() << endl;
+ exit(1);
+ }
+ cout << "Using configuration: " << config.toString() << endl;
+
+ // Instantiate objects to handle messages from the driver
+ const bool debug=false;
+ gbxsickacfr::gbxutilacfr::TrivialTracer tracer( debug );
+ gbxsickacfr::gbxutilacfr::TrivialStatus status( tracer );
+
+ // Instantiate the driver itself
+ gbxgarminacfr::Driver* device;
+ try
+ {
+ device = new gbxgarminacfr::Driver( config, tracer, status );
+ }
+ catch ( const std::exception& e )
+ {
+ cout <<"Test: Failed to init device: "<<e.what() << endl;
+ return 1;
+ }
+
+ // Create data structure to store sensor data
+ gbxgarminacfr::Data data;
+
+ // Read a few times
+ const int numReads = 3;
+ for ( int i=0; i < numReads; i++ )
+ {
+ try
+ {
+ device->read( data );
+
+ cout<<"Test: Got data "<<i+1<<" of "<<numReads<<endl;
+
+ if ( data.haveWarnings )
+ cout << "got warnings: " << data.warnings << endl;
+ }
+ catch ( const std::exception& e )
+ {
+ cout <<"Test: Failed to read data: "<<e.what()<<endl;
+ }
+ }
+
+ delete device;
+ return 0;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bo...@us...> - 2008-04-26 07:15:29
|
Revision: 128
http://gearbox.svn.sourceforge.net/gearbox/?rev=128&view=rev
Author: borax00
Date: 2008-04-26 00:15:32 -0700 (Sat, 26 Apr 2008)
Log Message:
-----------
corrected project name
Modified Paths:
--------------
gearbox/trunk/src/gbxsickacfr/test/example.cmake.in
Modified: gearbox/trunk/src/gbxsickacfr/test/example.cmake.in
===================================================================
--- gearbox/trunk/src/gbxsickacfr/test/example.cmake.in 2008-04-26 06:42:07 UTC (rev 127)
+++ gearbox/trunk/src/gbxsickacfr/test/example.cmake.in 2008-04-26 07:15:32 UTC (rev 128)
@@ -1,4 +1,4 @@
-PROJECT( gbxserialacfr_example )
+PROJECT( gbxsickacfr_example )
INCLUDE_DIRECTORIES( @CMAKE_INSTALL_PREFIX@/include/gearbox )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-04-26 06:41:59
|
Revision: 127
http://gearbox.svn.sourceforge.net/gearbox/?rev=127&view=rev
Author: russo2503v
Date: 2008-04-25 23:42:07 -0700 (Fri, 25 Apr 2008)
Log Message:
-----------
submitted garmin driver
Modified Paths:
--------------
gearbox/trunk/submitted/CMakeLists.txt
Added Paths:
-----------
gearbox/trunk/submitted/gbxgarminacfr/
gearbox/trunk/submitted/gbxgarminacfr/CMakeLists.txt
gearbox/trunk/submitted/gbxgarminacfr/doc.dox
gearbox/trunk/submitted/gbxgarminacfr/driver.cpp
gearbox/trunk/submitted/gbxgarminacfr/driver.h
gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/
gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/CMakeLists.txt
gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/latlon2mga.cpp
gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/latlon2mga.h
gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/nmea.cpp
gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/nmea.h
gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/test/
gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/test/CMakeLists.txt
gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/test/testmga.cpp
Modified: gearbox/trunk/submitted/CMakeLists.txt
===================================================================
--- gearbox/trunk/submitted/CMakeLists.txt 2008-04-26 06:41:26 UTC (rev 126)
+++ gearbox/trunk/submitted/CMakeLists.txt 2008-04-26 06:42:07 UTC (rev 127)
@@ -9,5 +9,8 @@
# When adding new directories, please maintain order of inter-dependencies.
# Otherwise, maintain alphabetical order.
+ # E.g. ADD_SUBDIRECTORY( mydir )
+ ADD_SUBDIRECTORY( gbxgarminacfr )
+
ENDIF( GBX_BUILD_SUBMITTED )
\ No newline at end of file
Added: gearbox/trunk/submitted/gbxgarminacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/CMakeLists.txt (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/CMakeLists.txt 2008-04-26 06:42:07 UTC (rev 127)
@@ -0,0 +1,32 @@
+SET( lib_name GbxGarminAcfr )
+GBX_ADD_LICENSE( LGPL )
+
+SET( build TRUE )
+GBX_REQUIRE_OPTION( build LIB ${lib_name} ON )
+GBX_REQUIRE_VAR( build LIB ${lib_name} GBX_OS_LINUX "only Linux OS is supported" )
+
+SET( int_libs GbxUtilAcfr GbxSerialAcfr )
+# SET( int_libs GbxUtilAcfr GbxSerialAcfr GbxGpsUtilAcfr )
+GBX_REQUIRE_TARGETS( build LIB ${lib_name} ${int_libs} )
+
+IF( build )
+
+ ADD_SUBDIRECTORY( gbxgpsutilacfr )
+
+ INCLUDE( ${GBX_CMAKE_DIR}/UseBasicRules.cmake )
+
+ FILE( GLOB hdrs *.h )
+ FILE( GLOB srcs *.cpp )
+ SET( dep_libs ${int_libs} )
+
+ GBX_ADD_LIBRARY( ${lib_name} SHARED ${srcs} )
+ TARGET_LINK_LIBRARIES( ${lib_name} ${dep_libs} )
+# GBX_ADD_PKGCONFIG( ${lib_name} "Garmin GPS driver" "" dep_libs "" "" )
+
+ GBX_ADD_HEADERS( gbxgarminacfr ${hdrs} )
+
+# IF( GBX_BUILD_TESTS )
+# ADD_SUBDIRECTORY( test )
+# ENDIF( GBX_BUILD_TESTS )
+
+ENDIF( build )
Added: gearbox/trunk/submitted/gbxgarminacfr/doc.dox
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/doc.dox (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/doc.dox 2008-04-26 06:42:07 UTC (rev 127)
@@ -0,0 +1,70 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp
+ *
+ * This distribution is licensed to you under the terms described in
+ * the LICENSE file included in this distribution.
+ *
+ */
+
+/*!
+@ingroup gbx_libs
+@ingroup gbx_cpp
+@ingroup gbx_linux
+@defgroup gbx_library_gbxgarminacfr GbxGarminAcfr
+@brief Garmin GPS receiver.
+
+Uses Garmin serial implementation. Written for Garmin-GPS15L.
+Tries to establish communication at 4800 baud (non-configurable).
+
+@par Header file
+
+@verbatim
+#include <gbxgarminacfr/driver.h>
+@endverbatim
+
+@par Example
+ See test/test.cpp
+
+@par Style
+ See http://orca-robotics.sourceforge.net/orca/orca_doc_style.html
+
+@par Units and Coordinate System
+ See http://orca-robotics.sourceforge.net/orca/orca_doc_units.html
+
+@par Copyright
+ Duncan Mercer, Alex Brooks, Alexei Makarenko, Tobias Kaupp
+
+@par Responsible Developer
+ Alex Brooks
+
+@par License
+ LGPL
+
+@par Dependencies
+
+- libIceUtil (for timing), v.3.2 or newer (latest tested 3.3).
+- @ref gbx_library_gbxserialacfr
+
+@par Installation
+
+- Finding libIceUtil
+ - IceUtil will be found automatically if installed in one of several standard locations.
+ - You can specify it's installation point with @c ICEUTIL_HOME CMake variable (or an environment variable with the same name). For example:
+@verbatim
+$ cmake -DICEUTIL_HOME=/home/myuser/install .
+@endverbatim
+
+*/
+
+
+/*!
+@brief Garmin GPS driver
+@namespace gbxgarminacfr
+
+This namespace is part of a Garmin GPS driver.
+
+@see @ref gbx_library_gbxgarminacfr
+
+*/
Added: gearbox/trunk/submitted/gbxgarminacfr/driver.cpp
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/driver.cpp (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/driver.cpp 2008-04-26 06:42:07 UTC (rev 127)
@@ -0,0 +1,404 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2004-2008 Duncan Mercer, Alex Brooks, Alexei Makarenko, Tobias Kaupp
+ *
+ * This distribution is licensed to you under the terms described in
+ * the LICENSE file included in this distribution.
+ *
+ */
+
+#include <iostream>
+#include <sstream>
+#include <gbxsickacfr/gbxutilacfr/gbxutilacfr.h>
+// #include <IceUtil/IceUtil.h>
+// #include <gbxsickacfr/gbxiceutilacfr/gbxiceutilacfr.h>
+#include <cstdlib>
+#include <sys/time.h>
+#include <time.h>
+#include <errno.h>
+
+#include "driver.h"
+
+using namespace std;
+using namespace gbxgarminacfr;
+
+bool
+Config::isValid() const
+{
+ if ( device.empty() ) return false;
+
+ return true;
+}
+
+std::string
+Config::toString() const
+{
+ std::stringstream ss;
+ ss << "Garmin driver config: device="<<device;
+ return ss.str();
+}
+
+/////////////////////
+
+Driver::Driver( const Config &config,
+ gbxsickacfr::gbxutilacfr::Tracer &tracer,
+ gbxsickacfr::gbxutilacfr::Status &status ) :
+ config_(config),
+ tracer_(tracer),
+ status_(status)
+{
+ if ( !config_.isValid() )
+ {
+ stringstream ss;
+ ss << __func__ << "(): Invalid config: " << config_.toString();
+ throw gbxsickacfr::gbxutilacfr::Exception( ERROR_INFO, ss.str() );
+ }
+
+ stringstream ssDebug;
+ ssDebug << "Connecting to GPS on serial port " << config_.device;
+ tracer_.debug( ssDebug.str() );
+
+ // there's no need to make this configurable
+// int baud = context_.properties().getPropertyAsIntWidDefault( prefix+"Baud", 4800 );
+ int baud = 4800;
+
+ // according to Duncan, the first 5 initialization messages come in 1 sec.
+ // 2 secs should be conservative.
+ serial_.reset( new gbxserialacfr::Serial( config_.device, baud, gbxserialacfr::Serial::Timeout(2,0) ) );
+
+ init();
+}
+
+Driver::~Driver()
+{
+ disableDevice();
+}
+
+void
+Driver::read( Data &data )
+{
+ return readFrame( data );
+}
+
+void
+Driver::init()
+{
+ //Make sure that we clear our internal data structures
+ memset((void*)(&nmeaMessage_) , 0 , sizeof(nmeaMessage_));
+ memset((void*)(&gpsData_) , 0 , sizeof(gpsData_));
+
+ try {
+ enableDevice();
+ //TODO Need to check here that we have been successful.
+ clearFrame();
+ }
+ catch ( const gbxserialacfr::SerialException &e )
+ {
+ stringstream ss;
+ ss << "Driver: Caught SerialException: " << e.what();
+ tracer_.error( ss.str() );
+ throw gbxsickacfr::gbxutilacfr::Exception( ERROR_INFO, ss.str() );
+ }
+}
+
+//*****************************************************************************
+
+void
+Driver::enableDevice()
+{
+
+ //Create the messages that we are going to send and add the checksums
+ //Note that the checksum field is filled with 'x's before we start
+ gbxgpsutilacfr::NmeaMessage DisableAllMsg("$PGRMO,,2*xx\r\n",gbxgpsutilacfr::AddChecksum);
+ gbxgpsutilacfr::NmeaMessage Start_GGA_Msg("$PGRMO,GPGGA,1*xx\r\n",gbxgpsutilacfr::AddChecksum);
+ gbxgpsutilacfr::NmeaMessage Start_VTG_Msg("$PGRMO,GPVTG,1*xx\r\n",gbxgpsutilacfr::AddChecksum);
+ gbxgpsutilacfr::NmeaMessage Start_RME_Msg("$PGRMO,PGRME,1*xx\r\n",gbxgpsutilacfr::AddChecksum);
+
+ tracer_.info("Configure Garmin GPS device");
+
+
+ //First disables all output messages then enable selected ones only.
+ serial_->writeString(DisableAllMsg.sentence());
+ sleep(1);
+
+ serial_->writeString(Start_GGA_Msg.sentence());
+ serial_->writeString(Start_VTG_Msg.sentence());
+ serial_->writeString(Start_RME_Msg.sentence());
+ sleep(1);
+}
+
+
+
+//***********************************************************************
+void
+Driver::disableDevice()
+{
+
+ //Simply send the no messages command!
+ gbxgpsutilacfr::NmeaMessage DisableAllMsg("$PGRMO,,2*xx\r\n",gbxgpsutilacfr::AddChecksum);
+ serial_->writeString(DisableAllMsg.sentence());
+}
+
+
+
+
+//****************************************************************************
+// Read one complete frame of data. IE all the messages that we need before returning the data.
+
+void
+Driver::readFrame(Data& GpsData)
+{
+
+ char serial_data[1024];
+ int gpsMsgNotYetGotFrameCount = 0;
+
+ //How many messages are we looking for to make our frame
+ const int N_MSGS_IN_FRAME = 3;
+
+ //Clear our data before we start trying to assemble the frame
+ clearFrame();
+
+
+ while(! haveCompleteFrame() ){
+
+ // This will block up to the timeout
+ tracer_.debug( "Driver::read(): calling serial_->readLine()", 10 );
+ int ret = serial_->readLine(serial_data,1024);
+ tracer_.debug( serial_data, 10 );
+
+// timeOfRead_ = IceUtil::Time::now();
+// gbxsickacfr::gbxiceutilacfr::now( timeOfReadSec_, timeOfReadUsec_ );
+ timeval now;
+ if ( gettimeofday( &now, 0 ) != 0 ) {
+ stringstream ss;
+ ss << "Pproblem getting timeofday: " << strerror(errno) << endl;
+ throw gbxsickacfr::gbxutilacfr::Exception( ERROR_INFO,ss.str() );
+ }
+
+ if ( ret<0 ) {
+ throw gbxsickacfr::gbxutilacfr::Exception( ERROR_INFO, "Driver: Timeout reading from serial port" );
+ }
+
+ if(ret==0) {
+ throw gbxsickacfr::gbxutilacfr::Exception( ERROR_INFO,"Driver: Read 0 bytes from serial port");
+ }
+
+ //
+ // We successfully read something from the serial port
+ //
+
+
+ //Put it into the message object and checksum the data
+ static int nmeaExceptionCount =0;
+ try{
+ //This throws if it cannot find the * to deliminate the checksum field
+ nmeaMessage_.setSentence(serial_data,gbxgpsutilacfr::TestChecksum);
+ }
+ catch (gbxgpsutilacfr::NmeaException &e){
+ //Don't throw if only occasional messages are missing the checksums
+ if(nmeaExceptionCount++ < 3) {return;}
+ stringstream ss;
+ ss << "MainThread: Problem reading from GPS: " << e.what();
+ tracer_.error( ss.str() );
+ throw gbxsickacfr::gbxutilacfr::Exception( ERROR_INFO,ss.str());
+ }
+ nmeaExceptionCount = 0;
+
+ //Only populate the data structures if our message passes the checksum!
+ static int nmeaFailChecksumCount =0;
+ if(nmeaMessage_.haveValidChecksum()){
+ nmeaFailChecksumCount = 0;
+ addDataToFrame();
+ }else{
+ if(nmeaFailChecksumCount++ >= 3){ //Dont throw an exception on the first failed checksum.
+ throw gbxsickacfr::gbxutilacfr::Exception( ERROR_INFO,"Driver: more than 3 sequential messages failed the checksum\n");
+ }else{
+ tracer_.error("Driver: Single message failed checksum. Not throwing an exception yet!\n" );
+ }
+ }
+
+ //Make sure that we do not wait for ever trying to get a frame of data
+ //Note that we might need to skip the N * $PGRMO messages echoed back from receiver when starting
+ //As well as the N * messages that we are looking for
+ if(gpsMsgNotYetGotFrameCount++ >= (N_MSGS_IN_FRAME * 3)){
+ throw gbxsickacfr::gbxutilacfr::Exception( ERROR_INFO,"Driver: Not able to assemble a complete data frame\n");
+ }
+
+ }
+
+ tracer_.debug("GPS got a complete frame\n", 10 );
+
+ // Hand the data back to the outside world
+ GpsData=gpsData_;
+}
+
+
+
+
+//**********************************************************************************
+
+void
+Driver::addDataToFrame()
+{
+ //First split up the data fields in the string we have read.
+ nmeaMessage_.parseTokens();
+
+ //We should not be being passed any messages with failed checksums, but just in case
+ if(nmeaMessage_.haveTestedChecksum() && (!nmeaMessage_.haveValidChecksum())){
+ throw gbxsickacfr::gbxutilacfr::Exception( ERROR_INFO,"Driver: Message fails checksum");
+ }
+
+ //And then find out which type of messge we have recieved...
+ string MsgType = nmeaMessage_.getDataToken(0);
+
+ if(MsgType == "$GPGGA"){
+ tracer_.debug("got GGA message\n",4);
+ extractGGAData();
+ haveGGA_ = true;
+ return;
+ }else if(MsgType == "$GPVTG"){
+ tracer_.debug("got VTG message\n",4);
+ extractVTGData();
+ haveVTG_ = true;
+ return;
+ }else if(MsgType == "$PGRME"){
+ tracer_.debug("got RME message\n",4);
+ extractRMEData();
+ haveRME_ = true;
+ return;
+ }else if(MsgType == "$PGRMO"){
+ //This message is sent by us to control msg transmission and then echoed by GPS
+ //So we can just ignore it
+ return;
+ }else{
+ // if we get here the msg is unknown
+ stringstream ErrMsg;
+ ErrMsg << "Message type unknown " << MsgType <<endl;
+ throw gbxsickacfr::gbxutilacfr::Exception( ERROR_INFO,ErrMsg.str());
+ }
+}
+
+
+//**************************************************************************************
+// Get the useful bits from a GGA message
+
+void
+Driver::extractGGAData(void){
+
+ //Names for the tokens in the GGA message
+ enum GGATokens{MsgType=0,UTC,Lat,LatDir,Lon,LonDir,FixType,
+ NSatsUsed,HDOP,Hgt,M1,GeoidHgt,M2,DiffAge,DiffId};
+
+ //cout << nmeaMessage_.sentence()<<endl;
+
+ //position fix type
+ switch (nmeaMessage_.getDataToken(FixType)[0])
+ {
+ case '0':
+ gpsData_.positionType = GpsPositionTypeNotAvailable;
+ return;
+ case '1':
+ gpsData_.positionType = GpsPositionTypeAutonomous;
+ break;
+ case '2':
+ gpsData_.positionType = GpsPositionTypeDifferential;
+ break;
+ }
+
+// gpsData_.timeStamp = orcaice::toOrcaTime (timeOfRead_);
+// gbxiceutil::timeFromIceUtil( timeOfRead_, gpsData_.timeStampSec, gpsData_.timeStampUsec );
+ gpsData_.timeStampSec = timeOfReadSec_;
+ gpsData_.timeStampUsec = timeOfReadUsec_;
+
+ //UTC time
+ sscanf(nmeaMessage_.getDataToken(UTC).c_str(),"%02d%02d%lf",
+ &gpsData_.utcTimeHrs, &gpsData_.utcTimeMin, &gpsData_.utcTimeSec );
+ //position
+ int deg;
+ double min;
+ double dir;
+
+ //latitude
+ sscanf(nmeaMessage_.getDataToken(Lat).c_str(),"%02d%lf",°,&min);
+ dir = (*nmeaMessage_.getDataToken(LatDir).c_str()=='N') ? 1.0 : -1.0;
+ gpsData_.latitude=dir*(deg+(min/60.0));
+ //longitude
+ sscanf(nmeaMessage_.getDataToken(Lon).c_str(),"%03d%lf",°,&min);
+ dir = (*nmeaMessage_.getDataToken(LonDir).c_str()=='E') ? 1.0 : -1.0;
+ gpsData_.longitude=dir*(deg+(min/60.0));
+
+ //number of satellites in use
+ gpsData_.satellites = atoi(nmeaMessage_.getDataToken(NSatsUsed).c_str());
+
+ //altitude
+ gpsData_.altitude=atof(nmeaMessage_.getDataToken(Hgt).c_str());
+
+ //geoidal Separation
+ gpsData_.geoidalSeparation=atof(nmeaMessage_.getDataToken(GeoidHgt).c_str());
+
+
+ //cout << "Lat " << GpsData_.latitude << " Long " << GpsData_.longitude ;
+ //cout << " Hght "<< GpsData_.altitude << " Geoid "<< GpsData_.geoidalSeparation << endl;
+
+ // Set flag
+
+ return;
+}
+
+
+//********************************************************************
+// VTG provides velocity and heading information
+void
+Driver::extractVTGData(void){
+
+ //Names for the VTG message items
+ enum VTGTokens{MsgType=0,HeadingTrue,T,HeadingMag,M,SpeedKnots,
+ N,SpeedKPH,K,ModeInd};
+
+ //Check for an empty string. Means that we are not moving
+ //When the message has empty fields tokeniser skips so we get the next field inline.
+ if(nmeaMessage_.getDataToken(HeadingTrue)[0] == 'T' ){
+ gpsData_.speed=0.0;
+ gpsData_.climbRate=0.0;
+ gpsData_.heading=0.0;
+ return;
+ }
+
+ //heading
+ double headingRad = DEG2RAD(atof(nmeaMessage_.getDataToken(HeadingTrue).c_str()));
+ NORMALISE_ANGLE( headingRad );
+ gpsData_.heading=headingRad;
+ //speed - converted to m/s
+ gpsData_.speed=atof(nmeaMessage_.getDataToken(SpeedKPH).c_str());
+ gpsData_.speed*=(1000/3600.0);
+ //set to zero
+ gpsData_.climbRate=0.0;
+
+ //cout << nmeaMessage_.sentence() << endl;
+ // cout << "head "<< RAD2DEG(GpsData_.heading) << " speed " << GpsData_.speed << endl;
+
+ return;
+}
+
+
+//*********************************************************************************************
+// RME message. This one is garmin specific... Give position error estimates
+// See the file garminErrorPositionEstimate.txt for a discussion of the position errors as
+// reported here. Essentially the EPE reported by the garmin is a 1 sigma error (RMS) or a
+// 68% confidence bounds.
+
+void
+Driver::extractRMEData(void){
+ //Names for the RME message items
+ enum VTGTokens{MsgType=0,HError,M1,VError,M2,EPE,M3};
+
+ gpsData_.horizontalPositionError = atof(nmeaMessage_.getDataToken(HError).c_str());
+ gpsData_.verticalPositionError = atof(nmeaMessage_.getDataToken(VError).c_str());
+
+ //cout << nmeaMessage_.sentence() << endl;
+ //cout << "Herr " << GpsData_.horizontalPositionError << " Verr " << GpsData_.verticalPositionError<<endl;
+
+ return;
+
+}
Added: gearbox/trunk/submitted/gbxgarminacfr/driver.h
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/driver.h (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/driver.h 2008-04-26 06:42:07 UTC (rev 127)
@@ -0,0 +1,179 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2004-2008 Duncan Mercer, Alex Brooks, Alexei Makarenko, Tobias Kaupp
+ *
+ * This distribution is licensed to you under the terms described in
+ * the LICENSE file included in this distribution.
+ *
+ */
+
+#ifndef GBXGARMINACFR_DRIVER_H
+#define GBXGARMINACFR_DRIVER_H
+
+#include <gbxserialacfr/serial.h>
+#include <gbxgarminacfr/gbxgpsutilacfr/nmea.h>
+#include <memory>
+
+namespace gbxgarminacfr {
+
+//! Configuration structure
+class Config
+{
+public:
+ Config() {};
+ bool isValid() const;
+ std::string toString() const;
+
+ //! Serial device. e.g. "/dev/ttyS0"
+ std::string device;
+};
+
+
+//! Gps position types.
+//! Using Novatel codes here is probably not the best thing. With more
+//! thought it's probably possible to categorize these position types
+//! into more generic categories. For now, non-Novatel receivers should
+//! use the generic types listed first.
+enum PositionType {
+ //! Invalid or not available
+ GpsPositionTypeNotAvailable,
+ //! Autonomous position
+ //! (This is the normal case for non-differential GPS)
+ GpsPositionTypeAutonomous,
+ //! Differentially corrected
+ GpsPositionTypeDifferential,
+ NovatelNone,
+ NovatelFixedPos,
+ NovatelFixedHeigth,
+ NovatelFloatConv,
+ NovatelWideLane,
+ NovatelNarrowLane,
+ NovatelDopplerVelocity,
+ NovatelSingle,
+ NovatelPsrDiff,
+ NovatelWAAS,
+ NovatelPropagated,
+ NovatelOmnistar,
+ NovatelL1Float,
+ NovatelIonFreeFloat,
+ NovatelNarrowFloat,
+ NovatelL1Int,
+ NovatelWideInt,
+ NovatelNarrowInt,
+ NovatelRTKDirectINS,
+ NovatelINS,
+ NovatelINSPSRSP,
+ NovatelINSPSRFLOAT,
+ NovatelINSRTKFLOAT,
+ NovatelINSRTKFIXED,
+ NovatelOmnistarHP,
+ NovatelUnknown
+};
+
+//! Gps data structure
+struct Data
+{
+ //! Time (according to the computer clock) when data was measured.
+ //! Number of seconds
+ int timeStampSec;
+ //! Time (according to the computer clock) when data was measured.
+ //! Number of microseconds
+ int timeStampUsec;
+ //! UTC time (according to GPS device), reference is Greenwich.
+ //! Hour [0..23]
+ int utcTimeHrs;
+ //! UTC time (according to GPS device), reference is Greenwich.
+ //! Minutes [0..59]
+ int utcTimeMin;
+ //! UTC time (according to GPS device), reference is Greenwich.
+ //! Seconds [0.0..59.9999(9)]
+ double utcTimeSec;
+
+ //! Latitude (degrees)
+ double latitude;
+ //! Longitude (degrees)
+ double longitude;
+ //! Altitude (metres above ellipsoid)
+ double altitude;
+
+ //! Horizontal position error: one standard deviation (metres)
+ double horizontalPositionError;
+ //! Vertical position error: one standard deviation (metres)
+ double verticalPositionError;
+
+ //! Heading/track/course with respect to true north (rad)
+ double heading;
+ //! Horizontal velocity (metres/second)
+ double speed;
+ //! Vertical velocity (metres/second)
+ double climbRate;
+
+ //! Number of satellites
+ int satellites;
+ int observationCountOnL1;
+ int observationCountOnL2;
+ //! Position type (see above)
+ PositionType positionType;
+ //! Geoidal Separation (metres)
+ double geoidalSeparation;
+};
+
+
+//! Garmin driver
+class Driver
+{
+
+public:
+
+ //! Constructor
+ //!
+ //! gbxutilacfr::Tracer and gbxutilacfr::Status allow
+ //! (human-readable and machine-readable respectively) external
+ //! monitorining of the driver's internal state.
+ Driver( const Config &config,
+ gbxsickacfr::gbxutilacfr::Tracer &tracer,
+ gbxsickacfr::gbxutilacfr::Status &status );
+
+ ~Driver();
+
+
+ //! Blocks till new data is available
+ void read( Data &data );
+
+private:
+
+ void init();
+ void addDataToFrame();
+ void enableDevice();
+ void disableDevice();
+ int resetDevice();
+ void extractGGAData();
+ void extractVTGData();
+ void extractRMEData();
+ void clearFrame(){haveGGA_ = false; haveVTG_ = false; haveRME_ =false;};
+ bool haveCompleteFrame(){return (haveGGA_ & haveVTG_ & haveRME_);};
+
+ void readFrame( Data &data);
+
+ std::auto_ptr<gbxserialacfr::Serial> serial_;
+
+ Data gpsData_;
+ gbxgpsutilacfr::NmeaMessage nmeaMessage_;
+ int timeOfReadSec_;
+ int timeOfReadUsec_;
+
+ //*** NOTE:- if we change the number of messages in the frame need to change
+ //The N_MSGS_IN_FRAME in the readFrame fn...
+ bool haveGGA_;
+ bool haveVTG_;
+ bool haveRME_;
+
+ Config config_;
+ gbxsickacfr::gbxutilacfr::Tracer& tracer_;
+ gbxsickacfr::gbxutilacfr::Status& status_;
+};
+
+} // namespace
+
+#endif
Added: gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/CMakeLists.txt (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/CMakeLists.txt 2008-04-26 06:42:07 UTC (rev 127)
@@ -0,0 +1,29 @@
+SET( lib_name GbxGpsUtilAcfr )
+GBX_ADD_LICENSE( LGPL )
+
+SET( build TRUE )
+# don't give user an option (while it's an internal library)
+# GBX_REQUIRE_OPTION( build LIB ${lib_name} ON )
+
+SET( int_libs GbxUtilAcfr )
+GBX_REQUIRE_TARGETS( build LIB ${lib_name} ${int_libs} )
+
+IF( build )
+
+ INCLUDE( ${GBX_CMAKE_DIR}/UseBasicRules.cmake )
+
+ FILE( GLOB hdrs *.h )
+ FILE( GLOB srcs *.cpp )
+ SET( dep_libs ${int_libs} ${ext_libs} )
+
+ GBX_ADD_LIBRARY( ${lib_name} SHARED ${srcs} )
+
+ TARGET_LINK_LIBRARIES( ${lib_name} ${dep_libs} )
+
+ GBX_ADD_HEADERS( gbxgarminacfr/gbxgpsutilacfr ${hdrs} )
+
+ IF( GBX_BUILD_TESTS )
+ ADD_SUBDIRECTORY( test )
+ ENDIF( GBX_BUILD_TESTS )
+
+ENDIF( build )
Added: gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/latlon2mga.cpp
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/latlon2mga.cpp (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/latlon2mga.cpp 2008-04-26 06:42:07 UTC (rev 127)
@@ -0,0 +1,349 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2004-2008 Matthew Ridley
+ *
+ * This distribution is licensed to you under the terms described in
+ * the LICENSE file included in this distribution.
+ *
+ */
+
+#include <cmath>
+using std::sqrt;
+using std::floor;
+using std::cos;
+using std::sin;
+using std::tan;
+using std::pow;
+
+#include <iostream>
+// #include <hydroportability/windows.h>
+
+#include "latlon2mga.h"
+
+namespace gbxgpsutilacfr{
+
+// LatLon_2_MGA convert (lat,lon) in degrees to (Northing, Easting) in meters
+void LatLon2MGA( double lat,
+ double lon,
+ double& Northing,
+ double& Easting,
+ int& Zone,
+ EGeodModel geodmodel) {
+ const double Lon_WE_Z0 = -186.0; // [], Longitude of western edge of zone zero
+ const double ZoneWidth = 6.0; // [], inverse zone width
+ const double inv_ZoneWidth = 1.0/ZoneWidth; // [1/], inverse zone width
+ const double Lon_cM_Z0 = Lon_WE_Z0 + 0.5*ZoneWidth; // [], Longitude of the central meridian of zone 0
+ const double False_Easting = 500000.0; // [m], False Easting
+ const double False_Northing = 10000000.0; // [m], False Northing
+ const double K0 = 0.9996; // Central Scale Factor
+
+ const double inv_6 = 1.0/6.0;
+ const double inv_24 = 1.0/24.0;
+ const double inv_120 = 1.0/120.0;
+ const double inv_720 = 1.0/720.0;
+ const double inv_5040 = 1.0/5040.0;
+ const double inv_40320 = 1.0/40320.0;
+
+ const double D2R = M_PI/180.0; // degrees -> radians conversion factor
+
+ static EGeodModel GeodModel = GM_UNDEFINED; // Geod model
+
+ static double a; // [m], Semi major axis
+ static double b; // [m], Semi minor axis
+ static double f; // flatening
+ static double e; // Eccentricity
+ static double e2, e4, e6; // Eccentricity powers
+ static double A0, A2, A4, A6; // Meridian Distance calculation parameters
+
+ double LonCM; // Longitude of the central meridian of calculation zone
+ double cLat, cLat2, cLat4, cLat6;
+ double sLat, sLat2;
+ double tLat, tLat2, tLat4, tLat6;
+ double omega, omega2, omega4, omega6, omega8;
+ double m, nu, Lat, Lon;
+ // double rho;
+ double t1, t2, t3, t4;
+ double psi, psi2, psi3, psi4;
+
+ if (GeodModel != geodmodel) {
+ GeodModel = geodmodel;
+
+ // Get Elipsoid Parameters, a = Semi major axis, f = flatening
+ switch(GeodModel) {
+ case GM_WGS84:
+ a = 6378137.0;
+ f = 1.0/298.257223563;
+ break;
+
+ case GM_GDA94:
+ a = 6378137.0;
+ f = 1.0/298.257222101;
+ break;
+
+ case GM_AGD84:
+ a = 6378160.0;
+ f = 1.0/298.25;
+ break;
+
+ case GM_WGS72:
+ a = 6378135.0;
+ f = 1.0/298.26;
+ break;
+
+ case GM_NSWC_9Z2:
+ a = 6378145.0;
+ f = 1.0/298.25;
+ break;
+
+ case GM_Clarke:
+ a = 20926348.0*0.3048;
+ f = 1.0/294.26;
+ break;
+ default:
+ std::cout << "The parameters for this GeoModel type have not been implemented" << std::endl;
+ break;
+ }
+
+ // Semi minor axis (m)
+ b = a*(1.0-f);
+
+ // Eccentricity
+ e = sqrt(2.0*f - f*f);
+ e2 = e*e;
+ e4 = e2*e2;
+ e6 = e4*e2;
+
+ // Coeficients
+ A0 = 1.0 - (e2/4.0) - (3.0*e4/64.0) - (5.0*e6/256.0);
+ A2 = (3.0/8.0)*(e2 + e4/4.0 + 15*e6/128.0);
+ A4 = (15.0/256.0)*(e4 + 3.0*e6/4.0);
+ A6 = 35.0*e6/3072.0;
+ }
+
+ // calculate zone parameters
+ Zone = (int)floor((lon - Lon_WE_Z0)*inv_ZoneWidth);
+ LonCM = (Lon_cM_Z0 + ZoneWidth*(double)Zone)*D2R;
+
+ // Convert to radian
+ Lat = lat*D2R;
+ Lon = lon*D2R;
+
+ // Convert to MGA
+ cLat = cos(Lat);
+ sLat = sin(Lat);
+ tLat = tan(Lat);
+
+ omega = Lon - LonCM;
+
+ // Powers
+ cLat2 = cLat*cLat;
+ cLat4 = cLat2*cLat2;
+ cLat6 = cLat4*cLat2;
+ sLat2 = sLat*sLat;
+ tLat2 = tLat*tLat;
+ tLat4 = tLat2*tLat2;
+ tLat6 = tLat4*tLat2;
+ omega2 = omega*omega;
+ omega4 = omega2*omega2;
+ omega6 = omega4*omega2;
+ omega8 = omega4*omega4;
+
+ // Meridian Radius
+ m = a*(A0*Lat - A2*sin(2.0*Lat) + A4*sin(4.0*Lat) - A6*sin(6.0*Lat));
+
+ // Radius of Curvature
+ t1 = 1.0 - e2*sLat2;
+// rho = a*(1.0 - e2)/(pow((1.0 - e2*sLat2),1.5));
+ nu = a/(pow(t1,0.5)); // = a/(pow((1.0 - e2*sLat2),0.5));
+ psi = t1/(1.0 - e2); // = nu/rho;
+ psi2 = psi*psi;
+ psi3 = psi2*psi;
+ psi4 = psi2*psi2;
+
+ // Easting
+ t1 = (inv_6*omega2)*cLat2*(psi - tLat2);
+ t2 = (inv_120*omega4)*cLat4*(4.0*psi3*(1.0 - 6.0*tLat2) + psi2*(1.0 + 8.0*tLat2) - 2.0*psi*tLat2 + tLat4);
+ t3 = (inv_5040*omega6)*cLat6*(61.0 - 479.0*tLat2 + 179.0*tLat4 - tLat6);
+
+// double Ehat = (K0*nu*omega*cLat)*(1.0 + t1 + t2 + t3);
+// Easting = Ehat + False_Easting;
+ Easting = (K0*nu*omega*cLat)*(1.0 + t1 + t2 + t3) + False_Easting;
+
+ // Northing
+ t1 = (0.5*omega2);
+ t2 = (inv_24*omega4)*cLat2*(4.0*psi2 + psi - tLat2);
+ t3 = (inv_720*omega6)*cLat4*(8.0*psi4*(11.0 - 24.0*tLat2) - 28.0*psi3*(1.0-6.0*tLat2) + psi2*(1.0-32.0*tLat2) - psi*(2.0*tLat2) + tLat4);
+ t4 = (inv_40320*omega8)*cLat6*(1385.0 - 3111.0*tLat2 + 543.0*tLat4 - tLat6);
+
+// double Nhat = K0*(m + nu*sLat*cLat*(t1 + t2 + t3 + t4));
+// Northing = Nhat + False_Northing;
+ Northing = K0*(m + nu*sLat*cLat*(t1 + t2 + t3 + t4)) + False_Northing;
+}
+
+// MGA_2_LatLon convert (Northing, Easting) in meters to (lat,lon) in degrees
+void MGA2LatLon( double Northing,
+ double Easting,
+ int Zone,
+ double& lat,
+ double& lon,
+ EGeodModel geodmodel) {
+ const double Lon_WE_Z0 = -186.0; // [], Longitude of western edge of zone zero
+ const double ZoneWidth = 6.0; // [], inverse zone width
+// const double inv_ZoneWidth = 1.0/ZoneWidth; // [1/], inverse zone width
+ const double Lon_cM_Z0 = Lon_WE_Z0 + 0.5*ZoneWidth; // [], Longitude of the central meridian of zone 0
+ const double False_Easting = 500000.0; // [m], False Easting
+ const double False_Northing = 10000000.0; // [m], False Northing
+ const double K0 = 0.9996; // Central Scale Factor
+
+ const double c9_4 = 9.0/4.0;
+ const double c225_64 = 225.0/64.0;
+ const double c27_32 = 27.0/32.0;
+ const double c21_16 = 21.0/16.0;
+ const double c55_32 = 55.0/32.0;
+ const double c151_96 = 151.0/96.0;
+ const double c1097_512 = 1097.0/512.0;
+
+ const double inv_6 = 1.0/6.0;
+ const double inv_24 = 1.0/24.0;
+ const double inv_120 = 1.0/120.0;
+ const double inv_720 = 1.0/720.0;
+ const double inv_5040 = 1.0/5040.0;
+ const double inv_40320 = 1.0/40320.0;
+
+ const double D2R = M_PI/180.0;
+ const double R2D = 180.0/M_PI;
+
+ static EGeodModel GeodModel = GM_UNDEFINED; // Geod model
+
+ static double a; // [m], Semi major axis
+ static double b; // [m], Semi minor axis
+ static double f; // flatening
+ static double e; // Eccentricity
+ static double e2, e4, e6; // Eccentricity powers
+ static double n, n2, n3, n4, G;
+
+ double LonCM; // Longitude of the central meridian of calculation zone
+ double psip, psip2, psip3, psip4;
+ double tp, tp2, tp4, tp6;
+ double m, sigma, phip, sphip2, rhop, nup, Ep, EtKr, Secphip;
+ // double sphip;
+ double x, x3, x5, x7;
+ double t1, t2, t3, t4;
+ double Lat, Lon;
+
+ if (GeodModel != geodmodel) {
+ GeodModel = geodmodel;
+
+ // Get Elipsoid Parameters, a = Semi major axis, f = flatening
+ switch(GeodModel) {
+ case GM_WGS84:
+ a = 6378137.0;
+ f = 1.0/298.257223563;
+ break;
+
+ case GM_GDA94:
+ a = 6378137.0;
+ f = 1.0/298.257222101;
+ break;
+
+ case GM_AGD84:
+ a = 6378160.0;
+ f = 1.0/298.25;
+ break;
+
+ case GM_WGS72:
+ a = 6378135.0;
+ f = 1.0/298.26;
+ break;
+
+ case GM_NSWC_9Z2:
+ a = 6378145.0;
+ f = 1.0/298.25;
+ break;
+
+ case GM_Clarke:
+ a = 20926348.0*0.3048;
+ f = 1.0/294.26;
+ break;
+ default:
+ std::cout << "The parameters for this GeoModel type have not been implemented" << std::endl;
+ break;
+ }
+
+ // Semi minor axis (m)
+ b = a*(1.0-f);
+
+ // Eccentricity
+ e = sqrt(2.0*f - f*f);
+ e2 = e*e;
+ e4 = e2*e2;
+ e6 = e4*e2;
+
+ n = f/(2.0 - f); // = (a-b)/(a+b)
+ n2 = n*n;
+ n3 = n*n2;
+ n4 = n2*n2;
+ G = a*(1.0 - n)*(1.0 - n2)*(1.0 + c9_4*n2 + c225_64*n4)*D2R;
+ }
+
+ // calculate zone parameters
+ LonCM = (Lon_cM_Z0 + ZoneWidth*(double)Zone)*D2R;
+
+ // Meridian Radius
+// Np = Northing - False_Northing;
+ m = (Northing - False_Northing)/K0;
+
+ // Foot-point Latitude
+ sigma = m/G*D2R;
+ phip = sigma + (1.5*n - c27_32*n3)*sin(2.0*sigma) + (c21_16*n2 - c55_32*n4)*sin(4.0*sigma) + c151_96*n3*sin(6.0*sigma) + c1097_512*n4*sin(8.0*sigma);
+
+ // Radius of Curvature
+ sphip2 = sin(phip);
+ sphip2 *= sphip2;
+ rhop = a*(1.0 - e2)/(pow((1.0 - e2*sphip2),1.5));
+ nup = a/(pow((1.0 - e2*sphip2),0.5));
+ psip = nup/rhop;
+ psip2 = psip*psip;
+ psip3 = psip2*psip;
+ psip4 = psip2*psip2;
+ tp = tan(phip);
+ tp2 = tp*tp;
+ tp4 = tp2*tp2;
+ tp6 = tp2*tp4;
+
+ // Latitude
+ Ep = Easting - False_Easting;
+ EtKr = Ep*tp/(K0*rhop);
+ x = Ep/(K0*nup);
+ x7 = x*x; // used as temp, x2
+ x3 = x7*x;
+ x5 = x3*x7;
+ x7 *= x5;
+
+ t1 = 0.5*x*EtKr;
+ t2 = inv_24*x3*EtKr*(-4.0*psip2 + 9.0*psip*(1.0 - tp2) + 12.0*tp2);
+ t3 = inv_720*x5*EtKr*(8.0*psip4*(11.0 - 24.0*tp2) - 12.0*psip3*(21.0 - 71.0*tp2) + 15.0*psip2*(15.0 - 98.0*tp2 + 15.0*tp4) + 180.0*psip*(5.0*tp2 - 3.0*tp4) + 360.0*tp4);
+ t4 = inv_40320*x7*EtKr*(1385.0 + 3633.0*tp2 + 4095.0*tp4 + 1575.0*tp6);
+ // The following line use to be:
+ // lat = phip - t1 + t2 - t3 + t4;
+ // which didn't make sense as lat was assigned two different values twice. Changed it so
+ // that compiler warnings were removed but hasn't been tested
+ Lat = phip - t1 + t2 - t3 + t4;
+ lat = Lat*R2D;
+
+ // Longitude
+ Secphip = 1.0/cos(phip);
+ t1 = x*Secphip;
+ t2 = inv_6*x3*Secphip*(psip + 2.0*tp2);
+ t3 = inv_120*x5*Secphip*(psip3*(-4.0 + 24.0*tp2) + psip2*(9.0 - 68.0*tp2) + 72.0*psip*tp2 + 24.0*tp4);
+ t4 = inv_5040*x7*Secphip*(61.0 + 662.0*tp2 + 1320.0*tp4 + 720.0*tp6);
+ // The following line use to be:
+ // lon = LonCM + t1 - t2 + t3 - t4;
+ // which didn't make sense as lon was assigned two different values twice. Changed it so
+ // that compiler warnings were removed but hasn't been tested
+ Lon = LonCM + t1 - t2 + t3 - t4;
+ lon = Lon*R2D;
+}
+
+} //namespace
Added: gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/latlon2mga.h
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/latlon2mga.h (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/latlon2mga.h 2008-04-26 06:42:07 UTC (rev 127)
@@ -0,0 +1,65 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2004-2008 Matthew Ridley
+ *
+ * This distribution is licensed to you under the terms described in
+ * the LICENSE file included in this distribution.
+ *
+ */
+
+// #include <hydroportability/sharedlib.h>
+
+#ifndef LATLON2MGA_H
+#define LATLON2MGA_H
+
+namespace gbxgpsutilacfr {
+
+ // enumeration of geod models
+// SOEXPORT enum EGeodModel {
+ enum EGeodModel {
+ GM_UNDEFINED=-1,
+ GM_WGS84 =0,
+ GM_GDA94,
+ GM_WGS72,
+ GM_AGD84,
+ GM_NSWC_9Z2,
+ GM_Clarke,
+ GM_NoOptions,
+ GM_GRS80=GM_GDA94,
+ GM_ANS=GM_AGD84 };
+
+ // Geod model
+// SOEXPORT typedef struct {
+ typedef struct {
+ double a; // Semi major axis (m)
+ double b; // Semi minor axis (m)
+ double f; // flatening
+ double e; // Eccentricity
+ double e2; // Eccentricity^2
+ double A0, A2, A4, A6; // Meridian Distance calculation parameters
+ } TGeoModelData;
+
+ // LatLon_2_MGA convert (lat,lon) in degrees to (Northing, Easting) in meters
+// SOEXPORT void LatLon2MGA(
+ void LatLon2MGA(
+ double lat,
+ double lon,
+ double& Northing,
+ double& Easting,
+ int& Zone,
+ EGeodModel geodmodel = GM_WGS84);
+
+ // MGA_2_LatLon convert (Northing, Easting) in meters to (lat,lon) in degrees
+// SOEXPORT void MGA2LatLon(
+ void MGA2LatLon(
+ double Northing,
+ double Easting,
+ int Zone,
+ double& lat,
+ double& lon,
+ EGeodModel geodmodel = GM_WGS84);
+
+} //namespace
+
+#endif
Added: gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/nmea.cpp
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/nmea.cpp (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/nmea.cpp 2008-04-26 06:42:07 UTC (rev 127)
@@ -0,0 +1,212 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2004-2008 Mathew Ridley, Alex Brooks, Alexei Makarenko, Tobias Kaupp
+ *
+ * This distribution is licensed to you under the terms described in
+ * the LICENSE file included in this distribution.
+ *
+ */
+
+#include <stdio.h>
+#include <string>
+#include <iostream>
+#include <assert.h>
+#include <gbxsickacfr/gbxutilacfr/tokenise.h>
+
+//////////////////////////////
+
+// Ensure we have strnlen
+// eg. Solaris doesn't define strnlen in string.h, so define it here.
+#if !HAVE_STRNLEN
+
+#include <cstring>
+
+// inline the fucker to guard against multiple inclusion, without the
+// hassle of a special lib.
+inline size_t strnlen(const char *s, size_t maxlen)
+{
+ char *p;
+ if (s == NULL) {
+ return maxlen;
+ }
+ p = (char *)memchr(s, 0, maxlen);
+ if (p == NULL) {
+ return maxlen;
+ }
+ return ((p - s) + 1);
+}
+#endif
+
+//////////////////////////////
+
+#include "nmea.h"
+
+using namespace std;
+using namespace gbxgpsutilacfr;
+
+const char NMEAStartOfSentence = '$';
+const char NMEAChecksumDelim = '*';
+
+
+//*************************************************************
+//The blank constructor
+NmeaMessage::NmeaMessage()
+{
+ init();
+}
+
+//**************************************************************
+void NmeaMessage::init()
+{
+ haveSentence_ = false;
+ haveTokens_ = false;
+ haveCheckSum_ = false;
+ checkSumOK_ = false;
+
+ // Now clear the internal data store
+ sentence_[0] = 0;
+ dataTokens_.clear();
+}
+
+
+//****************************************************************
+NmeaMessage::NmeaMessage(const char *sentence, int testCheckSum)
+{
+ init();
+ setSentence(sentence,testCheckSum);
+}
+
+
+//**********************************************************************
+//Load the data as requested and test the checksum if we are asked to.
+void NmeaMessage::setSentence(const char *data, int AddOrTestCheckSum)
+{
+ init();
+
+ strncpy(sentence_,data, MAX_SENTENCE_LEN);
+
+ //terminate just in case, Note that we have a buffer which is
+ //MAX_SENTENCE_LEN + 1 long!
+
+ sentence_[MAX_SENTENCE_LEN] = '\0';
+ haveSentence_ = true;
+
+ switch(AddOrTestCheckSum)
+ {
+ case TestChecksum: //This is for Rx'd data that we need to test for correct reception
+ testChecksumOk(); break;
+ case AddChecksum: //This is for Tx data that needs to checksummed before sending
+ addCheckSum(); checkSumOK_ = true; break;
+ case DontTestOrAddChecksum:
+ break;
+ default:
+ assert(true);
+ }
+
+}
+
+
+//*****************************************************************
+bool NmeaMessage::testChecksumOk()
+{
+ haveCheckSum_ = true;
+ checkSumOK_ = false;
+
+ //First save the checksum chars from the existing message
+ char* ptr;
+ char chksum_HIB,chksum_LOB;
+
+ //First save the existing two checksum chars from the message
+ //These are straight after the '*' character
+ ptr = strchr(sentence_, NMEAChecksumDelim);
+ if(!ptr){return false;}
+
+ //save the high and low bytes of the checksum
+ //Make sure they are in upper case!
+ chksum_HIB = toupper(*(++ptr));
+ chksum_LOB = toupper(*(ptr + 1));
+
+
+ //invalidate the existing checksum
+ *ptr = *(ptr+1) = 'x';
+
+ //****NOTE** We leave the ptr pointing at the first chksum byte
+
+ //Re-calculate our own copy of the checksum
+ addCheckSum();
+
+ //Now compare our saved version with our new ones
+ if((chksum_HIB == *ptr) && (chksum_LOB == *(ptr+1))){
+ //all looked good!
+ checkSumOK_ = true;
+ return true;
+ }
+
+ //failed the checksum!
+ return false;
+
+}
+
+
+//*****************************************************
+// Add the checksum chars to an existing message
+// NOTE: this assumes that there is allready space in the message for
+// the checksum, and that the checksum delimiter is there
+
+void NmeaMessage::addCheckSum(){
+
+ assert( haveSentence_ );
+
+ haveCheckSum_ = true;
+
+ //check that we have the '$' at the start
+ if(sentence_[0]!= NMEAStartOfSentence)
+ {return;}
+
+ unsigned char chkRunning = 0;
+
+ int loopCount;
+ unsigned char nextChar;
+ for( loopCount =1; loopCount < MAX_SENTENCE_LEN; loopCount++){
+
+ nextChar = static_cast<unsigned char>(sentence_[loopCount]);
+
+ // no delimiter uh oh
+ if((nextChar=='\r')||(nextChar=='\n')||(nextChar=='\0')){
+ throw NmeaException("nmea: cannot calculate checksum, missing '*'\n");
+ return;
+ }
+
+ // goodie we found it
+ if(nextChar==NMEAChecksumDelim)
+ {break;}
+
+ //Keep the running total going
+ chkRunning ^= nextChar;
+ }
+
+ //Put the byte values as upper case HEX back into the message
+ sprintf(sentence_ + loopCount + 1,"%02X",chkRunning);
+
+}
+
+
+//**********************************************************************
+// Parse the data fields of our message...
+void NmeaMessage::parseTokens(){
+
+ //We should not attempt to be parsing a message twice...
+ assert (numDataTokens() == 0);
+
+ //Split the message at the commas
+ //TODO cope with missing fields
+ dataTokens_ = gbxsickacfr::gbxutilacfr::tokenise(sentence_, ",");
+
+ //Now discard the $ and the * from the first and last tokens...
+ //TODO : - dataTokens_[0] =
+
+ //keep track of what we have done.
+ haveTokens_ = true;
+
+}
Added: gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/nmea.h
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/nmea.h (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/nmea.h 2008-04-26 06:42:07 UTC (rev 127)
@@ -0,0 +1,121 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp, Duncan Mercer
+ *
+ * This distribution is licensed to you under the terms described in
+ * the LICENSE file included in this distribution.
+ *
+ */
+
+#include <vector>
+#include <string>
+
+// #include <hydroportability/sharedlib.h>
+
+#ifndef GBXGPSUTILACFR_NMEA_H
+#define GBXGPSUTILACFR_NMEA_H
+
+
+
+/*
+
+for further info:
+
+http://www.kh-gps.de/nmea-faq.htm
+http://vancouver-webpages.com/peter/nmeafaq.txt
+
+NMEA-0183 sentence
+
+$aaccc,c--c*hh<CR><LF>
+|| || || |
+|| || || \________ <CR><LF> - End of sentence (0xOD 0xOA)
+|| || |\__________ hh - Checksum field hexadecimal [optional]
+|| || \___________ * - Checksum delimiter (0x2A) [optional]
+|| |\_______________ c--c - Data sentence block
+|| \________________ , - Field delimiter (0x2c)
+|\_____________________ aaccc - Address field/Command
+\______________________ $ - Start of sentence
+
+ The optional checksum field consists of a "*" and two hex digits
+ representing the exclusive OR of all characters between, but not
+ including, the "$" and "*". A checksum is required on some
+ sentences.
+
+*/
+
+namespace gbxgpsutilacfr {
+
+
+// class SOEXPORT NmeaException : public std::exception
+class NmeaException : public std::exception
+{
+public:
+
+ NmeaException(const char *message)
+ : message_(message) {}
+ NmeaException(const std::string &message)
+ : message_(message) {}
+ virtual ~NmeaException() throw() {}
+ virtual const char* what() const throw() { return message_.c_str(); }
+
+protected:
+ std::string message_;
+};
+
+
+#define MAX_SENTENCE_LEN 256
+
+// When using class to send data, need to add checksum, when reciving data need to test checksum
+// Checksums are usually optional
+ enum{TestChecksum, AddChecksum, DontTestOrAddChecksum};
+
+// class SOEXPORT NmeaMessage{
+ class NmeaMessage{
+ public:
+ NmeaMessage();
+ NmeaMessage(const char *sentence, int testCheckSum = DontTestOrAddChecksum);
+
+ // Do we only have the raw string ?
+ bool haveSentence(){return haveSentence_;};
+ // Set up the internal data for a sentence
+ void setSentence(const char *data, int testCheckSum = DontTestOrAddChecksum);
+ // Have we parsed fields ?
+ bool haveTokens(){return haveTokens_;};
+ // have we a valid checksum ?
+ bool haveValidChecksum(){return checkSumOK_;};
+ // have we checked the checksum?
+ bool haveTestedChecksum(){return haveCheckSum_;};
+ // calculate the checksum from sentence
+ // Note that this function may throw NMEA_Exception...
+ bool testChecksumOk();
+ // Return the raw sentence string
+ const char * sentence(){return sentence_;};
+ // Return a single data token as a string
+ std::string& getDataToken(int i){return dataTokens_[i];};
+
+ // Return the number of fields
+ int numDataTokens(){return dataTokens_.size();};
+ //Tokenise the string that we received
+ void parseTokens();
+
+ private:
+ void init();
+ void addCheckSum();
+ // Do we only have the raw string ?
+ bool haveSentence_;
+ // Have we parsed data into tokens ?
+ bool haveTokens_;
+ // Have we a checksum and is it valid?
+ bool haveCheckSum_;
+ bool checkSumOK_;
+ // The raw sentence, allow for terminator
+ char sentence_[MAX_SENTENCE_LEN+1];
+ // The tokenised data
+ std::vector<std::string> dataTokens_;
+
+ };
+
+}
+
+#endif
Added: gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/test/CMakeLists.txt
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/test/CMakeLists.txt (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/test/CMakeLists.txt 2008-04-26 06:42:07 UTC (rev 127)
@@ -0,0 +1,6 @@
+INCLUDE( ${GBX_CMAKE_DIR}/UseBasicRules.cmake )
+
+LINK_LIBRARIES( GbxGpsUtilAcfr )
+
+ADD_EXECUTABLE( testmga testmga.cpp )
+GBX_ADD_TEST( GbxGpsUtilAcfrTestMga testmga )
Added: gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/test/testmga.cpp
===================================================================
--- gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/test/testmga.cpp (rev 0)
+++ gearbox/trunk/submitted/gbxgarminacfr/gbxgpsutilacfr/test/testmga.cpp 2008-04-26 06:42:07 UTC (rev 127)
@@ -0,0 +1,54 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2004-2008 Mathew Ridley, Alex Brooks, Alexei Makarenko, Tobias Kaupp
+ *
+ * This distribution is licensed to you under the terms described in
+ * the LICENSE file included in this distribution.
+ *
+ */
+
+#include <gbxgarminacfr/gbxgpsutilacfr/latlon2mga.h>
+#include <iostream>
+#include <cmath>
+#include <cstdlib>
+
+using namespace std;
+using namespace gbxgpsutilacfr;
+
+bool close( double a, double b )
+{
+ if ( fabs(a-b) > 1e-3 )
+ {
+ cout<<"TRACE(testmga.cpp): diff: " << a-b << endl;
+ return false;
+ }
+ return true;
+}
+
+int main()
+{
+ double northing, easting;
+
+ double lat = -33.8895;
+ double lon = 151.193;
+
+ cout<<"TRACE(testmga.cpp): lat, lon: " << lat << ", " << lon << endl;
+
+ int zone;
+ LatLon2MGA( lat, lon, northing, easting, zone );
+ cout<<"TRACE(testmga.cpp): Using LatLon2MGA: northing,easting = " << northing << ", " << easting << endl;
+
+ double backlat, backlon;
+ MGA2LatLon( northing, easting, zone, backlat, backlon );
+ cout<<"TRACE(testmga.cpp): Converting back: lat,lon = " << backlat << ", " << backlon << endl;
+
+ if ( ! ( close(lat,backlat) && close(lon,backlon) ) )
+ {
+ cout << "ERROR(testmga.cpp): latlon->mga->latlon is broken." << endl;
+ exit(1);
+ }
+
+ cout<<"TRACE(testmga.cpp): test PASSED" << endl;
+ return 0;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-04-26 06:41:19
|
Revision: 126
http://gearbox.svn.sourceforge.net/gearbox/?rev=126&view=rev
Author: russo2503v
Date: 2008-04-25 23:41:26 -0700 (Fri, 25 Apr 2008)
Log Message:
-----------
added include for store.h
Modified Paths:
--------------
gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/gbxiceutilacfr.h
Modified: gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/gbxiceutilacfr.h
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/gbxiceutilacfr.h 2008-04-26 06:40:47 UTC (rev 125)
+++ gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/gbxiceutilacfr.h 2008-04-26 06:41:26 UTC (rev 126)
@@ -18,5 +18,6 @@
#include <gbxsickacfr/gbxiceutilacfr/subsystemthread.h>
#include <gbxsickacfr/gbxiceutilacfr/timer.h>
#include <gbxsickacfr/gbxiceutilacfr/buffer.h>
+#include <gbxsickacfr/gbxiceutilacfr/store.h>
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-04-26 06:40:41
|
Revision: 125
http://gearbox.svn.sourceforge.net/gearbox/?rev=125&view=rev
Author: russo2503v
Date: 2008-04-25 23:40:47 -0700 (Fri, 25 Apr 2008)
Log Message:
-----------
added comment
Modified Paths:
--------------
gearbox/trunk/src/gbxsickacfr/driver.h
Modified: gearbox/trunk/src/gbxsickacfr/driver.h
===================================================================
--- gearbox/trunk/src/gbxsickacfr/driver.h 2008-04-26 06:40:05 UTC (rev 124)
+++ gearbox/trunk/src/gbxsickacfr/driver.h 2008-04-26 06:40:47 UTC (rev 125)
@@ -61,6 +61,7 @@
std::string warnings;
};
+//! SICK driver.
class Driver
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-04-26 06:39:58
|
Revision: 124
http://gearbox.svn.sourceforge.net/gearbox/?rev=124&view=rev
Author: russo2503v
Date: 2008-04-25 23:40:05 -0700 (Fri, 25 Apr 2008)
Log Message:
-----------
added function needed by the garmin driver
Added Paths:
-----------
gearbox/trunk/src/gbxsickacfr/gbxutilacfr/tokenise.cpp
gearbox/trunk/src/gbxsickacfr/gbxutilacfr/tokenise.h
Added: gearbox/trunk/src/gbxsickacfr/gbxutilacfr/tokenise.cpp
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxutilacfr/tokenise.cpp (rev 0)
+++ gearbox/trunk/src/gbxsickacfr/gbxutilacfr/tokenise.cpp 2008-04-26 06:40:05 UTC (rev 124)
@@ -0,0 +1,69 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2007-2008 Alex Brooks
+ *
+ * This distribution is licensed to you under the terms described in
+ * the LICENSE file included in this distribution.
+ *
+ */
+
+#include "tokenise.h"
+#include <iostream>
+
+using namespace std;
+
+namespace gbxsickacfr {
+namespace gbxutilacfr {
+
+std::vector<string> tokenise( const string &str, const string &delimiter )
+{
+#define SKIP_DELIMS false
+#if !SKIP_DELIMS
+ std::vector<std::string> tokens;
+
+ string::size_type lastPos = 0;
+ // Find first "non-delimiter".
+ string::size_type pos = str.find_first_of(delimiter, lastPos);
+
+ while ( pos != string::npos )
+ {
+ // Found a token, add it to the vector.
+ tokens.push_back(str.substr(lastPos, pos - lastPos));
+ lastPos = pos+1;
+
+ // Find first "non-delimiter".
+ pos = str.find_first_of(delimiter, lastPos);
+ }
+ tokens.push_back(str.substr(lastPos,str.size()));
+
+ return tokens;
+
+
+#else
+
+ std::vector<std::string> tokens;
+
+ // Skip delimiters at beginning.
+ string::size_type lastPos = str.find_first_not_of(delimiter, 0);
+ // Find first "non-delimiter".
+ string::size_type pos = str.find_first_of(delimiter, lastPos);
+
+ while (string::npos != pos || string::npos != lastPos)
+ {
+ // Found a token, add it to the vector.
+ tokens.push_back(str.substr(lastPos, pos - lastPos));
+
+ // Skip delimiters. Note the "not_of"
+ lastPos = str.find_first_not_of(delimiter, pos);
+
+ // Find next "non-delimiter"
+ pos = str.find_first_of(delimiter, lastPos);
+ }
+
+ return tokens;
+#endif
+}
+
+}
+}
Added: gearbox/trunk/src/gbxsickacfr/gbxutilacfr/tokenise.h
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxutilacfr/tokenise.h (rev 0)
+++ gearbox/trunk/src/gbxsickacfr/gbxutilacfr/tokenise.h 2008-04-26 06:40:05 UTC (rev 124)
@@ -0,0 +1,28 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2007-2008 Alex Brooks
+ *
+ * This distribution is licensed to you under the terms described in
+ * the LICENSE file included in this distribution.
+ *
+ */
+
+#ifndef GBXUTILACFR_TOKENISE_H
+#define GBXUTILACFR_TOKENISE_H
+
+#include <string>
+#include <vector>
+
+namespace gbxsickacfr {
+namespace gbxutilacfr {
+
+//! Takes a string containing tokens separated by a delimiter
+//! Returns the vector of tokens
+std::vector<std::string> tokenise( const std::string &str,
+ const std::string &delimiter );
+
+}
+}
+
+#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-04-26 03:53:10
|
Revision: 123
http://gearbox.svn.sourceforge.net/gearbox/?rev=123&view=rev
Author: russo2503v
Date: 2008-04-25 20:53:15 -0700 (Fri, 25 Apr 2008)
Log Message:
-----------
cosmetic
Modified Paths:
--------------
gearbox/trunk/src/gbxserialacfr/serial.cpp
Modified: gearbox/trunk/src/gbxserialacfr/serial.cpp
===================================================================
--- gearbox/trunk/src/gbxserialacfr/serial.cpp 2008-04-22 03:52:09 UTC (rev 122)
+++ gearbox/trunk/src/gbxserialacfr/serial.cpp 2008-04-26 03:53:15 UTC (rev 123)
@@ -32,6 +32,8 @@
# include <sys/filio.h>
#endif
+//////////////////////////////
+
// Ensure we have strnlen
// eg. Solaris doesn't define strnlen in string.h, so define it here.
#if !HAVE_STRNLEN
@@ -54,6 +56,8 @@
}
#endif
+//////////////////////////////
+
using namespace std;
namespace gbxserialacfr {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2008-04-22 03:52:02
|
Revision: 122
http://gearbox.svn.sourceforge.net/gearbox/?rev=122&view=rev
Author: tobasco
Date: 2008-04-21 20:52:09 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
Modified Paths:
--------------
gearbox/trunk/CTestConfig.cmake
Modified: gearbox/trunk/CTestConfig.cmake
===================================================================
--- gearbox/trunk/CTestConfig.cmake 2008-04-22 03:14:46 UTC (rev 121)
+++ gearbox/trunk/CTestConfig.cmake 2008-04-22 03:52:09 UTC (rev 122)
@@ -1,5 +1,5 @@
set(CTEST_PROJECT_NAME "Gearbox")
-set(CTEST_NIGHTLY_START_TIME "04:00:00 EAST")
+set(CTEST_NIGHTLY_START_TIME "04:00:00 AEDT")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "cdash.acfr.usyd.edu.au")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2008-04-22 03:14:47
|
Revision: 121
http://gearbox.svn.sourceforge.net/gearbox/?rev=121&view=rev
Author: tobasco
Date: 2008-04-21 20:14:46 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
timezone
Modified Paths:
--------------
gearbox/trunk/CTestConfig.cmake
Modified: gearbox/trunk/CTestConfig.cmake
===================================================================
--- gearbox/trunk/CTestConfig.cmake 2008-04-21 12:56:18 UTC (rev 120)
+++ gearbox/trunk/CTestConfig.cmake 2008-04-22 03:14:46 UTC (rev 121)
@@ -1,5 +1,5 @@
set(CTEST_PROJECT_NAME "Gearbox")
-set(CTEST_NIGHTLY_START_TIME "04:00:00 EST")
+set(CTEST_NIGHTLY_START_TIME "04:00:00 EAST")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "cdash.acfr.usyd.edu.au")
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2008-04-21 12:56:15
|
Revision: 120
http://gearbox.svn.sourceforge.net/gearbox/?rev=120&view=rev
Author: tobasco
Date: 2008-04-21 05:56:18 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
updated dart scripts
Modified Paths:
--------------
gearbox/trunk/cmake/dart/gearbox-nightly-linux-gcc42.cmake
gearbox/trunk/cmake/dart/gearbox-nightly.sh
Modified: gearbox/trunk/cmake/dart/gearbox-nightly-linux-gcc42.cmake
===================================================================
--- gearbox/trunk/cmake/dart/gearbox-nightly-linux-gcc42.cmake 2008-04-21 12:45:02 UTC (rev 119)
+++ gearbox/trunk/cmake/dart/gearbox-nightly-linux-gcc42.cmake 2008-04-21 12:56:18 UTC (rev 120)
@@ -2,19 +2,19 @@
# Edit this to match your configuration, then set a cron job
# to run it regularly (with 'ctest -S <script_name>').
#
-SET(DASHBOARD_ROOT "/home/users/dart/ctests/gearbox/gearbox-nightly")
-SET(CTEST_SOURCE_DIRECTORY "${DASHBOARD_ROOT}/gearbox")
-SET(CTEST_BINARY_DIRECTORY "${DASHBOARD_ROOT}/build-gearbox")
+SET (DASHBOARD_ROOT "/home/users/dart/ctests/gearbox/gearbox-nightly")
+SET (CTEST_SOURCE_DIRECTORY "${DASHBOARD_ROOT}/gearbox")
+SET (CTEST_BINARY_DIRECTORY "${DASHBOARD_ROOT}/build-gearbox")
-SET(CTEST_CVS_COMMAND "svn")
+SET (CTEST_CVS_COMMAND "svn")
# which command to use for running the dashboard
#
-#SET(CTEST_COMMAND "ctest -D Nightly -A \"${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}\"" )
-SET(CTEST_COMMAND "ctest -D Nightly -A \"${CTEST_BINARY_DIRECTORY}/cmake_config_report.txt\"" )
+#SET (CTEST_COMMAND "ctest -D Nightly -A \"${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}\"" )
+SET (CTEST_COMMAND "ctest -D Nightly -A \"${CTEST_BINARY_DIRECTORY}/cmake_config_report.txt\"" )
# what cmake command to use for configuring this dashboard
-SET(CTEST_CMAKE_COMMAND "cmake" )
+SET (CTEST_CMAKE_COMMAND "cmake" )
####################################################################
@@ -23,19 +23,21 @@
####################################################################
# should ctest wipe the binary tree before running
-SET(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
+SET (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
# this is the initial cache to use for the binary tree, be careful to escape
# any quotes inside of this string if you use it
-SET(CTEST_INITIAL_CACHE "
+SET (CTEST_INITIAL_CACHE "
MAKECOMMAND:STRING=make
BUILDNAME:STRING=Debian-gcc42
SITE:STRING=devdebian.acfr.usyd.edu.au
CMAKE_BUILD_TYPE:STRING=Debug
+ICEUTIL_HOME:STRING=/opt/Ice
+GEARBOX_INSTALL:STRING=/opt/gearbox-nightly
")
# set any extra envionment variables here
-SET(CTEST_ENVIRONMENT
+SET (CTEST_ENVIRONMENT
CC=gcc-4.2
CXX=g++-4.2
CXXFLAGS=-fprofile-arcs -ftest-coverage
Modified: gearbox/trunk/cmake/dart/gearbox-nightly.sh
===================================================================
--- gearbox/trunk/cmake/dart/gearbox-nightly.sh 2008-04-21 12:45:02 UTC (rev 119)
+++ gearbox/trunk/cmake/dart/gearbox-nightly.sh 2008-04-21 12:56:18 UTC (rev 120)
@@ -2,19 +2,14 @@
dashboard=$HOME/ctests/gearbox/gearbox-nightly
-#
# compile with gcc-4.2
-#
logfile=$dashboard/gearbox.log
echo ---------------------------------------- >> $logfile
date >> $logfile
echo ---------------------------------------- >> $logfile
+# build and test
/usr/bin/ctest -S $dashboard/gearbox-nightly-linux-gcc42.cmake -V >> $logfile 2>&1
-
-#
# after testing, install so gearbox-dependent nightly tests will work
-#
+cd $dashboard/build-gearbox >> $logfile 2>&1
+make install >> $logfile 2>&1
-# cd $dashboard/build-gearbox >> $logfile 2>&1
-# make install >> $logfile 2>&1
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-04-21 12:45:06
|
Revision: 119
http://gearbox.svn.sourceforge.net/gearbox/?rev=119&view=rev
Author: russo2503v
Date: 2008-04-21 05:45:02 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
post-release version++
Modified Paths:
--------------
gearbox/trunk/CMakeLists.txt
gearbox/trunk/doc/devguide.dox
gearbox/trunk/doc/history.dox
Added Paths:
-----------
gearbox/trunk/doc/release_instructions.dox
Modified: gearbox/trunk/CMakeLists.txt
===================================================================
--- gearbox/trunk/CMakeLists.txt 2008-04-21 12:14:35 UTC (rev 118)
+++ gearbox/trunk/CMakeLists.txt 2008-04-21 12:45:02 UTC (rev 119)
@@ -11,7 +11,7 @@
#
# project version string
#
-SET( GBX_PROJECT_VERSION 1.0.0 CACHE STRING "Version of GearBox distribution" )
+SET( GBX_PROJECT_VERSION 1.0.0+ CACHE STRING "Version of GearBox distribution" )
#
# The rest is done by a script
Modified: gearbox/trunk/doc/devguide.dox
===================================================================
--- gearbox/trunk/doc/devguide.dox 2008-04-21 12:14:35 UTC (rev 118)
+++ gearbox/trunk/doc/devguide.dox 2008-04-21 12:45:02 UTC (rev 119)
@@ -20,5 +20,6 @@
- @ref gbx_doc_principles
- @ref gbx_doc_practices
+- @ref gbx_doc_release
*/
Modified: gearbox/trunk/doc/history.dox
===================================================================
--- gearbox/trunk/doc/history.dox 2008-04-21 12:14:35 UTC (rev 118)
+++ gearbox/trunk/doc/history.dox 2008-04-21 12:45:02 UTC (rev 119)
@@ -23,6 +23,17 @@
@section hydro_doc_todo_todo To-Do List for Next Release
+@section gbx_doc_history_head Changes in SVN since Last Release
+
+@par Project wide
+
+@par New libraries
+
+@par Updated libraries
+
+@par Removed libraries
+
+
@section gbx_doc_history_100 Changes in Release 1.0.0
@par Project wide
Added: gearbox/trunk/doc/release_instructions.dox
===================================================================
--- gearbox/trunk/doc/release_instructions.dox (rev 0)
+++ gearbox/trunk/doc/release_instructions.dox 2008-04-21 12:45:02 UTC (rev 119)
@@ -0,0 +1,50 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2008 GearBox Team
+ *
+ * This distribution is licensed to you under the terms described in
+ * the LICENSE file included in this distribution.
+ *
+ */
+
+/*!
+
+@page gbx_doc_release Release Instructions
+
+@note Reviewed for release 1.0.0.
+
+@section gbx_doc_release_release Release
+
+-# On any machine
+ - Make sure the distributions compile cleanly and the tests don't fail.
+-# On a machine that doesn't build regularly:
+ -# Blow away old installation.
+ -# Check out clean copy.
+ -# Modify the project version in the top-level CMakeLists.txt file.
+ -# Modify the 'news' section in the 'index.dox' file.
+ -# (Possibly) delete retired directory.
+ -# Update LICENSE information by running cmake with BUILD_LICENSE=ON.
+ -# Shunt everything down in 'doc/history.dox'.
+ -# Delete any temporary files created by an editor.
+ -# Check in those changes.
+ -# Tag the distributions, eg with:
+@verbatim
+$ svn copy https://gearbox.svn.sf.net/svnroot/gearbox/gearbox/trunk https://gearbox.svn.sf.net/svnroot/gearbox/gearbox/tags/RELEASE_1.7.0 -m 'Tagging release 1.7.0'
+@endverbatim
+ -# Delete all .svn directories (eg with 'find . -name .svn | xargs rm -rf')
+ -# Create tar-ball, named eg. 'gearbox-1.7.0.tar.gz'
+ -# Now the tar-ball is ready to roll. But first test that the original untars and builds cleanly.
+ -# Copy the tar-ball to a machine with external access.
+-# On a machine with external access:
+ -# ftp to upload.sf.net (anonymous login)
+ -# cd /incoming
+ -# 'put' the tarball
+-# Create a new distro through the sourceforge web interface
+ - Login a project administrator
+ - (Go through "'Admin' -> 'File Releases'" from the GearBox project page)
+-# Update the web page
+ - Use the script: <distro>/doc/rebuild_docco.sh
+-# Increment the version numbers (eg '1.7.0' -> '1.7.0+') in the top-level CMakeLists.txt files.
+
+*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-04-21 12:15:15
|
Revision: 118
http://gearbox.svn.sourceforge.net/gearbox/?rev=118&view=rev
Author: russo2503v
Date: 2008-04-21 05:14:35 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
Tagging release 1.0.0
Added Paths:
-----------
gearbox/tags/RELEASE_1.0.0/
Copied: gearbox/tags/RELEASE_1.0.0 (from rev 117, gearbox/trunk)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-04-21 12:12:36
|
Revision: 117
http://gearbox.svn.sourceforge.net/gearbox/?rev=117&view=rev
Author: russo2503v
Date: 2008-04-21 05:12:27 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
version++
Modified Paths:
--------------
gearbox/trunk/CMakeLists.txt
gearbox/trunk/LICENSE
Modified: gearbox/trunk/CMakeLists.txt
===================================================================
--- gearbox/trunk/CMakeLists.txt 2008-04-21 11:53:02 UTC (rev 116)
+++ gearbox/trunk/CMakeLists.txt 2008-04-21 12:12:27 UTC (rev 117)
@@ -11,7 +11,7 @@
#
# project version string
#
-SET( GBX_PROJECT_VERSION 0.0.1 CACHE STRING "Version of GearBox distribution" )
+SET( GBX_PROJECT_VERSION 1.0.0 CACHE STRING "Version of GearBox distribution" )
#
# The rest is done by a script
Modified: gearbox/trunk/LICENSE
===================================================================
--- gearbox/trunk/LICENSE 2008-04-21 11:53:02 UTC (rev 116)
+++ gearbox/trunk/LICENSE 2008-04-21 12:12:27 UTC (rev 117)
@@ -2,6 +2,10 @@
----------------------------------------------------------------------
DIRECTORY license
----------------------------------------------------------------------
-src/basic LGPL
-src/gbxadvanced GPL
-src/urglaser GPL
+src/basicexample LGPL
+src/gbxadvancedexample GPL
+src/gbxserialacfr LGPL
+src/gbxserialacfr/lockfile LGPL
+src/gbxsickacfr LGPL
+src/gbxsickacfr/gbxserialdeviceacfr LGPL
+src/urg_nz GPL
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-04-21 11:52:58
|
Revision: 116
http://gearbox.svn.sourceforge.net/gearbox/?rev=116&view=rev
Author: russo2503v
Date: 2008-04-21 04:53:02 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
fixed most of doxygen warnings
Modified Paths:
--------------
gearbox/trunk/cmake/FindIceUtil.cmake
gearbox/trunk/doc/doxyfile
gearbox/trunk/doc/index.dox
gearbox/trunk/doc/principles.dox
gearbox/trunk/src/gbxserialacfr/serial.h
gearbox/trunk/src/gbxsickacfr/doc.dox
gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/store.h
gearbox/trunk/src/urg_nz/urg_nz.h
Added Paths:
-----------
gearbox/trunk/doc/history.dox
gearbox/trunk/src/basicexample/doc.dox
gearbox/trunk/src/gbxadvancedexample/doc.dox
gearbox/trunk/src/urg_nz/doc.dox
Removed Paths:
-------------
gearbox/trunk/src/basicexample/basicexample.dox
gearbox/trunk/src/gbxadvancedexample/gbxadvancedexample.dox
gearbox/trunk/src/urg_nz/urg_nz.dox
Modified: gearbox/trunk/cmake/FindIceUtil.cmake
===================================================================
--- gearbox/trunk/cmake/FindIceUtil.cmake 2008-04-21 10:27:26 UTC (rev 115)
+++ gearbox/trunk/cmake/FindIceUtil.cmake 2008-04-21 11:53:02 UTC (rev 116)
@@ -22,11 +22,15 @@
# debian package installs Ice here
/usr/include/IceUtil
# Test standard installation points: newer versions first
- /opt/Ice-3.2.1/include/IceUtil
- /opt/Ice-3.2.0/include/IceUtil
+ /opt/Ice-3.3/include/IceUtil
+ /opt/Ice-3.2/include/IceUtil
# some people may manually choose to install Ice here
/usr/local/include/IceUtil
# windows
+ C:/Ice-3.3.0-VC80/include/IceUtil
+ C:/Ice-3.3.0/include/IceUtil
+ C:/Ice-3.2.1-VC80/include/IceUtil
+ C:/Ice-3.2.1/include/IceUtil
C:/Ice-3.2.0-VC80/include/IceUtil
C:/Ice-3.2.0/include/IceUtil
)
Modified: gearbox/trunk/doc/doxyfile
===================================================================
--- gearbox/trunk/doc/doxyfile 2008-04-21 10:27:26 UTC (rev 115)
+++ gearbox/trunk/doc/doxyfile 2008-04-21 11:53:02 UTC (rev 116)
@@ -83,7 +83,7 @@
*.c \
*.cc
RECURSIVE = YES
-EXCLUDE =
+EXCLUDE = ../src/gbxsickacfr/gbxiceutilacfr/
EXCLUDE_SYMLINKS = NO
EXCLUDE_PATTERNS =
EXAMPLE_PATH = ../src
Added: gearbox/trunk/doc/history.dox
===================================================================
--- gearbox/trunk/doc/history.dox (rev 0)
+++ gearbox/trunk/doc/history.dox 2008-04-21 11:53:02 UTC (rev 116)
@@ -0,0 +1,44 @@
+/*
+ * GearBox Project: Peer-Reviewed Open-Source Libraries for Robotics
+ * http://gearbox.sf.net/
+ * Copyright (c) 2008 GearBox Team
+ *
+ * This distribution is licensed to you under the terms described in
+ * the LICENSE file included in this distribution.
+ *
+ */
+
+TEMPLATE
+@section gbx_doc_history_head Changes in SVN since Last Release
+@par Project wide
+@par New libraries
+@par Updated libraries
+@par Removed libraries
+
+/*!
+
+@page gbx_doc_history Changes since Last Release and To-Do List
+
+Developers: as you make substantial changes in the code (add features, fix bugs, etc.), add an item in the section on changes. When the next version is released, this list will be copied into the release notes.
+
+@section hydro_doc_todo_todo To-Do List for Next Release
+
+@section gbx_doc_history_100 Changes in Release 1.0.0
+
+@par Project wide
+
+- First release.
+
+@par New libraries
+
+- liburg_nz
+ - moved from the Player project
+
+- libGbxSerialAcfr
+ - moved from the Orca project
+
+- libGbxSickAcfr
+ - moved from the Orca project
+
+
+*/
Modified: gearbox/trunk/doc/index.dox
===================================================================
--- gearbox/trunk/doc/index.dox 2008-04-21 10:27:26 UTC (rev 115)
+++ gearbox/trunk/doc/index.dox 2008-04-21 11:53:02 UTC (rev 116)
@@ -45,6 +45,7 @@
@section gbx_doc_index_news News
+- 21-Apr-08 First release, version 1.0 (@ref gbx_doc_history_100)
- 18-Mar-08 Accepted ACFR's implementation of SICK laser driver and the serial library used by it.
- 08-Feb-08 Accepted the first library: a driver for the URG laser.
- 01-Feb-08 Project created. @ref gbx_doc_announce "A half-page announcement".
Modified: gearbox/trunk/doc/principles.dox
===================================================================
--- gearbox/trunk/doc/principles.dox 2008-04-21 10:27:26 UTC (rev 115)
+++ gearbox/trunk/doc/principles.dox 2008-04-21 11:53:02 UTC (rev 116)
@@ -166,7 +166,7 @@
- variables, member variables, classes, structs, namespaces
- functions, member functions
-- #defines, enums
+- \#defines, enums
- filenames
- API usage style
Deleted: gearbox/trunk/src/basicexample/basicexample.dox
===================================================================
--- gearbox/trunk/src/basicexample/basicexample.dox 2008-04-21 10:27:26 UTC (rev 115)
+++ gearbox/trunk/src/basicexample/basicexample.dox 2008-04-21 11:53:02 UTC (rev 116)
@@ -1,34 +0,0 @@
-/*!
-
-@ingroup gbx_libs
-@ingroup gbx_examples
-@ingroup gbx_c
-@ingroup gbx_win
-@ingroup gbx_linux
-@defgroup gbx_library_basicexample libbasicexample
-@brief A build-system example of setting up a library with no dependencies.
-
-@par General notes
-
-All double's and int's are initialized to zero.
-
-For a full list of functions and classes see @ref basicexample.
-
-Header file:
-@verbatim
-#include <basicexample/basicexample.h>
-@endverbatim
-
-@par Responsible Developer
-Alex Makarenko
-
-*/
-
-/*!
-@namespace basicexample
-@brief Namespace for the basic build system example.
-
-This namespace is part of a library serving as a basic build system example.
-
-@see @ref gbx_library_basicexample
-*/
Copied: gearbox/trunk/src/basicexample/doc.dox (from rev 114, gearbox/trunk/src/basicexample/basicexample.dox)
===================================================================
--- gearbox/trunk/src/basicexample/doc.dox (rev 0)
+++ gearbox/trunk/src/basicexample/doc.dox 2008-04-21 11:53:02 UTC (rev 116)
@@ -0,0 +1,34 @@
+/*!
+
+@ingroup gbx_libs
+@ingroup gbx_examples
+@ingroup gbx_c
+@ingroup gbx_win
+@ingroup gbx_linux
+@defgroup gbx_library_basicexample libbasicexample
+@brief A build-system example of setting up a library with no dependencies.
+
+@par General notes
+
+All double's and int's are initialized to zero.
+
+For a full list of functions and classes see @ref basicexample.
+
+Header file:
+@verbatim
+#include <basicexample/basicexample.h>
+@endverbatim
+
+@par Responsible Developer
+Alex Makarenko
+
+*/
+
+/*!
+@namespace basicexample
+@brief Namespace for the basic build system example.
+
+This namespace is part of a library serving as a basic build system example.
+
+@see @ref gbx_library_basicexample
+*/
Copied: gearbox/trunk/src/gbxadvancedexample/doc.dox (from rev 114, gearbox/trunk/src/gbxadvancedexample/gbxadvancedexample.dox)
===================================================================
--- gearbox/trunk/src/gbxadvancedexample/doc.dox (rev 0)
+++ gearbox/trunk/src/gbxadvancedexample/doc.dox 2008-04-21 11:53:02 UTC (rev 116)
@@ -0,0 +1,33 @@
+/*!
+
+@ingroup gbx_libs
+@ingroup gbx_examples
+@ingroup gbx_cpp
+@ingroup gbx_linux
+@defgroup gbx_library_gbxadvancedexample libGbxAdvancedExample
+@brief A build-system example of setting up a library with an internal dependency.
+
+@par General notes
+
+All double's and int's are initialized to zero.
+
+For a full list of functions and classes see @ref gbxadvancedexample.
+
+Header file:
+@verbatim
+#include <gbxadvancedexample/gbxadvancedexample.h>
+@endverbatim
+
+@par Responsible Developer
+Alex Makarenko
+
+*/
+
+/*!
+@namespace gbxadvancedexample
+@brief Namespace for the advanced build system example.
+
+This namespace is part of a library serving as an advanced build system example.
+
+@see @ref gbx_library_gbxadvancedexample
+*/
Deleted: gearbox/trunk/src/gbxadvancedexample/gbxadvancedexample.dox
===================================================================
--- gearbox/trunk/src/gbxadvancedexample/gbxadvancedexample.dox 2008-04-21 10:27:26 UTC (rev 115)
+++ gearbox/trunk/src/gbxadvancedexample/gbxadvancedexample.dox 2008-04-21 11:53:02 UTC (rev 116)
@@ -1,33 +0,0 @@
-/*!
-
-@ingroup gbx_libs
-@ingroup gbx_examples
-@ingroup gbx_cpp
-@ingroup gbx_linux
-@defgroup gbx_library_gbxadvancedexample libGbxAdvancedExample
-@brief A build-system example of setting up a library with an internal dependency.
-
-@par General notes
-
-All double's and int's are initialized to zero.
-
-For a full list of functions and classes see @ref gbxadvancedexample.
-
-Header file:
-@verbatim
-#include <gbxadvancedexample/gbxadvancedexample.h>
-@endverbatim
-
-@par Responsible Developer
-Alex Makarenko
-
-*/
-
-/*!
-@namespace gbxadvancedexample
-@brief Namespace for the advanced build system example.
-
-This namespace is part of a library serving as an advanced build system example.
-
-@see @ref gbx_library_gbxadvancedexample
-*/
Modified: gearbox/trunk/src/gbxserialacfr/serial.h
===================================================================
--- gearbox/trunk/src/gbxserialacfr/serial.h 2008-04-21 10:27:26 UTC (rev 115)
+++ gearbox/trunk/src/gbxserialacfr/serial.h 2008-04-21 11:53:02 UTC (rev 116)
@@ -52,7 +52,7 @@
int usec;
};
- //! Opens a device @ref dev.
+ //! Opens a device @c dev.
//! Throws SerialException's or LockFileException's (both derive from std::exception) on error.
//! Timeouts control the various read functions below.
//! A timeout value of (sec=0,usec=0) indicates 'timeouts disabled'.
@@ -77,12 +77,12 @@
//! but can't set the {en|dis}abled state of timeouts.
void setTimeout( const Timeout &timeout );
- //! Reads up to @ref count bytes into buffer @ref buf.
+ //! Reads up to @c count bytes into buffer @c buf.
//! Returns the number of bytes read, or '-1' on timeout (if timeouts are enabled).
//! If timeouts are not enabled, blocks till it gets something.
int read(void *buf, int count);
- //! Tries to read exactly @ref count bytes into @ref buf.
+ //! Tries to read exactly @c count bytes into @c buf.
//! Returns the number of bytes read, or throws an exception.
//!
//! If timeouts are not enabled we might block forever, waiting for the number of bytes we want or an error.
@@ -94,7 +94,7 @@
//!
int readFull(void *buf, int count);
- //! Reads up to @ref count bytes-1 (including @ref termchar), terminated by @ref termchar.
+ //! Reads up to @c count bytes-1 (including @c termchar), terminated by @c termchar.
//! Returns the number of bytes read.
//! After reading the data, the string will be NULL terminated.
//!
@@ -158,7 +158,7 @@
// GOT_DATA : data available
int waitForDataOrTimeout(void);
- // Opens a device @ref dev.
+ // Opens a device @c dev.
void open(int flags=0);
// Won't throw exceptions.
Modified: gearbox/trunk/src/gbxsickacfr/doc.dox
===================================================================
--- gearbox/trunk/src/gbxsickacfr/doc.dox 2008-04-21 10:27:26 UTC (rev 115)
+++ gearbox/trunk/src/gbxsickacfr/doc.dox 2008-04-21 11:53:02 UTC (rev 116)
@@ -9,10 +9,10 @@
*/
/*!
-@ingroup gbx_drivers_laserscanner2d
+@ingroup gbx_libs
@ingroup gbx_cpp
@ingroup gbx_linux
-@defgroup gbx_driver_laserscanner2dsickacfr LaserScanner2dSickAcfr
+@defgroup gbx_library_gbxsickacfr GbxSickAcfr
@brief ACFR driver for SICK laser range-finder.
Drives SICK hardware, directly connected to the computer.
@@ -43,14 +43,23 @@
@par Dependencies
-- libIceUtil (for timing/threads/mutexes), v.3.2 or newer (latest tested 3.3b).
-- libGbxSerialAcfr
+- libIceUtil (for timing/threads/mutexes), v.3.2 or newer (latest tested 3.3).
+- @ref gbx_library_gbxserialacfr
+@par Installation
+
+- Finding libIceUtil
+ - IceUtil will be found automatically if installed in one of several standard locations.
+ - You can specify it's installation point with @c ICEUTIL_HOME CMake variable (or an environment variable with the same name). For example:
+@verbatim
+$ cmake -DICEUTIL_HOME=/home/myuser/install .
+@endverbatim
+
@par Limitations
- This is a Linux-only implementation.
- It works with those serial devices which @ref gbx_library_gbxserialacfr supports.
-- Currently, timestamps are generated whenever a _full_ message
+- Currently, timestamps are generated whenever a @b full message
arrives. This is sub-optimal, since the message may take a
significant amount of time to be transmitted over the serial
interface. eg. 181 samples at 38400 baud takes about 75ms.
Modified: gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/store.h
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/store.h 2008-04-21 10:27:26 UTC (rev 115)
+++ gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/store.h 2008-04-21 11:53:02 UTC (rev 116)
@@ -26,11 +26,11 @@
* This container is similar to a circular Buffer of size one but with two
* differences:
* - a copy of the data is always available, yet the user knows when new
- * data has arrived by calling @ref isNewData
- * - @ref getNext returns the new data arrives (not when the buffer
+ * data has arrived by calling isNewData().
+ * - getNext() returns the new data arrives (not when the buffer
* is non-empty.
*
- * Write to it with @ref set. Read its contents with @ref get. Trying to read from
+ * Write to it with set(). Read its contents with get(). Trying to read from
* an empty Store raises an gbxsickacfr::gbxutilacfr::Exception.
*
* @note Replaces the deprecated Proxy class.
@@ -45,18 +45,18 @@
virtual ~Store();
//! Returns TRUE if there's something in the Store. The Store starts its life empty
- //! but after the object is set once, it will be non-empty again until @ref purge is
+ //! but after the object is set once, it will be non-empty again until purge() is
//! called.
bool isEmpty() const;
- //! Returns TRUE if the data in the Store has not been accessed with @ref get yet.
+ //! Returns TRUE if the data in the Store has not been accessed with get() yet.
bool isNewData() const;
//! Sets the contents of the Store.
void set( const Type & obj );
//! Returns the contents of the Store. This operation makes the data in the Store
- //! "not new", i.e. @ref isNewData returns FALSE. Calls to @ref get when the Store is empty
+ //! "not new", i.e. @ref isNewData returns FALSE. Calls to get() when the Store is empty
//! raises an gbxsickacfr::gbxutilacfr::Exception exception.
void get( Type & obj ) const;
Copied: gearbox/trunk/src/urg_nz/doc.dox (from rev 114, gearbox/trunk/src/urg_nz/urg_nz.dox)
===================================================================
--- gearbox/trunk/src/urg_nz/doc.dox (rev 0)
+++ gearbox/trunk/src/urg_nz/doc.dox 2008-04-21 11:53:02 UTC (rev 116)
@@ -0,0 +1,50 @@
+/*!
+
+@ingroup gbx_libs
+@ingroup gbx_hardware
+@ingroup gbx_c
+@ingroup gbx_linux
+@defgroup gbx_library_urg_nz liburg_nz
+@brief Hokuyo URG laser scanner driver.
+
+For a full list of functions and classes see @ref urg_nz.
+
+Header file:
+@verbatim
+#include <urglaser/urg_laser.h>
+@endverbatim
+
+@par Responsible Developer
+ Geoffrey Biggs
+
+@par Copyright
+ Toby Collett, Nico Blodow, Geoffrey Biggs
+
+@par License
+ GPL
+
+@par Style guidelines
+
+- Naming conventions:
+ - Class methods start with a capital letter.
+ - Underscores in member, variable and type names.
+ - \#define'd values in all capitals.
+- Formatting:
+ - 4 space indentation.
+ - Function declarations on one line.
+ - Space between function name and arguments.
+- C++ API.
+ - Functionality provided through classes with utility structures.
+- Units:
+ - All internal units are in millimetres and radians.
+
+*/
+
+/*!
+@namespace urg_nz
+@brief URG laser scanner driver name space.
+
+This namespace is part of a library which provides a driver for the URG laser scanner driver.
+
+@see @ref gbx_library_urg_nz
+*/
Deleted: gearbox/trunk/src/urg_nz/urg_nz.dox
===================================================================
--- gearbox/trunk/src/urg_nz/urg_nz.dox 2008-04-21 10:27:26 UTC (rev 115)
+++ gearbox/trunk/src/urg_nz/urg_nz.dox 2008-04-21 11:53:02 UTC (rev 116)
@@ -1,50 +0,0 @@
-/*!
-
-@ingroup gbx_libs
-@ingroup gbx_hardware
-@ingroup gbx_c
-@ingroup gbx_linux
-@defgroup gbx_library_urg_nz liburg_nz
-@brief Hokuyo URG laser scanner driver.
-
-For a full list of functions and classes see @ref urg_nz.
-
-Header file:
-@verbatim
-#include <urglaser/urg_laser.h>
-@endverbatim
-
-@par Responsible Developer
- Geoffrey Biggs
-
-@par Copyright
- Toby Collett, Nico Blodow, Geoffrey Biggs
-
-@par License
- GPL
-
-@par Style guidelines
-
-- Naming conventions:
- - Class methods start with a capital letter.
- - Underscores in member, variable and type names.
- - #define'd values in all capitals.
-- Formatting:
- - 4 space indentation.
- - Function declarations on one line.
- - Space between function name and arguments.
-- C++ API.
- - Functionality provided through classes with utility structures.
-- Units:
- - All internal units are in millimetres and radians.
-
-*/
-
-/*!
-@namespace urg_nz
-@brief URG laser scanner driver name space.
-
-This namespace is part of a library which provides a driver for the URG laser scanner driver.
-
-@see @ref gbx_library_urg_nz
-*/
Modified: gearbox/trunk/src/urg_nz/urg_nz.h
===================================================================
--- gearbox/trunk/src/urg_nz/urg_nz.h 2008-04-21 10:27:26 UTC (rev 115)
+++ gearbox/trunk/src/urg_nz/urg_nz.h 2008-04-21 11:53:02 UTC (rev 116)
@@ -126,7 +126,7 @@
Supported baud rates for RS232 connections are 19200, 57600 and 115200. Baud rate is
not applicable to USB connections.
- @param PortName Fully-qualified path to the port the scanner is connected to.
+ @param port_name Fully-qualified path to the port the scanner is connected to.
@param use_serial Use a serial connection. The alternative is termios.
@param baud Baud rate for serial connections. */
void Open (const char *port_name, bool use_serial, int baud);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2008-04-21 10:27:21
|
Revision: 115
http://gearbox.svn.sourceforge.net/gearbox/?rev=115&view=rev
Author: tobasco
Date: 2008-04-21 03:27:26 -0700 (Mon, 21 Apr 2008)
Log Message:
-----------
trigger dashboard
Modified Paths:
--------------
gearbox/trunk/doc/publications.dox
Modified: gearbox/trunk/doc/publications.dox
===================================================================
--- gearbox/trunk/doc/publications.dox 2008-04-17 06:53:34 UTC (rev 114)
+++ gearbox/trunk/doc/publications.dox 2008-04-21 10:27:26 UTC (rev 115)
@@ -14,7 +14,7 @@
On project's rationale and objectives:
-- A.Makarenko, A.Brooks, T.Kaupp. <a href="http://www.cas.edu.au/content.php/237.html?publicationid=403">On the Benefits of Making Robotic Software Frameworks Thin</a>. IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2007). Workshop on Evaluation of Middleware and Architectures.
+- A. Makarenko, A. Brooks, T. Kaupp. <a href="http://www.cas.edu.au/content.php/237.html?publicationid=403">On the Benefits of Making Robotic Software Frameworks Thin</a>. IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS 2007). Workshop on Evaluation of Middleware and Architectures.
*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <to...@us...> - 2008-04-17 06:53:30
|
Revision: 114
http://gearbox.svn.sourceforge.net/gearbox/?rev=114&view=rev
Author: tobasco
Date: 2008-04-16 23:53:34 -0700 (Wed, 16 Apr 2008)
Log Message:
-----------
new dashboard
Modified Paths:
--------------
gearbox/trunk/doc/header.html
Added Paths:
-----------
gearbox/trunk/CTestConfig.cmake
Removed Paths:
-------------
gearbox/trunk/DartConfig.cmake
Added: gearbox/trunk/CTestConfig.cmake
===================================================================
--- gearbox/trunk/CTestConfig.cmake (rev 0)
+++ gearbox/trunk/CTestConfig.cmake 2008-04-17 06:53:34 UTC (rev 114)
@@ -0,0 +1,7 @@
+set(CTEST_PROJECT_NAME "Gearbox")
+set(CTEST_NIGHTLY_START_TIME "04:00:00 EST")
+
+set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_SITE "cdash.acfr.usyd.edu.au")
+set(CTEST_DROP_LOCATION "/submit.php?project=Gearbox")
+set(CTEST_DROP_SITE_CDASH TRUE)
Deleted: gearbox/trunk/DartConfig.cmake
===================================================================
--- gearbox/trunk/DartConfig.cmake 2008-04-13 02:19:02 UTC (rev 113)
+++ gearbox/trunk/DartConfig.cmake 2008-04-17 06:53:34 UTC (rev 114)
@@ -1,17 +0,0 @@
-SET(DROP_METHOD "xmlrpc")
-SET(DROP_SITE "http://opium.acfr.usyd.edu.au:8081")
-SET(DROP_LOCATION "gearbox")
-SET(COMPRESS_SUBMISSION ON)
-
-
-# Dashboard is opened for submissions for a 24 hour period starting at
-# the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
-SET(NIGHTLY_START_TIME "04:00:00 EAST")
-
-# Set up valgrind
-FIND_PROGRAM(MEMORYCHECK_COMMAND
- NAMES valgrind
- PATHS
- DOC "Path to valgrind, used for memory error detection."
- )
- SET(MEMORYCHECK_SUPPRESSIONS_FILE "" CACHE FILEPATH "File that contains suppressions for the memory checker")
Modified: gearbox/trunk/doc/header.html
===================================================================
--- gearbox/trunk/doc/header.html 2008-04-13 02:19:02 UTC (rev 113)
+++ gearbox/trunk/doc/header.html 2008-04-17 06:53:34 UTC (rev 114)
@@ -58,7 +58,7 @@
<!--
<strong><a href="gbx_doc_faq.html" style="text-decoration:none">FAQ</a></strong><br>
-->
-<strong><a href="http://129.78.210.237:8081/gearbox/Dashboard/" style="text-decoration:none">Dashboard</a></strong><br>
+<strong><a href="http://cdash.acfr.usyd.edu.au/index.php?project=Gearbox" style="text-decoration:none">Dashboard</a></strong><br>
<!--<strong><a href="http://wiki2.cas.edu.au/orca">Wiki</a></strong><br>
login/pass: orca/orca<br>-->
<br>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-04-13 02:18:57
|
Revision: 113
http://gearbox.svn.sourceforge.net/gearbox/?rev=113&view=rev
Author: russo2503v
Date: 2008-04-12 19:19:02 -0700 (Sat, 12 Apr 2008)
Log Message:
-----------
stating iceutil version required
Modified Paths:
--------------
gearbox/trunk/src/gbxsickacfr/doc.dox
Modified: gearbox/trunk/src/gbxsickacfr/doc.dox
===================================================================
--- gearbox/trunk/src/gbxsickacfr/doc.dox 2008-04-11 08:15:48 UTC (rev 112)
+++ gearbox/trunk/src/gbxsickacfr/doc.dox 2008-04-13 02:19:02 UTC (rev 113)
@@ -43,7 +43,7 @@
@par Dependencies
-- libIceUtil (for timing/threads/mutexes)
+- libIceUtil (for timing/threads/mutexes), v.3.2 or newer (latest tested 3.3b).
- libGbxSerialAcfr
@par Limitations
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <gb...@us...> - 2008-04-11 08:34:07
|
Revision: 112
http://gearbox.svn.sourceforge.net/gearbox/?rev=112&view=rev
Author: gbiggs
Date: 2008-04-11 01:15:48 -0700 (Fri, 11 Apr 2008)
Log Message:
-----------
Added USE flags for the gbxserialacfr and gbxsickacfr libraries.
Modified Paths:
--------------
gearbox/trunk/dist/gearbox-0.0.1.ebuild
Modified: gearbox/trunk/dist/gearbox-0.0.1.ebuild
===================================================================
--- gearbox/trunk/dist/gearbox-0.0.1.ebuild 2008-04-02 05:54:27 UTC (rev 111)
+++ gearbox/trunk/dist/gearbox-0.0.1.ebuild 2008-04-11 08:15:48 UTC (rev 112)
@@ -10,7 +10,7 @@
DESCRIPTION="A collection of libraries for robotics, including hardware drivers and algorithms."
SRC_URI="/${P}.tar.bz2"
HOMEPAGE="http://gearbox.sourceforge.net"
-IUSE="doc basic gbxadvanced urg_nz"
+IUSE="doc basic gbxadvanced urg_nz gbxserialacfr gbxsickacfr"
DEPEND=">=dev-util/cmake-2.4
doc? (app-doc/doxygen)"
RDEPEND=${DEPEND}
@@ -21,7 +21,9 @@
{
local mycmakeargs="`cmake-utils_use_enable basic LIB_BASIC`\
`cmake-utils_use_enable gbxadvanced LIB_GBXADVANCED`\
- `cmake-utils_use_enable urg_nz LIB_URG_NZ`"
+ `cmake-utils_use_enable urg_nz LIB_URG_NZ`\
+ `cmake-utils_use_enable gbxserialacfr LIB_GBXSERIALACFR`\
+ `cmake-utils_use_enable gbxsickacfr LIB_GBXSICKACFR`"
cmake-utils_src_compile
if use doc;
then
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <bo...@us...> - 2008-04-02 05:54:21
|
Revision: 111
http://gearbox.svn.sourceforge.net/gearbox/?rev=111&view=rev
Author: borax00
Date: 2008-04-01 22:54:27 -0700 (Tue, 01 Apr 2008)
Log Message:
-----------
Modified Paths:
--------------
gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/subsystemthread.cpp
Modified: gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/subsystemthread.cpp
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/subsystemthread.cpp 2008-03-30 06:29:09 UTC (rev 110)
+++ gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/subsystemthread.cpp 2008-04-02 05:54:27 UTC (rev 111)
@@ -33,23 +33,23 @@
}
catch ( const IceUtil::Exception &e )
{
- ss << "SubsystemThread::run(): Caught unexpected exception: " << e;
+ ss << "SubsystemThread::run() "<<subsysName()<<": Caught unexpected exception: " << e;
}
catch ( const std::exception &e )
{
- ss << "SubsystemThread::run(): Caught unexpected exception: " << e.what();
+ ss << "SubsystemThread::run() "<<subsysName()<<": Caught unexpected exception: " << e.what();
}
catch ( const std::string &e )
{
- ss << "SubsystemThread::run(): Caught unexpected string: " << e;
+ ss << "SubsystemThread::run() "<<subsysName()<<": Caught unexpected string: " << e;
}
catch ( const char *e )
{
- ss << "SubsystemThread::run(): Caught unexpected char *: " << e;
+ ss << "SubsystemThread::run() "<<subsysName()<<": Caught unexpected char *: " << e;
}
catch ( ... )
{
- ss << "SubsystemThread::run(): Caught unexpected unknown exception.";
+ ss << "SubsystemThread::run() "<<subsysName()<<": Caught unexpected unknown exception.";
}
// only if there were exceptions
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-03-30 06:29:08
|
Revision: 110
http://gearbox.svn.sourceforge.net/gearbox/?rev=110&view=rev
Author: russo2503v
Date: 2008-03-29 23:29:09 -0700 (Sat, 29 Mar 2008)
Log Message:
-----------
added function to listing all enable options
Modified Paths:
--------------
gearbox/trunk/cmake/DependencyUtils.cmake
gearbox/trunk/cmake/SetupDirectories.cmake
gearbox/trunk/cmake/TargetUtils.cmake
gearbox/trunk/cmake/internal/Setup.cmake
gearbox/trunk/doc/buildsys.dox
gearbox/trunk/doc/install_debian.dox
Modified: gearbox/trunk/cmake/DependencyUtils.cmake
===================================================================
--- gearbox/trunk/cmake/DependencyUtils.cmake 2008-03-26 02:32:57 UTC (rev 109)
+++ gearbox/trunk/cmake/DependencyUtils.cmake 2008-03-30 06:29:09 UTC (rev 110)
@@ -1,3 +1,6 @@
+#
+# utility macro
+#
MACRO( GBX_MAKE_OPTION_NAME option_name module_type module_name )
STRING( COMPARE EQUAL ${module_type} "EXE" is_exe )
@@ -68,6 +71,14 @@
OPTION( ${option_name} "Try to build lib${module_name} library" ${default_option_value} )
ENDIF( is_exe )
+ # add option to the list: this has nothing to do with the build system.
+ # it is useful to have a text list of all options if you want to build a particular
+ # configuration from the command line.
+ SET( templist ${OPTION_LIST} )
+ # (escaping \)
+ LIST( APPEND templist "${option_name}=${default_option_value}" )
+ SET( OPTION_LIST ${templist} CACHE INTERNAL "Global list of cmake options" FORCE )
+
# must dereference both var and option names once (!) and IF will evaluate their values
IF( ${cumulative_var} AND NOT ${option_name} )
SET( ${cumulative_var} FALSE )
@@ -227,3 +238,24 @@
ENDFOREACH( trgt ${ARGN} )
ENDMACRO( GBX_REQUIRE_TARGETS cumulative_var module_type module_name )
+
+#
+# This is a utility macro for internal use.
+#
+MACRO( GBX_WRITE_OPTIONS )
+ SET( output_file ${GBX_PROJECT_BINARY_DIR}/${PROJECT_NAME}_options.cmake )
+ WRITE_FILE( ${output_file} "\# Autogenerated by CMake for ${PROJECT_NAME} project" )
+
+ FOREACH( a ${OPTION_LIST} )
+ WRITE_FILE( ${output_file} "-D${a} \\" APPEND )
+ ENDFOREACH( a ${LIB_LIST} )
+ENDMACRO( GBX_WRITE_OPTIONS )
+
+#
+# This is a utility macro for internal use.
+# Reset global lists of components, libraries, etc.
+#
+MACRO( GBX_RESET_ALL_DEPENDENCY_LISTS )
+ # MESSAGE( STATUS "DEBUG: Resetting global dependency lists" )
+ SET( OPTION_LIST "" CACHE INTERNAL "Global list of cmake options" FORCE )
+ENDMACRO( GBX_RESET_ALL_DEPENDENCY_LISTS )
Modified: gearbox/trunk/cmake/SetupDirectories.cmake
===================================================================
--- gearbox/trunk/cmake/SetupDirectories.cmake 2008-03-26 02:32:57 UTC (rev 109)
+++ gearbox/trunk/cmake/SetupDirectories.cmake 2008-03-30 06:29:09 UTC (rev 110)
@@ -2,15 +2,15 @@
# Installation directory is determined by looking at 3 sources of information in the following order,
# later sources overwrite earlier ones:
# 1. OS-dependent defaults (effective only the first time CMake runs or after CMakeCache is deleted)
-# 2. Enviroment variable whose name is held in variable project_install_var
-# 3. CMake variable whose name is held in project_install_var.
+# 2. Enviroment variable whose name is determined as <PROJECT_NAME>_INSTALL
+# 3. CMake variable whose name is determined as <PROJECT_NAME>_INSTALL (same as the environment variable)
#
-# E.g.
-# - rm CMakeCache.txt; cmake .
-# /opt/orca-1.2.3
-# - export HYDRO_INSTALL=/home/myname; cmake .
-# /home/myname
-# - export HYDRO_INSTALL=/home/myname; cmake -DHYDRO_INSTALL=/home/myname/opt.
+# E.g. in Linux, for a project called 'fruitcake'
+# $ rm CMakeCache.txt; cmake .
+# /usr/local/
+# $ export FRUITCAKE_INSTALL=/home/myname/install; cmake .
+# /home/myname/install
+# $ export FRUITCAKE_INSTALL=/home/myname/install; cmake -DFRUITCAKE_INSTALL=/home/myname/opt .
# /home/myname/opt
#
# Afterwards, it's ok to just use "cmake .", the previously set installation dir is held in cache.
Modified: gearbox/trunk/cmake/TargetUtils.cmake
===================================================================
--- gearbox/trunk/cmake/TargetUtils.cmake 2008-03-26 02:32:57 UTC (rev 109)
+++ gearbox/trunk/cmake/TargetUtils.cmake 2008-03-30 06:29:09 UTC (rev 110)
@@ -1,7 +1,7 @@
#
-# Components should add themselves by calling 'GBX_ADD_EXECUTABLE'
+# Executables should add themselves by calling 'GBX_ADD_EXECUTABLE'
# instead of 'ADD_EXECUTABLE' in CMakeLists.txt.
-# Usage: GBX_ADD_EXECUTABLE( name src1 src2 src3 )
+# Usage is the same as ADD_EXECUTABLE, all parameters are passed to ADD_EXECUTABLE.
#
MACRO( GBX_ADD_EXECUTABLE name )
ADD_EXECUTABLE( ${name} ${ARGN} )
@@ -9,17 +9,17 @@
# INSTALL_RPATH "${INSTALL_RPATH};${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}"
# BUILD_WITH_INSTALL_RPATH TRUE )
INSTALL( TARGETS ${name} RUNTIME DESTINATION bin )
- SET( templist ${COMPONENT_LIST} )
+ SET( templist ${EXE_LIST} )
LIST( APPEND templist ${name} )
# MESSAGE( STATUS "DEBUG: ${templist}" )
- SET( COMPONENT_LIST ${templist} CACHE INTERNAL "Global list of components to build" FORCE )
+ SET( EXE_LIST ${templist} CACHE INTERNAL "Global list of executables to build" FORCE )
MESSAGE( STATUS "Planning to Build Executable: ${name}" )
ENDMACRO( GBX_ADD_EXECUTABLE name )
#
-# Components should add themselves by calling 'GBX_ADD_EXECUTABLE'
+# Libraries should add themselves by calling 'GBX_ADD_LIBRARY'
# instead of 'ADD_LIBRARY' in CMakeLists.txt.
-# Usage: GBX_ADD_LIBRARY( name src1 src2 src3 )
+# Usage is the same as ADD_LIBRARY, all parameters are passed to ADD_LIBRARY.
#
MACRO( GBX_ADD_LIBRARY name )
ADD_LIBRARY( ${name} ${ARGN} )
@@ -27,9 +27,9 @@
# INSTALL_RPATH "${INSTALL_RPATH};${CMAKE_INSTALL_PREFIX}/lib/${PROJECT_NAME}"
# BUILD_WITH_INSTALL_RPATH TRUE )
INSTALL( TARGETS ${name} LIBRARY DESTINATION lib/${PROJECT_NAME} )
- SET( templist ${LIBRARY_LIST} )
+ SET( templist ${LIB_LIST} )
LIST( APPEND templist ${name} )
- SET( LIBRARY_LIST ${templist} CACHE INTERNAL "Global list of libraries to build" FORCE )
+ SET( LIB_LIST ${templist} CACHE INTERNAL "Global list of libraries to build" FORCE )
MESSAGE( STATUS "Planning to Build Library : ${name}" )
ENDMACRO( GBX_ADD_LIBRARY name )
@@ -96,7 +96,7 @@
#
# This is a mechanism to register special items which are not
-# components or libraries. This function only records the name of
+# executables or libraries. This function only records the name of
# the item to display it at the end of the cmake run and to submit
# to the Dashboard.
# Usage: GBX_ADD_ITEM( name )
@@ -151,10 +151,10 @@
# Usage: GBX_NOT_ADD_EXECUTABLE( name reason )
#
MACRO( GBX_NOT_ADD_EXECUTABLE name reason )
- SET( templist ${COMPONENT_NOT_LIST} )
+ SET( templist ${EXE_NOT_LIST} )
LIST( APPEND templist ${name} )
# MESSAGE( STATUS "DEBUG: ${templist}" )
- SET( COMPONENT_NOT_LIST ${templist} CACHE INTERNAL "Global list of components NOT to build" FORCE )
+ SET( EXE_NOT_LIST ${templist} CACHE INTERNAL "Global list of executables NOT to build" FORCE )
MESSAGE( STATUS "Not planning to Build Executable : ${name} because ${reason}" )
ENDMACRO( GBX_NOT_ADD_EXECUTABLE name reason )
@@ -162,22 +162,23 @@
# Usage: GBX_NOT_ADD_LIBRARY( name reason )
#
MACRO( GBX_NOT_ADD_LIBRARY name reason )
- SET( templist ${LIBRARY_NOT_LIST} )
+ SET( templist ${LIB_NOT_LIST} )
LIST( APPEND templist ${name} )
# MESSAGE( STATUS "DEBUG: ${templist}" )
- SET( LIBRARY_NOT_LIST ${templist} CACHE INTERNAL "Global list of libraries NOT to build" FORCE )
+ SET( LIB_NOT_LIST ${templist} CACHE INTERNAL "Global list of libraries NOT to build" FORCE )
MESSAGE( STATUS "Not planning to Build Library : ${name} because ${reason}" )
ENDMACRO( GBX_NOT_ADD_LIBRARY name reason )
#
+# This is a utility macro for internal use.
# Prints out list information: size, and items.
# Prints nothing if list is empty.
-# Example: LIST_REPORT( COMPONENT_LIST "component(s)" )
+# Example: LIST_REPORT( EXE_LIST "executable(s)" )
#
# Tricky list stuff.
# see http://www.cmake.org/Wiki/CMakeMacroMerge for an example
#
-MACRO( LIST_REPORT ACTION ITEM_NAME note L )
+MACRO( LIST_REPORT action item_name note L )
SET( templist ${L} )
LIST( LENGTH templist templist_length )
SET( report_file ${GBX_PROJECT_BINARY_DIR}/cmake_config_report.txt )
@@ -185,15 +186,16 @@
IF( templist_length GREATER 0 )
LIST( SORT templist )
- MESSAGE( STATUS "${ACTION} ${templist_length} ${ITEM_NAME} ${note}:" )
+ MESSAGE( STATUS "${action} ${templist_length} ${item_name} ${note}:" )
MESSAGE( STATUS " ${templist}" )
- WRITE_FILE( ${report_file} "${ACTION} ${templist_length} ${ITEM_NAME}:" APPEND )
+ WRITE_FILE( ${report_file} "${action} ${templist_length} ${item_name}:" APPEND )
WRITE_FILE( ${report_file} " ${templist}" APPEND )
ENDIF( templist_length GREATER 0 )
-ENDMACRO( LIST_REPORT ACTION ITEM_NAME note L )
+ENDMACRO( LIST_REPORT action item_name note L )
#
+# This is a utility macro for internal use.
# Puts messages on the screen.
# Writes to a text file.
#
@@ -222,37 +224,40 @@
MESSAGE( STATUS "Install dir ${CMAKE_INSTALL_PREFIX}")
SET( note " " )
- LIST_REPORT( "Will build" "executables" ${note} "${COMPONENT_LIST}" )
- LIST_REPORT( "Will build" "libraries" ${note} "${LIBRARY_LIST}" )
+ LIST_REPORT( "Will build" "executables" ${note} "${EXE_LIST}" )
+ LIST_REPORT( "Will build" "libraries" ${note} "${LIB_LIST}" )
LIST_REPORT( "Will build" "CTest tests" ${note} "${TEST_LIST}" )
LIST_REPORT( "Will build" "special items" ${note} "${ITEM_LIST}" )
SET( note "(see above for reasons)" )
- LIST_REPORT( "Will NOT build" "executables" ${note} "${COMPONENT_NOT_LIST}" )
- LIST_REPORT( "Will NOT build" "libraries" ${note} "${LIBRARY_NOT_LIST}" )
+ LIST_REPORT( "Will NOT build" "executables" ${note} "${EXE_NOT_LIST}" )
+ LIST_REPORT( "Will NOT build" "libraries" ${note} "${LIB_NOT_LIST}" )
ENDMACRO( GBX_CONFIG_REPORT )
+#
+# This is a utility macro for internal use.
+#
MACRO( GBX_WRITE_MANIFEST )
- SET( manifest_file ${GBX_PROJECT_BINARY_DIR}/${PROJECT_NAME}_manifest.cmake )
- WRITE_FILE( ${manifest_file} "\# Autogenerated by CMake for ${PROJECT_NAME} project" )
+ SET( output_file ${GBX_PROJECT_BINARY_DIR}/${PROJECT_NAME}_manifest.cmake )
+ WRITE_FILE( ${output_file} "\# Autogenerated by CMake for ${PROJECT_NAME} project" )
- FOREACH( A ${LIBRARY_LIST} )
+ FOREACH( A ${LIB_LIST} )
STRING( TOUPPER ${A} UPPERA )
- WRITE_FILE( ${manifest_file} "SET( ${UPPERA}_INSTALLED 1)" APPEND )
- ENDFOREACH( A ${LIBRARY_LIST} )
+ WRITE_FILE( ${output_file} "SET( ${UPPERA}_INSTALLED 1)" APPEND )
+ ENDFOREACH( A ${LIB_LIST} )
- FOREACH( A ${LIBRARY_NOT_LIST} )
+ FOREACH( A ${LIB_NOT_LIST} )
STRING( TOUPPER ${A} UPPERA )
- WRITE_FILE( ${manifest_file} "SET( ${UPPERA}_INSTALLED 0)" APPEND )
- ENDFOREACH( A ${LIBRARY_NOT_LIST} )
+ WRITE_FILE( ${output_file} "SET( ${UPPERA}_INSTALLED 0)" APPEND )
+ ENDFOREACH( A ${LIB_NOT_LIST} )
- WRITE_FILE( ${manifest_file} " " APPEND )
+ WRITE_FILE( ${output_file} " " APPEND )
STRING( TOUPPER ${PROJECT_NAME} upper_project_name )
- WRITE_FILE( ${manifest_file} "SET( ${upper_project_name}_MANIFEST_LOADED 1)" APPEND )
+ WRITE_FILE( ${output_file} "SET( ${upper_project_name}_MANIFEST_LOADED 1)" APPEND )
- INSTALL( FILES ${manifest_file} DESTINATION . )
+ INSTALL( FILES ${output_file} DESTINATION . )
ENDMACRO( GBX_WRITE_MANIFEST )
MACRO( GBX_WRITE_LICENSE )
@@ -269,17 +274,18 @@
ENDMACRO( GBX_WRITE_LICENSE )
#
+# This is a utility macro for internal use.
# Reset global lists of components, libraries, etc.
#
-MACRO( GBX_RESET_ALL_LISTS )
- # MESSAGE( STATUS "DEBUG: Resetting global component and library lists" )
- SET( COMPONENT_LIST "" CACHE INTERNAL "Global list of components to build" FORCE )
- SET( LIBRARY_LIST "" CACHE INTERNAL "Global list of libraries to build" FORCE )
- SET( TEST_LIST "" CACHE INTERNAL "Global list of CTest tests to build" FORCE )
- SET( ITEM_LIST "" CACHE INTERNAL "Global list of special items to build" FORCE )
+MACRO( GBX_RESET_ALL_TARGET_LISTS )
+ # MESSAGE( STATUS "DEBUG: Resetting global target lists" )
+ SET( EXE_LIST "" CACHE INTERNAL "Global list of executables to build" FORCE )
+ SET( LIB_LIST "" CACHE INTERNAL "Global list of libraries to build" FORCE )
+ SET( TEST_LIST "" CACHE INTERNAL "Global list of CTest tests to build" FORCE )
+ SET( ITEM_LIST "" CACHE INTERNAL "Global list of special items to build" FORCE )
- SET( COMPONENT_NOT_LIST "" CACHE INTERNAL "Global list of components NOT to build" FORCE )
- SET( LIBRARY_NOT_LIST "" CACHE INTERNAL "Global list of libraries NOT to build" FORCE )
+ SET( EXE_NOT_LIST "" CACHE INTERNAL "Global list of executables NOT to build" FORCE )
+ SET( LIB_NOT_LIST "" CACHE INTERNAL "Global list of libraries NOT to build" FORCE )
- SET( LICENSE_LIST "" CACHE INTERNAL "Global list of directories and their licenses" FORCE )
-ENDMACRO( GBX_RESET_ALL_LISTS )
+ SET( LICENSE_LIST "" CACHE INTERNAL "Global list of directories and their licenses" FORCE )
+ENDMACRO( GBX_RESET_ALL_TARGET_LISTS )
Modified: gearbox/trunk/cmake/internal/Setup.cmake
===================================================================
--- gearbox/trunk/cmake/internal/Setup.cmake 2008-03-26 02:32:57 UTC (rev 109)
+++ gearbox/trunk/cmake/internal/Setup.cmake 2008-03-30 06:29:09 UTC (rev 110)
@@ -90,9 +90,10 @@
ADD_SUBDIRECTORY( cmake )
#
-# Print results of CMake activity
+# Write results of CMake activity to file
#
GBX_WRITE_MANIFEST()
+GBX_WRITE_OPTIONS()
#
# Print license information to a file
@@ -101,9 +102,13 @@
GBX_WRITE_LICENSE()
ENDIF( GBX_BUILD_LICENSE )
+#
+# Print results of CMake activity
+#
GBX_CONFIG_REPORT( "Nothing special" )
#
-# House-keeping, clear lists of targets, licenses, etc.
+# House-keeping, clear lists of targets, licenses, options, etc.
#
-GBX_RESET_ALL_LISTS()
+GBX_RESET_ALL_TARGET_LISTS()
+GBX_RESET_ALL_DEPENDENCY_LISTS()
Modified: gearbox/trunk/doc/buildsys.dox
===================================================================
--- gearbox/trunk/doc/buildsys.dox 2008-03-26 02:32:57 UTC (rev 109)
+++ gearbox/trunk/doc/buildsys.dox 2008-03-30 06:29:09 UTC (rev 110)
@@ -195,8 +195,12 @@
Path variables:
@verbatim
+GBX_BIN_INSTALL_DIR
+GBX_LIB_INSTALL_DIR
+GBX_INCLUDE_INSTALL_DIR
GBX_PROJECT_BINARY_DIR
GBX_PROJECT_SOURCE_DIR
+GBX_SHARE_INSTALL_DIR
@endverbatim
*/
Modified: gearbox/trunk/doc/install_debian.dox
===================================================================
--- gearbox/trunk/doc/install_debian.dox 2008-03-26 02:32:57 UTC (rev 109)
+++ gearbox/trunk/doc/install_debian.dox 2008-03-30 06:29:09 UTC (rev 110)
@@ -14,15 +14,11 @@
@note Reviewed for release 0.0.1
-These are detailed instructions for installing GearBox on Debian Linux. They are known to work for a system using Debian \b Testing distribution. See @ref gbx_doc_getting for general guidelines.
+These are detailed instructions for installing GearBox on Debian Linux. They are known to work for a system using Debian \b Testing distribution. These instructions should also be applicable to Ubuntu/Kubuntu 6.10 (Edgy). See @ref gbx_doc_getting for general guidelines.
-@section gbx_doc_installdebian_ubuntu Ubuntu\Kubuntu
-
-These instructions should also be applicable to Ubuntu/Kubuntu 6.10 (Edgy).
-
@section gbx_doc_installdebian_cmake CMake
-Minimum version required 2.4-patch 4 (latest tested: 2.4-patch 7).
+Minimum version required 2.4-patch 4 (latest tested: 2.4-patch 8).
@verbatim
# apt-get install cmake
@@ -70,17 +66,17 @@
The default installation directory is @c /usr/local. There are two options for specifying a custom install directory:
- Option 1. With @c cmake. This variable is stored in CMake cache so you don't have to set this variable every time: only the first time you run cmake and when you want to change it. For example:
@verbatim
-$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/gearbox .
+$ cmake -DGEARBOX_INSTALL=$HOME/gearbox .
@endverbatim
or
@verbatim
-$ cmake -DCMAKE_INSTALL_PREFIX=/opt/gearbox-[VERSION] .
+$ cmake -DGEARBOX_INSTALL=/opt/gearbox-[VERSION] .
@endverbatim
- Option 2. If you've changed your mind about the installation directory, you can change it at any time using @c ccmake tool.
@verbatim
$ ccmake .
@endverbatim
-Scroll down to @c CMAKE_INSTALL_PREFIX variable, hit ENTER to edit and type in the new installation directory. When finished, hit ENTER again, then type "c" for [c]onfigure and "g" for [g]enerate. From now on, the new installation dir will be used.
+Scroll down to @c GEARBOX_INSTALL variable, hit ENTER to edit and type in the new installation directory. When finished, hit ENTER again, then type "c" for [c]onfigure and "g" for [g]enerate. From now on, the new installation dir will be used.
That's it! We are done.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-03-26 02:32:59
|
Revision: 109
http://gearbox.svn.sourceforge.net/gearbox/?rev=109&view=rev
Author: russo2503v
Date: 2008-03-25 19:32:57 -0700 (Tue, 25 Mar 2008)
Log Message:
-----------
cosmetic changes only: remove extra spaces after cmake commands
Modified Paths:
--------------
gearbox/trunk/DartConfig.cmake
gearbox/trunk/cmake/Assert.cmake
gearbox/trunk/cmake/CheckCompiler.cmake
gearbox/trunk/cmake/DependencyUtils.cmake
gearbox/trunk/cmake/FindGearbox.cmake
gearbox/trunk/cmake/FindIceUtil.cmake
gearbox/trunk/cmake/SetupBuildType.cmake
gearbox/trunk/cmake/SetupDirectories.cmake
gearbox/trunk/cmake/SetupOs.cmake
gearbox/trunk/cmake/TargetUtils.cmake
gearbox/trunk/cmake/UseBasicRules.cmake
gearbox/trunk/cmake/WriteConfigH.cmake
gearbox/trunk/cmake/dart/gearbox-nightly-linux-gcc42.cmake
gearbox/trunk/cmake/internal/Setup.cmake
gearbox/trunk/src/CMakeLists.txt
gearbox/trunk/src/basicexample/CMakeLists.txt
gearbox/trunk/src/gbxadvancedexample/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/gbxsickacfr/gbxutilacfr/CMakeLists.txt
gearbox/trunk/src/urg_nz/CMakeLists.txt
gearbox/trunk/submitted/CMakeLists.txt
Modified: gearbox/trunk/DartConfig.cmake
===================================================================
--- gearbox/trunk/DartConfig.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/DartConfig.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,12 +1,12 @@
-SET (DROP_METHOD "xmlrpc")
-SET (DROP_SITE "http://opium.acfr.usyd.edu.au:8081")
-SET (DROP_LOCATION "gearbox")
-SET (COMPRESS_SUBMISSION ON)
+SET(DROP_METHOD "xmlrpc")
+SET(DROP_SITE "http://opium.acfr.usyd.edu.au:8081")
+SET(DROP_LOCATION "gearbox")
+SET(COMPRESS_SUBMISSION ON)
# Dashboard is opened for submissions for a 24 hour period starting at
# the specified NIGHLY_START_TIME. Time is specified in 24 hour format.
-SET (NIGHTLY_START_TIME "04:00:00 EAST")
+SET(NIGHTLY_START_TIME "04:00:00 EAST")
# Set up valgrind
FIND_PROGRAM(MEMORYCHECK_COMMAND
Modified: gearbox/trunk/cmake/Assert.cmake
===================================================================
--- gearbox/trunk/cmake/Assert.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/cmake/Assert.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -3,30 +3,30 @@
#
MACRO( GBX_ASSERT TEST COMMENT_FAIL )
- IF ( ${TEST} )
+ IF( ${TEST} )
# MESSAGE( STATUS "DEBUG: assertion passed : ${TEST}" )
# ARG2 holds COMMENT_PASS
- IF ( ${ARGC} GREATER 2 )
+ IF( ${ARGC} GREATER 2 )
MESSAGE( STATUS ${ARGV2} )
- ENDIF ( ${ARGC} GREATER 2 )
+ ENDIF( ${ARGC} GREATER 2 )
ELSE ( ${TEST} )
# MESSAGE( STATUS "DEBUG: assertion failed : ${TEST}" )
SET( IS_FATAL 0 )
- IF ( ${ARGC} GREATER 3 )
+ IF( ${ARGC} GREATER 3 )
SET( IS_FATAL ${ARGV3} )
- ENDIF ( ${ARGC} GREATER 3 )
+ ENDIF( ${ARGC} GREATER 3 )
- IF ( ${IS_FATAL} )
+ IF( ${IS_FATAL} )
# MESSAGE( STATUS "DEBUG: failure is fatal : ${IS_FATAL}" )
MESSAGE( FATAL_ERROR ${COMMENT_FAIL} )
ELSE ( ${IS_FATAL} )
# MESSAGE( STATUS "DEBUG: failure is NOT fatal : ${IS_FATAL}" )
MESSAGE( STATUS ${COMMENT_FAIL} )
- ENDIF ( ${IS_FATAL} )
+ ENDIF( ${IS_FATAL} )
- ENDIF ( ${TEST} )
+ ENDIF( ${TEST} )
ENDMACRO( GBX_ASSERT )
Modified: gearbox/trunk/cmake/CheckCompiler.cmake
===================================================================
--- gearbox/trunk/cmake/CheckCompiler.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/cmake/CheckCompiler.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,28 +1,28 @@
#
# If we're using gcc, make sure the version is OK.
#
-IF ( ${CMAKE_C_COMPILER} MATCHES gcc )
+IF( ${CMAKE_C_COMPILER} MATCHES gcc )
EXEC_PROGRAM ( ${CMAKE_C_COMPILER} ARGS --version OUTPUT_VARIABLE gcc_version )
- MESSAGE ( STATUS "gcc version: ${gcc_version}")
+ MESSAGE( STATUS "gcc version: ${gcc_version}")
# Why doesn't this work?
#STRING( REGEX MATCHALL "gcc\.*" VERSION_STRING ${CMAKE_C_COMPILER} )
- IF ( gcc_version MATCHES ".*4\\.[0-9]\\.[0-9]" )
+ IF( gcc_version MATCHES ".*4\\.[0-9]\\.[0-9]" )
SET( GCC_VERSION_OK 1 )
- ENDIF ( gcc_version MATCHES ".*4\\.[0-9]\\.[0-9]")
+ ENDIF( gcc_version MATCHES ".*4\\.[0-9]\\.[0-9]")
GBX_ASSERT ( GCC_VERSION_OK
"Checking gcc version - failed. ${PROJECT_NAME} requires gcc v. 4.x"
"Checking gcc version - ok"
1 )
- IF ( gcc_version MATCHES ".*4\\.0.*" )
+ IF( gcc_version MATCHES ".*4\\.0.*" )
# gcc 4.0.x
- ENDIF ( gcc_version MATCHES ".*4\\.0.*" )
+ ENDIF( gcc_version MATCHES ".*4\\.0.*" )
- IF ( gcc_version MATCHES ".*4\\.1.*" )
+ IF( gcc_version MATCHES ".*4\\.1.*" )
# gcc 4.1.x
# gcc-4.1 adds stack protection, which makes code robust to buffer-overrun attacks
# (see: http://www.trl.ibm.com/projects/security/ssp/)
@@ -31,7 +31,7 @@
# Tobi: it looks like stack protection is off by default from version gcc 4.1.2, so we don't need this any more.
# Will keep it for now, it doesn't hurt.
ADD_DEFINITIONS( -fno-stack-protector )
- ENDIF ( gcc_version MATCHES ".*4\\.1.*" )
+ ENDIF( gcc_version MATCHES ".*4\\.1.*" )
-ENDIF ( ${CMAKE_C_COMPILER} MATCHES gcc )
+ENDIF( ${CMAKE_C_COMPILER} MATCHES gcc )
Modified: gearbox/trunk/cmake/DependencyUtils.cmake
===================================================================
--- gearbox/trunk/cmake/DependencyUtils.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/cmake/DependencyUtils.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,20 +1,20 @@
MACRO( GBX_MAKE_OPTION_NAME option_name module_type module_name )
- STRING ( COMPARE EQUAL ${module_type} "EXE" is_exe )
- STRING ( COMPARE EQUAL ${module_type} "LIB" is_lib )
- IF ( NOT is_exe AND NOT is_lib )
- MESSAGE ( FATAL_ERROR "In macro GBX_MAKE_OPTION_NAME, module_type must be either 'EXE' or 'LIB'" )
- ENDIF ( NOT is_exe AND NOT is_lib )
- IF ( is_exe AND is_lib )
- MESSAGE ( FATAL_ERROR "In macro GBX_MAKE_OPTION_NAME, module_type must be either 'EXE' or 'LIB'" )
- ENDIF ( is_exe AND is_lib )
+ STRING( COMPARE EQUAL ${module_type} "EXE" is_exe )
+ STRING( COMPARE EQUAL ${module_type} "LIB" is_lib )
+ IF( NOT is_exe AND NOT is_lib )
+ MESSAGE( FATAL_ERROR "In macro GBX_MAKE_OPTION_NAME, module_type must be either 'EXE' or 'LIB'" )
+ ENDIF( NOT is_exe AND NOT is_lib )
+ IF( is_exe AND is_lib )
+ MESSAGE( FATAL_ERROR "In macro GBX_MAKE_OPTION_NAME, module_type must be either 'EXE' or 'LIB'" )
+ ENDIF( is_exe AND is_lib )
STRING( TOUPPER ${module_name} module_name_upper )
- IF ( is_exe )
+ IF( is_exe )
SET( option_name "ENABLE_${module_name_upper}" )
ELSE ( is_exe )
SET( option_name "ENABLE_LIB_${module_name_upper}" )
- ENDIF ( is_exe )
+ ENDIF( is_exe )
ENDMACRO( GBX_MAKE_OPTION_NAME option_name module_name )
@@ -31,52 +31,52 @@
#
MACRO( GBX_REQUIRE_OPTION cumulative_var module_type module_name default_option_value )
- STRING ( COMPARE EQUAL ${module_type} "EXE" is_exe )
- STRING ( COMPARE EQUAL ${module_type} "LIB" is_lib )
- IF ( NOT is_exe AND NOT is_lib )
- MESSAGE ( FATAL_ERROR "In macro GBX_REQUIRE_OPTION, module_type must be either 'EXE' or 'LIB'" )
- ENDIF ( NOT is_exe AND NOT is_lib )
- IF ( is_exe AND is_lib )
- MESSAGE ( FATAL_ERROR "In macro GBX_REQUIRE_OPTION, module_type must be either 'EXE' or 'LIB'" )
- ENDIF ( is_exe AND is_lib )
+ STRING( COMPARE EQUAL ${module_type} "EXE" is_exe )
+ STRING( COMPARE EQUAL ${module_type} "LIB" is_lib )
+ IF( NOT is_exe AND NOT is_lib )
+ MESSAGE( FATAL_ERROR "In macro GBX_REQUIRE_OPTION, module_type must be either 'EXE' or 'LIB'" )
+ ENDIF( NOT is_exe AND NOT is_lib )
+ IF( is_exe AND is_lib )
+ MESSAGE( FATAL_ERROR "In macro GBX_REQUIRE_OPTION, module_type must be either 'EXE' or 'LIB'" )
+ ENDIF( is_exe AND is_lib )
- IF ( ${ARGC} GREATER 5 )
+ IF( ${ARGC} GREATER 5 )
SET( option_name ${ARGV6} )
ELSE ( ${ARGC} GREATER 5 )
STRING( TOUPPER ${module_name} module_name_upper )
- IF ( is_exe )
+ IF( is_exe )
SET( option_name "ENABLE_${module_name_upper}" )
ELSE ( is_exe )
SET( option_name "ENABLE_LIB_${module_name_upper}" )
- ENDIF ( is_exe )
- ENDIF ( ${ARGC} GREATER 5 )
+ ENDIF( is_exe )
+ ENDIF( ${ARGC} GREATER 5 )
- IF ( ${ARGC} GREATER 6 )
+ IF( ${ARGC} GREATER 6 )
SET( option_descr ${ARGV7} )
ELSE ( ${ARGC} GREATER 6 )
SET( option_descr "disabled by user, use ccmake to enable" )
- ENDIF ( ${ARGC} GREATER 6 )
+ ENDIF( ${ARGC} GREATER 6 )
# debug
# MESSAGE( STATUS
# "GBX_REQUIRE_OPTION (CUM_VAR=${cumulative_var}, MOD_TYPE=${module_type}, MOD_NAME=${module_name}, default_option_value=${default_option_value}, OPT_NAME=${option_name}, OPT_DESC=${option_descr})" )
# set up the option
- IF ( is_exe )
+ IF( is_exe )
OPTION( ${option_name} "Try to build ${module_name}" ${default_option_value} )
ELSE ( is_exe )
OPTION( ${option_name} "Try to build lib${module_name} library" ${default_option_value} )
- ENDIF ( is_exe )
+ ENDIF( is_exe )
# must dereference both var and option names once (!) and IF will evaluate their values
- IF ( ${cumulative_var} AND NOT ${option_name} )
+ IF( ${cumulative_var} AND NOT ${option_name} )
SET( ${cumulative_var} FALSE )
- IF ( is_exe )
+ IF( is_exe )
GBX_NOT_ADD_EXECUTABLE( ${module_name} ${option_descr} )
ELSE ( is_exe )
GBX_NOT_ADD_LIBRARY( ${module_name} ${option_descr} )
- ENDIF ( is_exe )
- ENDIF ( ${cumulative_var} AND NOT ${option_name} )
+ ENDIF( is_exe )
+ ENDIF( ${cumulative_var} AND NOT ${option_name} )
ENDMACRO( GBX_REQUIRE_OPTION cumulative_var module_type module_name default_option_value )
@@ -94,24 +94,24 @@
# debug
# MESSAGE( STATUS "GBX_REQUIRE_VAR [ CUM_VAR=${cumulative_var}, MOD_TYPE=${module_type}, MOD_NAME=${module_name}, test_var=${${test_var}}, reason=${reason} ]" )
- STRING ( COMPARE EQUAL ${module_type} "EXE" is_exe )
- STRING ( COMPARE EQUAL ${module_type} "LIB" is_lib )
- IF ( NOT is_exe AND NOT is_lib )
- MESSAGE ( FATAL_ERROR "In macro GBX_REQUIRE_VAR, module_type must be either 'EXE' or 'LIB'" )
- ENDIF ( NOT is_exe AND NOT is_lib )
- IF ( is_exe AND is_lib )
- MESSAGE ( FATAL_ERROR "In macro GBX_REQUIRE_VAR, module_type must be either 'EXE' or 'LIB'" )
- ENDIF ( is_exe AND is_lib )
+ STRING( COMPARE EQUAL ${module_type} "EXE" is_exe )
+ STRING( COMPARE EQUAL ${module_type} "LIB" is_lib )
+ IF( NOT is_exe AND NOT is_lib )
+ MESSAGE( FATAL_ERROR "In macro GBX_REQUIRE_VAR, module_type must be either 'EXE' or 'LIB'" )
+ ENDIF( NOT is_exe AND NOT is_lib )
+ IF( is_exe AND is_lib )
+ MESSAGE( FATAL_ERROR "In macro GBX_REQUIRE_VAR, module_type must be either 'EXE' or 'LIB'" )
+ ENDIF( is_exe AND is_lib )
# must dereference both var names once (!) and IF will evaluate their values
- IF ( ${cumulative_var} AND NOT ${test_var} )
+ IF( ${cumulative_var} AND NOT ${test_var} )
SET( ${cumulative_var} FALSE )
- IF ( is_exe )
+ IF( is_exe )
GBX_NOT_ADD_EXECUTABLE( ${module_name} ${reason} )
ELSE ( is_exe )
GBX_NOT_ADD_LIBRARY( ${module_name} ${reason} )
- ENDIF ( is_exe )
- ENDIF ( ${cumulative_var} AND NOT ${test_var} )
+ ENDIF( is_exe )
+ ENDIF( ${cumulative_var} AND NOT ${test_var} )
ENDMACRO( GBX_REQUIRE_VAR cumulative_var module_type module_name test_var reason )
@@ -122,7 +122,7 @@
# for the module with a name "installed_module".
# E.g.
# Initialize a variable first
-# SET ( BUILD TRUE )
+# SET( BUILD TRUE )
# Now test the variable value
# REQUIRE_INSTALL ( build LIB HydroStuff GbxStuff )
# will check if GBXSTUFF_INSTALLED is defined.
@@ -134,14 +134,14 @@
# debug
# MESSAGE( STATUS "REQUIRE_INSTALL [ CUM_VAR=${cumulative_var}, MOD_TYPE=${module_type}, MOD_NAME=${module_name}, installed_module=${installed_module} ]" )
- STRING ( TOUPPER ${installed_module} upper_installed_module )
+ STRING( TOUPPER ${installed_module} upper_installed_module )
SET( test_var ${upper_installed_module}_INSTALLED )
- IF ( ${ARGC} GREATER 5 )
+ IF( ${ARGC} GREATER 5 )
SET( reason ${ARGV6} )
ELSE ( ${ARGC} GREATER 5 )
SET( reason "${installed_module} was not installed" )
- ENDIF ( ${ARGC} GREATER 5 )
+ ENDIF( ${ARGC} GREATER 5 )
# must dereference both var names once (!)
GBX_REQUIRE_VAR( ${cumulative_var} ${module_type} ${module_name} ${test_var} ${reason} )
@@ -177,35 +177,35 @@
# debug
# MESSAGE( STATUS "GBX_REQUIRE_TARGET [ CUM_VAR=${${cumulative_var}}, MOD_TYPE=${module_type}, MOD_NAME=${module_name}, target_name=${target_name} ]" )
- STRING ( COMPARE EQUAL ${module_type} "EXE" is_exe )
- STRING ( COMPARE EQUAL ${module_type} "LIB" is_lib )
- IF ( NOT is_exe AND NOT is_lib )
- MESSAGE ( FATAL_ERROR "In macro GBX_REQUIRE_TARGET, module_type must be either 'EXE' or 'LIB'" )
- ENDIF ( NOT is_exe AND NOT is_lib )
- IF ( is_exe AND is_lib )
- MESSAGE ( FATAL_ERROR "In macro GBX_REQUIRE_TARGET, module_type must be either 'EXE' or 'LIB'" )
- ENDIF ( is_exe AND is_lib )
+ STRING( COMPARE EQUAL ${module_type} "EXE" is_exe )
+ STRING( COMPARE EQUAL ${module_type} "LIB" is_lib )
+ IF( NOT is_exe AND NOT is_lib )
+ MESSAGE( FATAL_ERROR "In macro GBX_REQUIRE_TARGET, module_type must be either 'EXE' or 'LIB'" )
+ ENDIF( NOT is_exe AND NOT is_lib )
+ IF( is_exe AND is_lib )
+ MESSAGE( FATAL_ERROR "In macro GBX_REQUIRE_TARGET, module_type must be either 'EXE' or 'LIB'" )
+ ENDIF( is_exe AND is_lib )
- IF ( ${ARGC} GREATER 5 )
+ IF( ${ARGC} GREATER 5 )
SET( reason ${ARGV6} )
ELSE ( ${ARGC} GREATER 5 )
SET( reason "lib${target_name} is not being built" )
- ENDIF ( ${ARGC} GREATER 5 )
+ ENDIF( ${ARGC} GREATER 5 )
GET_TARGET_PROPERTY( target_location ${target_name} LOCATION )
# must dereference both var and option names once (!) and IF will evaluate their values
- IF ( ${cumulative_var} AND NOT target_location )
+ IF( ${cumulative_var} AND NOT target_location )
SET( ${cumulative_var} FALSE )
GBX_MAKE_OPTION_NAME( option_name ${module_type} ${module_name} )
- IF ( is_exe )
+ 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 ( ${cumulative_var} AND NOT target_location )
+ ENDIF( is_exe )
+ ENDIF( ${cumulative_var} AND NOT target_location )
ENDMACRO( GBX_REQUIRE_TARGET cumulative_var module_type module_name target_name )
Modified: gearbox/trunk/cmake/FindGearbox.cmake
===================================================================
--- gearbox/trunk/cmake/FindGearbox.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/cmake/FindGearbox.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -19,6 +19,6 @@
# MESSAGE( STATUS "DEBUG: manifest.cmake is apparently found in : ${GEARBOX_HOME}" )
# NOTE: if GEARBOX_HOME is set to *-NOTFOUND it will evaluate to FALSE
-IF ( GEARBOX_HOME )
+IF( GEARBOX_HOME )
SET( GEARBOX_FOUND 1 CACHE BOOL "Do we have Gearbox?" FORCE )
-ENDIF ( GEARBOX_HOME )
+ENDIF( GEARBOX_HOME )
Modified: gearbox/trunk/cmake/FindIceUtil.cmake
===================================================================
--- gearbox/trunk/cmake/FindIceUtil.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/cmake/FindIceUtil.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -33,7 +33,7 @@
# MESSAGE( STATUS "DEBUG: Ice.h is apparently found in : ${ICEUTIL_HOME_INCLUDE_ICE}" )
# NOTE: if ICEUTIL_HOME_INCLUDE_ICE is set to *-NOTFOUND it will evaluate to FALSE
-IF ( ICEUTIL_HOME_INCLUDE_ICEUTIL )
+IF( ICEUTIL_HOME_INCLUDE_ICEUTIL )
SET( ICEUTIL_FOUND 1 CACHE BOOL "Do we have Ice?" FORCE )
@@ -44,10 +44,10 @@
GET_FILENAME_COMPONENT( ICEUTIL_HOME ${ICEUTIL_HOME_INCLUDE} PATH CACHE )
# MESSAGE( STATUS "Setting ICEUTIL_HOME to ${ICEUTIL_HOME}" )
-ENDIF ( ICEUTIL_HOME_INCLUDE_ICEUTIL )
+ENDIF( ICEUTIL_HOME_INCLUDE_ICEUTIL )
-IF ( ICEUTIL_FOUND )
+IF( ICEUTIL_FOUND )
MESSAGE( STATUS "Looking for libIceUtil - found in ${ICEUTIL_HOME}")
ELSE ( ICEUTIL_FOUND )
MESSAGE( STATUS "Looking for libIceUtil - not found")
-ENDIF ( ICEUTIL_FOUND )
+ENDIF( ICEUTIL_FOUND )
Modified: gearbox/trunk/cmake/SetupBuildType.cmake
===================================================================
--- gearbox/trunk/cmake/SetupBuildType.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/cmake/SetupBuildType.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,13 +1,13 @@
-IF ( NOT CMAKE_BUILD_TYPE )
+IF( NOT CMAKE_BUILD_TYPE )
- IF ( NOT GBX_OS_WIN )
+ IF( NOT GBX_OS_WIN )
# For gcc, RelWithDebInfo gives '-O2 -g'
SET( CMAKE_BUILD_TYPE RelWithDebInfo )
ELSE ( NOT GBX_OS_WIN )
# windows... a temp hack: VCC does not seem to respect the cmake
# setting and always defaults to debug, we have to match it here.
SET( CMAKE_BUILD_TYPE Debug )
- ENDIF ( NOT GBX_OS_WIN )
+ ENDIF( NOT GBX_OS_WIN )
MESSAGE( STATUS "Setting build type to '${CMAKE_BUILD_TYPE}'" )
@@ -15,4 +15,4 @@
MESSAGE( STATUS "Build type set to '${CMAKE_BUILD_TYPE}' by user." )
-ENDIF ( NOT CMAKE_BUILD_TYPE )
+ENDIF( NOT CMAKE_BUILD_TYPE )
Modified: gearbox/trunk/cmake/SetupDirectories.cmake
===================================================================
--- gearbox/trunk/cmake/SetupDirectories.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/cmake/SetupDirectories.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -21,11 +21,11 @@
# 1. using custom defaults (effective only the very first time CMake runs, or after CMakeCache is deleted)
IF( CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT)
MESSAGE( STATUS "Setting default installation directory..." )
- IF ( NOT GBX_OS_WIN )
+ IF( NOT GBX_OS_WIN )
SET( CMAKE_INSTALL_PREFIX /usr/local CACHE PATH "Installation directory" FORCE )
ELSE ( NOT GBX_OS_WIN )
SET( CMAKE_INSTALL_PREFIX "C:\Program Files\${PROJECT_NAME}\Include" CACHE PATH "Installation directory" FORCE )
- ENDIF ( NOT GBX_OS_WIN )
+ ENDIF( NOT GBX_OS_WIN )
ENDIF( CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT )
# the name of the variable controlling install directory for this project
Modified: gearbox/trunk/cmake/SetupOs.cmake
===================================================================
--- gearbox/trunk/cmake/SetupOs.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/cmake/SetupOs.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -8,34 +8,34 @@
STRING( REGEX MATCH Linux GBX_OS_LINUX ${CMAKE_SYSTEM_NAME})
# Rename CMake's variable to something which makes more sense.
-IF ( QNXNTO )
+IF( QNXNTO )
SET( GBX_OS_QNX TRUE BOOL INTERNAL )
-ENDIF ( QNXNTO )
+ENDIF( QNXNTO )
# In windows we just mirror CMake's own variable
-IF ( WIN32 )
+IF( WIN32 )
SET( GBX_OS_WIN TRUE BOOL INTERNAL )
-ENDIF ( WIN32 )
+ENDIF( WIN32 )
# In MacOS X we just mirror CMake's own variable
-IF ( APPLE )
+IF( APPLE )
SET( GBX_OS_MAC TRUE BOOL INTERNAL )
-ENDIF ( APPLE )
+ENDIF( APPLE )
# From now on, use our own OS flags
-IF ( GBX_OS_LINUX )
- MESSAGE ( STATUS "Running on Linux" )
-ENDIF ( GBX_OS_LINUX )
+IF( GBX_OS_LINUX )
+ MESSAGE( STATUS "Running on Linux" )
+ENDIF( GBX_OS_LINUX )
-IF ( GBX_OS_QNX )
- MESSAGE ( STATUS "Running on QNX" )
+IF( GBX_OS_QNX )
+ MESSAGE( STATUS "Running on QNX" )
ADD_DEFINITIONS( -shared -fexceptions )
-ENDIF ( GBX_OS_QNX )
+ENDIF( GBX_OS_QNX )
-IF ( GBX_OS_WIN )
+IF( GBX_OS_WIN )
# CMake seems not to set this property correctly for some reason
SET( GBX_EXE_EXTENSION ".exe" )
- MESSAGE ( STATUS "Running on Windows" )
-ENDIF ( GBX_OS_WIN )
+ MESSAGE( STATUS "Running on Windows" )
+ENDIF( GBX_OS_WIN )
Modified: gearbox/trunk/cmake/TargetUtils.cmake
===================================================================
--- gearbox/trunk/cmake/TargetUtils.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/cmake/TargetUtils.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -10,8 +10,8 @@
# BUILD_WITH_INSTALL_RPATH TRUE )
INSTALL( TARGETS ${name} RUNTIME DESTINATION bin )
SET( templist ${COMPONENT_LIST} )
- LIST ( APPEND templist ${name} )
-# MESSAGE ( STATUS "DEBUG: ${templist}" )
+ LIST( APPEND templist ${name} )
+# MESSAGE( STATUS "DEBUG: ${templist}" )
SET( COMPONENT_LIST ${templist} CACHE INTERNAL "Global list of components to build" FORCE )
MESSAGE( STATUS "Planning to Build Executable: ${name}" )
ENDMACRO( GBX_ADD_EXECUTABLE name )
@@ -28,7 +28,7 @@
# BUILD_WITH_INSTALL_RPATH TRUE )
INSTALL( TARGETS ${name} LIBRARY DESTINATION lib/${PROJECT_NAME} )
SET( templist ${LIBRARY_LIST} )
- LIST ( APPEND templist ${name} )
+ LIST( APPEND templist ${name} )
SET( LIBRARY_LIST ${templist} CACHE INTERNAL "Global list of libraries to build" FORCE )
MESSAGE( STATUS "Planning to Build Library : ${name}" )
ENDMACRO( GBX_ADD_LIBRARY name )
@@ -103,7 +103,7 @@
#
MACRO( GBX_ADD_ITEM name )
SET( templist ${ITEM_LIST} )
- LIST ( APPEND templist ${name} )
+ LIST( APPEND templist ${name} )
SET( ITEM_LIST ${templist} CACHE INTERNAL "Global list of special items to build" FORCE )
MESSAGE( STATUS "Planning to Build Item : ${name}" )
ENDMACRO( GBX_ADD_ITEM name )
@@ -116,21 +116,21 @@
SET( templist ${LICENSE_LIST} )
# get relative path to the current source dir
- STRING ( LENGTH ${GBX_PROJECT_SOURCE_DIR} proj_src_dir_length )
- STRING ( LENGTH ${CMAKE_CURRENT_SOURCE_DIR} current_src_dir_length )
- MATH ( EXPR relative_path_length "${current_src_dir_length} - ${proj_src_dir_length} - 1" )
- MATH ( EXPR relative_path_start "${proj_src_dir_length} + 1" )
- STRING ( SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR}
+ STRING( LENGTH ${GBX_PROJECT_SOURCE_DIR} proj_src_dir_length )
+ STRING( LENGTH ${CMAKE_CURRENT_SOURCE_DIR} current_src_dir_length )
+ MATH( EXPR relative_path_length "${current_src_dir_length} - ${proj_src_dir_length} - 1" )
+ MATH( EXPR relative_path_start "${proj_src_dir_length} + 1" )
+ STRING( SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR}
${relative_path_start} ${relative_path_length} current_src_dir_relative )
# format the string to line up properly
SET( spaces "A Z" )
- STRING ( LENGTH ${current_src_dir_relative} current_src_dir_relative_length )
- MATH ( EXPR white_space_length "60 - ${current_src_dir_relative_length}" )
- STRING ( SUBSTRING ${spaces} 1 ${white_space_length} white_space )
+ STRING( LENGTH ${current_src_dir_relative} current_src_dir_relative_length )
+ MATH( EXPR white_space_length "60 - ${current_src_dir_relative_length}" )
+ STRING( SUBSTRING ${spaces} 1 ${white_space_length} white_space )
SET( line_item "${current_src_dir_relative}${white_space}${license}" )
- LIST ( APPEND templist ${line_item} )
+ LIST( APPEND templist ${line_item} )
SET( LICENSE_LIST ${templist} CACHE INTERNAL "Global list of directories and their licenses" FORCE )
# MESSAGE( STATUS ${line_item} )
ENDMACRO( GBX_ADD_LICENSE license )
@@ -142,7 +142,7 @@
MACRO( GBX_ADD_TEST name executable )
ADD_TEST( ${name} ${executable} ${ARGN} )
SET( templist ${TEST_LIST} )
- LIST ( APPEND templist ${name} )
+ LIST( APPEND templist ${name} )
SET( TEST_LIST ${templist} CACHE INTERNAL "Global list of (CTest) tests to build" FORCE )
# MESSAGE( STATUS "Planning to Build Test : ${name}" )
ENDMACRO( GBX_ADD_TEST name executable )
@@ -152,8 +152,8 @@
#
MACRO( GBX_NOT_ADD_EXECUTABLE name reason )
SET( templist ${COMPONENT_NOT_LIST} )
- LIST ( APPEND templist ${name} )
-# MESSAGE ( STATUS "DEBUG: ${templist}" )
+ LIST( APPEND templist ${name} )
+# MESSAGE( STATUS "DEBUG: ${templist}" )
SET( COMPONENT_NOT_LIST ${templist} CACHE INTERNAL "Global list of components NOT to build" FORCE )
MESSAGE( STATUS "Not planning to Build Executable : ${name} because ${reason}" )
ENDMACRO( GBX_NOT_ADD_EXECUTABLE name reason )
@@ -163,8 +163,8 @@
#
MACRO( GBX_NOT_ADD_LIBRARY name reason )
SET( templist ${LIBRARY_NOT_LIST} )
- LIST ( APPEND templist ${name} )
-# MESSAGE ( STATUS "DEBUG: ${templist}" )
+ LIST( APPEND templist ${name} )
+# MESSAGE( STATUS "DEBUG: ${templist}" )
SET( LIBRARY_NOT_LIST ${templist} CACHE INTERNAL "Global list of libraries NOT to build" FORCE )
MESSAGE( STATUS "Not planning to Build Library : ${name} because ${reason}" )
ENDMACRO( GBX_NOT_ADD_LIBRARY name reason )
@@ -177,21 +177,21 @@
# Tricky list stuff.
# see http://www.cmake.org/Wiki/CMakeMacroMerge for an example
#
-MACRO ( LIST_REPORT ACTION ITEM_NAME note L )
+MACRO( LIST_REPORT ACTION ITEM_NAME note L )
SET( templist ${L} )
- LIST ( LENGTH templist templist_length )
+ LIST( LENGTH templist templist_length )
SET( report_file ${GBX_PROJECT_BINARY_DIR}/cmake_config_report.txt )
- IF ( templist_length GREATER 0 )
- LIST ( SORT templist )
+ IF( templist_length GREATER 0 )
+ LIST( SORT templist )
- MESSAGE ( STATUS "${ACTION} ${templist_length} ${ITEM_NAME} ${note}:" )
- MESSAGE ( STATUS " ${templist}" )
+ MESSAGE( STATUS "${ACTION} ${templist_length} ${ITEM_NAME} ${note}:" )
+ MESSAGE( STATUS " ${templist}" )
- WRITE_FILE ( ${report_file} "${ACTION} ${templist_length} ${ITEM_NAME}:" APPEND )
- WRITE_FILE ( ${report_file} " ${templist}" APPEND )
- ENDIF ( templist_length GREATER 0 )
-ENDMACRO ( LIST_REPORT ACTION ITEM_NAME note L )
+ WRITE_FILE( ${report_file} "${ACTION} ${templist_length} ${ITEM_NAME}:" APPEND )
+ WRITE_FILE( ${report_file} " ${templist}" APPEND )
+ ENDIF( templist_length GREATER 0 )
+ENDMACRO( LIST_REPORT ACTION ITEM_NAME note L )
#
# Puts messages on the screen.
@@ -203,76 +203,76 @@
# write configuration results to file (this line clears existing contents)
SET( report_file ${GBX_PROJECT_BINARY_DIR}/cmake_config_report.txt )
- WRITE_FILE ( ${report_file} "Autogenerated by CMake for ${PROJECT_NAME} project" )
-# WRITE_FILE ( ${report_file} "Using Ice version ${ICE_VERSION}" )
+ WRITE_FILE( ${report_file} "Autogenerated by CMake for ${PROJECT_NAME} project" )
+# WRITE_FILE( ${report_file} "Using Ice version ${ICE_VERSION}" )
#
# Print some results
#
- MESSAGE ( STATUS "Project name ${PROJECT_NAME}")
- MESSAGE ( STATUS "Project version ${GBX_PROJECT_VERSION}")
+ MESSAGE( STATUS "Project name ${PROJECT_NAME}")
+ MESSAGE( STATUS "Project version ${GBX_PROJECT_VERSION}")
# would be nice to print out Orca version for satellite projects
# for this we need an executable which is guaranteed to be installed.
# then we can run it with --version flag.
- # IF ( NOT ORCA_MOTHERSHIP )
- # MESSAGE ( STATUS "Using Orca version ${ORCA_VERSION}")
- # ENDIF ( NOT ORCA_MOTHERSHIP )
- MESSAGE ( STATUS "Platform ${CMAKE_SYSTEM}")
- MESSAGE ( STATUS "CMake version ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}-patch ${CMAKE_PATCH_VERSION}")
- MESSAGE ( STATUS "Install dir ${CMAKE_INSTALL_PREFIX}")
+ # IF( NOT ORCA_MOTHERSHIP )
+ # MESSAGE( STATUS "Using Orca version ${ORCA_VERSION}")
+ # ENDIF( NOT ORCA_MOTHERSHIP )
+ MESSAGE( STATUS "Platform ${CMAKE_SYSTEM}")
+ MESSAGE( STATUS "CMake version ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}-patch ${CMAKE_PATCH_VERSION}")
+ MESSAGE( STATUS "Install dir ${CMAKE_INSTALL_PREFIX}")
SET( note " " )
- LIST_REPORT ( "Will build" "executables" ${note} "${COMPONENT_LIST}" )
- LIST_REPORT ( "Will build" "libraries" ${note} "${LIBRARY_LIST}" )
- LIST_REPORT ( "Will build" "CTest tests" ${note} "${TEST_LIST}" )
- LIST_REPORT ( "Will build" "special items" ${note} "${ITEM_LIST}" )
+ LIST_REPORT( "Will build" "executables" ${note} "${COMPONENT_LIST}" )
+ LIST_REPORT( "Will build" "libraries" ${note} "${LIBRARY_LIST}" )
+ LIST_REPORT( "Will build" "CTest tests" ${note} "${TEST_LIST}" )
+ LIST_REPORT( "Will build" "special items" ${note} "${ITEM_LIST}" )
SET( note "(see above for reasons)" )
- LIST_REPORT ( "Will NOT build" "executables" ${note} "${COMPONENT_NOT_LIST}" )
- LIST_REPORT ( "Will NOT build" "libraries" ${note} "${LIBRARY_NOT_LIST}" )
+ LIST_REPORT( "Will NOT build" "executables" ${note} "${COMPONENT_NOT_LIST}" )
+ LIST_REPORT( "Will NOT build" "libraries" ${note} "${LIBRARY_NOT_LIST}" )
ENDMACRO( GBX_CONFIG_REPORT )
-MACRO ( GBX_WRITE_MANIFEST )
+MACRO( GBX_WRITE_MANIFEST )
SET( manifest_file ${GBX_PROJECT_BINARY_DIR}/${PROJECT_NAME}_manifest.cmake )
- WRITE_FILE ( ${manifest_file} "\# Autogenerated by CMake for ${PROJECT_NAME} project" )
+ WRITE_FILE( ${manifest_file} "\# Autogenerated by CMake for ${PROJECT_NAME} project" )
FOREACH( A ${LIBRARY_LIST} )
- STRING ( TOUPPER ${A} UPPERA )
- WRITE_FILE ( ${manifest_file} "SET( ${UPPERA}_INSTALLED 1)" APPEND )
+ STRING( TOUPPER ${A} UPPERA )
+ WRITE_FILE( ${manifest_file} "SET( ${UPPERA}_INSTALLED 1)" APPEND )
ENDFOREACH( A ${LIBRARY_LIST} )
FOREACH( A ${LIBRARY_NOT_LIST} )
- STRING ( TOUPPER ${A} UPPERA )
- WRITE_FILE ( ${manifest_file} "SET( ${UPPERA}_INSTALLED 0)" APPEND )
+ STRING( TOUPPER ${A} UPPERA )
+ WRITE_FILE( ${manifest_file} "SET( ${UPPERA}_INSTALLED 0)" APPEND )
ENDFOREACH( A ${LIBRARY_NOT_LIST} )
- WRITE_FILE ( ${manifest_file} " " APPEND )
+ WRITE_FILE( ${manifest_file} " " APPEND )
- STRING ( TOUPPER ${PROJECT_NAME} upper_project_name )
- WRITE_FILE ( ${manifest_file} "SET( ${upper_project_name}_MANIFEST_LOADED 1)" APPEND )
+ STRING( TOUPPER ${PROJECT_NAME} upper_project_name )
+ WRITE_FILE( ${manifest_file} "SET( ${upper_project_name}_MANIFEST_LOADED 1)" APPEND )
INSTALL( FILES ${manifest_file} DESTINATION . )
-ENDMACRO ( GBX_WRITE_MANIFEST )
+ENDMACRO( GBX_WRITE_MANIFEST )
-MACRO ( GBX_WRITE_LICENSE )
+MACRO( GBX_WRITE_LICENSE )
SET( license_file ${GBX_PROJECT_SOURCE_DIR}/LICENSE )
- WRITE_FILE ( ${license_file} "Autogenerated by CMake for ${PROJECT_NAME} project" )
- WRITE_FILE ( ${license_file} "----------------------------------------------------------------------" APPEND )
- WRITE_FILE ( ${license_file} "DIRECTORY license" APPEND )
- WRITE_FILE ( ${license_file} "----------------------------------------------------------------------" APPEND )
+ WRITE_FILE( ${license_file} "Autogenerated by CMake for ${PROJECT_NAME} project" )
+ WRITE_FILE( ${license_file} "----------------------------------------------------------------------" APPEND )
+ WRITE_FILE( ${license_file} "DIRECTORY license" APPEND )
+ WRITE_FILE( ${license_file} "----------------------------------------------------------------------" APPEND )
FOREACH( A ${LICENSE_LIST} )
- WRITE_FILE ( ${license_file} ${A} APPEND )
+ WRITE_FILE( ${license_file} ${A} APPEND )
ENDFOREACH( A ${LICENSE_LIST} )
-ENDMACRO ( GBX_WRITE_LICENSE )
+ENDMACRO( GBX_WRITE_LICENSE )
#
# Reset global lists of components, libraries, etc.
#
-MACRO ( GBX_RESET_ALL_LISTS )
- # MESSAGE ( STATUS "DEBUG: Resetting global component and library lists" )
+MACRO( GBX_RESET_ALL_LISTS )
+ # MESSAGE( STATUS "DEBUG: Resetting global component and library lists" )
SET( COMPONENT_LIST "" CACHE INTERNAL "Global list of components to build" FORCE )
SET( LIBRARY_LIST "" CACHE INTERNAL "Global list of libraries to build" FORCE )
SET( TEST_LIST "" CACHE INTERNAL "Global list of CTest tests to build" FORCE )
@@ -282,4 +282,4 @@
SET( LIBRARY_NOT_LIST "" CACHE INTERNAL "Global list of libraries NOT to build" FORCE )
SET( LICENSE_LIST "" CACHE INTERNAL "Global list of directories and their licenses" FORCE )
-ENDMACRO ( GBX_RESET_ALL_LISTS )
+ENDMACRO( GBX_RESET_ALL_LISTS )
Modified: gearbox/trunk/cmake/UseBasicRules.cmake
===================================================================
--- gearbox/trunk/cmake/UseBasicRules.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/cmake/UseBasicRules.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -8,15 +8,15 @@
# Do the same for the submitted directory when its compilation
# is enabled.
#
-IF ( GBX_BUILD_SUBMITTED )
+IF( GBX_BUILD_SUBMITTED )
INCLUDE_DIRECTORIES( ${GBX_PROJECT_SOURCE_DIR}/submitted )
-ENDIF ( GBX_BUILD_SUBMITTED )
+ENDIF( GBX_BUILD_SUBMITTED )
#
# Platform-specific compiler and linker flags
#
-IF ( NOT GBX_OS_WIN )
+IF( NOT GBX_OS_WIN )
ADD_DEFINITIONS( "-Wall" )
ELSE ( NOT GBX_OS_WIN )
ADD_DEFINITIONS( "-Wall -D_CRT_SECURE_NO_DEPRECATE" )
-ENDIF ( NOT GBX_OS_WIN )
+ENDIF( NOT GBX_OS_WIN )
Modified: gearbox/trunk/cmake/WriteConfigH.cmake
===================================================================
--- gearbox/trunk/cmake/WriteConfigH.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/cmake/WriteConfigH.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -10,7 +10,7 @@
SET( CONFIG_H ${PROJECT_BINARY_DIR}/config.h )
# Only write config.h once
-IF ( WROTE_CONFIG_H )
+IF( WROTE_CONFIG_H )
MESSAGE( STATUS "Not writing config.h -- wrote it previously" )
ELSE ( WROTE_CONFIG_H )
MESSAGE( STATUS "Writing config.h" )
@@ -18,7 +18,7 @@
FILE( WRITE ${CONFIG_H} "/* config.h. Generated by CMakeLists.txt */\n\n" )
- IF ( WIN32 )
+ IF( WIN32 )
#
# define some stuff to make MSVC look a bit more like gcc
@@ -167,4 +167,4 @@
ENDIF( WIN32 )
-ENDIF ( WROTE_CONFIG_H )
+ENDIF( WROTE_CONFIG_H )
Modified: gearbox/trunk/cmake/dart/gearbox-nightly-linux-gcc42.cmake
===================================================================
--- gearbox/trunk/cmake/dart/gearbox-nightly-linux-gcc42.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/cmake/dart/gearbox-nightly-linux-gcc42.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -2,19 +2,19 @@
# Edit this to match your configuration, then set a cron job
# to run it regularly (with 'ctest -S <script_name>').
#
-SET (DASHBOARD_ROOT "/home/users/dart/ctests/gearbox/gearbox-nightly")
-SET (CTEST_SOURCE_DIRECTORY "${DASHBOARD_ROOT}/gearbox")
-SET (CTEST_BINARY_DIRECTORY "${DASHBOARD_ROOT}/build-gearbox")
+SET(DASHBOARD_ROOT "/home/users/dart/ctests/gearbox/gearbox-nightly")
+SET(CTEST_SOURCE_DIRECTORY "${DASHBOARD_ROOT}/gearbox")
+SET(CTEST_BINARY_DIRECTORY "${DASHBOARD_ROOT}/build-gearbox")
-SET (CTEST_CVS_COMMAND "svn")
+SET(CTEST_CVS_COMMAND "svn")
# which command to use for running the dashboard
#
-#SET (CTEST_COMMAND "ctest -D Nightly -A \"${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}\"" )
-SET (CTEST_COMMAND "ctest -D Nightly -A \"${CTEST_BINARY_DIRECTORY}/cmake_config_report.txt\"" )
+#SET(CTEST_COMMAND "ctest -D Nightly -A \"${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}\"" )
+SET(CTEST_COMMAND "ctest -D Nightly -A \"${CTEST_BINARY_DIRECTORY}/cmake_config_report.txt\"" )
# what cmake command to use for configuring this dashboard
-SET (CTEST_CMAKE_COMMAND "cmake" )
+SET(CTEST_CMAKE_COMMAND "cmake" )
####################################################################
@@ -23,11 +23,11 @@
####################################################################
# should ctest wipe the binary tree before running
-SET (CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
+SET(CTEST_START_WITH_EMPTY_BINARY_DIRECTORY TRUE)
# this is the initial cache to use for the binary tree, be careful to escape
# any quotes inside of this string if you use it
-SET (CTEST_INITIAL_CACHE "
+SET(CTEST_INITIAL_CACHE "
MAKECOMMAND:STRING=make
BUILDNAME:STRING=Debian-gcc42
SITE:STRING=devdebian.acfr.usyd.edu.au
@@ -35,7 +35,7 @@
")
# set any extra envionment variables here
-SET (CTEST_ENVIRONMENT
+SET(CTEST_ENVIRONMENT
CC=gcc-4.2
CXX=g++-4.2
CXXFLAGS=-fprofile-arcs -ftest-coverage
Modified: gearbox/trunk/cmake/internal/Setup.cmake
===================================================================
--- gearbox/trunk/cmake/internal/Setup.cmake 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/cmake/internal/Setup.cmake 2008-03-26 02:32:57 UTC (rev 109)
@@ -76,18 +76,18 @@
# Enable testing by including the Dart module
# (must be done *before* entering source directories )
-INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake)
+INCLUDE(${CMAKE_ROOT}/Modules/Dart.cmake)
ENABLE_TESTING()
#
# Enter the source tree
#
-ADD_SUBDIRECTORY ( src )
-ADD_SUBDIRECTORY ( submitted )
-# ADD_SUBDIRECTORY ( retired )
+ADD_SUBDIRECTORY( src )
+ADD_SUBDIRECTORY( submitted )
+# ADD_SUBDIRECTORY( retired )
# Some cmake and shell scripts need to be installed
-ADD_SUBDIRECTORY ( cmake )
+ADD_SUBDIRECTORY( cmake )
#
# Print results of CMake activity
@@ -97,9 +97,9 @@
#
# Print license information to a file
#
-IF ( GBX_BUILD_LICENSE )
+IF( GBX_BUILD_LICENSE )
GBX_WRITE_LICENSE()
-ENDIF ( GBX_BUILD_LICENSE )
+ENDIF( GBX_BUILD_LICENSE )
GBX_CONFIG_REPORT( "Nothing special" )
Modified: gearbox/trunk/src/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/CMakeLists.txt 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/src/CMakeLists.txt 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,6 +1,6 @@
# A place for well-tested and well-documented libraries.
-MESSAGE ( STATUS "== SRC ==" )
+MESSAGE( STATUS "== SRC ==" )
# When adding new directories, please maintain order of inter-dependencies.
# Otherwise, maintain alphabetical order.
Modified: gearbox/trunk/src/basicexample/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/basicexample/CMakeLists.txt 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/src/basicexample/CMakeLists.txt 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,10 +1,10 @@
-SET ( lib_name basicexample )
+SET( lib_name basicexample )
GBX_ADD_LICENSE( LGPL )
-SET ( build TRUE )
+SET( build TRUE )
GBX_REQUIRE_OPTION( build LIB ${lib_name} OFF )
-IF ( build )
+IF( build )
INCLUDE( ${GBX_CMAKE_DIR}/UseBasicRules.cmake )
@@ -17,8 +17,8 @@
# the custom command above is equivalent to this
# INSTALL( FILES ${hdrs} DESTINATION include/gearbox/basicexample )
-# IF ( GBX_BUILD_TESTS )
-# ADD_SUBDIRECTORY ( test )
-# ENDIF ( GBX_BUILD_TESTS )
+# IF( GBX_BUILD_TESTS )
+# ADD_SUBDIRECTORY( test )
+# ENDIF( GBX_BUILD_TESTS )
-ENDIF ( build )
+ENDIF( build )
Modified: gearbox/trunk/src/gbxadvancedexample/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxadvancedexample/CMakeLists.txt 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/src/gbxadvancedexample/CMakeLists.txt 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,14 +1,14 @@
-SET ( lib_name GbxAdvancedExample )
+SET( lib_name GbxAdvancedExample )
GBX_ADD_LICENSE( GPL )
-SET ( build TRUE )
+SET( build TRUE )
GBX_REQUIRE_OPTION( build LIB ${lib_name} OFF )
GBX_REQUIRE_VAR( build LIB ${lib_name} GBX_OS_LINUX "only Linux OS is supported" )
SET( dep_libs basicexample )
GBX_REQUIRE_TARGETS( build LIB ${lib_name} ${dep_libs} )
-IF ( build )
+IF( build )
INCLUDE( ${GBX_CMAKE_DIR}/UseBasicRules.cmake )
@@ -20,4 +20,4 @@
GBX_ADD_HEADERS( gbxadvancedexample ${hdrs} )
-ENDIF ( build )
+ENDIF( build )
Modified: gearbox/trunk/src/gbxserialacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxserialacfr/CMakeLists.txt 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/src/gbxserialacfr/CMakeLists.txt 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,7 +1,7 @@
-SET ( lib_name GbxSerialAcfr )
+SET( lib_name GbxSerialAcfr )
GBX_ADD_LICENSE( LGPL )
-SET ( build TRUE )
+SET( build TRUE )
GBX_REQUIRE_OPTION( build LIB ${lib_name} ON )
GBX_REQUIRE_VAR( build LIB ${lib_name} GBX_OS_LINUX "only Linux OS is supported" )
@@ -9,7 +9,7 @@
# this is currently internal, so we don't have to check it
# GBX_REQUIRE_TARGETS( build LIB ${lib_name} ${dep_libs} )
-IF ( build )
+IF( build )
ADD_SUBDIRECTORY( lockfile )
@@ -27,9 +27,9 @@
GBX_ADD_HEADERS( gbxserialacfr ${hdrs} )
- IF ( GBX_BUILD_TESTS )
- ADD_SUBDIRECTORY ( test )
- ENDIF ( GBX_BUILD_TESTS )
+ IF( GBX_BUILD_TESTS )
+ ADD_SUBDIRECTORY( test )
+ ENDIF( GBX_BUILD_TESTS )
-ENDIF ( build )
+ENDIF( build )
Modified: gearbox/trunk/src/gbxserialacfr/lockfile/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxserialacfr/lockfile/CMakeLists.txt 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/src/gbxserialacfr/lockfile/CMakeLists.txt 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,13 +1,13 @@
-SET ( lib_name GbxLockFileAcfr )
+SET( lib_name GbxLockFileAcfr )
GBX_ADD_LICENSE( LGPL )
-SET ( build TRUE )
+SET( build TRUE )
# don't give user an option
# GBX_REQUIRE_OPTION( build LIB ${lib_name} ON )
# this was already tested in the dir above
# GBX_REQUIRE_VAR( build LIB ${lib_name} GBX_OS_LINUX "only Linux OS is supported" )
-IF ( build )
+IF( build )
INCLUDE( ${GBX_CMAKE_DIR}/UseBasicRules.cmake )
@@ -19,8 +19,8 @@
GBX_ADD_HEADERS( gbxserialacfr/lockfile ${hdrs} )
- IF ( GBX_BUILD_TESTS )
- ADD_SUBDIRECTORY ( test )
- ENDIF ( GBX_BUILD_TESTS )
+ IF( GBX_BUILD_TESTS )
+ ADD_SUBDIRECTORY( test )
+ ENDIF( GBX_BUILD_TESTS )
-ENDIF ( build )
+ENDIF( build )
Modified: gearbox/trunk/src/gbxsickacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxsickacfr/CMakeLists.txt 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/src/gbxsickacfr/CMakeLists.txt 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,7 +1,7 @@
-SET ( lib_name GbxSickAcfr )
+SET( lib_name GbxSickAcfr )
GBX_ADD_LICENSE( LGPL )
-SET ( build TRUE )
+SET( build TRUE )
GBX_REQUIRE_OPTION( build LIB ${lib_name} ON )
GBX_REQUIRE_VAR( build LIB ${lib_name} GBX_OS_LINUX "only Linux OS is supported" )
@@ -14,7 +14,7 @@
# these are built internally
SET( int_libs GbxUtilAcfr GbxIceUtilAcfr GbxSerialDeviceAcfr )
-IF ( build )
+IF( build )
ADD_SUBDIRECTORY( gbxutilacfr )
ADD_SUBDIRECTORY( gbxiceutilacfr )
@@ -33,8 +33,8 @@
GBX_ADD_HEADERS( gbxsickacfr ${hdrs} )
- IF ( GBX_BUILD_TESTS )
- ADD_SUBDIRECTORY ( test )
- ENDIF ( GBX_BUILD_TESTS )
+ IF( GBX_BUILD_TESTS )
+ ADD_SUBDIRECTORY( test )
+ ENDIF( GBX_BUILD_TESTS )
-ENDIF ( build )
+ENDIF( build )
Modified: gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/CMakeLists.txt 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/src/gbxsickacfr/gbxiceutilacfr/CMakeLists.txt 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,7 +1,7 @@
-SET ( lib_name GbxIceUtilAcfr )
+SET( lib_name GbxIceUtilAcfr )
GBX_ADD_LICENSE( LGPL )
-SET ( build TRUE )
+SET( build TRUE )
# don't give user an option
# GBX_REQUIRE_OPTION( build LIB ${lib_name} ON )
@@ -16,7 +16,7 @@
SET( proj_libs GbxUtilAcfr )
# GBX_REQUIRE_TARGETS( build LIB ${lib_name} ${proj_libs} )
-IF ( build )
+IF( build )
INCLUDE( ${GBX_CMAKE_DIR}/UseBasicRules.cmake )
INCLUDE( ${GBX_CMAKE_DIR}/UseIceUtil.cmake )
@@ -33,8 +33,8 @@
GBX_ADD_HEADERS( gbxsickacfr/gbxiceutilacfr ${hdrs} )
- IF ( GBX_BUILD_TESTS )
- ADD_SUBDIRECTORY ( test )
- ENDIF ( GBX_BUILD_TESTS )
+ IF( GBX_BUILD_TESTS )
+ ADD_SUBDIRECTORY( test )
+ ENDIF( GBX_BUILD_TESTS )
-ENDIF ( build )
+ENDIF( build )
Modified: gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/CMakeLists.txt 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/src/gbxsickacfr/gbxserialdeviceacfr/CMakeLists.txt 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,7 +1,7 @@
-SET ( lib_name GbxSerialDeviceAcfr )
+SET( lib_name GbxSerialDeviceAcfr )
GBX_ADD_LICENSE( LGPL )
-SET ( build TRUE )
+SET( build TRUE )
# don't give user an option
# GBX_REQUIRE_OPTION( build LIB ${lib_name} ON )
@@ -16,7 +16,7 @@
SET( proj_libs GbxSerialAcfr )
# GBX_REQUIRE_TARGETS( build LIB ${lib_name} ${proj_libs} )
-IF ( build )
+IF( build )
INCLUDE( ${GBX_CMAKE_DIR}/UseBasicRules.cmake )
INCLUDE( ${GBX_CMAKE_DIR}/UseIceUtil.cmake )
@@ -33,8 +33,8 @@
GBX_ADD_HEADERS( gbxsickacfr/gbxserialdeviceacfr ${hdrs} )
-# IF ( GBX_BUILD_TESTS )
-# ADD_SUBDIRECTORY ( test )
-# ENDIF ( GBX_BUILD_TESTS )
+# IF( GBX_BUILD_TESTS )
+# ADD_SUBDIRECTORY( test )
+# ENDIF( GBX_BUILD_TESTS )
-ENDIF ( build )
+ENDIF( build )
Modified: gearbox/trunk/src/gbxsickacfr/gbxutilacfr/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/gbxsickacfr/gbxutilacfr/CMakeLists.txt 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/src/gbxsickacfr/gbxutilacfr/CMakeLists.txt 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,11 +1,11 @@
-SET ( lib_name GbxUtilAcfr )
+SET( lib_name GbxUtilAcfr )
GBX_ADD_LICENSE( LGPL )
-SET ( build TRUE )
+SET( build TRUE )
# don't give user an option
# GBX_REQUIRE_OPTION( build LIB ${lib_name} ON )
-IF ( build )
+IF( build )
INCLUDE( ${GBX_CMAKE_DIR}/UseBasicRules.cmake )
@@ -19,8 +19,8 @@
GBX_ADD_HEADERS( gbxsickacfr/gbxutilacfr ${hdrs} )
- IF ( GBX_BUILD_TESTS )
- ADD_SUBDIRECTORY ( test )
- ENDIF ( GBX_BUILD_TESTS )
+ IF( GBX_BUILD_TESTS )
+ ADD_SUBDIRECTORY( test )
+ ENDIF( GBX_BUILD_TESTS )
-ENDIF ( build )
+ENDIF( build )
Modified: gearbox/trunk/src/urg_nz/CMakeLists.txt
===================================================================
--- gearbox/trunk/src/urg_nz/CMakeLists.txt 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/src/urg_nz/CMakeLists.txt 2008-03-26 02:32:57 UTC (rev 109)
@@ -1,12 +1,12 @@
-SET ( lib_name urg_nz )
+SET( lib_name urg_nz )
set ( lib_desc "Hokuyo URG laser scanner driver" )
GBX_ADD_LICENSE( GPL )
-SET ( build TRUE )
+SET( build TRUE )
GBX_REQUIRE_OPTION( build LIB ${lib_name} ON )
GBX_REQUIRE_VAR( build LIB ${lib_name} GBX_OS_LINUX "Only Linux OS is supported" )
-IF ( build )
+IF( build )
INCLUDE( ${GBX_CMAKE_DIR}/UseBasicRules.cmake )
@@ -20,4 +20,4 @@
GBX_ADD_EXAMPLE( ${lib_name} example.cmake.in example.cmake example.cpp example.readme )
-ENDIF ( build )
+ENDIF( build )
Modified: gearbox/trunk/submitted/CMakeLists.txt
===================================================================
--- gearbox/trunk/submitted/CMakeLists.txt 2008-03-26 01:52:08 UTC (rev 108)
+++ gearbox/trunk/submitted/CMakeLists.txt 2008-03-26 02:32:57 UTC (rev 109)
@@ -3,11 +3,11 @@
OPTION ( GBX_BUILD_SUBMITTED "Build submitted libraries" OFF )
MARK_AS_ADVANCED ( FORCE GBX_BUILD_SUBMITTED )
-IF ( GBX_BUILD_SUBMITTED )
+IF( GBX_BUILD_SUBMITTED )
- MESSAGE ( STATUS "== SUBMITTED ==" )
+ MESSAGE( STATUS "== SUBMITTED ==" )
# When adding new directories, please maintain order of inter-dependencies.
# Otherwise, maintain alphabetical order.
-ENDIF ( GBX_BUILD_SUBMITTED )
\ No newline at end of file
+ENDIF( GBX_BUILD_SUBMITTED )
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <rus...@us...> - 2008-03-26 01:52:02
|
Revision: 108
http://gearbox.svn.sourceforge.net/gearbox/?rev=108&view=rev
Author: russo2503v
Date: 2008-03-25 18:52:08 -0700 (Tue, 25 Mar 2008)
Log Message:
-----------
installing cmake scripts
Added Paths:
-----------
gearbox/trunk/cmake/CMakeLists.txt
Added: gearbox/trunk/cmake/CMakeLists.txt
===================================================================
--- gearbox/trunk/cmake/CMakeLists.txt (rev 0)
+++ gearbox/trunk/cmake/CMakeLists.txt 2008-03-26 01:52:08 UTC (rev 108)
@@ -0,0 +1,5 @@
+#
+# Install all .cmake files, so other projects can use them.
+#
+FILE( GLOB scripts *.cmake )
+GBX_ADD_SHARED_FILES( cmake ${scripts} )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|