From: <bo...@us...> - 2008-02-25 12:32:06
|
Revision: 82 http://gearbox.svn.sourceforge.net/gearbox/?rev=82&view=rev Author: borax00 Date: 2008-02-25 04:32:07 -0800 (Mon, 25 Feb 2008) Log Message: ----------- Modified Paths: -------------- gearbox/trunk/submitted/gbxserialacfr/doc.dox gearbox/trunk/submitted/gbxsickacfr/doc.dox gearbox/trunk/submitted/gbxsickacfr/driver.cpp gearbox/trunk/submitted/gbxsickacfr/driver.h gearbox/trunk/submitted/gbxsickacfr/gbxserialdeviceacfr/serialdevicehandler.h gearbox/trunk/submitted/gbxsickacfr/gbxutilacfr/trivialstatus.h gearbox/trunk/submitted/gbxsickacfr/gbxutilacfr/trivialtracer.h gearbox/trunk/submitted/gbxsickacfr/test/test.cpp Modified: gearbox/trunk/submitted/gbxserialacfr/doc.dox =================================================================== --- gearbox/trunk/submitted/gbxserialacfr/doc.dox 2008-02-25 12:00:58 UTC (rev 81) +++ gearbox/trunk/submitted/gbxserialacfr/doc.dox 2008-02-25 12:32:07 UTC (rev 82) @@ -50,6 +50,9 @@ @par Responsible Developer Alex Brooks +@par License + LGPL + */ /*! Modified: gearbox/trunk/submitted/gbxsickacfr/doc.dox =================================================================== --- gearbox/trunk/submitted/gbxsickacfr/doc.dox 2008-02-25 12:00:58 UTC (rev 81) +++ gearbox/trunk/submitted/gbxsickacfr/doc.dox 2008-02-25 12:32:07 UTC (rev 82) @@ -29,12 +29,18 @@ @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 Alex Brooks, Alexei Makarenko, Tobias Kaupp @par Responsible Developer Alex Brooks +@par License + LGPL + @par Dependencies - libIceUtil (for timing/threads/mutexes) Modified: gearbox/trunk/submitted/gbxsickacfr/driver.cpp =================================================================== --- gearbox/trunk/submitted/gbxsickacfr/driver.cpp 2008-02-25 12:00:58 UTC (rev 81) +++ gearbox/trunk/submitted/gbxsickacfr/driver.cpp 2008-02-25 12:32:07 UTC (rev 82) @@ -72,8 +72,7 @@ bool Config::validate() const { - // baudRate ??? - // device ??? + // Don't bother verifying baudRate or device, the user will find out soon enough when the Driver bitches. if ( minRange < 0.0 ) return false; if ( maxRange <= 0.0 ) return false; if ( fieldOfView <= 0.0 || fieldOfView > DEG2RAD(360.0) ) return false; @@ -227,7 +226,7 @@ else { stringstream ss; - ss << "Weird return code from getAndPopNext: " << ret; + ss << "Weird return code from serialHandler_->getNextResponse: " << ret; throw gbxutilacfr::Exception( ERROR_INFO, ss.str() ); } } @@ -310,7 +309,7 @@ // help with dazzle (ie sunlight interfering with the laser). // I haven't had a chance to test it though, so I'm not game // to set it. - cout<<"TRACE(sickacfrdriver.cpp): TODO: set availability?" << endl; + cout<<"TRACE(driver.cpp): TODO: set availability?" << endl; // c.availability = 0x01; return c; Modified: gearbox/trunk/submitted/gbxsickacfr/driver.h =================================================================== --- gearbox/trunk/submitted/gbxsickacfr/driver.h 2008-02-25 12:00:58 UTC (rev 81) +++ gearbox/trunk/submitted/gbxsickacfr/driver.h 2008-02-25 12:32:07 UTC (rev 82) @@ -69,8 +69,8 @@ //! Constructor Driver( const Config &config, gbxutilacfr::Tracer& tracer, gbxutilacfr::Status& status ); - //! Blocks till new data is available, but shouldn't occupy the thread indefinitely. - //! Ranges and intensities can be expected to have been pre-sized correctly. + //! Blocks till new data is available, but not for longer than timeoutMs. + //! The ranges and intensities in 'data' are expected to have been pre-sized correctly. //! Throws exceptions on un-recoverable faults. //! //! The default timeout is greater than the scan inter-arrival time for all baudrates. Modified: gearbox/trunk/submitted/gbxsickacfr/gbxserialdeviceacfr/serialdevicehandler.h =================================================================== --- gearbox/trunk/submitted/gbxsickacfr/gbxserialdeviceacfr/serialdevicehandler.h 2008-02-25 12:00:58 UTC (rev 81) +++ gearbox/trunk/submitted/gbxsickacfr/gbxserialdeviceacfr/serialdevicehandler.h 2008-02-25 12:32:07 UTC (rev 82) @@ -18,7 +18,7 @@ namespace gbxsickacfr { namespace gbxserialdeviceacfr { -// @brief A generic Response: a message received from the device +//! @brief A generic Response: a message received from the device class IResponse : public IceUtil::Shared { public: @@ -34,7 +34,7 @@ }; typedef IceUtil::Handle<IResponse> IResponsePtr; -// Response plus a timeStamp: a simple container to keep the two together +//! Response plus a timeStamp: a simple container to keep the two together class TimedResponse { public: @@ -48,10 +48,10 @@ IResponsePtr response; }; -// -// The implementation of this class needs to be provided by the user. -// It parses buffers to produce discrete messages (responses form the device) -// +//! +//! The implementation of this class needs to be provided by the user. +//! It parses buffers to produce discrete messages (responses form the device) +//! class IResponseParser { public: @@ -72,19 +72,19 @@ }; -// -// @brief Handles the serial port. -// -// This thread waits for new messags to arrive from the device, parses -// them and sticks them into a buffer for someone else to grab. -// -// Read in this separate loop so we can hopefully grab the messages -// as soon as they arrive, without relying on an external poller -// which may be busy doing other stuff. -// This will hopefully give us accurate timestamps. -// -// @author Alex Brooks -// +//! +//! @brief Handles the serial port. +//! +//! This thread waits for new messags to arrive from the device, parses +//! them and sticks them into a buffer for someone else to grab. +//! +//! Read in this separate loop so we can hopefully grab the messages +//! as soon as they arrive, without relying on an external poller +//! which may be busy doing other stuff. +//! This will hopefully give us accurate timestamps. +//! +//! @author Alex Brooks +//! class SerialDeviceHandler : public gbxiceutilacfr::SubsystemThread { Modified: gearbox/trunk/submitted/gbxsickacfr/gbxutilacfr/trivialstatus.h =================================================================== --- gearbox/trunk/submitted/gbxsickacfr/gbxutilacfr/trivialstatus.h 2008-02-25 12:00:58 UTC (rev 81) +++ gearbox/trunk/submitted/gbxsickacfr/gbxutilacfr/trivialstatus.h 2008-02-25 12:32:07 UTC (rev 82) @@ -18,6 +18,11 @@ namespace gbxutilacfr { +//! +//! @brief A trivial implementation of the status API which prints to cout. +//! +//! @see Status +//! class TrivialStatus : public Status { public: Modified: gearbox/trunk/submitted/gbxsickacfr/gbxutilacfr/trivialtracer.h =================================================================== --- gearbox/trunk/submitted/gbxsickacfr/gbxutilacfr/trivialtracer.h 2008-02-25 12:00:58 UTC (rev 81) +++ gearbox/trunk/submitted/gbxsickacfr/gbxutilacfr/trivialtracer.h 2008-02-25 12:32:07 UTC (rev 82) @@ -16,6 +16,11 @@ namespace gbxsickacfr { namespace gbxutilacfr { +//! +//! @brief A simple implementation of the tracer API which prints to cout. +//! +//! @see Tracer +//! class TrivialTracer : public Tracer { public: Modified: gearbox/trunk/submitted/gbxsickacfr/test/test.cpp =================================================================== --- gearbox/trunk/submitted/gbxsickacfr/test/test.cpp 2008-02-25 12:00:58 UTC (rev 81) +++ gearbox/trunk/submitted/gbxsickacfr/test/test.cpp 2008-02-25 12:32:07 UTC (rev 82) @@ -35,19 +35,19 @@ // Get some options from the command line while ((opt = getopt (argc, argv, "p:b:")) != -1) { - switch (opt) + switch ( opt ) { - case 'p': - port = optarg; - break; - case 'b': - baud = atoi (optarg); - break; - default: - cout << "Usage: " << argv[0] << " [-p port] [-b baud]" << endl << endl - << "-p port\tPort the laser scanner is connected to. E.g. /dev/ttyS0" << endl - << "-b baud\tBaud rate to connect at (19200, 57600 or 115200)." << endl; - return 1; + case 'p': + port = optarg; + break; + case 'b': + baud = atoi( optarg ); + break; + default: + cout << "Usage: " << argv[0] << " [-p port] [-b baud]" << endl << endl + << "-p port\tPort the laser scanner is connected to. E.g. /dev/ttyS0" << endl + << "-b baud\tBaud rate to connect at (19200, 57600 or 115200)." << endl; + return 1; } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |