mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
gui client works for just getting status
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@149 af1100a4-978c-4157-bff7-07162d2ba061
This commit is contained in:
@ -28,6 +28,7 @@ public:
|
||||
|
||||
static const int64_t GUI_VERSION=0x20121213;
|
||||
|
||||
#define GOODBYE -200
|
||||
//-------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
enum{
|
||||
|
@ -22,6 +22,7 @@ class qTabSettings;
|
||||
class qTabDebugging;
|
||||
class qTabDeveloper;
|
||||
class qTabMessages;
|
||||
class qServer;
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
/** Qt Include Headers */
|
||||
@ -110,6 +111,9 @@ private:
|
||||
/**Messages tab */
|
||||
qTabMessages *tab_messages;
|
||||
|
||||
/** server object*/
|
||||
qServer *myServer;
|
||||
|
||||
/**if the developer tab should be enabled,known from command line */
|
||||
int isDeveloper;
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* qDrawPlot.h
|
||||
*
|
||||
* Created on: May 7, 2012
|
||||
* Author: Ian Johnson
|
||||
* Author: Dhanya Maliakal
|
||||
*/
|
||||
#ifndef QDRAWPLOT_H
|
||||
#define QDRAWPLOT_H
|
||||
@ -117,8 +117,6 @@ public:
|
||||
int UpdateTrimbitPlot(bool fromDetector,bool Histogram);
|
||||
|
||||
|
||||
|
||||
|
||||
public slots:
|
||||
/** To select 1D or 2D plot
|
||||
@param i is 1 for 1D, else 2D plot */
|
||||
|
106
slsDetectorGui/include/qServer.h
Normal file
106
slsDetectorGui/include/qServer.h
Normal file
@ -0,0 +1,106 @@
|
||||
/*
|
||||
* qServer.h.h
|
||||
*
|
||||
* Created on: Feb 27, 2013
|
||||
* Author: Dhanya Maliakal
|
||||
*/
|
||||
#ifndef QSERVER_H
|
||||
#define QSERVER_H
|
||||
|
||||
|
||||
/** Qt Project Class Headers */
|
||||
#include "sls_detector_defs.h"
|
||||
#include "qDefs.h"
|
||||
class qDrawPlot;
|
||||
class qTabMeasurement;
|
||||
|
||||
/** Project Class Headers */
|
||||
class multiSlsDetector;
|
||||
class MySocketTCP;
|
||||
/** C++ Include Headers */
|
||||
|
||||
|
||||
/**
|
||||
*@short Sets up the gui server
|
||||
*/
|
||||
class qServer: public virtual slsDetectorDefs{
|
||||
|
||||
|
||||
public:
|
||||
/** \short The constructor */
|
||||
qServer(multiSlsDetector*& detector, qTabMeasurement* m, qDrawPlot *d);
|
||||
/** Destructor */
|
||||
~qServer();
|
||||
|
||||
/** Start or Stop Gui Server
|
||||
* @param start is 1 to start and 0 to stop
|
||||
*/
|
||||
int StartStopServer(int start);
|
||||
|
||||
private:
|
||||
/** assigns functions to the fnum enum */
|
||||
int function_table();
|
||||
|
||||
/** Decodes Function */
|
||||
int decode_function();
|
||||
|
||||
/** Unrecognized Function */
|
||||
int M_nofunc();
|
||||
|
||||
|
||||
/**
|
||||
* Static function - Thread started which listens to client gui.
|
||||
* Called by StartStopServer()
|
||||
* @param this_pointer pointer to this object
|
||||
*/
|
||||
static void* StartServerThread(void *this_pointer);
|
||||
|
||||
/**
|
||||
* Thread started which listens to client gui.
|
||||
* Called by startServerThread()
|
||||
*
|
||||
*/
|
||||
int StartServer();
|
||||
|
||||
/** Get Detector Status */
|
||||
int get_status();
|
||||
|
||||
|
||||
|
||||
|
||||
/** The multi detector object */
|
||||
multiSlsDetector *myDet;
|
||||
/**The measurement tab object*/
|
||||
qTabMeasurement *tab_measurement;
|
||||
/**The plot widget object*/
|
||||
qDrawPlot *myPlot;
|
||||
|
||||
|
||||
/** tcp socket to gui client */
|
||||
MySocketTCP *mySocket;
|
||||
/** server port number*/
|
||||
int port_no;
|
||||
/** Lock Status if server locked to a client */
|
||||
int lockStatus;
|
||||
|
||||
/** Function List */
|
||||
static const int NUMBER_OF_FUNCTIONS = 256;
|
||||
int (qServer::*flist[NUMBER_OF_FUNCTIONS])();
|
||||
|
||||
|
||||
/** if the gui server thread is running*/
|
||||
static int gui_server_thread_running;
|
||||
/** thread listening to gui client*/
|
||||
pthread_t gui_server_thread;
|
||||
|
||||
/** server started */
|
||||
int checkStarted;
|
||||
|
||||
/** Message */
|
||||
char mess[MAX_STR_LENGTH];
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* QSERVER_H */
|
@ -91,7 +91,6 @@ private:
|
||||
void Enable(bool enable);
|
||||
|
||||
|
||||
|
||||
private slots:
|
||||
/** Sets the timing mode
|
||||
* @ param mode cane be None, Auto, Gated, Trigger Exposure Series,
|
||||
@ -156,7 +155,6 @@ private slots:
|
||||
void EnableFileWrite(bool enable);
|
||||
|
||||
|
||||
|
||||
private:
|
||||
/** The sls detector object */
|
||||
multiSlsDetector *myDet;
|
||||
|
@ -2,10 +2,10 @@
|
||||
#define SVNURL "file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui"
|
||||
//#define SVNREPPATH ""
|
||||
#define SVNREPUUID "af1100a4-978c-4157-bff7-07162d2ba061"
|
||||
//#define SVNREV 0x147
|
||||
//#define SVNREV 0x148
|
||||
//#define SVNKIND ""
|
||||
//#define SVNSCHED ""
|
||||
#define SVNAUTH "l_maliakal_d"
|
||||
#define SVNREV 0x147
|
||||
#define SVNREV 0x148
|
||||
#define SVNDATE 0x20130226
|
||||
//
|
||||
|
Reference in New Issue
Block a user