MethodsBag.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. * Copyright (C) 2007-2013 Siemens AG
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU Lesser General Public License as published
  6. * by the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU Lesser General Public License for more details.
  13. * GNU Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /*******************************************************************
  19. *
  20. * @author Daniel.Peintner.EXT@siemens.com
  21. * @version 0.8
  22. * @contact Joerg.Heuer@siemens.com
  23. *
  24. * <p>Code generated by EXIdizer.com</p>
  25. * <p>Schema: input/test_v2g/V2G_CI_MsgDef.xsd</p>
  26. *
  27. *
  28. ********************************************************************/
  29. #ifndef METHODS_BAG_H
  30. #define METHODS_BAG_H
  31. /**
  32. * \file MethodsBag.h
  33. * \brief Method bag for bit and octet functions
  34. *
  35. */
  36. #include <stdint.h>
  37. /**
  38. * \brief Returns the number of bits to identify the characteristics.
  39. *
  40. * \param characteristics number of characteristics
  41. * \param codingLength number of bits
  42. * \return Error-Code <> 0
  43. *
  44. */
  45. int exiGetCodingLength(uint16_t characteristics, uint16_t* codingLength);
  46. /**
  47. * \brief Returns the least number of 7 bit-blocks that is needed to represent the passed integer value
  48. *
  49. * Note: Returns 1 if passed parameter is 0.
  50. *
  51. * \param n integer value
  52. * \return Error-Code <> 0
  53. *
  54. */
  55. uint8_t numberOf7BitBlocksToRepresent(uint32_t n);
  56. #endif