Page 2 of 5

Re: freeems communications stress testing

Posted: Thu Dec 30, 2010 9:17 am
by Fred
Feedback (yes, already) :

1) Remove or obfuscate your email to reduce spam!
2) You shouldn't have/don't need to have the gpl header in the readme file, you can just tell them for information purposes what the license used is.
3) You should include the text version of the license and/or link to the gnu.org site with that on it.
4) GREAT to see doxygen from the start! :-)
5) There isn't much more to comment on! But it's great to see a git repo properly setup already. I'll clone it now, please setup the irc hook to announce in #freeems-dev, just use the channel, irc.freenode.net the port and check the activate box at the bottom and it should work.

Keep up the good work :-)

Fred.

Re: freeems communications stress testing

Posted: Fri Dec 31, 2010 7:19 am
by Fred
Error on macports macosx :

Code: Select all

freeair:freeems-cst fred$ make
Scanning dependencies of target cst
[ 50%] Building CXX object src/CMakeFiles/cst.dir/main.cpp.o
cc1plus: warnings being treated as errors
In file included from /opt/local/include/boost/lambda/lambda.hpp:23,
                 from /Users/fred/Desktop/workspaces/home/freeems-cst/src/main.cpp:26:
/opt/local/include/boost/lambda/detail/operator_return_type_traits.hpp:494: warning: use of old-style cast
/opt/local/include/boost/lambda/detail/operator_return_type_traits.hpp:494: warning: use of old-style cast
make[2]: *** [src/CMakeFiles/cst.dir/main.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/cst.dir/all] Error 2
make: *** [all] Error 2

Re: freeems communications stress testing

Posted: Fri Dec 31, 2010 8:08 am
by EssEss

Re: freeems communications stress testing

Posted: Fri Dec 31, 2010 10:07 am
by Fred
No problem! Thanks for the app, looking forward to those bug reports! :-)

Re: freeems communications stress testing

Posted: Sat Jan 01, 2011 7:41 pm
by EssEss
Can I get the packet checksum calculation method added to FreeEMS-SerialProtocolCoreSpecification.odt ? I want to avoid peeking into anyone else's implementation.

To get started, is it just a simple rolling sum ?

Re: freeems communications stress testing

Posted: Sat Jan 01, 2011 10:23 pm
by Fred
At the moment it is just "byte + byte + byte + byte + byte = one byte checksum" how would you like that written in the document. I thought it already was, but you want it more specific/explicit (and for good reason) so can you suggest how you would write it?

Fred.

Re: freeems communications stress testing

Posted: Sun Jan 02, 2011 3:30 am
by EssEss
So I'm new to cpp and I'm already in love:

Code: Select all

/**
 * @public
 * @brief encode a flattened packet
 * @param[in] p reference to flattened packet
 * @retval vector<uint8_t> packet encoded in accordance with the freeems
 *                         core protocol spec. caller is responsible for
 *                         destruction when use is complete.
 */
std::vector<uint8_t> *
  feEncoder::encode( std::vector<uint8_t> const &p )
{
    std::vector<uint8_t> *const v = new std::vector<uint8_t>();
    v->reserve( 1024 * 4 );     /**< reserve initial worst case capacity */

    std::vector<uint8_t>::iterator pkt_iter = p.begin();

  ......
}
is actually caught at compile time! templates are the sh!t.

where the following was actually intended .. so the deref in the coming iterator actually matches the qualifier on the declaration

Code: Select all

/**
 * @public
 * @brief encode a flattened packet
 * @param[in] p reference to flattened packet
 * @retval vector<uint8_t> packet encoded in accordance with the freeems
 *                         core protocol spec. caller is responsible for
 *                         destruction when use is complete.
 */
std::vector<uint8_t> *
  feEncoder::encode( std::vector<uint8_t> [color=#FF0000]const[/color] &p )
{
    std::vector<uint8_t> *const v = new std::vector<uint8_t>();
    v->reserve( 1024 * 4 );     /**< reserve initial worst case capacity */

    std::vector<uint8_t>::[color=#FF0000]const_iterator[/color] pkt_iter = p.begin();

  ......
}
took me forever to figure out that there was a ::const_iterator, thanks http://cplusplus.com/reference/stl/vector/
checkin will follow shortly and I'll need comments from the cpp experts out there.

Re: freeems communications stress testing

Posted: Sun Jan 02, 2011 4:20 am
by EssEss
https://github.com/EssEss/freeems-cst/c ... ...cac6424

my last test is failing for some reason .. although its looks like its encoded correctly. anyways ...
I'd like an experienced cpp dev to look over my encode function (starting small) and I'll start moving things to a library and build off of it.

edit -> fixed -> https://github.com/EssEss/freeems-cst/c ... 5583c61e22

Re: freeems communications stress testing

Posted: Sun Jan 02, 2011 12:46 pm
by Fred
Great to see progress on this! I did some payload id fixes this evening, I'm trying to beat you to finding issues with it :-) Testing is essential, and my hand testing tonight proves that, yet again! :-) Looking forward to your 15 page report on how shit my work is.

Re: freeems communications stress testing

Posted: Wed Jan 05, 2011 3:09 pm
by nitrousnrg
EssEss, I'm looking forward for you code, I'd really like to have someone else's code in charge of communications for ecumanager :-)

What I did in Debian was just

# aptitude install libboost1.42-dev

Others could also do:
# aptitude install libboost1.42-dev cmake g++
I already had those packages.

Anyway, I can't build it:
After
cd <build_dir>
cmake <path_to_src>
make

I get the following error:

Code: Select all

marcos@nitrousPresario:~/electronica/programas/freeems-cst$ make
Scanning dependencies of target cst
[ 33%] Building CXX object CMakeFiles/cst.dir/main.cpp.o                                                                                                                           
/home/marcos/electronica/programas/freeems-cst/EssEss-freeems-cst-ab4066a/src/main.cpp:26:18: error: main.h: No such file or directory                                             
make[2]: *** [CMakeFiles/cst.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/cst.dir/all] Error 2
make: *** [all] Error 2
marcos@nitrousPresario:~
My cmake version is 2.8.2,
boostversion: 1.42

I took a look at the makefiles and cmakefiles, but can't find references to the inc/ directory. I don't know cmake, so I could be going in a totally wrong direction.

Cheers