added callbacks (but should still implement them in the base classes)

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@182 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
bergamaschi
2012-05-22 15:34:12 +00:00
parent 0bab16cde7
commit d30ad5faac
13 changed files with 145 additions and 93 deletions

View File

@ -512,11 +512,23 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
*/
virtual int writeConfigurationFile(string const fname)=0;
void registerGetPositionCallback( float (*func)(void)){get_position=func;};
void registerConnectChannelsCallback( int (*func)(void)){connect_channels=func;};
void registerDisconnectChannelsCallback( int (*func)(void)){disconnect_channels=func;};
void registerGoToPositionCallback( int (*func)(float)){go_to_position=func;};
void registerGoToPositionNoWaitCallback( int (*func)(float)){go_to_position_no_wait=func;};
void registerGetI0Callback( float (*func)(int)){get_i0=func;};
protected:
static const int64_t thisSoftwareVersion=0x20120124;
protected:
//protected:
int *stoppedFlag;
@ -530,6 +542,13 @@ class slsDetectorUtils : public slsDetectorActions, public postProcessing {
int progressIndex;
float (*get_position)(void);
int (*go_to_position)(float);
int (*go_to_position_no_wait)(float);
int (*connect_channels)(void);
int (*disconnect_channels)(void);
float (*get_i0)(int);
};