unit-test.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * Copyright © 2008 Stéphane Raimbault <stephane.raimbault@gmail.com>
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * 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 General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17. #ifndef _UNIT_TEST_H_
  18. #define _UNIT_TEST_H_
  19. #include <stdint.h>
  20. const uint16_t UT_COIL_STATUS_ADDRESS = 0x13;
  21. const uint16_t UT_COIL_STATUS_NB_POINTS = 0x25;
  22. const uint8_t UT_COIL_STATUS_TAB[] = { 0xCD, 0x6B, 0xB2, 0x0E, 0x1B };
  23. const uint16_t UT_INPUT_STATUS_ADDRESS = 0xC4;
  24. const uint16_t UT_INPUT_STATUS_NB_POINTS = 0x16;
  25. const uint8_t UT_INPUT_STATUS_TAB[] = { 0xAC, 0xDB, 0x35 };
  26. const uint16_t UT_HOLDING_REGISTERS_ADDRESS = 0x6B;
  27. const uint16_t UT_HOLDING_REGISTERS_NB_POINTS = 0x3;
  28. const uint16_t UT_HOLDING_REGISTERS_TAB[] = { 0x022B, 0x0000, 0x0064 };
  29. const uint16_t UT_INPUT_REGISTERS_ADDRESS = 0x08;
  30. const uint16_t UT_INPUT_REGISTERS_NB_POINTS = 0x1;
  31. const uint16_t UT_INPUT_REGISTERS_TAB[] = { 0x000A };
  32. #endif /* _UNIT_TEST_H_ */