Zoltan Hudak
/
MQTT_Hello
MQTT client to test the ENC28J60-EMAC on NUCLEO-F446RE.
MQTT/MQTTPacket/MQTTFormat.h@0:238f0d0c0ba3, 2021-03-26 (annotated)
- Committer:
- hudakz
- Date:
- Fri Mar 26 16:15:14 2021 +0000
- Revision:
- 0:238f0d0c0ba3
MQTT client to test the ENC28J60-EMAC on NUCLEO-F446RE.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hudakz | 0:238f0d0c0ba3 | 1 | /******************************************************************************* |
hudakz | 0:238f0d0c0ba3 | 2 | * Copyright (c) 2014 IBM Corp. |
hudakz | 0:238f0d0c0ba3 | 3 | * |
hudakz | 0:238f0d0c0ba3 | 4 | * All rights reserved. This program and the accompanying materials |
hudakz | 0:238f0d0c0ba3 | 5 | * are made available under the terms of the Eclipse Public License v1.0 |
hudakz | 0:238f0d0c0ba3 | 6 | * and Eclipse Distribution License v1.0 which accompany this distribution. |
hudakz | 0:238f0d0c0ba3 | 7 | * |
hudakz | 0:238f0d0c0ba3 | 8 | * The Eclipse Public License is available at |
hudakz | 0:238f0d0c0ba3 | 9 | * http://www.eclipse.org/legal/epl-v10.html |
hudakz | 0:238f0d0c0ba3 | 10 | * and the Eclipse Distribution License is available at |
hudakz | 0:238f0d0c0ba3 | 11 | * http://www.eclipse.org/org/documents/edl-v10.php. |
hudakz | 0:238f0d0c0ba3 | 12 | * |
hudakz | 0:238f0d0c0ba3 | 13 | * Contributors: |
hudakz | 0:238f0d0c0ba3 | 14 | * Ian Craggs - initial API and implementation and/or initial documentation |
hudakz | 0:238f0d0c0ba3 | 15 | *******************************************************************************/ |
hudakz | 0:238f0d0c0ba3 | 16 | |
hudakz | 0:238f0d0c0ba3 | 17 | #if !defined(MQTTFORMAT_H) |
hudakz | 0:238f0d0c0ba3 | 18 | #define MQTTFORMAT_H |
hudakz | 0:238f0d0c0ba3 | 19 | |
hudakz | 0:238f0d0c0ba3 | 20 | #define MQTT_CLIENT |
hudakz | 0:238f0d0c0ba3 | 21 | #define MQTT_SERVER |
hudakz | 0:238f0d0c0ba3 | 22 | |
hudakz | 0:238f0d0c0ba3 | 23 | #include "StackTrace.h" |
hudakz | 0:238f0d0c0ba3 | 24 | #include "MQTTPacket.h" |
hudakz | 0:238f0d0c0ba3 | 25 | |
hudakz | 0:238f0d0c0ba3 | 26 | const char* MQTTPacket_getName(unsigned short packetid); |
hudakz | 0:238f0d0c0ba3 | 27 | int MQTTStringFormat_connect(char* strbuf, int strbuflen, MQTTPacket_connectData* data); |
hudakz | 0:238f0d0c0ba3 | 28 | int MQTTStringFormat_connack(char* strbuf, int strbuflen, unsigned char connack_rc, unsigned char sessionPresent); |
hudakz | 0:238f0d0c0ba3 | 29 | int MQTTStringFormat_publish(char* strbuf, int strbuflen, unsigned char dup, int qos, unsigned char retained, |
hudakz | 0:238f0d0c0ba3 | 30 | unsigned short packetid, MQTTString topicName, unsigned char* payload, int payloadlen); |
hudakz | 0:238f0d0c0ba3 | 31 | int MQTTStringFormat_ack(char* strbuf, int strbuflen, unsigned char packettype, unsigned char dup, unsigned short packetid); |
hudakz | 0:238f0d0c0ba3 | 32 | int MQTTStringFormat_subscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid, int count, |
hudakz | 0:238f0d0c0ba3 | 33 | MQTTString topicFilters[], int requestedQoSs[]); |
hudakz | 0:238f0d0c0ba3 | 34 | int MQTTStringFormat_suback(char* strbuf, int strbuflen, unsigned short packetid, int count, int* grantedQoSs); |
hudakz | 0:238f0d0c0ba3 | 35 | int MQTTStringFormat_unsubscribe(char* strbuf, int strbuflen, unsigned char dup, unsigned short packetid, |
hudakz | 0:238f0d0c0ba3 | 36 | int count, MQTTString topicFilters[]); |
hudakz | 0:238f0d0c0ba3 | 37 | char* MQTTFormat_toClientString(char* strbuf, int strbuflen, unsigned char* buf, int buflen); |
hudakz | 0:238f0d0c0ba3 | 38 | char* MQTTFormat_toServerString(char* strbuf, int strbuflen, unsigned char* buf, int buflen); |
hudakz | 0:238f0d0c0ba3 | 39 | |
hudakz | 0:238f0d0c0ba3 | 40 | #endif |