pando_command.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /*******************************************************
  2. * File name: pando_command.h
  3. * Author: wfq
  4. * Versions: 1.0
  5. * Description: pando object interfaces
  6. * History:
  7. * 1.Date: Jan 14, 2016
  8. * Author: wfq
  9. * create:
  10. *********************************************************/
  11. #ifndef PANDO_COMMAND_H_
  12. #define PANDO_COMMAND_H_
  13. #include "pando_types.h"
  14. //#include "../protocol/sub_device_protocol.h"
  15. typedef struct TLVs PARAMS;
  16. typedef struct {
  17. uint8_t no;
  18. uint8_t priority;
  19. void (*unpack)(PARAMS*);
  20. }pd_command;
  21. /******************************************************************************
  22. * FunctionName : register_pando_command.
  23. * Description : register a pando command to framework.
  24. * Parameters : a pando command.
  25. * Returns : none.
  26. *******************************************************************************/
  27. void register_pando_command(pd_command cmd);
  28. /******************************************************************************
  29. * FunctionName : find_pando_command.
  30. * Description : find a pando command by command no.
  31. * Parameters : the command no.
  32. * Returns : the pando command of specified no, NULL if not found.
  33. *******************************************************************************/
  34. pd_command* find_pando_command(uint8_t no);
  35. #endif /* PANDO_OBJECTS_H_ */