-
Notifications
You must be signed in to change notification settings - Fork 8
feat: added msg bus subscriber #557
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
base: master
Are you sure you want to change the base?
Conversation
5c28952 to
4e17ac1
Compare
|
Tests failing while it's referencing a git depedency with npm. Will update and have tests passing before merge whenever the sdk-interfaces with approriate interfaces is released. |
eskilgh
left a comment
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.
Nice!
| /** | ||
| * Class for handling framing subscriptions | ||
| */ | ||
| export default class MsgBusSubscriber implements IMsgBusSubscriber { |
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.
If we want improved typing we could make this class generic, where the provided type is whatever message is passed to the subscriptionHandler
MsgBusSubscriber<Detections>
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.
If I understand you correctly that means that we will have to reinstantiate the subscriber when switching framing modes? Not necessarily against that though. It also gave me an idea for the interface
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.
Yes that's a good point. Or you could do a discriminated union type and check for whatever is present
73907dd to
0992ea4
Compare
0992ea4 to
7ea7120
Compare
7ea7120 to
dd84d9b
Compare
dd84d9b to
71582e5
Compare
The new subcriber is used in the detector class to refactor out detection and framing subscription handling. - Added functionality to update framing subscriber to use different framing subscription and handler functions.
71582e5 to
c270708
Compare
The new subcriber is used in the detector class to refactor out detection and framing subscription handling.