Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DidacticNetwork
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
letsgoING
Libraries
DidacticNetwork
Commits
03ceaa3a
Verified
Commit
03ceaa3a
authored
7 months ago
by
Anian Bühler
Browse files
Options
Downloads
Patches
Plain Diff
added Config.h for defines
parent
f7ca97aa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Config.h
+65
-0
65 additions, 0 deletions
src/Config.h
with
65 additions
and
0 deletions
src/Config.h
0 → 100644
+
65
−
0
View file @
03ceaa3a
/**************************************************************************
@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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment