[collectd] [PATCH] updated ted.c based on Florian's input

Florian Forster octo at verplant.org
Mon Mar 9 08:52:07 CET 2009


Hi Eric,

On Sat, Mar 07, 2009 at 10:06:42AM -0600, Eric Reed wrote:
> Since the packet size is larger that 255 we can not program the  
> termios to buffer the entire package.   This means we have to get the  
> data in chunks.

oh, I see.. The problem is probably just that I check in
`ted_read_value' if the data received is actually large enough to hold
the desired data and I forgot that data might arrive in chunks..

If you remove the following check in `ted_read_value' it might just
work:
  else if (receive_buffer_length < EXPECTED_PACKAGE_LENGTH) { ... }

> Do you want me to try and update your code?

Let me know how the above change turns out.. If that's all there's to
it, I can remove that myself pretty easily ;) If there's more, it'd be
great if you could look into it since I don't have such a device..

> Also  TED has a lot more information delivered in the package.
> 
>  http://www.myrocontrol.com/forum/viewtopic.php?f=13&t=3

Thanks for the link :) Judging from the name of the variables in that
Perl script, the current power consumption and voltage is the most
interesting information you can get from the device.

> Maybe there is a better form of enabling what to store.

In the patch I've sent on Friday, I'm the power consumption as type
`power' in watts and the voltage as type `voltage' in, well, volts ;)
This enables graphing frontends to convert the numbers to SI-units if
applicable (i. e. `kilo', `mega', ...)

Regards,
-octo
-- 
Florian octo Forster
Hacker in training
GnuPG: 0x91523C3D
http://verplant.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mailman.verplant.org/pipermail/collectd/attachments/20090309/eb6699e4/attachment.pgp 


More information about the collectd mailing list