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
61e4487a
Verified
Commit
61e4487a
authored
2 years ago
by
Anian Bühler
Browse files
Options
Downloads
Patches
Plain Diff
adderd erroro-codes for getTopic
and updated Readme
parent
0c11fbf3
No related branches found
Branches containing commit
No related tags found
1 merge request
!9
update master from dev2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+12
-0
12 additions, 0 deletions
README.md
src/DidacticNet.cpp
+5
-2
5 additions, 2 deletions
src/DidacticNet.cpp
src/DidacticNet.h
+1
-0
1 addition, 0 deletions
src/DidacticNet.h
with
18 additions
and
2 deletions
README.md
+
12
−
0
View file @
61e4487a
...
...
@@ -59,6 +59,17 @@ int psnClient.subscribe(char* topic, int length);
// return ERROR-Wert: DN_ERROR_NO_ERROR,
// DN_ERROR_TOPIC_LEN (Topic zu lang - wird abgeschnitten)
#Anzahl der aboonierten Topics ausgeben
int
getMaxNrTopics
();
// return: Anzahl der abbonierten Topics
#Bezeichnung eines abonnierten Topics ausgeben
int
getSubscribedTopic
(
char
*
,
int
);
// param1: char-Array in das die Topic-Bezeichnung eingetragen wird
// param2: Nummer welches Topic ausgegeben werden soll (0 - getMaxNrTopics())
// return ERROR-WERT: DN_ERROR_NO_ERROR,
// DN_ERROR_NO_TOPIC (Topic unter der angegebenen Nummer nicht verfügbar)
#Topic eines anderen Clients entfernen
bool
psnClient
.
unsubscribe
(
char
*
topic
);
// param: Topic String/char-Array
...
...
@@ -222,6 +233,7 @@ DN_PUBLISH_SUCCESSULL 1
DN_ERROR_NO_ERROR
0
DN_ERROR_TOPIC_LEN
-
1
DN_ERROR_PAYLOAD_LEN
-
2
DN_ERROR_NO_TOPIC
-
3
#Frame
MSG_PRELIMITER
'<'
...
...
This diff is collapsed.
Click to expand it.
src/DidacticNet.cpp
+
5
−
2
View file @
61e4487a
...
...
@@ -331,8 +331,11 @@ int DidacticPSNetClient::getFreeTopicNr() {
}
int
DidacticPSNetClient
::
getSubscribedTopic
(
char
*
topic
,
int
number
){
strcpy
(
topic
,
_topic
[
number
]);
return
1
;
if
(
number
>
0
&&
number
<
getMaxNrTopics
()){
strcpy
(
topic
,
_topic
[
number
]);
return
DN_ERROR_NO_ERROR
;
}
return
DN_ERROR_NO_TOPIC
;
}
int
DidacticPSNetClient
::
getMaxNrTopics
(){
...
...
This diff is collapsed.
Click to expand it.
src/DidacticNet.h
+
1
−
0
View file @
61e4487a
...
...
@@ -49,6 +49,7 @@
#define DN_ERROR_NO_ERROR 0
#define DN_ERROR_TOPIC_LEN -1
#define DN_ERROR_PAYLOAD_LEN -2
#define DN_ERROR_NO_TOPIC -3
//little helpers
...
...
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