The Cayenne MQTT mbed Library provides functions to easily connect to the Cayenne IoT project builder.
Fork of Cayenne-MQTT-mbed by
Diff: src/CayenneMQTTClient/CayenneMQTTClient.h
- Revision:
- 17:75cc2d58e796
- Parent:
- 8:aec9cfdd4c8e
- Child:
- 21:e46b1f93c011
diff -r 085bcf2e9a18 -r 75cc2d58e796 src/CayenneMQTTClient/CayenneMQTTClient.h --- a/src/CayenneMQTTClient/CayenneMQTTClient.h Fri Nov 04 13:26:29 2016 -0600 +++ b/src/CayenneMQTTClient/CayenneMQTTClient.h Fri Nov 04 18:12:41 2016 -0600 @@ -321,17 +321,14 @@ /** * Send a response to a channel. - * @param[in] topic Cayenne topic - * @param[in] channel The channel to send data to, or CAYENNE_NO_CHANNEL if there is none - * @param[in] channel The channel to send response to * @param[in] id ID of message the response is for * @param[in] error Optional error message, NULL for success * @param[in] clientID The client ID to use in the topic, NULL to use the clientID the client was initialized with * @return success code */ - int publishResponse(unsigned int channel, const char* id, const char* error, const char* clientID = NULL) { + int publishResponse(const char* id, const char* error, const char* clientID = NULL) { char buffer[MAX_MQTT_PACKET_SIZE + 1] = { 0 }; - int result = CayenneBuildTopic(buffer, sizeof(buffer), _username, clientID ? clientID : _clientID, RESPONSE_TOPIC, channel); + int result = CayenneBuildTopic(buffer, sizeof(buffer), _username, clientID ? clientID : _clientID, RESPONSE_TOPIC, CAYENNE_NO_CHANNEL); if (result == CAYENNE_SUCCESS) { size_t size = strlen(buffer); char* payload = &buffer[size + 1];