------------------------------------------------------------ revno: 18 committer: [email protected] branch nick: dev timestamp: Wed 2010-12-29 11:30:53 -0500 message: Initial structure and start of the header for the transciever class. added: common/transciever/ common/transciever/Makefile common/transciever/transciever.cpp common/transciever/transciever.h common/transciever/transciever_test.cpp
-- 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
=== added directory 'common/transciever' === added file 'common/transciever/Makefile' --- common/transciever/Makefile 1970-01-01 00:00:00 +0000 +++ common/transciever/Makefile 2010-12-29 16:30:53 +0000 @@ -0,0 +1,35 @@ +#*********************************************** +#This file is part of the NRTB project (https://launchpad.net/nrtb). +# +# NRTB is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# NRTB is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with NRTB. If not, see <http://www.gnu.org/licenses/>. +# +#*********************************************** + +lib: transciever_test + @cp -v transciever.h ../include + @cp -v transciever.o ../obj + @echo build complete + +transciever.o: transciever.h transciever.cpp Makefile + @rm -f transciever.o + g++ -c transciever.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 + +clean: + @rm -rvf *.o transciever_test ../include/transciever.h ../obj/transciever.o + @echo all objects and executables have been erased. === added file 'common/transciever/transciever.cpp' --- common/transciever/transciever.cpp 1970-01-01 00:00:00 +0000 +++ common/transciever/transciever.cpp 2010-12-29 16:30:53 +0000 @@ -0,0 +1,20 @@ +/*********************************************** + This file is part of the NRTB project (https://*launchpad.net/nrtb). + + NRTB is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + NRTB is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with NRTB. If not, see <http://www.gnu.org/licenses/>. + + **********************************************/ + +#include "transciever.h" + === added file 'common/transciever/transciever.h' --- common/transciever/transciever.h 1970-01-01 00:00:00 +0000 +++ common/transciever/transciever.h 2010-12-29 16:30:53 +0000 @@ -0,0 +1,48 @@ +/*********************************************** + This file is part of the NRTB project (https://*launchpad.net/nrtb). + + NRTB is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + NRTB is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with NRTB. If not, see <http://www.gnu.org/licenses/>. + + **********************************************/ + +#ifndef nrtb_transciever_h +#define nrtb_transciever_h + +#include <string> +#include <Poco/Net/StreamSocket.h> +#include <Poco/Net/SocketStream.h> +#include <boost/circular_buffer.hpp> + +namespace nrtb +{ + template <class out_gpb, class in_gpb> + class transciever + { + public: + typedef out_gpb outbound_type; + typedef in_gpb inbound_type; + transciever(Poco::Net::StreamSocket socket); + ~transciever(); + inbound_type & get(); + void send(const & outbound_type); + protected: + Poco::Net::StreamSocket sock; + Poco::Net::SocketStream stream; + boost::circular_buffer<outbound_type> sent_messages; + private: + }; + +} // namespace nrtb + +#endif //nrtb_transciever_h \ No newline at end of file === added file 'common/transciever/transciever_test.cpp' --- common/transciever/transciever_test.cpp 1970-01-01 00:00:00 +0000 +++ common/transciever/transciever_test.cpp 2010-12-29 16:30:53 +0000 @@ -0,0 +1,17 @@ +/*********************************************** + This file is part of the NRTB project (https://*launchpad.net/nrtb). + + NRTB is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + NRTB is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with NRTB. If not, see <http://www.gnu.org/licenses/>. + + **********************************************/ \ No newline at end of file
_______________________________________________ Mailing list: https://launchpad.net/~nrtb-core Post to : [email protected] Unsubscribe : https://launchpad.net/~nrtb-core More help : https://help.launchpad.net/ListHelp

