ecl_converters_lite Documentation

ecl_converters_lite: Simple c style library for type conversions

These are a very simple version of some of the functions in ecl_converters suitable for firmware development. That is, there is no use of new, templates or exceptions.


Lightweight converter functions suitable for control firmware develompent.


Include the following at the top of any translation unit which requires this library:

        #include <ecl/converters_lite.hpp>

        // The converter functions
        using ecl::from_byte_array;

Since it is solely comprised of inline header functions, no linking is required if you are only using this class.


Byte Array Converters

These convert between integral types and character arrays. This is quite a common operation for control systems which are reading/writing to and from i/o character devices (e.g. serial port).

These functions do need some care as you're passing pointers which must be pointing to memory with at least the required number of bytes to do the conversion

  ecl::int32 value;
  char three_six_three[4] = { 0x6b, 0x01, 0x00, 0x00 };
  std::cout << value << std::endl; // prints 363.
  // ...also unsigned int/char variants.  

Current List of Converters

The following are listed with the 'to' type on the left and 'from' types on the right.



 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends

Author(s): Daniel Stonier (d.stonier@gmail.com)
autogenerated on Fri Mar 1 15:20:52 2013