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

Split Holovibes into two new API submodules #803

Open
Hpn4 opened this issue Jan 13, 2025 · 0 comments
Open

Split Holovibes into two new API submodules #803

Hpn4 opened this issue Jan 13, 2025 · 0 comments
Labels
cleanup Makes the code cleaner refacto Anything that needs refactoring

Comments

@Hpn4
Copy link
Collaborator

Hpn4 commented Jan 13, 2025

Holovibes can be split into two distinct modules:

  • worker_api.hh/cc: will hold all workers (benchmark, read frame, compute, record...) and functions to start and stop them. (so all *_worker_controller_ members and their related functions).
  • settings_api.hh/cc: will hold all the settings (ones defined in settings.hh and handle access, update and initialization of it (in the ctor). It will also hold cudaStream and the CudaStreams struct. (so the realtime_settings_ and cuda_streams_ members and associated functions).

These two modules must be internal, the front user must not control directly settings and workers only the API has the right to do so.

You could do this by making all submodules of the API friend to these new two modules.

Other variables inside holovibes.hh should be separated like so:

  • the input_queue_ and active_camera_: should be stored in the input_api.
  • the record_queue_: inside record_api.
  • the compute_pipe_: inside compute_api.

Other functions should be separated like so:

  • get_input_queue, init_input_queue and get_camera_ini_name: in input_api
  • get_record_queue, init_record_queue and is_recording: in record_api.
  • get_compute_pipe: in compute_api (this must not throw exception and the no throw version can be deleted).
@Hpn4 Hpn4 added refacto Anything that needs refactoring cleanup Makes the code cleaner labels Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Makes the code cleaner refacto Anything that needs refactoring
Projects
None yet
Development

No branches or pull requests

1 participant