| 23 | } |
| 24 | |
| 25 | int FileStreamer::init_streamer () |
| 26 | { |
| 27 | if ((strcmp (file_mode, "w") != 0) && (strcmp (file_mode, "w+") != 0) && |
| 28 | (strcmp (file_mode, "a") != 0) && (strcmp (file_mode, "a+") != 0)) |
| 29 | { |
| 30 | return (int)BrainFlowExitCodes::INVALID_ARGUMENTS_ERROR; |
| 31 | } |
| 32 | fp = fopen (file, file_mode); |
| 33 | if (fp == NULL) |
| 34 | { |
| 35 | return (int)BrainFlowExitCodes::GENERAL_ERROR; |
| 36 | } |
| 37 | return (int)BrainFlowExitCodes::STATUS_OK; |
| 38 | } |
| 39 | |
| 40 | void FileStreamer::stream_data (double *data) |
| 41 | { |