CARTA Backend
The backend component of CARTA
Loading...
Searching...
No Matches
carta::Session Class Reference

#include <Session.h>

Collaboration diagram for carta::Session:
[legend]

Public Member Functions

 Session (uWS::WebSocket< false, true, PerSocketData > *ws, uWS::Loop *loop, uint32_t id, std::string address, std::shared_ptr< FileListHandler > file_list_handler)
 
 ~Session ()
 
void OnRegisterViewer (const CARTA::RegisterViewer &message, uint16_t icd_version, uint32_t request_id)
 
void OnFileListRequest (const CARTA::FileListRequest &request, uint32_t request_id)
 
void OnFileInfoRequest (const CARTA::FileInfoRequest &request, uint32_t request_id)
 
bool OnOpenFile (const CARTA::OpenFile &message, uint32_t request_id, bool silent=false)
 
bool OnOpenFile (int file_id, const string &name, std::shared_ptr< casacore::ImageInterface< casacore::Float > > image, CARTA::OpenFileAck *open_file_ack)
 
void OnCloseFile (const CARTA::CloseFile &message)
 
void OnAddRequiredTiles (const CARTA::AddRequiredTiles &message, int channel=CURRENT_Z, int animation_id=0, bool skip_data=false)
 
void OnSetImageChannels (const CARTA::SetImageChannels &message)
 
void OnSetCursor (const CARTA::SetCursor &message, uint32_t request_id)
 
bool OnSetRegion (const CARTA::SetRegion &message, uint32_t request_id, bool silent=false)
 
void OnRemoveRegion (const CARTA::RemoveRegion &message)
 
void OnImportRegion (const CARTA::ImportRegion &message, uint32_t request_id)
 
void OnExportRegion (const CARTA::ExportRegion &message, uint32_t request_id)
 
void OnSetSpatialRequirements (const CARTA::SetSpatialRequirements &message)
 
void OnSetHistogramRequirements (const CARTA::SetHistogramRequirements &message, uint32_t request_id)
 
void OnSetSpectralRequirements (const CARTA::SetSpectralRequirements &message)
 
void OnSetStatsRequirements (const CARTA::SetStatsRequirements &message)
 
void OnSetContourParameters (const CARTA::SetContourParameters &message, bool silent=false)
 
void OnRegionListRequest (const CARTA::RegionListRequest &request, uint32_t request_id)
 
void OnRegionFileInfoRequest (const CARTA::RegionFileInfoRequest &request, uint32_t request_id)
 
void OnResumeSession (const CARTA::ResumeSession &message, uint32_t request_id)
 
void OnCatalogFileList (CARTA::CatalogListRequest file_list_request, uint32_t request_id)
 
void OnCatalogFileInfo (CARTA::CatalogFileInfoRequest file_info_request, uint32_t request_id)
 
void OnOpenCatalogFile (CARTA::OpenCatalogFile open_file_request, uint32_t request_id, bool silent=false)
 
void OnCloseCatalogFile (CARTA::CloseCatalogFile close_file_request)
 
void OnCatalogFilter (CARTA::CatalogFilterRequest filter_request, uint32_t request_id)
 
void OnMomentRequest (const CARTA::MomentRequest &moment_request, uint32_t request_id)
 
void OnStopMomentCalc (const CARTA::StopMomentCalc &stop_moment_calc)
 
void OnSaveFile (const CARTA::SaveFile &save_file, uint32_t request_id)
 
bool OnConcatStokesFiles (const CARTA::ConcatStokesFiles &message, uint32_t request_id)
 
void OnPvRequest (const CARTA::PvRequest &pv_request, uint32_t request_id)
 
void OnStopPvCalc (const CARTA::StopPvCalc &stop_pv_calc)
 
void OnFittingRequest (const CARTA::FittingRequest &fitting_request, uint32_t request_id)
 
void OnStopFitting (const CARTA::StopFitting &stop_fitting)
 
void OnSetVectorOverlayParameters (const CARTA::SetVectorOverlayParameters &message)
 
void OnStopPvPreview (const CARTA::StopPvPreview &stop_pv_preview)
 
void OnClosePvPreview (const CARTA::ClosePvPreview &close_pv_preview)
 
void OnRemoteFileRequest (const CARTA::RemoteFileRequest &message, uint32_t request_id)
 
void AddToSetChannelQueue (CARTA::SetImageChannels message, uint32_t request_id)
 
void ExecuteSetChannelEvt (std::pair< CARTA::SetImageChannels, uint32_t > request)
 
void HandleChannelMapFlowControlEvt (CARTA::ChannelMapFlowControl &message)
 
void CancelSetHistRequirements ()
 
void ResetHistContext ()
 
SessionContextHistContext ()
 
SessionContextAnimationContext ()
 
void CancelAnimation ()
 
void BuildAnimationObject (CARTA::StartAnimation &msg, uint32_t request_id)
 
bool ExecuteAnimationFrame ()
 
void ExecuteAnimationFrameInner (int animation_id)
 
void StopAnimation (int file_id, const ::CARTA::AnimationFrame &frame)
 
void HandleAnimationFlowControlEvt (CARTA::AnimationFlowControl &message)
 
int CurrentFlowWindowSize ()
 
void CancelExistingAnimation ()
 
void CheckCancelAnimationOnFileClose (int file_id)
 
void AddCursorSetting (CARTA::SetCursor message, uint32_t request_id)
 
void ImageChannelLock (int file_id)
 
void ImageChannelUnlock (int file_id)
 
bool ImageChannelTaskTestAndSet (int file_id)
 
void ImageChannelTaskSetIdle (int file_id)
 
int IncreaseRefCount ()
 
int DecreaseRefCount ()
 
int GetRefCount ()
 
void WaitForTaskCancellation ()
 
void ConnectCalled ()
 
SessionContextContext ()
 
void SetWaitingTask (bool set_wait)
 
bool WaitingFlowEvent ()
 
bool AnimationRunning ()
 
int CalculateAnimationFlowWindow ()
 
uint32_t GetId ()
 
std::string GetAddress ()
 
void RegionDataStreams (int file_id, int region_id)
 
bool SendSpectralProfileData (int file_id, int region_id, bool stokes_changed=false)
 
bool SendPvPreview (int file_id, int region_id, bool preview_region)
 
void StopPvPreviewUpdates (int preview_id)
 
void SendScriptingRequest (CARTA::ScriptingRequest &message, ScriptingResponseCallback callback, ScriptingSessionClosedCallback session_closed_callback)
 
void OnScriptingResponse (const CARTA::ScriptingResponse &message, uint32_t request_id)
 
void OnScriptingAbort (uint32_t scripting_request_id)
 
void CloseAllScriptingRequests ()
 
void StopImageFileList ()
 
void StopCatalogFileList ()
 
void UpdateLastMessageTimestamp ()
 
std::chrono::high_resolution_clock::time_point GetLastMessageTimestamp ()
 
void CloseCachedImage (const std::string &directory, const std::string &file)
 
bool AnimationActive ()
 
void SetAnimationActive (bool val)
 

Static Public Member Functions

static int NumberOfSessions ()
 
static void SetExitTimeout (int secs)
 
static void SetInitExitTimeout (int secs)
 
static void SetControllerDeploymentFlag (bool controller_deployment)
 

Public Attributes

CursorSettings _cursor_settings
 
std::unordered_map< int, concurrent_queue< std::pair< CARTA::SetImageChannels, uint32_t > > > _set_channel_queues
 

Protected Member Functions

bool FillExtendedFileInfo (std::map< std::string, CARTA::FileInfoExtended > &hdu_info_map, CARTA::FileInfo &file_info, const std::string &folder, const std::string &filename, const std::string &hdu, bool support_aips_beam, std::string &message)
 
bool FillExtendedFileInfo (CARTA::FileInfoExtended &extended_info, CARTA::FileInfo &file_info, const std::string &folder, const std::string &filename, std::string &hdu_name, bool support_aips_beam, std::string &message, std::string &fullname)
 
bool FillFileInfo (CARTA::FileInfo &file_info, const std::string &folder, const std::string &filename, std::string &fullname, std::string &message)
 
bool FillExtendedFileInfo (CARTA::FileInfoExtended &extended_info, std::shared_ptr< casacore::ImageInterface< float > > image, const std::string &filename, std::string &message, std::shared_ptr< FileLoader > &image_loader)
 
int GetNextFileId ()
 
void DeleteFrame (int file_id)
 
bool CalculateCubeHistogram (int file_id, CARTA::RegionHistogramData &cube_histogram_message)
 
bool SendContourData (int file_id, bool ignore_empty=true, int channel=CURRENT_Z)
 
bool SendSpatialProfileData (int file_id, int region_id)
 
void SendSpatialProfileDataByFileId (int file_id)
 
void SendSpatialProfileDataByRegionId (int region_id)
 
bool SendRegionHistogramData (int file_id, int region_id, bool channel_changed=false)
 
bool SendRegionStatsData (int file_id, int region_id)
 
void UpdateImageData (int file_id, bool send_image_histogram, bool z_changed, bool stokes_changed)
 
void UpdateRegionData (int file_id, int region_id, bool z_changed, bool stokes_changed)
 
bool SendVectorFieldData (int file_id)
 
void SendEvent (CARTA::EventType event_type, u_int32_t event_id, const google::protobuf::MessageLite &message, bool compress=true)
 
void SendFileEvent (int file_id, CARTA::EventType event_type, u_int32_t event_id, google::protobuf::MessageLite &message, bool compress=true)
 
void SendLogEvent (const std::string &message, std::vector< std::string > tags, CARTA::ErrorSeverity severity)
 
bool IsInChannelMapRange (int file_id, int channel)
 
bool HasValidChannelMapTiles (int file_id, const CARTA::AddRequiredTiles &required_tiles)
 
bool GetValidChannelMapTiles (int file_id, const CARTA::AddRequiredTiles &required_tiles, std::vector< int > &valid_tiles)
 

Protected Attributes

uWS::WebSocket< false, true, PerSocketData > * _socket
 
uWS::Loop * _loop
 
uint32_t _id
 
std::string _address
 
std::shared_ptr< FileListHandler_file_list_handler
 
LoaderCache _loaders
 
std::unordered_map< int, std::shared_ptr< Frame > > _frames
 
int _last_file_id
 
std::mutex _frame_mutex
 
int _remote_file_index
 
const std::unique_ptr< TableController_table_controller
 
std::unique_ptr< RegionHandler_region_handler
 
std::unique_ptr< AnimationObject_animation_object
 
volatile bool _animation_active
 
std::unique_ptr< StokesFilesConnector_stokes_files_connector
 
std::unordered_map< int, std::mutex > _image_channel_mutexes
 
std::unordered_map< int, bool > _image_channel_task_active
 
std::unique_ptr< ChannelMapSettings_channel_map_settings
 
std::unordered_map< int, int > _channel_map_received_channel
 
float _histogram_progress
 
concurrent_queue< std::pair< std::vector< char >, bool > > _out_msgs
 
SessionContext _base_context
 
SessionContext _histogram_context
 
SessionContext _animation_context
 
std::atomic< int > _ref_count
 
int _sync_id
 
int _animation_id
 
bool _connected
 
std::unordered_map< int, std::tuple< ScriptingResponseCallback, ScriptingSessionClosedCallback > > _scripting_callbacks
 
std::mutex _scripting_mutex
 
std::chrono::high_resolution_clock::time_point _last_message_timestamp
 
std::string _top_level_folder
 
bool _read_only_mode
 
bool _enable_scripting
 

Static Protected Attributes

static volatile int _num_sessions = 0
 
static int _exit_after_num_seconds = 5
 
static bool _exit_when_all_sessions_closed = false
 
static bool _controller_deployment = false
 
static std::thread * _animation_thread = nullptr
 

Constructor & Destructor Documentation

◆ Session()

Session::Session ( uWS::WebSocket< false, true, PerSocketData > *  ws,
uWS::Loop *  loop,
uint32_t  id,
std::string  address,
std::shared_ptr< FileListHandler file_list_handler 
)
Here is the call graph for this function:

◆ ~Session()

Session::~Session ( )
Here is the call graph for this function:

Member Function Documentation

◆ AddCursorSetting()

void carta::Session::AddCursorSetting ( CARTA::SetCursor  message,
uint32_t  request_id 
)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddToSetChannelQueue()

void Session::AddToSetChannelQueue ( CARTA::SetImageChannels  message,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AnimationActive()

bool carta::Session::AnimationActive ( )
inline
Here is the caller graph for this function:

◆ AnimationContext()

SessionContext & carta::Session::AnimationContext ( )
inline

◆ AnimationRunning()

bool carta::Session::AnimationRunning ( )
inline

◆ BuildAnimationObject()

void Session::BuildAnimationObject ( CARTA::StartAnimation &  msg,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CalculateAnimationFlowWindow()

int Session::CalculateAnimationFlowWindow ( )
Here is the caller graph for this function:

◆ CalculateCubeHistogram()

bool Session::CalculateCubeHistogram ( int  file_id,
CARTA::RegionHistogramData &  cube_histogram_message 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CancelAnimation()

void carta::Session::CancelAnimation ( )
inline

◆ CancelExistingAnimation()

void Session::CancelExistingAnimation ( )
Here is the caller graph for this function:

◆ CancelSetHistRequirements()

void carta::Session::CancelSetHistRequirements ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ CheckCancelAnimationOnFileClose()

void Session::CheckCancelAnimationOnFileClose ( int  file_id)
Here is the caller graph for this function:

◆ CloseAllScriptingRequests()

void Session::CloseAllScriptingRequests ( )
Here is the caller graph for this function:

◆ CloseCachedImage()

void Session::CloseCachedImage ( const std::string &  directory,
const std::string &  file 
)
Here is the call graph for this function:

◆ ConnectCalled()

void Session::ConnectCalled ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Context()

SessionContext & carta::Session::Context ( )
inline

◆ CurrentFlowWindowSize()

int carta::Session::CurrentFlowWindowSize ( )
inline
Here is the caller graph for this function:

◆ DecreaseRefCount()

int carta::Session::DecreaseRefCount ( )
inline
Here is the caller graph for this function:

◆ DeleteFrame()

void Session::DeleteFrame ( int  file_id)
protected
Here is the caller graph for this function:

◆ ExecuteAnimationFrame()

bool Session::ExecuteAnimationFrame ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExecuteAnimationFrameInner()

void Session::ExecuteAnimationFrameInner ( int  animation_id)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ExecuteSetChannelEvt()

void carta::Session::ExecuteSetChannelEvt ( std::pair< CARTA::SetImageChannels, uint32_t >  request)
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FillExtendedFileInfo() [1/3]

bool Session::FillExtendedFileInfo ( CARTA::FileInfoExtended &  extended_info,
CARTA::FileInfo &  file_info,
const std::string &  folder,
const std::string &  filename,
std::string &  hdu_name,
bool  support_aips_beam,
std::string &  message,
std::string &  fullname 
)
protected
Here is the call graph for this function:

◆ FillExtendedFileInfo() [2/3]

bool Session::FillExtendedFileInfo ( CARTA::FileInfoExtended &  extended_info,
std::shared_ptr< casacore::ImageInterface< float > >  image,
const std::string &  filename,
std::string &  message,
std::shared_ptr< FileLoader > &  image_loader 
)
protected
Here is the call graph for this function:

◆ FillExtendedFileInfo() [3/3]

bool Session::FillExtendedFileInfo ( std::map< std::string, CARTA::FileInfoExtended > &  hdu_info_map,
CARTA::FileInfo &  file_info,
const std::string &  folder,
const std::string &  filename,
const std::string &  hdu,
bool  support_aips_beam,
std::string &  message 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ FillFileInfo()

bool Session::FillFileInfo ( CARTA::FileInfo &  file_info,
const std::string &  folder,
const std::string &  filename,
std::string &  fullname,
std::string &  message 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetAddress()

std::string carta::Session::GetAddress ( )
inline
Here is the caller graph for this function:

◆ GetId()

uint32_t carta::Session::GetId ( )
inline
Here is the caller graph for this function:

◆ GetLastMessageTimestamp()

std::chrono::high_resolution_clock::time_point Session::GetLastMessageTimestamp ( )
Here is the caller graph for this function:

◆ GetNextFileId()

int carta::Session::GetNextFileId ( )
inlineprotected
Here is the caller graph for this function:

◆ GetRefCount()

int carta::Session::GetRefCount ( )
inline
Here is the caller graph for this function:

◆ GetValidChannelMapTiles()

bool Session::GetValidChannelMapTiles ( int  file_id,
const CARTA::AddRequiredTiles &  required_tiles,
std::vector< int > &  valid_tiles 
)
protected
Here is the caller graph for this function:

◆ HandleAnimationFlowControlEvt()

void Session::HandleAnimationFlowControlEvt ( CARTA::AnimationFlowControl &  message)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleChannelMapFlowControlEvt()

void Session::HandleChannelMapFlowControlEvt ( CARTA::ChannelMapFlowControl &  message)
Here is the caller graph for this function:

◆ HasValidChannelMapTiles()

bool Session::HasValidChannelMapTiles ( int  file_id,
const CARTA::AddRequiredTiles &  required_tiles 
)
protected
Here is the caller graph for this function:

◆ HistContext()

SessionContext & carta::Session::HistContext ( )
inline

◆ ImageChannelLock()

void carta::Session::ImageChannelLock ( int  file_id)
inline
Here is the caller graph for this function:

◆ ImageChannelTaskSetIdle()

void carta::Session::ImageChannelTaskSetIdle ( int  file_id)
inline
Here is the caller graph for this function:

◆ ImageChannelTaskTestAndSet()

bool carta::Session::ImageChannelTaskTestAndSet ( int  file_id)
inline
Here is the caller graph for this function:

◆ ImageChannelUnlock()

void carta::Session::ImageChannelUnlock ( int  file_id)
inline
Here is the caller graph for this function:

◆ IncreaseRefCount()

int carta::Session::IncreaseRefCount ( )
inline
Here is the caller graph for this function:

◆ IsInChannelMapRange()

bool Session::IsInChannelMapRange ( int  file_id,
int  channel 
)
protected
Here is the caller graph for this function:

◆ NumberOfSessions()

static int carta::Session::NumberOfSessions ( )
inlinestatic
Here is the caller graph for this function:

◆ OnAddRequiredTiles()

void Session::OnAddRequiredTiles ( const CARTA::AddRequiredTiles &  message,
int  channel = CURRENT_Z,
int  animation_id = 0,
bool  skip_data = false 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnCatalogFileInfo()

void Session::OnCatalogFileInfo ( CARTA::CatalogFileInfoRequest  file_info_request,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnCatalogFileList()

void Session::OnCatalogFileList ( CARTA::CatalogListRequest  file_list_request,
uint32_t  request_id 
)
Here is the call graph for this function:

◆ OnCatalogFilter()

void Session::OnCatalogFilter ( CARTA::CatalogFilterRequest  filter_request,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnCloseCatalogFile()

void Session::OnCloseCatalogFile ( CARTA::CloseCatalogFile  close_file_request)
Here is the caller graph for this function:

◆ OnCloseFile()

void Session::OnCloseFile ( const CARTA::CloseFile &  message)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnClosePvPreview()

void Session::OnClosePvPreview ( const CARTA::ClosePvPreview &  close_pv_preview)
Here is the caller graph for this function:

◆ OnConcatStokesFiles()

bool Session::OnConcatStokesFiles ( const CARTA::ConcatStokesFiles &  message,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnExportRegion()

void Session::OnExportRegion ( const CARTA::ExportRegion &  message,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnFileInfoRequest()

void Session::OnFileInfoRequest ( const CARTA::FileInfoRequest &  request,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnFileListRequest()

void Session::OnFileListRequest ( const CARTA::FileListRequest &  request,
uint32_t  request_id 
)
Here is the call graph for this function:

◆ OnFittingRequest()

void Session::OnFittingRequest ( const CARTA::FittingRequest &  fitting_request,
uint32_t  request_id 
)
Here is the call graph for this function:

◆ OnImportRegion()

void Session::OnImportRegion ( const CARTA::ImportRegion &  message,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnMomentRequest()

void Session::OnMomentRequest ( const CARTA::MomentRequest &  moment_request,
uint32_t  request_id 
)
Here is the call graph for this function:

◆ OnOpenCatalogFile()

void Session::OnOpenCatalogFile ( CARTA::OpenCatalogFile  open_file_request,
uint32_t  request_id,
bool  silent = false 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnOpenFile() [1/2]

bool Session::OnOpenFile ( const CARTA::OpenFile &  message,
uint32_t  request_id,
bool  silent = false 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnOpenFile() [2/2]

bool Session::OnOpenFile ( int  file_id,
const string &  name,
std::shared_ptr< casacore::ImageInterface< casacore::Float > >  image,
CARTA::OpenFileAck *  open_file_ack 
)
Here is the call graph for this function:

◆ OnPvRequest()

void Session::OnPvRequest ( const CARTA::PvRequest &  pv_request,
uint32_t  request_id 
)
Here is the call graph for this function:

◆ OnRegionFileInfoRequest()

void Session::OnRegionFileInfoRequest ( const CARTA::RegionFileInfoRequest &  request,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnRegionListRequest()

void Session::OnRegionListRequest ( const CARTA::RegionListRequest &  request,
uint32_t  request_id 
)
Here is the call graph for this function:

◆ OnRegisterViewer()

void Session::OnRegisterViewer ( const CARTA::RegisterViewer &  message,
uint16_t  icd_version,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnRemoteFileRequest()

void Session::OnRemoteFileRequest ( const CARTA::RemoteFileRequest &  message,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnRemoveRegion()

void Session::OnRemoveRegion ( const CARTA::RemoveRegion &  message)
Here is the caller graph for this function:

◆ OnResumeSession()

void Session::OnResumeSession ( const CARTA::ResumeSession &  message,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSaveFile()

void Session::OnSaveFile ( const CARTA::SaveFile &  save_file,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnScriptingAbort()

void Session::OnScriptingAbort ( uint32_t  scripting_request_id)

◆ OnScriptingResponse()

void Session::OnScriptingResponse ( const CARTA::ScriptingResponse &  message,
uint32_t  request_id 
)
Here is the caller graph for this function:

◆ OnSetContourParameters()

void Session::OnSetContourParameters ( const CARTA::SetContourParameters &  message,
bool  silent = false 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSetCursor()

void Session::OnSetCursor ( const CARTA::SetCursor &  message,
uint32_t  request_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSetHistogramRequirements()

void Session::OnSetHistogramRequirements ( const CARTA::SetHistogramRequirements &  message,
uint32_t  request_id 
)
Here is the call graph for this function:

◆ OnSetImageChannels()

void Session::OnSetImageChannels ( const CARTA::SetImageChannels &  message)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSetRegion()

bool Session::OnSetRegion ( const CARTA::SetRegion &  message,
uint32_t  request_id,
bool  silent = false 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSetSpatialRequirements()

void Session::OnSetSpatialRequirements ( const CARTA::SetSpatialRequirements &  message)
Here is the call graph for this function:

◆ OnSetSpectralRequirements()

void Session::OnSetSpectralRequirements ( const CARTA::SetSpectralRequirements &  message)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSetStatsRequirements()

void Session::OnSetStatsRequirements ( const CARTA::SetStatsRequirements &  message)
Here is the call graph for this function:

◆ OnSetVectorOverlayParameters()

void Session::OnSetVectorOverlayParameters ( const CARTA::SetVectorOverlayParameters &  message)
Here is the call graph for this function:

◆ OnStopFitting()

void Session::OnStopFitting ( const CARTA::StopFitting &  stop_fitting)
Here is the caller graph for this function:

◆ OnStopMomentCalc()

void Session::OnStopMomentCalc ( const CARTA::StopMomentCalc &  stop_moment_calc)
Here is the caller graph for this function:

◆ OnStopPvCalc()

void Session::OnStopPvCalc ( const CARTA::StopPvCalc &  stop_pv_calc)
Here is the caller graph for this function:

◆ OnStopPvPreview()

void Session::OnStopPvPreview ( const CARTA::StopPvPreview &  stop_pv_preview)
Here is the caller graph for this function:

◆ RegionDataStreams()

void Session::RegionDataStreams ( int  file_id,
int  region_id 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ResetHistContext()

void carta::Session::ResetHistContext ( )
inline
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendContourData()

bool Session::SendContourData ( int  file_id,
bool  ignore_empty = true,
int  channel = CURRENT_Z 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendEvent()

void Session::SendEvent ( CARTA::EventType  event_type,
u_int32_t  event_id,
const google::protobuf::MessageLite &  message,
bool  compress = true 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendFileEvent()

void Session::SendFileEvent ( int  file_id,
CARTA::EventType  event_type,
u_int32_t  event_id,
google::protobuf::MessageLite &  message,
bool  compress = true 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendLogEvent()

void Session::SendLogEvent ( const std::string &  message,
std::vector< std::string >  tags,
CARTA::ErrorSeverity  severity 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendPvPreview()

bool Session::SendPvPreview ( int  file_id,
int  region_id,
bool  preview_region 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendRegionHistogramData()

bool Session::SendRegionHistogramData ( int  file_id,
int  region_id,
bool  channel_changed = false 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendRegionStatsData()

bool Session::SendRegionStatsData ( int  file_id,
int  region_id 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendScriptingRequest()

void Session::SendScriptingRequest ( CARTA::ScriptingRequest &  message,
ScriptingResponseCallback  callback,
ScriptingSessionClosedCallback  session_closed_callback 
)
Here is the call graph for this function:

◆ SendSpatialProfileData()

bool Session::SendSpatialProfileData ( int  file_id,
int  region_id 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendSpatialProfileDataByFileId()

void Session::SendSpatialProfileDataByFileId ( int  file_id)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendSpatialProfileDataByRegionId()

void Session::SendSpatialProfileDataByRegionId ( int  region_id)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SendSpectralProfileData()

bool Session::SendSpectralProfileData ( int  file_id,
int  region_id,
bool  stokes_changed = false 
)
Here is the caller graph for this function:

◆ SendVectorFieldData()

bool Session::SendVectorFieldData ( int  file_id)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetAnimationActive()

void carta::Session::SetAnimationActive ( bool  val)
inline
Here is the caller graph for this function:

◆ SetControllerDeploymentFlag()

static void carta::Session::SetControllerDeploymentFlag ( bool  controller_deployment)
inlinestatic

◆ SetExitTimeout()

void Session::SetExitTimeout ( int  secs)
static

◆ SetInitExitTimeout()

void Session::SetInitExitTimeout ( int  secs)
static
Here is the call graph for this function:

◆ SetWaitingTask()

void carta::Session::SetWaitingTask ( bool  set_wait)
inline
Here is the caller graph for this function:

◆ StopAnimation()

void Session::StopAnimation ( int  file_id,
const ::CARTA::AnimationFrame &  frame 
)
Here is the caller graph for this function:

◆ StopCatalogFileList()

void Session::StopCatalogFileList ( )
Here is the caller graph for this function:

◆ StopImageFileList()

void Session::StopImageFileList ( )
Here is the caller graph for this function:

◆ StopPvPreviewUpdates()

void Session::StopPvPreviewUpdates ( int  preview_id)
Here is the caller graph for this function:

◆ UpdateImageData()

void Session::UpdateImageData ( int  file_id,
bool  send_image_histogram,
bool  z_changed,
bool  stokes_changed 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateLastMessageTimestamp()

void Session::UpdateLastMessageTimestamp ( )
Here is the caller graph for this function:

◆ UpdateRegionData()

void Session::UpdateRegionData ( int  file_id,
int  region_id,
bool  z_changed,
bool  stokes_changed 
)
protected
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WaitForTaskCancellation()

void Session::WaitForTaskCancellation ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ WaitingFlowEvent()

bool carta::Session::WaitingFlowEvent ( )
inline

Member Data Documentation

◆ _address

std::string carta::Session::_address
protected

◆ _animation_active

volatile bool carta::Session::_animation_active
protected

◆ _animation_context

SessionContext carta::Session::_animation_context
protected

◆ _animation_id

int carta::Session::_animation_id
protected

◆ _animation_object

std::unique_ptr<AnimationObject> carta::Session::_animation_object
protected

◆ _animation_thread

std::thread * Session::_animation_thread = nullptr
staticprotected

◆ _base_context

SessionContext carta::Session::_base_context
protected

◆ _channel_map_received_channel

std::unordered_map<int, int> carta::Session::_channel_map_received_channel
protected

◆ _channel_map_settings

std::unique_ptr<ChannelMapSettings> carta::Session::_channel_map_settings
protected

◆ _connected

bool carta::Session::_connected
protected

◆ _controller_deployment

bool Session::_controller_deployment = false
staticprotected

◆ _cursor_settings

CursorSettings carta::Session::_cursor_settings

◆ _enable_scripting

bool carta::Session::_enable_scripting
protected

◆ _exit_after_num_seconds

int Session::_exit_after_num_seconds = 5
staticprotected

◆ _exit_when_all_sessions_closed

bool Session::_exit_when_all_sessions_closed = false
staticprotected

◆ _file_list_handler

std::shared_ptr<FileListHandler> carta::Session::_file_list_handler
protected

◆ _frame_mutex

std::mutex carta::Session::_frame_mutex
protected

◆ _frames

std::unordered_map<int, std::shared_ptr<Frame> > carta::Session::_frames
protected

◆ _histogram_context

SessionContext carta::Session::_histogram_context
protected

◆ _histogram_progress

float carta::Session::_histogram_progress
protected

◆ _id

uint32_t carta::Session::_id
protected

◆ _image_channel_mutexes

std::unordered_map<int, std::mutex> carta::Session::_image_channel_mutexes
protected

◆ _image_channel_task_active

std::unordered_map<int, bool> carta::Session::_image_channel_task_active
protected

◆ _last_file_id

int carta::Session::_last_file_id
protected

◆ _last_message_timestamp

std::chrono::high_resolution_clock::time_point carta::Session::_last_message_timestamp
protected

◆ _loaders

LoaderCache carta::Session::_loaders
protected

◆ _loop

uWS::Loop* carta::Session::_loop
protected

◆ _num_sessions

volatile int Session::_num_sessions = 0
staticprotected

◆ _out_msgs

concurrent_queue<std::pair<std::vector<char>, bool> > carta::Session::_out_msgs
protected

◆ _read_only_mode

bool carta::Session::_read_only_mode
protected

◆ _ref_count

std::atomic<int> carta::Session::_ref_count
protected

◆ _region_handler

std::unique_ptr<RegionHandler> carta::Session::_region_handler
protected

◆ _remote_file_index

int carta::Session::_remote_file_index
protected

◆ _scripting_callbacks

std::unordered_map<int, std::tuple<ScriptingResponseCallback, ScriptingSessionClosedCallback> > carta::Session::_scripting_callbacks
protected

◆ _scripting_mutex

std::mutex carta::Session::_scripting_mutex
protected

◆ _set_channel_queues

std::unordered_map<int, concurrent_queue<std::pair<CARTA::SetImageChannels, uint32_t> > > carta::Session::_set_channel_queues

◆ _socket

uWS::WebSocket<false, true, PerSocketData>* carta::Session::_socket
protected

◆ _stokes_files_connector

std::unique_ptr<StokesFilesConnector> carta::Session::_stokes_files_connector
protected

◆ _sync_id

int carta::Session::_sync_id
protected

◆ _table_controller

const std::unique_ptr<TableController> carta::Session::_table_controller
protected

◆ _top_level_folder

std::string carta::Session::_top_level_folder
protected

The documentation for this class was generated from the following files: