-
Notifications
You must be signed in to change notification settings - Fork 0
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
Deepstream 5.0 Subscription Implementation #1
Open
Shubhamturakhia
wants to merge
32
commits into
master
Choose a base branch
from
DS-5.0-subscription-implementation
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.
+217
−21
Open
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
2e29abb
Add msgapi_subscribe implementation
Shubhamturakhia 2a7a3d6
Modify broker.c file
Shubhamturakhia 9a5bc7a
Added subcribe implementation
Shubhamturakhia b2c6940
Added Subscribe implementation
Shubhamturakhia bf90453
Minor changes
Shubhamturakhia 67dffec
Changes according to PR review
Shubhamturakhia 5ca5006
Add callback wrapper
Shubhamturakhia 4821a94
Added unsubscribe feature
Shubhamturakhia adc30df
Changes as per PR review
Shubhamturakhia f8f0099
Minor change
Shubhamturakhia 7aa84e7
Minor change
Shubhamturakhia 9a8ff42
Fix formatting
Shubhamturakhia bd3310d
Update aws_protocol_adaptor/device_client/aws_nvmsgbroker.c
Shubhamturakhia 7e4b8d9
Add msgapi connection signature mwthod
Shubhamturakhia f2cd2b9
Merge branch 'DS-5.0-subscription-implementation' of https://github.c…
Shubhamturakhia 3707004
added connection signature method
Shubhamturakhia 2fd20b1
Minor changes
Shubhamturakhia 072dfbb
Modified utilities for conn signature
Shubhamturakhia 93deacc
Formatting and minor refactoring
Shubhamturakhia 9c1449a
Changes as per PR review
Shubhamturakhia fa94cc3
Modifications for Hash code
Shubhamturakhia 525ee45
Changes as per review
Shubhamturakhia 579d7b4
Minor indentation change
Shubhamturakhia d330130
Hash code refactoring
Shubhamturakhia 819cdc0
Add hash code implementation for config file
Shubhamturakhia 0bac762
Fix Incorrect Return Types
lummish ef454fb
Minor changes
Shubhamturakhia 9c61435
Resolve Compilation Errors
lummish d9fa5a6
Link OpenSSL in Makefile
lummish 54fff91
Statically Link to libssl and libcrypto
lummish c99d2de
Reorder SSL Linkages
lummish 0c7895e
Reorder Linkage to SSL Libraries
lummish 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
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.
This will not compile.
cb
is not the correct type. You will likely need to somehow wrapcb
in a function that implements the correct type expected byaws_iot_mqtt_subscribe
.Recall that this is the callback type accepted by
aws_iot_mqtt_subscribe
:And this is the callback type accepted by
nvds_msgapi_subscribe
:So we'll need to create a function of type
*pApplicationHandler_t
that callscb
.Something like this (not this exactly) would work:
The trick here is determining how to create this wrapped callback. You will likely need to have a static variable that stores a pointer to such a function, then you can set the value of this static variable when the subscribe method is called for the first time.
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.
I was actually looking for way of wrapping the callback, thanks for the above explanation
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.
@Shubhamturakhia Here's an idea:
Define a static variable
nvds_cb
that we will use to store the callback provided by a user:Define a function that implements the type of callbacks expected by the mqtt subscribe function:
In your implementation of nvds_msgapi_subscribe, assign the callback supplied as an argument to the
nvds_cb
variable: