Subversion Repositories HomeAutomation

Rev

Rev 1322 | Rev 1326 | 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. void BitBuffer::incrementPointer(unsigned int steps)
  44. {
  45.  
  46. }
  47.  
  48. void BitBuffer::clear()
  49. {
  50.     this->myBuffer.clear();
  51.     // TÒDO resent pointers
  52. }
  53.  
  54. void BitBuffer::readDecimal(unsigned int length, unsigned int scaling, double & value)
  55. {
  56. }
  57.  
  58. void BitBuffer::writeDecimal(unsigned int length, unsigned int scaling, double value)
  59. {
  60. }
  61.  
  62.  
  63. void BitBuffer::readBasicType(unsigned int length, unsigned long & value)
  64. {
  65. }
  66.  
  67. void BitBuffer::writeBasicType(unsigned int length, unsigned long value)
  68. {
  69. }
  70.  
  71. void BitBuffer::readBasicType(unsigned int length, long & value)
  72. {
  73. }
  74.  
  75. void BitBuffer::writeBasicType(unsigned int length, long  value)
  76. {
  77. }
  78.  
  79. void BitBuffer::readBasicType(unsigned int length, bool & value)
  80. {
  81. }
  82.  
  83. void BitBuffer::writeBasicType(unsigned int length, bool value)
  84. {
  85. }
  86.  
  87.  
  88. }
  89. }
  90.