Fawkes API Fawkes Development Version
|
This class implements the logic for a GUI that allows to transfer LUTs via FUSE. More...
#include "fuse_transfer_widget.h"
Public Member Functions | |
FuseTransferWidget () | |
Constructor. More... | |
virtual | ~FuseTransferWidget () |
Destructor. More... | |
void | add_fountain_service (const char *name, const char *host_name, uint16_t port) |
Tell the widget that a new FUSE service has been discovered. More... | |
void | remove_fountain_service (const char *name) |
Tell the widget that a service is not available any more. More... | |
void | set_current_colormap (firevision::YuvColormap *colormap) |
Set the current colormap. More... | |
void | set_upload_btn (Gtk::Button *btn_upload) |
Set the button to trigger the LUT upload. More... | |
void | set_download_btn (Gtk::Button *btn_download) |
Set the button to trigger the LUT download. More... | |
void | set_local_img (Gtk::Image *img_local) |
Set the Image to display the local LUT. More... | |
void | set_local_layer_selector (Gtk::Scale *scl) |
Assign a Scale to switch between the layers of the loal colormap. More... | |
void | set_remote_img (Gtk::Image *img_remote) |
Set the Image to display the remote LUT. More... | |
void | set_remote_layer_selector (Gtk::Scale *scl) |
Assign a Scale to switch between the layers of the remote colormap. More... | |
void | set_local_lut_list_trv (Gtk::TreeView *lut_list) |
Set the TreeView for the list of local LUTs. More... | |
void | set_remote_lut_list_trv (Gtk::TreeView *lut_list) |
Set the TreeView for the list of remote LUTs. More... | |
void | fuse_invalid_server_version (uint32_t local_version, uint32_t remote_version) noexcept |
Invalid version string received. More... | |
void | fuse_connection_established () noexcept |
Connection has been established. More... | |
void | fuse_connection_died () noexcept |
Connection died. More... | |
void | fuse_inbound_received (firevision::FuseNetworkMessage *m) noexcept |
Message received. More... | |
This class implements the logic for a GUI that allows to transfer LUTs via FUSE.
Definition at line 37 of file fuse_transfer_widget.h.
FuseTransferWidget::FuseTransferWidget | ( | ) |
Constructor.
Definition at line 46 of file fuse_transfer_widget.cpp.
References fawkes::LockQueue< Type >::clear().
|
virtual |
Destructor.
Definition at line 76 of file fuse_transfer_widget.cpp.
References fawkes::Thread::cancel(), firevision::FuseClient::disconnect(), fawkes::Thread::join(), fawkes::LockQueue< Type >::lock(), fawkes::LockQueue< Type >::push_locked(), and fawkes::LockQueue< Type >::unlock().
void FuseTransferWidget::add_fountain_service | ( | const char * | name, |
const char * | host_name, | ||
uint16_t | port | ||
) |
Tell the widget that a new FUSE service has been discovered.
The widget will then attempt to connect to the host and list the available LUTs.
name | the name of the service |
host_name | the name of the host the service is running on |
port | the port |
Definition at line 106 of file fuse_transfer_widget.cpp.
References fawkes::LockQueue< Type >::push_locked().
|
virtualnoexcept |
Connection died.
Implements firevision::FuseClientHandler.
Definition at line 465 of file fuse_transfer_widget.cpp.
References fawkes::LockQueue< Type >::push_locked().
|
virtualnoexcept |
Connection has been established.
Implements firevision::FuseClientHandler.
Definition at line 460 of file fuse_transfer_widget.cpp.
|
virtualnoexcept |
Message received.
An incoming message has been received and can now be processed. Note that if you want to work on the message after this method has finished you have to reference the message by calling FuseMessage::ref()!
m | message to handle |
Implements firevision::FuseClientHandler.
Definition at line 476 of file fuse_transfer_widget.cpp.
References firevision::FuseLutContent::buffer(), firevision::FUSE_lutinfo_t::bytes_per_cell, firevision::FUSE_lutinfo_t::depth, firevision::FuseLutContent::depth(), firevision::FuseLutListContent::has_next(), firevision::FUSE_lutinfo_t::height, firevision::FuseLutContent::height(), firevision::FUSE_lutinfo_t::lut_id, firevision::FuseLutListContent::next(), fawkes::Exception::print_trace(), firevision::FUSE_lutinfo_t::width, and firevision::FuseLutContent::width().
|
virtualnoexcept |
Invalid version string received.
The remote end has a different incompatible FUSE version.
local_version | version that the FuseClient speaks |
remote_version | version that the remote FUSE server speaks. |
Implements firevision::FuseClientHandler.
Definition at line 453 of file fuse_transfer_widget.cpp.
void FuseTransferWidget::remove_fountain_service | ( | const char * | name | ) |
Tell the widget that a service is not available any more.
All entries in the list of remote LUTs for the corresponding service will be deleted.
name | the name of the service |
Definition at line 124 of file fuse_transfer_widget.cpp.
void FuseTransferWidget::set_current_colormap | ( | firevision::YuvColormap * | colormap | ) |
Set the current colormap.
The current colormap is the local colormap that is currently trained.
colormap | the colormap |
Definition at line 144 of file fuse_transfer_widget.cpp.
References firevision::YuvColormap::depth(), firevision::YuvColormap::height(), and firevision::YuvColormap::width().
void FuseTransferWidget::set_download_btn | ( | Gtk::Button * | btn | ) |
Set the button to trigger the LUT download.
btn | the download button |
Definition at line 198 of file fuse_transfer_widget.cpp.
void FuseTransferWidget::set_local_img | ( | Gtk::Image * | img | ) |
Set the Image to display the local LUT.
img | the local LUT image |
Definition at line 207 of file fuse_transfer_widget.cpp.
References ColormapViewerWidget::set_colormap_img().
Referenced by Firestation::Firestation().
void FuseTransferWidget::set_local_layer_selector | ( | Gtk::Scale * | scl | ) |
Assign a Scale to switch between the layers of the loal colormap.
scl | a Gtk::Scale |
Definition at line 217 of file fuse_transfer_widget.cpp.
References ColormapViewerWidget::set_layer_selector().
Referenced by Firestation::Firestation().
void FuseTransferWidget::set_local_lut_list_trv | ( | Gtk::TreeView * | trv | ) |
Set the TreeView for the list of local LUTs.
trv | the TreeView for the list of local LUTs |
Definition at line 245 of file fuse_transfer_widget.cpp.
Referenced by Firestation::Firestation().
void FuseTransferWidget::set_remote_img | ( | Gtk::Image * | img | ) |
Set the Image to display the remote LUT.
img | the remote LUT Image |
Definition at line 226 of file fuse_transfer_widget.cpp.
References ColormapViewerWidget::set_colormap_img().
Referenced by Firestation::Firestation().
void FuseTransferWidget::set_remote_layer_selector | ( | Gtk::Scale * | scl | ) |
Assign a Scale to switch between the layers of the remote colormap.
scl | a Gtk::Scale |
Definition at line 236 of file fuse_transfer_widget.cpp.
References ColormapViewerWidget::set_layer_selector().
Referenced by Firestation::Firestation().
void FuseTransferWidget::set_remote_lut_list_trv | ( | Gtk::TreeView * | trv | ) |
Set the TreeView for the list of remote LUTs.
trv | the TreeView for the list of remote LUTs |
Definition at line 263 of file fuse_transfer_widget.cpp.
Referenced by Firestation::Firestation().
void FuseTransferWidget::set_upload_btn | ( | Gtk::Button * | btn | ) |
Set the button to trigger the LUT upload.
btn | the upload button |
Definition at line 188 of file fuse_transfer_widget.cpp.
Referenced by Firestation::Firestation().