removing the return value usage in start acquisition callback, callbacks will be called if registered, and we will write files if file write enabled

This commit is contained in:
Dhanya Maliakal 2017-03-24 13:41:30 +01:00
parent 44be9829d4
commit eb203c93b2
2 changed files with 12 additions and 10 deletions

View File

@ -71,11 +71,13 @@ This release supports the following features:
- The call back value for Start Acquisition Call back has only 2 - The call back value for Start Acquisition Call back is insignificant at the
options now: moment and left for future use. Instead, the following rules apply:
* 0 user mode: user call back takes care of open, close and writing * If file write is enabled from the client, we will write the files.
to file. * If callbacks are registered, they will be called.
* 1 default mode: default procedure to open, close and write to file. For example, the user prefers to write the data himself, one must disable
file write (so we dont write) and register the callbacks (so the user gets
the data).

View File

@ -90,6 +90,8 @@ int main(int argc, char *argv[]) {
} }
//register callbacks //register callbacks
//remember to set file write enable to 0 (using the client) if we should not write files and
//you will write data using the callbacks
/** /**
* Call back for start acquisition * Call back for start acquisition
@ -99,10 +101,9 @@ int main(int argc, char *argv[]) {
* fileindex * fileindex
* datasize * datasize
* *
* return value is * return value is insignificant at the moment
* 0 callback takes care of open,close,wrie file * we write depending on file write enable
* 1 callback writes file, we have to open, close it * users get data to write depending on call backs registered
* 2 we open, close, write file, callback does not do anything
*/ */
printf("Registering StartAcq()\n"); printf("Registering StartAcq()\n");
receivers[i]->registerCallBackStartAcquisition(StartAcq, NULL); receivers[i]->registerCallBackStartAcquisition(StartAcq, NULL);
@ -133,7 +134,6 @@ int main(int argc, char *argv[]) {
* version is the version number of this structure format * version is the version number of this structure format
* dataPointer is the pointer to the data * dataPointer is the pointer to the data
* dataSize in bytes is the size of the data in bytes * dataSize in bytes is the size of the data in bytes
* fileDescriptor is the file descriptor
*/ */
printf("Registering GetData() \n"); printf("Registering GetData() \n");
receivers[i]->registerCallBackRawDataReady(GetData,NULL); receivers[i]->registerCallBackRawDataReady(GetData,NULL);