Subversion Repositories HomeAutomation

Rev

Rev 1319 | Rev 1323 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. /*
  2.  * BitBuffer.cpp
  3.  *
  4.  *  Created on: Jul 17, 2009
  5.  *      Author: Mattias Runge
  6.  */
  7.  
  8. #include "BitBuffer.h"
  9.  
  10. namespace atom {
  11. namespace message {
  12.  
  13. BitBuffer::BitBuffer(unsigned char bytes[], unsigned int length)
  14. {
  15.     for (unsigned int n = 0; n < length; n++)
  16.     {
  17.         this->myBuffer.push_back(bytes[n]);
  18.     }
  19. }
  20.  
  21. BitBuffer::BitBuffer(byte_list bytes) {
  22.     this->setFromBytes(bytes);
  23. }
  24.  
  25.  
  26. BitBuffer::BitBuffer() {
  27. }
  28.  
  29. BitBuffer::~BitBuffer() {
  30. }
  31.  
  32.  
  33. byte_list BitBuffer::getAsBytes()
  34. {
  35.     return this->myBuffer;
  36. }
  37.  
  38. void BitBuffer::setFromBytes(byte_list bytes)
  39. {
  40.     this->myBuffer = bytes;
  41. }
  42.  
  43.  
  44. void BitBuffer::readDecimal(unsigned int length, unsigned int scaling, double & value)
  45. {
  46. }
  47.  
  48. void BitBuffer::writeDecimal(unsigned int length, unsigned int scaling, double value)
  49. {
  50. }
  51.  
  52.  
  53. void BitBuffer::readBasicType(unsigned int length, unsigned long & value)
  54. {
  55. }
  56.  
  57. void BitBuffer::writeBasicType(unsigned int length, unsigned long value)
  58. {
  59. }
  60.  
  61. void BitBuffer::readBasicType(unsigned int length, long & value)
  62. {
  63. }
  64.  
  65. void BitBuffer::writeBasicType(unsigned int length, long  value)
  66. {
  67. }
  68.  
  69. void BitBuffer::readBasicType(unsigned int length, bool & value)
  70. {
  71. }
  72.  
  73. void BitBuffer::writeBasicType(unsigned int length, bool value)
  74. {
  75. }
  76.  
  77.  
  78. }
  79. }
  80.