update client command doc

This commit is contained in:
Dhanya Maliakal 2017-08-16 19:05:17 +02:00
parent ac6720e27d
commit 16fc44b3ab
3 changed files with 64 additions and 75 deletions

View File

@ -131,6 +131,7 @@ int main(int argc, char* argv[]) {
buffer[BUFFERSIZE-1] = '\n'; buffer[BUFFERSIZE-1] = '\n';
cprintf(GREEN,"Ready...\n"); cprintf(GREEN,"Ready...\n");
/* /*
int once = 1; int once = 1;
while(strcmp(buffer,"start")){ while(strcmp(buffer,"start")){

View File

@ -259,8 +259,8 @@ int Feb_Control_OpenSerialCommunication(){
return 0; return 0;
} }
/*
//send start //send the first message (which will be garbled up)
char buffer[SPECIAL9M_HIGHVOLTAGE_BUFFERSIZE]; char buffer[SPECIAL9M_HIGHVOLTAGE_BUFFERSIZE];
memset(buffer,0,SPECIAL9M_HIGHVOLTAGE_BUFFERSIZE); memset(buffer,0,SPECIAL9M_HIGHVOLTAGE_BUFFERSIZE);
buffer[SPECIAL9M_HIGHVOLTAGE_BUFFERSIZE-1] = '\n'; buffer[SPECIAL9M_HIGHVOLTAGE_BUFFERSIZE-1] = '\n';
@ -270,7 +270,7 @@ int Feb_Control_OpenSerialCommunication(){
cprintf(RED,"\nWarning: Error writing to i2c bus\n"); cprintf(RED,"\nWarning: Error writing to i2c bus\n");
return 0; return 0;
} }
*/
return 1; return 1;
} }

View File

@ -166,6 +166,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
Commands to configure the detector. these commands are often left to the configuration file. Commands to configure the detector. these commands are often left to the configuration file.
- \ref detstructure "Detector Structure": commands to configure detector structure - \ref detstructure "Detector Structure": commands to configure detector structure
- \ref detstatus "Detector Status": commands to configure detector status - \ref detstatus "Detector Status": commands to configure detector status
- \ref detsize "Detector Data Size": commands to configure detector data size
- \ref versions "Versions": commands to check version of each subsytem - \ref versions "Versions": commands to check version of each subsytem
*/ */
@ -186,16 +187,13 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
/*! \page config /*! \page config
- \b free Free shared memory on the control PC - \b free Free shared memory on the control PC
*/ */
descrToFuncMap[i].m_pFuncName="free";//OK descrToFuncMap[i].m_pFuncName="free";//OK
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFree; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdFree;
i++; i++;
/*! \page config /*! \page config
- \b add Adds a detector at the end of the multi-detector structure. \c put argument is the hostname or IP adress. Returns the chained list of detector hostnames. - \b add Adds a detector at the end of the multi-detector structure. \c put argument is the hostname or IP adress. Returns the chained list of detector hostnames.
*/ */
descrToFuncMap[i].m_pFuncName="add";//OK descrToFuncMap[i].m_pFuncName="add";//OK
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdd; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAdd;
i++; i++;
@ -203,16 +201,13 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
/*! \page config /*! \page config
- <b>remove i</b> Removes controller \c i from the multi-detector structure. Can be used for partial readout of the detector. - <b>remove i</b> Removes controller \c i from the multi-detector structure. Can be used for partial readout of the detector.
*/ */
descrToFuncMap[i].m_pFuncName="remove";//OK descrToFuncMap[i].m_pFuncName="remove";//OK
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRemove; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRemove;
i++; i++;
/*! \page config /*! \page config
- <b>type</b> Sets/gets detector type (string). - <b>type</b> Sets/gets detector type (string).
*/ */
descrToFuncMap[i].m_pFuncName="type"; //OK descrToFuncMap[i].m_pFuncName="type"; //OK
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdHostname; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdHostname;
i++; i++;
@ -220,7 +215,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
/*! \page config /*! \page config
- <b>hostname</b> \c put adds the hostname (ot IP adress) at the end of the multi-detector structure. If used for a single controlled (i:) replaces the current hostname. Returns the list of the hostnames of the multi-detector structure. - <b>hostname</b> \c put adds the hostname (ot IP adress) at the end of the multi-detector structure. If used for a single controlled (i:) replaces the current hostname. Returns the list of the hostnames of the multi-detector structure.
*/ */
descrToFuncMap[i].m_pFuncName="hostname"; //OK descrToFuncMap[i].m_pFuncName="hostname"; //OK
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdHostname; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdHostname;
i++; i++;
@ -228,7 +222,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
/*! \page config /*! \page config
- <b>id[:i]</b> Returns the id of the detector structure. i is the detector position in a multi detector system. If used a \c put, configures the id of the detector structure. i is the detector position in a multi detector system and l is the id of the detector to be added. - <b>id[:i]</b> Returns the id of the detector structure. i is the detector position in a multi detector system. If used a \c put, configures the id of the detector structure. i is the detector position in a multi detector system and l is the id of the detector to be added.
*/ */
descrToFuncMap[i].m_pFuncName="id"; //OK descrToFuncMap[i].m_pFuncName="id"; //OK
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdId; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdId;
i++; i++;
@ -273,6 +266,62 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
i++; i++;
/* detector and data size */
/*! \page config
\section detsize Detector Data Size
commands to configure detector data size
*/
/*! \page config
- <b>nmod [i]</b> sets/gets the number of modules of the detector. Used for MYTHEN only.
*/
descrToFuncMap[i].m_pFuncName="nmod"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
/*! \page config
- <b>maxmod </b> Gets the maximum number of modules of the detector. Used for MYTHEN only. Cannot put!
*/
descrToFuncMap[i].m_pFuncName="maxmod"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
/*! \page config
- <b>dr [i]</b> sets/gets the dynamic range of detector. Mythen [4,8,16,24]. Eiger [4,8,16,32]. Others cannot put!
*/
descrToFuncMap[i].m_pFuncName="dr"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
/*! \page config
- <b>roi [i] [xmin] [xmax] [ymin] [ymax] </b> sets region of interest of the detector, where i is number of rois;i=0 to clear rois. Used for GOTTHARD only.
*/
descrToFuncMap[i].m_pFuncName="roi"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
/*! \page config
- <b>detsizechan [xmax] [ymax]</b> sets the maximum number of channels in each dimension for complete detector set; -1 is no limit. Use for multi-detector system as first command in config file.
*/
descrToFuncMap[i].m_pFuncName="detsizechan"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
/*! \page config
- <b>roimask [i]</b> ??
*/
descrToFuncMap[i].m_pFuncName="roimask"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
/*! \page config
- <b>flippeddatax [i]</b> enables/disables data being flipped across x axis. 1 enables, 0 disables. Used for EIGER only. 1 for bottom half-module, 0 for top-half module.
*/
descrToFuncMap[i].m_pFuncName="flippeddatax"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
@ -298,27 +347,21 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
/*! \page data /*! \page data
- <b>ratecorr [ns]</b> Returns the dead time used for rate correections in ns (int). \c put sets the deadtime correction constant in ns, -1 will set it to default tau of settings (0 unset). - <b>ratecorr [ns]</b> Returns the dead time used for rate correections in ns (int). \c put sets the deadtime correction constant in ns, -1 will set it to default tau of settings (0 unset).
*/ */
descrToFuncMap[i].m_pFuncName="ratecorr"; // descrToFuncMap[i].m_pFuncName="ratecorr"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRateCorr; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdRateCorr;
i++; i++;
/*! \page data /*! \page data
- <b>badchannels [fn]</b> \c put sets the badchannels file to \c fn . \get returns the bad channels file name. If \fn is specified, it writes the badchannels to \c fn. \c none disables badchannel corrections. - <b>badchannels [fn]</b> \c put sets the badchannels file to \c fn . \get returns the bad channels file name. If \fn is specified, it writes the badchannels to \c fn. \c none disables badchannel corrections.
*/ */
descrToFuncMap[i].m_pFuncName="badchannels"; // descrToFuncMap[i].m_pFuncName="badchannels"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdBadChannels; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdBadChannels;
i++; i++;
/*! \page data /*! \page data
- <b>angconv [fn]</b> \c put sets the angular conversion file to \c fn . \get returns the angular conversion file name. If \fn is specified, it writes the angular conversion factors to \c fn. \c none disables angular corrections. - <b>angconv [fn]</b> \c put sets the angular conversion file to \c fn . \get returns the angular conversion file name. If \fn is specified, it writes the angular conversion factors to \c fn. \c none disables angular corrections.
*/ */
descrToFuncMap[i].m_pFuncName="angconv"; // descrToFuncMap[i].m_pFuncName="angconv"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv;
i++; i++;
@ -326,7 +369,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
/*! \page data /*! \page data
- <b>globaloff [f]</b> Sets/gets the beamline angular global offset (float). - <b>globaloff [f]</b> Sets/gets the beamline angular global offset (float).
*/ */
descrToFuncMap[i].m_pFuncName="globaloff"; // descrToFuncMap[i].m_pFuncName="globaloff"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv;
i++; i++;
@ -335,7 +377,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
- <b>fineoff [f]</b> Sets/gets the angular fine offset of the measurement (float). - <b>fineoff [f]</b> Sets/gets the angular fine offset of the measurement (float).
*/ */
//2017/08/15 //2017/08/15
descrToFuncMap[i].m_pFuncName="fineoff"; // descrToFuncMap[i].m_pFuncName="fineoff"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv;
i++; i++;
@ -343,7 +384,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
/*! \page data /*! \page data
- <b>binsize [f]</b> Sets/gets the bin size used for the angular conversion (float). - <b>binsize [f]</b> Sets/gets the bin size used for the angular conversion (float).
*/ */
descrToFuncMap[i].m_pFuncName="binsize" ;// descrToFuncMap[i].m_pFuncName="binsize" ;//
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv;
i++; i++;
@ -351,12 +391,10 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
/*! \page data /*! \page data
- <b>angdir [i]</b> Sets/gets the angular direction. 1 means increasing channels number as increasing angle, -1 increasing channel number decreasing angle. - <b>angdir [i]</b> Sets/gets the angular direction. 1 means increasing channels number as increasing angle, -1 increasing channel number decreasing angle.
*/ */
descrToFuncMap[i].m_pFuncName="angdir" ;// descrToFuncMap[i].m_pFuncName="angdir" ;//
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv;
i++; i++;
/*! \page data /*! \page data
- <b>moveflag [i]</b> Sets/gets the flag for physically moving the detector during the acquisition of several positions. 1 sets (moves), 0 unsets. - <b>moveflag [i]</b> Sets/gets the flag for physically moving the detector during the acquisition of several positions. 1 sets (moves), 0 unsets.
*/ */
@ -371,7 +409,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv;
i++; i++;
/*! \page data /*! \page data
- <b>sampley [f]</b> Sets/gets the sample displacement in th direction orthogonal to the beam in um. Unused! - <b>sampley [f]</b> Sets/gets the sample displacement in th direction orthogonal to the beam in um. Unused!
*/ */
@ -379,7 +416,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv; descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdAngConv;
i++; i++;
/*! \page data /*! \page data
- <b>threaded [i]</b> Sets/gets the data processing threaded flag. 1 is threaded, 0 unthreaded. - <b>threaded [i]</b> Sets/gets the data processing threaded flag. 1 is threaded, 0 unthreaded.
*/ */
@ -442,8 +478,8 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
i++; i++;
/* file name */
/* file name */
/*! \page output Output settings /*! \page output Output settings
Commands to setup the file destination and format Commands to setup the file destination and format
@ -500,6 +536,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
/* Acquisition actions */ /* Acquisition actions */
/*! \page actions Actions /*! \page actions Actions
@ -685,6 +722,7 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
/* communication configuration */ /* communication configuration */
/*! \page network Network /*! \page network Network
@ -814,56 +852,6 @@ slsDetectorCommand::slsDetectorCommand(slsDetectorUtils *det) {
i++; i++;
/* detector and data size */
/*! \page config
- <b>nmod [i]</b> sets/gets the number of modules of the detector. Used for MYTHEN only.
*/
descrToFuncMap[i].m_pFuncName="nmod"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
/*! \page config
- <b>maxmod </b> Gets the maximum number of modules of the detector. Used for MYTHEN only. Cannot put!
*/
descrToFuncMap[i].m_pFuncName="maxmod"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
/*! \page config
- <b>dr [i]</b> sets/gets the dynamic range of detector. Mythen [4,8,16,24]. Eiger [4,8,16,32]. Others cannot put!
*/
descrToFuncMap[i].m_pFuncName="dr"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
/*! \page config
- <b>roi [i] [xmin] [xmax] [ymin] [ymax] </b> sets region of interest of the detector, where i is number of rois;i=0 to clear rois. Used for GOTTHARD only.
*/
descrToFuncMap[i].m_pFuncName="roi"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
/*! \page config
- <b>detsizechan [xmax] [ymax]</b> sets the maximum number of channels in each dimension for complete detector set; -1 is no limit. Use for multi-detector system as first command in config file.
*/
descrToFuncMap[i].m_pFuncName="detsizechan"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
/*! \page config
- <b>roimask [i]</b> ??
*/
descrToFuncMap[i].m_pFuncName="roimask"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
/*! \page config
- <b>flippeddatax [i]</b> enables/disables data being flipped across x axis. 1 enables, 0 disables. Used for EIGER only. 1 for bottom half-module, 0 for top-half module.
*/
descrToFuncMap[i].m_pFuncName="flippeddatax"; //
descrToFuncMap[i].m_pFuncPtr=&slsDetectorCommand::cmdDetectorSize;
i++;
/*! \page test /*! \page test
- <b>flippeddatay [i]</b> enables/disables data being flipped across y axis. 1 enables, 0 disables. Not implemented. - <b>flippeddatay [i]</b> enables/disables data being flipped across y axis. 1 enables, 0 disables. Not implemented.