-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
EMB-27360: Add enum for SubAck and ClearSubsAck. #315
Open
peter-lasota
wants to merge
5
commits into
Geotab:master
Choose a base branch
from
peter-lasota:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ab0922e
EMB-27360: Add enum for SubAck and ClearSubsAck.
Norman-To 237877e
EMB-27360: Describe the behaviour when Iox Pub/Sub is not enabled.
Norman-To 2f803c1
EMB-27360: Link message 0x26 and 0x8C to Appendix D.
Norman-To a2b58aa
EMB-27360: Fix the links.
Norman-To 3483c90
EMB-27360: Moved Master switch description into message 0x26.
Norman-To File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -598,16 +598,16 @@ Messages sent from the IOX to the GO is represented by IoxToGo | |
Messages sent from the GO to the IOX is represented by IoxFromGo | ||
|
||
example of building protobuf in python: | ||
<code> | ||
``` | ||
iox_to_go=iox_messaging_pb2.IoxToGo() | ||
iox_to_go.pub_sub.sub.topic = 1 #TOPIC_ACCEL | ||
iox_to_go_seralized = iox_to_go.SerializeToString() | ||
</code> | ||
``` | ||
After the protobuf is built, we will get payload "0a040a020801" | ||
|
||
The content of complete .proto is as below. | ||
|
||
<code> | ||
``` | ||
// Possible subscription topics | ||
// Includes status data IDs | ||
enum Topic { | ||
|
@@ -652,7 +652,9 @@ message SubAck { | |
// Unsubscribe fails if the topic has not been subscribed to | ||
SUB_ACK_RESULT_TOPIC_NOT_SUBBED = 5; | ||
// Unsubscribe fails if the subscription belongs to another IOX. | ||
SUB_ACK_RESULT_SUBSCRIPTION_NOT_AVAILABLE = 6; | ||
SUB_ACK_RESULT_UNAVAILABLE = 6; | ||
// IOX Pub/Sub is not enabled by Master Switch. | ||
SUB_ACK_RESULT_DISABLED = 7; | ||
} | ||
Result result = 1; | ||
Topic topic = 2; | ||
|
@@ -671,13 +673,15 @@ message TopicInfoList { | |
repeated TopicInfo topics = 1; | ||
} | ||
|
||
message ClearSubAck { | ||
message ClearSubsAck { | ||
enum Result { | ||
CLEAR_SUB_ACK_RESULT_UNSPECIFIED = 0; | ||
// Unsubscribe succeeded | ||
CLEAR_SUB_ACK_RESULT_SUCCESS = 1; | ||
// Unsubscribe fails if the subscription belongs to another IOX. | ||
CLEAR_SUB_ACK_RESULT_FAILED = 2; | ||
CLEAR_SUBS_ACK_RESULT_UNSPECIFIED = 0; | ||
// Clear subscription succeeded | ||
CLEAR_SUBS_ACK_RESULT_SUCCESS = 1; | ||
// Clear subscription failed: The subscription is owned by another IOX. | ||
CLEAR_SUBS_ACK_RESULT_UNAVAILABLE = 2; | ||
// Clear subscription failed: Pub/Sub is not enabled by Master Switch. | ||
CLEAR_SUBS_ACK_RESULT_DISABLED = 3; | ||
} | ||
Result result = 1; | ||
} | ||
|
@@ -769,5 +773,9 @@ message IoxFromGo { | |
PubSubFromGo pub_sub = 1; | ||
} | ||
} | ||
</code> | ||
|
||
``` | ||
Note: The IOX Pub/Sub is controlled by a Master-Switch. When IOX Pub/Sub is not enabled: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you please move this up at the beginning of Appendix? |
||
* Request to subscribe/unsubscribe a topic will be responded with SUB_ACK_RESULT_DISABLED. | ||
* Request to clear the subscription will be responded with CLEAR_SUBS_ACK_RESULT_DISABLED. | ||
* Request to list the subscription will be responded with an empty list. | ||
* Request to list all available topics will be responded with an empty list. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mention the master switch and how sending sub request would be responded by each message in the message description of 0x8C/0x26. Only adding enums are not enough.