Skip to content
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

fix(RawImageDisplayArea): add user_data echo when frame received #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aronhelser
Copy link

When a frame is sent by the server to the RawImageDisplayArea, allow the inclusion of user_data in the meta information, which is sent as message back to the server when the frame is received. Allows the server to track if the client is keeping up with the frames sent.

@jourdain
Copy link
Collaborator

jourdain commented Jul 5, 2024

Hum, can we talk? I see the idea, but I don't like the naming and how things are done. We can achieve more with less.

…ame received

When a frame is sent by the server to the RawImageDisplayArea, allow
the inclusion of `ack_id` in the meta information, which is sent
as message back to the server when the frame is received. Allows the
server to track if the client is keeping up with the frames sent.

Also allow `user_data` in the meta information, which is propagated
to the client as a Vue event.
@aronhelser
Copy link
Author

Updated to ack_id and user_data, but I don't think I've got the user_data event hooked up correctly in https://gitlab.kitware.com/kwiver/burnoutweb/-/merge_requests/10 because I'm not seeing any console log being triggered - could just be an incorrect event handler though.

@jourdain
Copy link
Collaborator

jourdain commented Jul 5, 2024

Missing event listing in Python classes (i.e.: RemoteControlledArea).
Example of events here
Also, the topic/event name in JS should be something like userData not user_data.

}
// if the frame sender provide user_data, emit as a client event
if (meta['user_data'] !== undefined) {
this.$emit('user_data', meta['user_data']);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this.$emit('user-data', meta.user_data);

ctx.putImageData(imageData, 0, 0);
// if the frame sender provided an ack_id, send back to the server
// so they know this frame has been processed
if (meta['ack_id'] !== undefined) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meta.ack_id !== undefined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants