From: Tom H. <tom...@us...> - 2003-03-25 17:24:56
|
Update of /cvsroot/rccparser/rccserializer In directory sc8-pr-cvs1:/tmp/cvs-serv23797 Modified Files: ChangeLog NEWS README Log Message: 2003-03-25 Tom Howard <tom...@us...> * Initial code import Index: ChangeLog =================================================================== RCS file: /cvsroot/rccparser/rccserializer/ChangeLog,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** ChangeLog 25 Mar 2003 17:03:01 -0000 1.1.1.1 --- ChangeLog 25 Mar 2003 17:24:49 -0000 1.2 *************** *** 1,44 **** ! 2003-01-10 Tom Howard <tom...@us...> ! ! * ./configure.ac ! Released rcclient-0.0.1 ! ! 2003-01-10 Tom Howard <tom...@us...> ! ! * ./README ! Updated readme ! ! * ./acinclude.m4 ! * ./configure.ac ! Added macro from rcssnet detection ! ! * ./src/rcclient.cpp ! * ./src/rcclient.h ! * ./src/rcctest.cpp ! Integrated with rcssnet and added compression support ! ! 2003-01-06 Tom Howard <tom...@us...> ! ! * ./configure.ac ! Released rcclient-0.0.0 ! ! 2003-01-06 Tom Howard <tom...@us...> ! ! * ./AUTHORS ! Added myself ! ! * ./README ! Added basic documentation ! ! * ./src/Makefile.am ! changed library instaltion directory ! ! * ./src/rcclient.cpp ! * ./src/rcclient.h ! Added reconnect ! ! 2003-01-06 Tom Howard <tom...@us...> ! * ./src/rcclient.cpp ! Removed default agruments. They are already specified in the .h --- 1,4 ---- ! 2003-03-25 Tom Howard <tom...@us...> ! * Initial code import Index: NEWS =================================================================== RCS file: /cvsroot/rccparser/rccserializer/NEWS,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** NEWS 25 Mar 2003 17:03:01 -0000 1.1.1.1 --- NEWS 25 Mar 2003 17:24:49 -0000 1.2 *************** *** 1,36 **** - [0.0.1] - * RCClient supports compressed communications with the server, through - the use of the compression() and setCompression() functions. To - change the current compression level (default is none), you first need - to send the request to the simulator, which is done with the - compression() function. The server will then reply with either - - (ok compression LEVEL) - - or - - (warning compression_unsupported) - - or not at all if your request was lost, or the compression requested - was greater than 9. - - If you receive the warning, the data will remain uncompressed and no - further action is required. - - If you receive acknowledgement of the new compression level, you MUST - call setCompression() with the new compression level, BEFORE - rcc::Parser::doBuildCompressionOK() returns. Otherwise subsequent - data will be read at the wrong compression level, which will result in - parse errors and loss of data. - - What's more, you CANNOT send any data after your request to change to - the compression level until the server has responded or you give up - the request as lost. Sound nasty? Well it is. Unfortunately there is - no nice solution because the server uses plain UDP, which does not - guarantee reliability. Unless the server changes this is as good as - we can get. - - The rcctest example now uses compression, to demostrate how it's done. - [0.0.0] * Initial release. Please see the README file for some basic --- 1,2 ---- Index: README =================================================================== RCS file: /cvsroot/rccparser/rccserializer/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** README 25 Mar 2003 17:03:01 -0000 1.1.1.1 --- README 25 Mar 2003 17:24:50 -0000 1.2 *************** *** 1,29 **** ============ INTRODUCTION ============ ! RCClient is a library for clients for the RoboCup Soccer Simulator ! (http://sserver.sf.net). The library is designed for use with the ! RCCParser library and provides complete network send and receive ! functionality for version 7 and 8 players (including goalies). Send ! support for other clients (coaches) will be added soon (recv ! functionality is already implemented). =========== CONFIGURING =========== ! Before you can build the RCClient library you will need to run the ! `configure' script located in the root of the distribution directory. ! The default configuration will set up RCClient to install its components in the following locations: ! /usr/local/bin for the rcctest executable, /usr/local/lib for the ! RCClient library and /usr/local/include/rcclient for the RCClient ! headers. ! You may need administrator privileges to install RCClient into the default locations. These locations can be modified by using configure's `--prefix=DIR' and related options. See `configure --help' for more details. ! RCClient has several features that can be enabled or disabled at configure time by using the `--enable-FEATURE[=ARG]' or `--disable-FEATURE' parameters to `configure'. `--disable-FEATURE' is --- 1,27 ---- ============ INTRODUCTION ============ ! RCCSerializer is a set of libraries for clients for the RoboCup Soccer ! Simulator (http://sserver.sf.net). The library provides complete ! command serialisation for field players, goalies, online coaches and ! offline coaches. =========== CONFIGURING =========== ! Before you can build the RCCSerializer library you will need to run ! the `configure' script located in the root of the distribution ! directory. ! The default configuration will set up RCCSerializer to install its components in the following locations: ! /usr/local/lib for the RCCSerializer libraries and ! /usr/local/include/rcclient for the RCCSerializer headers. ! You may need administrator privileges to install RCCSerializer into the default locations. These locations can be modified by using configure's `--prefix=DIR' and related options. See `configure --help' for more details. ! RCCSerializer has several features that can be enabled or disabled at configure time by using the `--enable-FEATURE[=ARG]' or `--disable-FEATURE' parameters to `configure'. `--disable-FEATURE' is *************** *** 36,40 **** libraries. Shared libraries are enabled by default. ! RCClient uses GNU Libtool in order to build shared libraries on a variety of systems. While this is very nice for making usable binaries, it can be a pain when trying to debug a program. For that --- 34,38 ---- libraries. Shared libraries are enabled by default. ! RCCSerializer uses GNU Libtool in order to build shared libraries on a variety of systems. While this is very nice for making usable binaries, it can be a pain when trying to debug a program. For that *************** *** 43,55 **** To link against the shared library you must either use GNU Libtool, ! and specify the full pathname of the RCClient shared library, or use ! `-L<prefix>/lib' during linking and do at least one of the following: - add `<prefix>/lib' to the `LD_LIBRARY_PATH' environment variable ! during execution - add `<prefix>/lib' to the `LD_RUN_PATH' environment ! variable during linking - use the `-Wl,--rpath -Wl,<prefix>/lib' ! linker flag - have your system administrator add `<prefix>/lib' to `/etc/ld.so.conf' ! where <prefix> is where you installed RCClient (default is /usr/local). See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual --- 41,60 ---- To link against the shared library you must either use GNU Libtool, ! and specify the full pathname of one of the RCCSerializer shared ! libraries, or use `-L<prefix>/lib' during linking and do at least one ! of the following: ! - add `<prefix>/lib' to the `LD_LIBRARY_PATH' environment variable ! during execution ! ! - add `<prefix>/lib' to the `LD_RUN_PATH' environment variable during ! linking ! ! - use the `-Wl,--rpath -Wl,<prefix>/lib' linker flag ! ! - have your system administrator add `<prefix>/lib' to `/etc/ld.so.conf' ! where <prefix> is where you installed RCCSerializer (default is /usr/local). See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual *************** *** 60,86 **** libraries. Static libraries are enabled by default. ! Your code can be compiled with the static RCClient library by adding ! `-I<prefix>/rcclient -L<prefix>/lib -lrcclient' or modify as necessary if you installed rcclient into non-default directories. - - `--enable-rccptest=yes' will enable the building and installation of - rccptest, a parser testing program that reads from stdin. - ======== BUILDING ======== ! Once you have successfully configured RCClient, simply run `make' to build the sources. ========== INSTALLING ========== ! When you have completed building RCClient, it's components can be installed into their default locations or the locations specified during configuring by running `make install'. Depending on where you ! are installing RCClient, you may need special permissions to do this. ============ UNINSTALLING ============ ! RCClient can also be easily removed by entering the distribution directory and running `make uninstall'. This will remove all the files that where installed, but not any directories that were created --- 65,87 ---- libraries. Static libraries are enabled by default. ! Your code can be compiled with one of the static RCCSerializer libraries by adding ! `-I<prefix>/rccserializer -L<prefix>/lib -l<libname>' or modify as necessary if you installed rcclient into non-default directories. ======== BUILDING ======== ! Once you have successfully configured RCCSerializer, simply run `make' to build the sources. ========== INSTALLING ========== ! When you have completed building RCCSerializer, it's components can be installed into their default locations or the locations specified during configuring by running `make install'. Depending on where you ! are installing RCCSerializer, you may need special permissions to do this. ============ UNINSTALLING ============ ! RCCSerializer can also be easily removed by entering the distribution directory and running `make uninstall'. This will remove all the files that where installed, but not any directories that were created *************** *** 89,156 **** ================ USING THE LIBRARY ================ ! The parser can be interfaced with your code by adding ! ! #include <rcclient/rcclient.h> ! ! in one of you source files. You can then create an instance of a ! rcc::Client by passing it an instance of a rcc::Parser, the port you ! wish to connect on and the host name of the machine running the ! server. For instance ! ! rcc::Client your_client( your_parser, server_port, server_host ); ! ! You would then send an init message to the server by calling ! init(). E.G. ! ! your_client.init( your_teamname, protocol_version, goalie_flag ); ! ! Apon receiving your init message, the server will start to send data ! to your client. You can start parsing the data by either calling the ! operator() or by passing your client to a thread and have it call the ! operator(). The operator() is used to provide direct compatibility ! with rcss::thread::Thread. ! ! The operator() does not return until some error in parsing has ! occurred, so if you chose not to use a threaded approach (which is a ! perfectly valid thing to do) you will only be able to call send ! functions (such as dash and turn) from within the rcc::Parser virtual ! functions. ! ! Also note, if you choose to use a single threaded approach you will ! also have to make sure that you return promptly from any of the ! rcc::Parser virtual functions. Failure to do so may result in a ! backup of data and potential data loss if the network buffer ! overflows. ! RCClient supports compressed communications with the server, through ! the use of the compression() and setCompression() functions. To ! change the current compression level (default is none), you first need ! to send the request to the simulator, which is done with the ! compression() function. The server will then reply with either ! (ok compression LEVEL) ! or ! (warning compression_unsupported) ! or not at all if your request was lost, or the compression requested ! was greater than 9. ! If you receive the warning, the data will remain uncompressed and no ! further action is required. ! If you receive acknowledgement of the new compression level, you MUST ! call setCompression() with the new compression level, BEFORE ! rcc::Parser::doBuildCompressionOK() returns. Otherwise subsequent ! data will be read at the wrong compression level, which will result in ! parse errors and loss of data. ! What's more, you CANNOT send any data after your request to change to ! the compression level until the server has responded of you give up ! the request as lost. Sound nasty? Well it is. Unfortunately there is ! no nice solution because the server uses plain UDP, which does not ! guarantee reliability. Unless the server changes this is as good as ! we can get. ============== Making Contact ============== --- 90,113 ---- ================ USING THE LIBRARY ================ ! The library can be interfaced with your code by adding ! #include <rccserializer/rccplayerserializer.hpp> ! for field players, ! #include <rccserializer/rccofflinecoachserializer.hpp> ! for offline coaches or ! #include <rccserializer/rcconlinecoachserializer.hpp> ! in one of your source files. You can then create an instance of a ! rcc::*Serializer by passing it an reference to an output stream. For instance ! rcc::PlayerSerializer ser( server_stream ); ! ser.init( "YourTeam", 9 ); ! would write an init message to server_stream, with the team name ! "YourTeam" and version 9. ============== Making Contact ============== |