mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-11 04:17:15 +02:00
void pointers added to callback functions
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@199 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -13,6 +13,7 @@ float i0=0;
|
||||
static double timeout = 3.0;
|
||||
|
||||
chid ch_pos,ch_i0, ch_getpos;
|
||||
void *ch_arg,*ch_darg,*ch_parg,*ch_poarg,*ch_ioarg;
|
||||
|
||||
|
||||
|
||||
@ -138,7 +139,7 @@ float angle(int ichan, float encoder, float totalOffset, float conv_r, float cen
|
||||
|
||||
/* reads the encoder and returns the position */
|
||||
|
||||
float get_position() {
|
||||
float get_position(void *ch_poarg) {
|
||||
#ifdef VERBOSE
|
||||
printf("Getting motor position \n");
|
||||
#endif
|
||||
@ -168,7 +169,7 @@ float get_position() {
|
||||
/* moves the encoder to position p */
|
||||
|
||||
|
||||
int go_to_position(float p) {
|
||||
int go_to_position(float p,void *ch_parg) {
|
||||
#ifdef VERBOSE
|
||||
printf("Setting motor position \n");
|
||||
#endif
|
||||
@ -230,7 +231,7 @@ int go_to_position_no_wait(float p) {
|
||||
|
||||
/* reads I0 and returns the intensity */
|
||||
|
||||
float get_i0() {
|
||||
float get_i0(void *ch_ioarg) {
|
||||
#ifdef VERBOSE
|
||||
printf("Getting I0 readout \n");
|
||||
#endif
|
||||
@ -257,7 +258,7 @@ float get_i0() {
|
||||
}
|
||||
|
||||
|
||||
int connect_channels() {
|
||||
int connect_channels(void *ch_arg) {
|
||||
#ifdef EPICS
|
||||
//double value = 256;
|
||||
/* channel name */
|
||||
@ -278,7 +279,7 @@ int connect_channels() {
|
||||
//"ca_get X04SA-ES2-SC:CH6"
|
||||
|
||||
/* open the channel by name and return ch_id */
|
||||
status = connect_channel("X04SA-ES2-SC:CH6", &ch_i0);
|
||||
status = connect_channel("NULLX04SA-ES2-SC:CH6", &ch_i0);
|
||||
if (status == ECA_NORMAL)
|
||||
printf("I0 channel connected \n");
|
||||
else {
|
||||
@ -307,7 +308,7 @@ int connect_channels() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int disconnect_channels() {
|
||||
int disconnect_channels(void *ch_darg) {
|
||||
#ifdef EPICS
|
||||
/* close channel connect */
|
||||
disconnect_channel(ch_i0);
|
||||
|
@ -134,7 +134,7 @@ float defaultAngleFunction(float ichan, float encoder, float totalOffset, float
|
||||
|
||||
/* reads the encoder and returns the position */
|
||||
|
||||
float defaultGetPosition() {
|
||||
float defaultGetPosition(void *d) {
|
||||
#ifdef VERBOSE
|
||||
printf("Getting motor position \n");
|
||||
#endif
|
||||
@ -158,13 +158,14 @@ float defaultGetPosition() {
|
||||
|
||||
|
||||
|
||||
return pos;
|
||||
return pos
|
||||
;
|
||||
}
|
||||
|
||||
/* moves the encoder to position p */
|
||||
|
||||
|
||||
int defaultGoToPosition(float p) {
|
||||
int defaultGoToPosition(float p,void *d) {
|
||||
#ifdef VERBOSE
|
||||
printf("Setting motor position \n");
|
||||
#endif
|
||||
@ -191,7 +192,7 @@ int defaultGoToPosition(float p) {
|
||||
|
||||
/* moves the encoder to position p without waiting */
|
||||
|
||||
int defaultGoToPositionNoWait(float p) {
|
||||
int defaultGoToPositionNoWait(float p,void *d) {
|
||||
#ifdef VERBOSE
|
||||
printf("Setting motor position no wait \n");
|
||||
#endif
|
||||
@ -222,7 +223,7 @@ int defaultGoToPositionNoWait(float p) {
|
||||
|
||||
/* reads I0 and returns the intensity */
|
||||
|
||||
float defaultGetI0(int t) {
|
||||
float defaultGetI0(int t,void *d) {
|
||||
#ifdef VERBOSE
|
||||
printf("Getting I0 readout \n");
|
||||
#endif
|
||||
@ -258,7 +259,7 @@ float defaultGetI0(int t) {
|
||||
}
|
||||
|
||||
|
||||
int defaultConnectChannels() {
|
||||
int defaultConnectChannels(void*d) {
|
||||
#ifdef EPICS
|
||||
//double value = 256;
|
||||
/* channel name */
|
||||
@ -308,7 +309,7 @@ int defaultConnectChannels() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
int defaultDisconnectChannels() {
|
||||
int defaultDisconnectChannels(void *d) {
|
||||
#ifdef EPICS
|
||||
/* close channel connect */
|
||||
disconnect_channel(ch_i0);
|
||||
|
@ -30,12 +30,12 @@ extern "C" {
|
||||
|
||||
|
||||
float defaultAngleFunction(float ichan, float encoder, float totalOffset, float conv_r, float center, float offset, float tilt, int direction);
|
||||
float defaultGetPosition();
|
||||
int defaultGoToPosition(float p);
|
||||
int defaultGoToPositionNoWait(float p);
|
||||
int defaultConnectChannels();
|
||||
int defaultDisconnectChannels();
|
||||
float defaultGetI0(int t);
|
||||
float defaultGetPosition(void *d);
|
||||
int defaultGoToPosition(float p,void *d);
|
||||
int defaultGoToPositionNoWait(float p,void *d);
|
||||
int defaultConnectChannels(void *d);
|
||||
int defaultDisconnectChannels(void *d);
|
||||
float defaultGetI0(int t,void *d);
|
||||
|
||||
int defaultDataReadyFunc(detectorData* d, void* p);
|
||||
|
||||
|
Reference in New Issue
Block a user