Number.h
Go to the documentation of this file.
00001 
00048 #ifndef NUMBER_H_
00049 #define NUMBER_H_
00050 
00051 #include <cstdlib>
00052 #include <stdint.h>
00053 #include <iostream>
00054 
00055 namespace clearpath
00056 {
00057 
00058 /* Little-endian byte array to number conversion routines. */
00059   void utob(void *dest, size_t dest_len, uint64_t src);
00060 
00061   void utob(void *dest, size_t dest_len, uint32_t src);
00062 
00063   void utob(void *dest, size_t dest_len, uint16_t src);
00064 
00065   void itob(void *dest, size_t dest_len, int64_t src);
00066 
00067   void itob(void *dest, size_t dest_len, int32_t src);
00068 
00069   void itob(void *dest, size_t dest_len, int16_t src);
00070 
00071 /* void toBytes(void* dest, size_t dest_len, float src, float scale); */
00072   void ftob(void *dest, size_t dest_len, double src, double scale);
00073 
00074 /* Number to little-endian byte array conversion routines 
00075  * Need to provide all, since size of the int param matters. */
00076   uint64_t btou(void *src, size_t src_len);
00077 
00078   int64_t btoi(void *src, size_t src_len);
00079 
00080   double btof(void *src, size_t src_len, double scale);
00081 
00082 }; // namespace clearpath
00083 
00084 #endif // NUMBER_H_
00085 


husky_base
Author(s): Mike Purvis , Paul Bovbel
autogenerated on Sat Jun 8 2019 18:26:01