Skip to content
Snippets Groups Projects
Verified Commit 03ceaa3a authored by Anian Bühler's avatar Anian Bühler
Browse files

added Config.h for defines

parent f7ca97aa
No related branches found
No related tags found
No related merge requests found
/**************************************************************************
@file Config.h
@author anian buehler @ letsgoING
**************************************************************************/
// APPLICATION
#define DN_MSG_PRELIMITER '<'
#define DN_MSG_DELIMITER '>'
#define DN_MSG_SEPARATOR '|'
//<@topic|payload>
#define DN_LEN_OVERHEAD 4
// PUBSUB APPLICATION
//************************/
#ifdef CALLBACK_W_LENGTH
// callback(topic, topicLength, payload, payloadLength)
#define PSNET_CALLBACK_SIGNATURE void (*callback)(char *, int, char *, int)
#else
// callback(topic, payload)
#define PSNET_CALLBACK_SIGNATURE void (*callback)(char *, char *)
#endif
#define PS_CLIENT_MODE_BASIC false
#define PS_CLIENT_MODE_ADVANCED true
//@ 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 PS_MSG_PUBLISH '@'
#define PS_MSG_SUBSCRIBE '?'
#define PS_MSG_UPDATE '#'
#define PS_MSG_TOPIC_MULTI '*'
#define PS_MAX_NR_TOPICS_CLIENT 10
#define PS_MAX_NR_TOPICS_BROKER 20
#define PS_MAX_LEN_TOPICS 10
#define PS_MAX_LEN_PAYLOAD 20
#define PS_PUBLISH_SUCCESSULL 1
#define PS_ERROR_NO_ERROR 0
#define PS_ERROR_TOPIC_LEN -1
#define PS_ERROR_PAYLOAD_LEN -2
#define PS_ERROR_NO_TOPIC -3
#define PS_INTERVAL_CLIENT 500L
#define PS_INTERVAL_BROKER 0L
// TRANSMIT
//************************/
#define DNT_CSMA_CHECK_DELAY_US 400
#define DNT_CSMA_MIN_DELAY_MS 10
#define DNT_CSMA_MID_DELAY_MS 20
#define DNT_CSMA_MAX_DELAY_MS 30
#define DNT_MAX_LEN_TELEGRAM 40
// SERIAL USER INTERFACE
//************************/
#define SUI_MAX_LEN_USERINPUT 41
#define SUI_ASCII_EOS 0
#define SUI_ASCII_CR 13
#define SUI_ASCII_NL 10
#define SUI_ASCII_DEL 127
\ No newline at end of file
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