Skip to content
Snippets Groups Projects
Commit 740c1230 authored by Anian Bühler's avatar Anian Bühler
Browse files

fixed wildcard-topic for client

parent e0ebf7a9
No related branches found
No related tags found
1 merge request!7fixed wildcard-topic for client
......@@ -299,7 +299,8 @@ bool DidacticPSNetClient::handleData(){
payloadLength = extractData(topicLength+3, MAX_LEN_PAYLOAD, _bufferPayload, MSG_DELIMITER);
if( currentTopicNr >= 0){
savePayload( _bufferPayload, currentTopicNr);
callback(_topic[currentTopicNr], topicLength, _payload[currentTopicNr], payloadLength);
//callback(_topic[currentTopicNr], topicLength, _payload[currentTopicNr], payloadLength);
callback(_bufferTopic, topicLength, _bufferPayload, payloadLength);
}
}
return true;
......
......@@ -18,10 +18,10 @@
//@ publish → on publish check topic, then send topic-update
//? subscribe → subscribe starts update, topic filter @client
//# update → update to specific topic Broker to client
#define MSG_PUBLISH '@'
#define MSG_SUBSCRIBE '?'
#define MSG_UPDATE '#'
#define MSG_TOPIC_MULTI '*'
#define MSG_PUBLISH '@'
#define MSG_SUBSCRIBE '?'
#define MSG_UPDATE '#'
#define MSG_TOPIC_MULTI '*'
//<@topic|payload>
#define LEN_OVERHEAD 4
......@@ -34,7 +34,7 @@
#define INTERVAL_CLIENT 500L
#define INTERVAL_BROKER 0L
#define MAX_NR_TOPICS_CLIENT 20
#define MAX_NR_TOPICS_CLIENT 10
#define MAX_NR_TOPICS_BROKER 20
#define MAX_LEN_TOPICS 10
#define MAX_LEN_PAYLOAD 20
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment