dm_config.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (C) 2012-2019 UCloud. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License").
  5. * You may not use this file except in compliance with the License.
  6. * A copy of the License is located at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * or in the "license" file accompanying this file. This file is distributed
  11. * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  12. * express or implied. See the License for the specific language governing
  13. * permissions and limitations under the License.
  14. */
  15. #ifndef C_SDK_DM_CONFIG_H_
  16. #define C_SDK_DM_CONFIG_H_
  17. #ifdef __cplusplus
  18. extern "C" {
  19. #endif
  20. #define DM_TOPIC_BUF_LEN (128)
  21. #define DM_MSG_REPLY_BUF_LEN (128)
  22. #define DM_MSG_REPORT_BUF_LEN (2048)
  23. #define DM_EVENT_POST_BUF_LEN (2048)
  24. #define DM_CMD_REPLY_BUF_LEN (2048)
  25. //pub
  26. #define PROPERTY_RESTORE_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/property/restore"
  27. #define PROPERTY_POST_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/property/post"
  28. #define PROPERTY_SET_REPLY_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/property/set_reply"
  29. #define PROPERTY_DESIRED_GET_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/property/desired/get"
  30. #define PROPERTY_DESIRED_DELETE_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/property/desired/delete"
  31. #define EVENT_POST_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/event/post"
  32. #define COMMAND_REPLY_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/command_reply/%s"
  33. //sub
  34. #define PROPERTY_RESTORE_REPLY_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/property/restore_reply"
  35. #define PROPERTY_POST_REPLY_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/property/post_reply"
  36. #define PROPERTY_SET_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/property/set"
  37. #define PROPERTY_DESIRED_GET_REPLY_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/property/desired/get_reply"
  38. #define PROPERTY_DESIRED_DELETE_REPLY_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/property/desired/delete_reply"
  39. #define EVENT_POST_REPLY_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/event/post_reply"
  40. #define COMMAND_TOPIC_TEMPLATE "/$system/%s/%s/tmodel/command"
  41. #ifdef __cplusplus
  42. }
  43. #endif
  44. #endif //C_SDK_DM_CONFIG_H_