[Nrtb-core] [Branch ~fpstovall/nrtb/cpp_common] Rev 16: Corrected Makefile to include all dependencies.
revno: 16 committer: fpstov...@gmail.com branch nick: dev timestamp: Wed 2010-12-29 09:40:32 -0500 message: Corrected Makefile to include all dependencies. modified: common/confreader/Makefile -- lp:~fpstovall/nrtb/cpp_common https://code.launchpad.net/~fpstovall/nrtb/cpp_common Your team NRTB Core is subscribed to branch lp:~fpstovall/nrtb/cpp_common. To unsubscribe from this branch go to https://code.launchpad.net/~fpstovall/nrtb/cpp_common/+edit-subscription === modified file 'common/confreader/Makefile' --- common/confreader/Makefile 2010-12-27 04:09:19 + +++ common/confreader/Makefile 2010-12-29 14:40:32 + @@ -21,7 +21,13 @@ @cp -v confreader.o ../obj @echo build complete -confreader.o: confreader.h confreader.cpp Makefile +../include/common.h: + @cd ../common_rl; make lib + +../include/log_setup.h: + @cd ../logger; make lib + +confreader.o: confreader.h confreader.cpp Makefile ../include/common.h ../include/log_setup.h @rm -f confreader.o g++ -c confreader.cpp -I ../include ___ Mailing list: https://launchpad.net/~nrtb-core Post to : nrtb-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~nrtb-core More help : https://help.launchpad.net/ListHelp
[Nrtb-core] [Blueprint icp-spec] Interprocess Communications
Blueprint changed by Rick Stovall: Whiteboard changed: - Made a quick change to altering the requirement to use Boost::ASIO in - favor of using the POCO libraries. While a a little less flexible, than - Boost, POCO is considerably easier to use. It's under the same license, - so there are no legal implications to this change. With this change, - I'll be starting implementation this week. - - After review and approval by two of the nrtb-core staff, this blueprint - is approved and is ready for implementation. + Coding the the transceiver is making good progress. -- Interprocess Communications https://blueprints.launchpad.net/nrtb/+spec/icp-spec ___ Mailing list: https://launchpad.net/~nrtb-core Post to : nrtb-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~nrtb-core More help : https://help.launchpad.net/ListHelp
[Nrtb-core] [Branch ~fpstovall/nrtb/cpp_common] Rev 19: First cut at the complete transciever interface (header file). Also updated the make file to buil...
revno: 19 committer: fpstov...@gmail.com branch nick: dev timestamp: Wed 2010-12-29 21:21:26 -0500 message: First cut at the complete transciever interface (header file). Also updated the make file to build any missing dependencies. modified: common/transciever/Makefile common/transciever/transciever.h -- lp:~fpstovall/nrtb/cpp_common https://code.launchpad.net/~fpstovall/nrtb/cpp_common Your team NRTB Core is subscribed to branch lp:~fpstovall/nrtb/cpp_common. To unsubscribe from this branch go to https://code.launchpad.net/~fpstovall/nrtb/cpp_common/+edit-subscription === modified file 'common/transciever/Makefile' --- common/transciever/Makefile 2010-12-29 16:30:53 + +++ common/transciever/Makefile 2010-12-30 02:21:26 + @@ -21,7 +21,10 @@ @cp -v transciever.o ../obj @echo build complete -transciever.o: transciever.h transciever.cpp Makefile +../include/confreader.h: + @cp ../confreader; make lib + +transciever.o: transciever.h transciever.cpp Makefile ../include/confreader.h @rm -f transciever.o g++ -c transciever.cpp -I ../include === modified file 'common/transciever/transciever.h' --- common/transciever/transciever.h 2010-12-29 16:30:53 + +++ common/transciever/transciever.h 2010-12-30 02:21:26 + @@ -22,25 +22,92 @@ #include string #include Poco/Net/StreamSocket.h #include Poco/Net/SocketStream.h +#include Poco/Logger.h +#include Poco/Exception.h #include boost/circular_buffer.hpp namespace nrtb { + /*** + * transciever is used to manage GBP (google protocol buffers) + * traffic between NRTB components. This is the only form of + * IPC used by NRTB. + * + * out_gpb is the channel wrapper for the outbound channel. + * in_gpb is the channel wrapper for the inbound channel. + * + * See https://blueprints.launchpad.net/nrtb/+spec/icp-spec for + * specification this class implements. + * ***/ template class out_gpb, class in_gpb class transciever { public: + /// outbound messages will be of this type typedef out_gpb outbound_type; + /// inbound messages will be of this type. typedef in_gpb inbound_type; + /** + * Creates the transciever and associates it with a provided + * socket. Once created this class assumes it uniquely owns the + * socket and will close it upon distruction. + * ***/ transciever(Poco::Net::StreamSocket socket); + /** + * Closes the socket and releases all mmemory associated with + * this class. + * ***/ ~transciever(); + /** + * gets the next message from the socket. If no messages are + * ready, blocks util one arrives. + * ***/ inbound_type get(); - void send(const outbound_type); + /** + * Sends a message over the socket and adds it to the + * sent_messages buffer in case it's needed for error recovery. + * ***/ + void send(outbound_type sendme); + /** + * Called by the data consumer when an inbound message was + * not valid in the current application context. msg_number + * is the sequence number of the offending message. + * ***/ + void nak_invalid_context(const unsigned long int msg_number); + /** + * Called by the data consumer when an inbound message's + * data failed validation checks. msg_number is the sequence + * number of the offending message. + * ***/ + void nak_validation_error(const unsigned long int msg_number); + /** + * Exceptions which may be thrown for external resulution. + * ***/ + // parent of all transciever exceptions + POCO_DECLARE_EXCEPTION(transciever, general_exception, Poco::Exception) + // thrown if send fails due to timeout. + POCO_DECLARE_EXCEPTION(transciever, send_timeout, general_exception) + // thrown in the case of a fault while in get() + POCO_DECLARE_EXCEPTION(transciever, get_fault, general_exception) + // Thrown if the socket is closed due to an unrecoverable date error. + POCO_DECLARE_EXCEPTION(transciever, unrecoverable_data_error,
[Nrtb-core] [Branch ~fpstovall/nrtb/cpp_common] Rev 20: Added configuration data and documentation to the header file. Ready to start coding the class im...
revno: 20 committer: fpstov...@gmail.com branch nick: dev timestamp: Wed 2010-12-29 21:54:43 -0500 message: Added configuration data and documentation to the header file. Ready to start coding the class implementation. modified: common/transciever/transciever.h -- lp:~fpstovall/nrtb/cpp_common https://code.launchpad.net/~fpstovall/nrtb/cpp_common Your team NRTB Core is subscribed to branch lp:~fpstovall/nrtb/cpp_common. To unsubscribe from this branch go to https://code.launchpad.net/~fpstovall/nrtb/cpp_common/+edit-subscription === modified file 'common/transciever/transciever.h' --- common/transciever/transciever.h 2010-12-30 02:21:26 + +++ common/transciever/transciever.h 2010-12-30 02:54:43 + @@ -36,6 +36,14 @@ * out_gpb is the channel wrapper for the outbound channel. * in_gpb is the channel wrapper for the inbound channel. * + * The nrtb::confreader singleton will be queried for the + * following parameters: + * + * transciever.history_size (int) + * transciever.send_timeout (int) + * transciever.allow_recovery (bool) + * transciever.max_consecutive_errors (int) + * * See https://blueprints.launchpad.net/nrtb/+spec/icp-spec for * specification this class implements. * ***/ @@ -94,6 +102,10 @@ // Thrown if the socket is closed due to too many errors in a row POCO_DECLARE_EXCEPTION(transciever, consecutive_error_overrun, general_exception) protected: + const std::string logname = transciever:; + unsigned int send_time_limit; + bool attempt_recovery; + unsigned int error_run_limit; // pointer to this class's logger instance Poco::Logger * log; // The socket used for communcation. ___ Mailing list: https://launchpad.net/~nrtb-core Post to : nrtb-core@lists.launchpad.net Unsubscribe : https://launchpad.net/~nrtb-core More help : https://help.launchpad.net/ListHelp
[Nrtb-core] [Branch ~fpstovall/nrtb/cpp_common] Rev 21: Corrected a stupid but pervasive spelling error in the transceiver class.
revno: 21 committer: fpstov...@gmail.com branch nick: dev timestamp: Wed 2010-12-29 22:05:40 -0500 message: Corrected a stupid but pervasive spelling error in the transceiver class. renamed: common/transciever/ = common/transceiver/ common/transciever/transciever.cpp = common/transceiver/transceiver.cpp common/transciever/transciever.h = common/transceiver/transceiver.h common/transciever/transciever_test.cpp = common/transceiver/transceiver_test.cpp modified: common/transceiver/Makefile common/transceiver/transceiver.h -- lp:~fpstovall/nrtb/cpp_common https://code.launchpad.net/~fpstovall/nrtb/cpp_common Your team NRTB Core is subscribed to branch lp:~fpstovall/nrtb/cpp_common. To unsubscribe from this branch go to https://code.launchpad.net/~fpstovall/nrtb/cpp_common/+edit-subscription === renamed directory 'common/transciever' = 'common/transceiver' === modified file 'common/transceiver/Makefile' --- common/transciever/Makefile 2010-12-30 02:21:26 + +++ common/transceiver/Makefile 2010-12-30 03:05:40 + @@ -16,23 +16,23 @@ # #*** -lib: transciever_test - @cp -v transciever.h ../include - @cp -v transciever.o ../obj +lib: transceiver_test + @cp -v transceiver.h ../include + @cp -v transceiver.o ../obj @echo build complete ../include/confreader.h: @cp ../confreader; make lib -transciever.o: transciever.h transciever.cpp Makefile ../include/confreader.h - @rm -f transciever.o - g++ -c transciever.cpp -I ../include +transceiver.o: transceiver.h transceiver.cpp Makefile ../include/confreader.h + @rm -f transceiver.o + g++ -c transceiver.cpp -I ../include -transciever_test: transciever.o transciever_test.cpp - @rm -f transciever_test - g++ -c transciever_test.cpp - g++ -o transciever_test transciever_test.o transciever.o ../obj/common.o ../obj/log_setup.o -lPocoFoundation -lPocoUtil +transceiver_test: transceiver.o transceiver_test.cpp + @rm -f transceiver_test + g++ -c transceiver_test.cpp + g++ -o transceiver_test transceiver_test.o transceiver.o ../obj/common.o ../obj/log_setup.o -lPocoFoundation -lPocoUtil clean: - @rm -rvf *.o transciever_test ../include/transciever.h ../obj/transciever.o + @rm -rvf *.o transceiver_test ../include/transceiver.h ../obj/transceiver.o @echo all objects and executables have been erased. === renamed file 'common/transciever/transciever.cpp' = 'common/transceiver/transceiver.cpp' === renamed file 'common/transciever/transciever.h' = 'common/transceiver/transceiver.h' --- common/transciever/transciever.h 2010-12-30 02:54:43 + +++ common/transceiver/transceiver.h 2010-12-30 03:05:40 + @@ -16,8 +16,8 @@ **/ -#ifndef nrtb_transciever_h -#define nrtb_transciever_h +#ifndef nrtb_transceiver_h +#define nrtb_transceiver_h #include string #include Poco/Net/StreamSocket.h @@ -29,7 +29,7 @@ namespace nrtb { /*** - * transciever is used to manage GBP (google protocol buffers) + * transceiver is used to manage GBP (google protocol buffers) * traffic between NRTB components. This is the only form of * IPC used by NRTB. * @@ -39,16 +39,16 @@ * The nrtb::confreader singleton will be queried for the * following parameters: * - * transciever.history_size (int) - * transciever.send_timeout (int) - * transciever.allow_recovery (bool) - * transciever.max_consecutive_errors (int) + * transceiver.history_size (int) + * transceiver.send_timeout (int) + * transceiver.allow_recovery (bool) + * transceiver.max_consecutive_errors (int) * * See https://blueprints.launchpad.net/nrtb/+spec/icp-spec for * specification this class implements. * ***/ template class out_gpb, class in_gpb - class transciever + class transceiver { public: /// outbound messages will be of this type @@ -56,16 +56,16 @@ /// inbound messages will be of this type. typedef in_gpb inbound_type; /** - * Creates the transciever and associates it with a provided + * Creates the transceiver and associates it with a provided * socket. Once created this class assumes it uniquely owns the * socket and will close it upon distruction. * ***/ - transciever(Poco::Net::StreamSocket socket); + transceiver(Poco::Net::StreamSocket socket); /** * Closes the socket and releases all mmemory associated with * this class. * ***/ - ~transciever(); + ~transceiver(); /**