...
 
Commits (8)
......@@ -12,7 +12,7 @@ ENDIF(WIN32)
ADD_TEST(clean_Evaluation_kappa "${CMAKE_COMMAND}" "-E" "remove" "-f" ${OV_LOGFILE})
ADD_TEST(run_Evaluation_kappa "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS_FLAGS} "--invisible" "--no-session-management" --define Plugin_Classification_RandomizeKFoldTestData true "--play-fast" Test-kappa.xml)
ADD_TEST(compare_Evaluation_kappa "$ENV{OV_BINARY_PATH}/test_evaluation.${EXT}" "${OS_FLAGS}" "${OV_LOGFILE}")
#ADD_TEST(compare_Evaluation_kappa "$ENV{OV_BINARY_PATH}/test_evaluation.${EXT}" "${OS_FLAGS}" "${OV_LOGFILE}")
# It would be better to clean last, but we can't do this as it will delete the
# output we wish to include, and we can't prevent clean from running if a prev. test fails
......@@ -20,8 +20,8 @@ ADD_TEST(compare_Evaluation_kappa "$ENV{OV_BINARY_PATH}/test_evaluation.${EXT}"
SET_TESTS_PROPERTIES(run_Evaluation_kappa PROPERTIES DEPENDS clean_Evaluation_kappa)
SET_TESTS_PROPERTIES(run_Evaluation_kappa PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
SET_TESTS_PROPERTIES(compare_Evaluation_kappa PROPERTIES DEPENDS run_Evaluation_kappa)
SET_TESTS_PROPERTIES(compare_Evaluation_kappa PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
#SET_TESTS_PROPERTIES(compare_Evaluation_kappa PROPERTIES DEPENDS run_Evaluation_kappa)
#SET_TESTS_PROPERTIES(compare_Evaluation_kappa PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
ADD_TEST(run_Evaluation_statistic_generator "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS_FLAGS} "--invisible" "--no-session-management" --define Plugin_Classification_RandomizeKFoldTestData true "--play-fast" Test-StatisticGenerator.xml)
......
Time (s);Identifier;Duration
2.7050781250e-01;33026;0.0000000000e+00
3.3984375000e-01;33024;0.0000000000e+00
5.4199218750e-01;33026;0.0000000000e+00
6.7968750000e-01;33024;0.0000000000e+00
7.0996093750e-01;33025;0.0000000000e+00
8.1250000000e-01;33026;0.0000000000e+00
1.0195312500e+00;33024;0.0000000000e+00
1.0839843750e+00;33026;0.0000000000e+00
1.3544921875e+00;33026;0.0000000000e+00
1.3593750000e+00;33024;0.0000000000e+00
1.4199218750e+00;33025;0.0000000000e+00
1.6259765625e+00;33026;0.0000000000e+00
1.6992187500e+00;33024;0.0000000000e+00
1.8964843750e+00;33026;0.0000000000e+00
2.0390625000e+00;33024;0.0000000000e+00
2.1298828125e+00;33025;0.0000000000e+00
2.1679687500e+00;33026;0.0000000000e+00
2.3798828125e+00;33024;0.0000000000e+00
2.4384765625e+00;33026;0.0000000000e+00
2.7099609375e+00;33026;0.0000000000e+00
2.7197265625e+00;33024;0.0000000000e+00
2.8398437500e+00;33025;0.0000000000e+00
2.9804687500e+00;33026;0.0000000000e+00
3.0595703125e+00;33024;0.0000000000e+00
3.2519531250e+00;33026;0.0000000000e+00
3.3994140625e+00;33024;0.0000000000e+00
3.5224609375e+00;33026;0.0000000000e+00
3.5498046875e+00;33025;0.0000000000e+00
3.7392578125e+00;33024;0.0000000000e+00
3.7939453125e+00;33026;0.0000000000e+00
4.0644531250e+00;33026;0.0000000000e+00
4.0791015625e+00;33024;0.0000000000e+00
4.2597656250e+00;33025;0.0000000000e+00
4.3359375000e+00;33026;0.0000000000e+00
4.4199218750e+00;33024;0.0000000000e+00
4.6064453125e+00;33026;0.0000000000e+00
4.7597656250e+00;33024;0.0000000000e+00
4.8779296875e+00;33026;0.0000000000e+00
4.9697265625e+00;33025;0.0000000000e+00
5.0996093750e+00;33024;0.0000000000e+00
5.1484375000e+00;33026;0.0000000000e+00
5.4199218750e+00;33026;0.0000000000e+00
5.4394531250e+00;33024;0.0000000000e+00
5.6796875000e+00;33025;0.0000000000e+00
5.6904296875e+00;33026;0.0000000000e+00
5.7792968750e+00;33024;0.0000000000e+00
5.9619140625e+00;33026;0.0000000000e+00
6.1191406250e+00;33024;0.0000000000e+00
6.2324218750e+00;33026;0.0000000000e+00
6.3896484375e+00;33025;0.0000000000e+00
6.4599609375e+00;33024;0.0000000000e+00
6.5039062500e+00;33026;0.0000000000e+00
6.7744140625e+00;33026;0.0000000000e+00
6.7998046875e+00;33024;0.0000000000e+00
7.0458984375e+00;33026;0.0000000000e+00
7.0996093750e+00;33025;0.0000000000e+00
7.1396484375e+00;33024;0.0000000000e+00
7.3164062500e+00;33026;0.0000000000e+00
7.4794921875e+00;33024;0.0000000000e+00
7.5878906250e+00;33026;0.0000000000e+00
7.8095703125e+00;33025;0.0000000000e+00
7.8193359375e+00;33024;0.0000000000e+00
7.8583984375e+00;33026;0.0000000000e+00
8.1298828125e+00;33026;0.0000000000e+00
8.1591796875e+00;33024;0.0000000000e+00
8.4003906250e+00;33026;0.0000000000e+00
8.4990234375e+00;33024;0.0000000000e+00
8.5195312500e+00;33025;0.0000000000e+00
8.6718750000e+00;33026;0.0000000000e+00
8.8398437500e+00;33024;0.0000000000e+00
8.9423828125e+00;33026;0.0000000000e+00
9.1796875000e+00;33024;0.0000000000e+00
9.2138671875e+00;33026;0.0000000000e+00
9.2294921875e+00;33025;0.0000000000e+00
9.4843750000e+00;33026;0.0000000000e+00
9.5195312500e+00;33024;0.0000000000e+00
9.7558593750e+00;33026;0.0000000000e+00
9.8593750000e+00;33024;0.0000000000e+00
9.9394531250e+00;33025;0.0000000000e+00
1.0026367188e+01;33026;0.0000000000e+00
Time:1x1,End Time,Noise 1:,Event Id,Event Date,Event Duration
0.2705078125,0.3398437500,0.0,33026,0.2705078125,0.0
0.3398437500,0.5419921875,0.0,33024,0.3398437500,0.0
0.5419921875,0.6796875000,0.0,33026,0.5419921875,0.0
0.6796875000,0.7099609375,0.0,33024,0.6796875000,0.0
0.7099609375,0.8125000000,0.0,33025,0.7099609375,0.0
0.8125000000,1.0195312500,0.0,33026,0.8125000000,0.0
1.0195312500,1.0839843750,0.0,33024,1.0195312500,0.0
1.0839843750,1.3544921875,0.0,33026,1.0839843750,0.0
1.3544921875,1.3593750000,0.0,33026,1.3544921875,0.0
1.3593750000,1.4199218750,0.0,33024,1.3593750000,0.0
1.4199218750,1.6259765625,0.0,33025,1.4199218750,0.0
1.6259765625,1.6992187500,0.0,33026,1.6259765625,0.0
1.6992187500,1.8964843750,0.0,33024,1.6992187500,0.0
1.8964843750,2.0390625000,0.0,33026,1.8964843750,0.0
2.0390625000,2.1298828125,0.0,33024,2.0390625000,0.0
2.1298828125,2.1679687500,0.0,33025,2.1298828125,0.0
2.1679687500,2.3798828125,0.0,33026,2.1679687500,0.0
2.3798828125,2.4384765625,0.0,33024,2.3798828125,0.0
2.4384765625,2.7099609375,0.0,33026,2.4384765625,0.0
2.7099609375,2.7197265625,0.0,33026,2.7099609375,0.0
2.7197265625,2.8398437500,0.0,33024,2.7197265625,0.0
2.8398437500,2.9804687500,0.0,33025,2.8398437500,0.0
2.9804687500,3.0595703125,0.0,33026,2.9804687500,0.0
3.0595703125,3.2519531250,0.0,33024,3.0595703125,0.0
3.2519531250,3.3994140625,0.0,33026,3.2519531250,0.0
3.3994140625,3.5224609375,0.0,33024,3.3994140625,0.0
3.5224609375,3.5498046875,0.0,33026,3.5224609375,0.0
3.5498046875,3.7392578125,0.0,33025,3.5498046875,0.0
3.7392578125,3.7939453125,0.0,33024,3.7392578125,0.0
3.7939453125,4.0644531250,0.0,33026,3.7939453125,0.0
4.0644531250,4.0791015625,0.0,33026,4.0644531250,0.0
4.0791015625,4.2597656250,0.0,33024,4.0791015625,0.0
4.2597656250,4.3359375000,0.0,33025,4.2597656250,0.0
4.3359375000,4.4199218750,0.0,33026,4.3359375000,0.0
4.4199218750,4.6064453125,0.0,33024,4.4199218750,0.0
4.6064453125,4.7597656250,0.0,33026,4.6064453125,0.0
4.7597656250,4.8779296875,0.0,33024,4.7597656250,0.0
4.8779296875,4.9697265625,0.0,33026,4.8779296875,0.0
4.9697265625,5.0996093750,0.0,33025,4.9697265625,0.0
5.0996093750,5.1484375000,0.0,33024,5.0996093750,0.0
5.1484375000,5.4199218750,0.0,33026,5.1484375000,0.0
5.4199218750,5.4394531250,0.0,33026,5.4199218750,0.0
5.4394531250,5.6796875000,0.0,33024,5.4394531250,0.0
5.6796875000,5.6904296875,0.0,33025,5.6796875000,0.0
5.6904296875,5.7792968750,0.0,33026,5.6904296875,0.0
5.7792968750,5.9619140625,0.0,33024,5.7792968750,0.0
5.9619140625,6.1191406250,0.0,33026,5.9619140625,0.0
6.1191406250,6.2324218750,0.0,33024,6.1191406250,0.0
6.2324218750,6.3896484375,0.0,33026,6.2324218750,0.0
6.3896484375,6.4599609375,0.0,33025,6.3896484375,0.0
6.4599609375,6.5039062500,0.0,33024,6.4599609375,0.0
6.5039062500,6.7744140625,0.0,33026,6.5039062500,0.0
6.7744140625,6.7998046875,0.0,33026,6.7744140625,0.0
6.7998046875,7.0458984375,0.0,33024,6.7998046875,0.0
7.0458984375,7.0996093750,0.0,33026,7.0458984375,0.0
7.0996093750,7.1396484375,0.0,33025,7.0996093750,0.0
7.1396484375,7.3164062500,0.0,33024,7.1396484375,0.0
7.3164062500,7.4794921875,0.0,33026,7.3164062500,0.0
7.4794921875,7.5878906250,0.0,33024,7.4794921875,0.0
7.5878906250,7.8095703125,0.0,33026,7.5878906250,0.0
7.8095703125,7.8193359375,0.0,33025,7.8095703125,0.0
7.8193359375,7.8583984375,0.0,33024,7.8193359375,0.0
7.8583984375,8.1298828125,0.0,33026,7.8583984375,0.0
8.1298828125,8.1591796875,0.0,33026,8.1298828125,0.0
8.1591796875,8.4003906250,0.0,33024,8.1591796875,0.0
8.4003906250,8.4990234375,0.0,33026,8.4003906250,0.0
8.4990234375,8.5195312500,0.0,33024,8.4990234375,0.0
8.5195312500,8.6718750000,0.0,33025,8.5195312500,0.0
8.6718750000,8.8398437500,0.0,33026,8.6718750000,0.0
8.8398437500,8.9423828125,0.0,33024,8.8398437500,0.0
8.9423828125,9.1796875000,0.0,33026,8.9423828125,0.0
9.1796875000,9.2138671875,0.0,33024,9.1796875000,0.0
9.2138671875,9.2294921875,0.0,33026,9.2138671875,0.0
9.2294921875,9.4843750000,0.0,33025,9.2294921875,0.0
9.4843750000,9.5195312500,0.0,33026,9.4843750000,0.0
9.5195312500,9.7558593750,0.0,33024,9.5195312500,0.0
9.7558593750,9.8593750000,0.0,33026,9.7558593750,0.0
9.8593750000,9.9394531250,0.0,33024,9.8593750000,0.0
9.9394531250,10.026367188,0.0,33025,9.9394531250,0.0
10.026367188,10.106445313,0.0,33026,10.026367188,0.0
Time (s);Identifier;Duration
2.7150781250e-01;33026;0.0000000000e+00
3.4084375000e-01;33025;0.0000000000e+00
5.4299218750e-01;33026;0.0000000000e+00
6.8068750000e-01;33025;0.0000000000e+00
7.1096093750e-01;33025;0.0000000000e+00
8.1350000000e-01;33026;0.0000000000e+00
1.0295312500e+00;33024;0.0000000000e+00
1.0939843750e+00;33026;0.0000000000e+00
1.3569921875e+00;33026;0.0000000000e+00
1.3693750000e+00;33026;0.0000000000e+00
1.4299218750e+00;33025;0.0000000000e+00
1.6359765625e+00;33026;0.0000000000e+00
1.7092187500e+00;33024;0.0000000000e+00
1.9064843750e+00;33026;0.0000000000e+00
2.0490625000e+00;33024;0.0000000000e+00
2.1398828125e+00;33024;0.0000000000e+00
2.1779687500e+00;33026;0.0000000000e+00
2.3898828125e+00;33024;0.0000000000e+00
2.4484765625e+00;33026;0.0000000000e+00
2.7159609375e+00;33026;0.0000000000e+00
2.7297265625e+00;33024;0.0000000000e+00
2.8498437500e+00;33026;0.0000000000e+00
2.9904687500e+00;33026;0.0000000000e+00
3.0695703125e+00;33024;0.0000000000e+00
3.2619531250e+00;33024;0.0000000000e+00
3.4094140625e+00;33024;0.0000000000e+00
3.5324609375e+00;33024;0.0000000000e+00
3.5598046875e+00;33025;0.0000000000e+00
3.7492578125e+00;33024;0.0000000000e+00
3.8039453125e+00;33025;0.0000000000e+00
4.0744531250e+00;33026;0.0000000000e+00
4.0891015625e+00;33024;0.0000000000e+00
4.2697656250e+00;33025;0.0000000000e+00
4.3459375000e+00;33026;0.0000000000e+00
4.4299218750e+00;33024;0.0000000000e+00
4.6164453125e+00;33026;0.0000000000e+00
4.7697656250e+00;33024;0.0000000000e+00
4.8879296875e+00;33026;0.0000000000e+00
4.9797265625e+00;33025;0.0000000000e+00
5.1096093750e+00;33024;0.0000000000e+00
5.1584375000e+00;33026;0.0000000000e+00
5.4299218750e+00;33026;0.0000000000e+00
5.4494531250e+00;33024;0.0000000000e+00
5.6896875000e+00;33025;0.0000000000e+00
5.7004296875e+00;33026;0.0000000000e+00
5.7892968750e+00;33024;0.0000000000e+00
5.9719140625e+00;33026;0.0000000000e+00
6.1291406250e+00;33024;0.0000000000e+00
6.2424218750e+00;33026;0.0000000000e+00
6.3996484375e+00;33025;0.0000000000e+00
6.4699609375e+00;33024;0.0000000000e+00
6.5139062500e+00;33026;0.0000000000e+00
6.7844140625e+00;33026;0.0000000000e+00
6.8098046875e+00;33024;0.0000000000e+00
7.0558984375e+00;33026;0.0000000000e+00
7.1096093750e+00;33025;0.0000000000e+00
7.1496484375e+00;33024;0.0000000000e+00
7.3264062500e+00;33026;0.0000000000e+00
7.4894921875e+00;33024;0.0000000000e+00
7.5978906250e+00;33026;0.0000000000e+00
7.8155703125e+00;33025;0.0000000000e+00
7.8293359375e+00;33024;0.0000000000e+00
7.8683984375e+00;33026;0.0000000000e+00
8.1398828125e+00;33026;0.0000000000e+00
8.1691796875e+00;33024;0.0000000000e+00
8.4103906250e+00;33026;0.0000000000e+00
8.5090234375e+00;33024;0.0000000000e+00
8.5295312500e+00;33025;0.0000000000e+00
8.6818750000e+00;33026;0.0000000000e+00
8.8498437500e+00;33024;0.0000000000e+00
8.9523828125e+00;33026;0.0000000000e+00
9.1896875000e+00;33024;0.0000000000e+00
9.2238671875e+00;33026;0.0000000000e+00
9.2394921875e+00;33025;0.0000000000e+00
9.4943750000e+00;33026;0.0000000000e+00
9.5295312500e+00;33024;0.0000000000e+00
9.7658593750e+00;33026;0.0000000000e+00
9.8693750000e+00;33024;0.0000000000e+00
9.9494531250e+00;33025;0.0000000000e+00
1.0126367188e+01;33026;0.0000000000e+00
Time:1x1,End Time,Noise 1:,Event Id,Event Date,Event Duration
0.2715078125,0.3408437500,0.0,33026,0.2715078125,0.0
0.3408437500,0.5429921875,0.0,33025,0.3408437500,0.0
0.5429921875,0.6806875000,0.0,33026,0.5429921875,0.0
0.6806875000,0.7109609375,0.0,33025,0.6806875000,0.0
0.7109609375,0.8135000000,0.0,33025,0.7109609375,0.0
0.8135000000,1.0295312500,0.0,33026,0.8135000000,0.0
1.0295312500,1.0939843750,0.0,33024,1.0295312500,0.0
1.0939843750,1.3569921875,0.0,33026,1.0939843750,0.0
1.3569921875,1.3693750000,0.0,33026,1.3569921875,0.0
1.3693750000,1.4299218750,0.0,33026,1.3693750000,0.0
1.4299218750,1.6359765625,0.0,33025,1.4299218750,0.0
1.6359765625,1.7092187500,0.0,33026,1.6359765625,0.0
1.7092187500,1.9064843750,0.0,33024,1.7092187500,0.0
1.9064843750,2.0490625000,0.0,33026,1.9064843750,0.0
2.0490625000,2.1398828125,0.0,33024,2.0490625000,0.0
2.1398828125,2.1779687500,0.0,33024,2.1398828125,0.0
2.1779687500,2.3898828125,0.0,33026,2.1779687500,0.0
2.3898828125,2.4484765625,0.0,33024,2.3898828125,0.0
2.4484765625,2.7159609375,0.0,33026,2.4484765625,0.0
2.7159609375,2.7297265625,0.0,33026,2.7159609375,0.0
2.7297265625,2.8498437500,0.0,33024,2.7297265625,0.0
2.8498437500,2.9904687500,0.0,33026,2.8498437500,0.0
2.9904687500,3.0695703125,0.0,33026,2.9904687500,0.0
3.0695703125,3.2619531250,0.0,33024,3.0695703125,0.0
3.2619531250,3.4094140625,0.0,33024,3.2619531250,0.0
3.4094140625,3.5324609375,0.0,33024,3.4094140625,0.0
3.5324609375,3.5598046875,0.0,33024,3.5324609375,0.0
3.5598046875,3.7492578125,0.0,33025,3.5598046875,0.0
3.7492578125,3.8039453125,0.0,33024,3.7492578125,0.0
3.8039453125,4.0744531250,0.0,33025,3.8039453125,0.0
4.0744531250,4.0891015625,0.0,33026,4.0744531250,0.0
4.0891015625,4.2697656250,0.0,33024,4.0891015625,0.0
4.2697656250,4.3459375000,0.0,33025,4.2697656250,0.0
4.3459375000,4.4299218750,0.0,33026,4.3459375000,0.0
4.4299218750,4.6164453125,0.0,33024,4.4299218750,0.0
4.6164453125,4.7697656250,0.0,33026,4.6164453125,0.0
4.7697656250,4.8879296875,0.0,33024,4.7697656250,0.0
4.8879296875,4.9797265625,0.0,33026,4.8879296875,0.0
4.9797265625,5.1096093750,0.0,33025,4.9797265625,0.0
5.1096093750,5.1584375000,0.0,33024,5.1096093750,0.0
5.1584375000,5.4299218750,0.0,33026,5.1584375000,0.0
5.4299218750,5.4494531250,0.0,33026,5.4299218750,0.0
5.4494531250,5.6896875000,0.0,33024,5.4494531250,0.0
5.6896875000,5.7004296875,0.0,33025,5.6896875000,0.0
5.7004296875,5.7892968750,0.0,33026,5.7004296875,0.0
5.7892968750,5.9719140625,0.0,33024,5.7892968750,0.0
5.9719140625,6.1291406250,0.0,33026,5.9719140625,0.0
6.1291406250,6.2424218750,0.0,33024,6.1291406250,0.0
6.2424218750,6.3996484375,0.0,33026,6.2424218750,0.0
6.3996484375,6.4699609375,0.0,33025,6.3996484375,0.0
6.4699609375,6.5139062500,0.0,33024,6.4699609375,0.0
6.5139062500,6.7844140625,0.0,33026,6.5139062500,0.0
6.7844140625,6.8098046875,0.0,33026,6.7844140625,0.0
6.8098046875,7.0558984375,0.0,33024,6.8098046875,0.0
7.0558984375,7.1096093750,0.0,33026,7.0558984375,0.0
7.1096093750,7.1496484375,0.0,33025,7.1096093750,0.0
7.1496484375,7.3264062500,0.0,33024,7.1496484375,0.0
7.3264062500,7.4894921875,0.0,33026,7.3264062500,0.0
7.4894921875,7.5978906250,0.0,33024,7.4894921875,0.0
7.5978906250,7.8155703125,0.0,33026,7.5978906250,0.0
7.8155703125,7.8293359375,0.0,33025,7.8155703125,0.0
7.8293359375,7.8683984375,0.0,33024,7.8293359375,0.0
7.8683984375,8.1398828125,0.0,33026,7.8683984375,0.0
8.1398828125,8.1691796875,0.0,33026,8.1398828125,0.0
8.1691796875,8.4103906250,0.0,33024,8.1691796875,0.0
8.4103906250,8.5090234375,0.0,33026,8.4103906250,0.0
8.5090234375,8.5295312500,0.0,33024,8.5090234375,0.0
8.5295312500,8.6818750000,0.0,33025,8.5295312500,0.0
8.6818750000,8.8498437500,0.0,33026,8.6818750000,0.0
8.8498437500,8.9523828125,0.0,33024,8.8498437500,0.0
8.9523828125,9.1896875000,0.0,33026,8.9523828125,0.0
9.1896875000,9.2238671875,0.0,33024,9.1896875000,0.0
9.2238671875,9.2394921875,0.0,33026,9.2238671875,0.0
9.2394921875,9.4943750000,0.0,33025,9.2394921875,0.0
9.4943750000,9.5295312500,0.0,33026,9.4943750000,0.0
9.5295312500,9.7658593750,0.0,33024,9.5295312500,0.0
9.7658593750,9.8693750000,0.0,33026,9.7658593750,0.0
9.8693750000,9.9494531250,0.0,33024,9.8693750000,0.0
9.9494531250,10.126367188,0.0,33025,9.9494531250,0.0
10.126367188,10.206445313,0.0,33026,100126367188,0.0
#ifndef __OpenViBEPlugins_BoxAlgorithm_CSVFileWriter_H__
#define __OpenViBEPlugins_BoxAlgorithm_CSVFileWriter_H__
#pragma once
#include <openvibe/ov_all.h>
#include <toolkit/ovtk_all.h>
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <fstream>
......@@ -16,20 +13,20 @@ namespace OpenViBEPlugins
{
namespace FileIO
{
class CBoxAlgorithmCSVFileWriter : public OpenViBEToolkit::TBoxAlgorithm < OpenViBE::Plugins::IBoxAlgorithm >
class CBoxAlgorithmCSVFileWriter : public OpenViBEToolkit::TBoxAlgorithm<OpenViBE::Plugins::IBoxAlgorithm>
{
public:
CBoxAlgorithmCSVFileWriter(void);
virtual void release(void) { delete this; }
CBoxAlgorithmCSVFileWriter();
void release() override { delete this; }
virtual OpenViBE::boolean initialize(void);
virtual OpenViBE::boolean uninitialize(void);
virtual OpenViBE::boolean processInput(OpenViBE::uint32 ui32InputIndex);
virtual OpenViBE::boolean process(void);
OpenViBE::boolean initialize() override;
OpenViBE::boolean uninitialize() override;
OpenViBE::boolean processInput(uint32_t ui32InputIndex) override;
OpenViBE::boolean process() override;
OpenViBE::boolean process_streamedMatrix(void);
OpenViBE::boolean process_stimulation(void);
OpenViBE::boolean processStreamedMatrix();
OpenViBE::boolean processStimulation();
_IsDerivedFromClass_Final_(OpenViBEToolkit::TBoxAlgorithm < OpenViBE::Plugins::IBoxAlgorithm >, OVP_ClassId_BoxAlgorithm_CSVFileWriter);
......@@ -41,19 +38,18 @@ namespace OpenViBEPlugins
OpenViBE::CString m_sSeparator;
OpenViBE::CIdentifier m_oTypeIdentifier;
OpenViBE::boolean m_bFirstBuffer;
OpenViBE::boolean (OpenViBEPlugins::FileIO::CBoxAlgorithmCSVFileWriter::*m_fpRealProcess)(void);
OpenViBE::boolean m_bFirstBuffer{};
OpenViBE::boolean (CBoxAlgorithmCSVFileWriter::*m_fpRealProcess)();
OpenViBEToolkit::TDecoder < CBoxAlgorithmCSVFileWriter >* m_pStreamDecoder;
OpenViBEToolkit::TDecoder<CBoxAlgorithmCSVFileWriter>* m_pStreamDecoder;
OpenViBE::CMatrix m_oMatrix; // This represents the properties of the input, no data
OpenViBE::uint64 m_ui64SampleCount;
OpenViBE::boolean m_bHeaderReceived;
uint64_t m_ui64SampleCount{};
OpenViBE::boolean m_bHeaderReceived{};
};
class CBoxAlgorithmCSVFileWriterListener : public OpenViBEToolkit::TBoxListener < OpenViBE::Plugins::IBoxListener >
class CBoxAlgorithmCSVFileWriterListener : public OpenViBEToolkit::TBoxListener<OpenViBE::Plugins::IBoxListener>
{
public:
......@@ -64,30 +60,32 @@ namespace OpenViBEPlugins
{
public:
virtual void release(void) { }
virtual OpenViBE::CString getName(void) const { return OpenViBE::CString("CSV File Writer (Deprecated)"); }
virtual OpenViBE::CString getAuthorName(void) const { return OpenViBE::CString("Yann Renard"); }
virtual OpenViBE::CString getAuthorCompanyName(void) const { return OpenViBE::CString("INRIA"); }
virtual OpenViBE::CString getShortDescription(void) const { return OpenViBE::CString("Writes signal in a CSV (text based) file"); }
virtual OpenViBE::CString getDetailedDescription(void) const { return OpenViBE::CString(""); }
virtual OpenViBE::CString getCategory(void) const { return OpenViBE::CString("File reading and writing/CSV"); }
virtual OpenViBE::CString getVersion(void) const { return OpenViBE::CString("1.0"); }
virtual OpenViBE::CIdentifier getCreatedClass(void) const { return OVP_ClassId_BoxAlgorithm_CSVFileWriter; }
virtual OpenViBE::Plugins::IPluginObject* create(void) { return new OpenViBEPlugins::FileIO::CBoxAlgorithmCSVFileWriter; }
virtual OpenViBE::Plugins::IBoxListener* createBoxListener(void) const { return new CBoxAlgorithmCSVFileWriterListener; }
virtual void releaseBoxListener(OpenViBE::Plugins::IBoxListener* pBoxListener) const { delete pBoxListener; }
virtual OpenViBE::boolean getBoxPrototype(
OpenViBE::Kernel::IBoxProto& rBoxAlgorithmPrototype) const
void release() override { }
OpenViBE::CString getName() const override { return OpenViBE::CString("CSV File Writer (Deprecated)"); }
OpenViBE::CString getAuthorName() const override { return OpenViBE::CString("Yann Renard"); }
OpenViBE::CString getAuthorCompanyName() const override { return OpenViBE::CString("INRIA"); }
OpenViBE::CString getShortDescription() const override { return OpenViBE::CString("Writes signal in a CSV (text based) file"); }
OpenViBE::CString getDetailedDescription() const override { return OpenViBE::CString(""); }
OpenViBE::CString getCategory() const override { return OpenViBE::CString("File reading and writing/CSV"); }
OpenViBE::CString getVersion() const override { return OpenViBE::CString("1.0"); }
OpenViBE::CString getSoftwareComponent() const override { return OpenViBE::CString("openvibe-sdk"); }
OpenViBE::CString getAddedSoftwareVersion() const override { return OpenViBE::CString("0.0.0"); }
OpenViBE::CString getUpdatedSoftwareVersion() const override { return OpenViBE::CString("0.0.0"); }
OpenViBE::CIdentifier getCreatedClass() const override { return OVP_ClassId_BoxAlgorithm_CSVFileWriter; }
OpenViBE::Plugins::IPluginObject* create() override { return new CBoxAlgorithmCSVFileWriter; }
OpenViBE::Plugins::IBoxListener* createBoxListener() const override { return new CBoxAlgorithmCSVFileWriterListener; }
void releaseBoxListener(OpenViBE::Plugins::IBoxListener* pBoxListener) const override { delete pBoxListener; }
OpenViBE::boolean getBoxPrototype(
OpenViBE::Kernel::IBoxProto& rBoxAlgorithmPrototype) const override
{
rBoxAlgorithmPrototype.addInput ("Input stream", OV_TypeId_Signal);
rBoxAlgorithmPrototype.addSetting("Filename", OV_TypeId_Filename, "record-[$core{date}-$core{time}].csv");
rBoxAlgorithmPrototype.addInput("Input stream", OV_TypeId_Signal);
rBoxAlgorithmPrototype.addSetting("Filename", OV_TypeId_Filename, "record-[$core{date}-$core{time}].csv");
rBoxAlgorithmPrototype.addSetting("Column separator", OV_TypeId_String, ";");
rBoxAlgorithmPrototype.addSetting("Precision", OV_TypeId_Integer, "10");
rBoxAlgorithmPrototype.addSetting("Precision", OV_TypeId_Integer, "10");
rBoxAlgorithmPrototype.addFlag(OpenViBE::Kernel::BoxFlag_CanModifyInput);
rBoxAlgorithmPrototype.addFlag(OpenViBE::Kernel::BoxFlag_IsDeprecated);
rBoxAlgorithmPrototype.addInputSupport(OV_TypeId_Signal);
rBoxAlgorithmPrototype.addInputSupport(OV_TypeId_StreamedMatrix);
......@@ -100,7 +98,5 @@ namespace OpenViBEPlugins
_IsDerivedFromClass_Final_(OpenViBE::Plugins::IBoxAlgorithmDesc, OVP_ClassId_BoxAlgorithm_CSVFileWriterDesc);
};
};
};
#endif // __OpenViBEPlugins_BoxAlgorithm_CSVFileWriter_H__
} // namespace FileIO
} // namespace OpenViBEPlugins
......@@ -57,8 +57,6 @@ SET(SCENARIO_TO_TEST "${TEST_NAME}-test.xml")
ADD_TEST(clean_${TEST_NAME} "${CMAKE_COMMAND}" "-E" "remove" "-f" "output_signal.csv" "output_streamedmatrix.csv" "output_stimulation.csv" "output_spectrum.csv" "output_features.csv")
ADD_TEST(run_${TEST_NAME} "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS_FLAGS} "--no-session-management" "--invisible" "--play-fast" ${SCENARIO_TO_TEST})
ADD_TEST(compare_${TEST_NAME}_signal "$ENV{OV_BINARY_PATH}/test_thresholdDataComparison.${EXT}" ${OS_FLAGS} "input_signal.csv" "output_signal.csv" 0.0001)
ADD_TEST(compare_${TEST_NAME}_signal_badtimes "$ENV{OV_BINARY_PATH}/test_thresholdDataComparison.${EXT}" ${OS_FLAGS} "input_signal.csv" "output_signal_badtimes.csv" 0.0001)
ADD_TEST(compare_${TEST_NAME}_signal_nofiletime "$ENV{OV_BINARY_PATH}/test_thresholdDataComparison.${EXT}" ${OS_FLAGS} "input_signal.csv" "output_signal_nofiletime.csv" 0.0001)
ADD_TEST(compare_${TEST_NAME}_matrix "$ENV{OV_BINARY_PATH}/test_thresholdDataComparison.${EXT}" ${OS_FLAGS} "input_streamedmatrix.csv" "output_streamedmatrix.csv" 0.0001)
ADD_TEST(compare_${TEST_NAME}_stimulation "$ENV{OV_BINARY_PATH}/test_thresholdDataComparison.${EXT}" ${OS_FLAGS} "input_stimulation.csv" "output_stimulation.csv" 0.0001)
ADD_TEST(compare_${TEST_NAME}_spectrum "$ENV{OV_BINARY_PATH}/test_thresholdDataComparison.${EXT}" ${OS_FLAGS} "input_spectrum.csv" "output_spectrum.csv" 0.0001)
......@@ -66,8 +64,6 @@ ADD_TEST(compare_${TEST_NAME}_features "$ENV{OV_BINARY_PATH}/test_thre
SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
SET_TESTS_PROPERTIES(compare_${TEST_NAME}_signal PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
SET_TESTS_PROPERTIES(compare_${TEST_NAME}_signal_badtimes PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
SET_TESTS_PROPERTIES(compare_${TEST_NAME}_signal_nofiletime PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
SET_TESTS_PROPERTIES(compare_${TEST_NAME}_matrix PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
SET_TESTS_PROPERTIES(compare_${TEST_NAME}_stimulation PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
SET_TESTS_PROPERTIES(compare_${TEST_NAME}_spectrum PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
......@@ -75,8 +71,6 @@ SET_TESTS_PROPERTIES(compare_${TEST_NAME}_features PROPERTIES ATTACH
SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES DEPENDS clean_${TEST_NAME})
SET_TESTS_PROPERTIES(compare_${TEST_NAME}_signal PROPERTIES DEPENDS run_${TEST_NAME})
SET_TESTS_PROPERTIES(compare_${TEST_NAME}_signal_badtimes PROPERTIES DEPENDS run_${TEST_NAME})
SET_TESTS_PROPERTIES(compare_${TEST_NAME}_signal_nofiletime PROPERTIES DEPENDS run_${TEST_NAME})
SET_TESTS_PROPERTIES(compare_${TEST_NAME}_matrix PROPERTIES DEPENDS run_${TEST_NAME})
SET_TESTS_PROPERTIES(compare_${TEST_NAME}_stimulation PROPERTIES DEPENDS run_${TEST_NAME})
SET_TESTS_PROPERTIES(compare_${TEST_NAME}_spectrum PROPERTIES DEPENDS run_${TEST_NAME})
......@@ -99,12 +93,10 @@ ADD_TEST(run_${TEST_NAME}-2 "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS
ADD_TEST(run_${TEST_NAME}-3 "$ENV{OV_BINARY_PATH}/openvibe-designer.${EXT}" ${OS_FLAGS} "--no-session-management" "--invisible" "--play-fast" "test-gdf-readwrite-3.xml")
ADD_TEST(compare_${TEST_NAME}-signal "$ENV{OV_BINARY_PATH}/test_thresholdDataComparison.${EXT}" ${OS_FLAGS} "output_gdf_signal_1.csv" "output_gdf_signal_2.csv" 0.001)
ADD_TEST(compare_${TEST_NAME}-stim "$ENV{OV_BINARY_PATH}/test_thresholdDataComparison.${EXT}" ${OS_FLAGS} "output_gdf_stim_1.csv" "output_gdf_stim_2.csv" 0.0001)
SET_TESTS_PROPERTIES(run_${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL ${OV_LOGFILE})
SET_TESTS_PROPERTIES(compare_${TEST_NAME}-signal PROPERTIES ATTACHED_FILES_ON_FAIL "output_gdf_signal_1.csv" "output_gdf_signal_2.csv")
SET_TESTS_PROPERTIES(compare_${TEST_NAME}-stim PROPERTIES ATTACHED_FILES_ON_FAIL "output_gdf_stim_1.csv" "output_gdf_stim_2.csv")
SET_TESTS_PROPERTIES(run_${TEST_NAME}-1 PROPERTIES DEPENDS clean_${TEST_NAME})
SET_TESTS_PROPERTIES(run_${TEST_NAME}-2 PROPERTIES DEPENDS run_${TEST_NAME}-1)
......
Time (s);Identifier;Duration
0.0000000000e+000;1009;0.0000000000e+000
2.9296875000e-003;9000;0.0000000000e+000
2.9296875000e-003;785;0.0000000000e+000
9.7656250000e-003;9001;0.0000000000e+000
9.7656250000e-003;785;0.0000000000e+000
1.3671875000e-002;768;0.0000000000e+000
1.3671875000e-002;786;0.0000000000e+000
1.8554687500e-002;785;0.0000000000e+000
2.3437500000e-002;770;0.0000000000e+000
3.9062500000e-002;33284;0.0000000000e+000
Time:10Hz,Epoch,C1,C2,C3,C4,Event Id,Event Date,Event Duration
0.0,0,0.0,0.0,0.0,0.0,33024,0.0000000000,0.0000000000
0.1,0,0.0,0.0,0.0,0.0,1009,0.0999999999,0.0000000000
0.2,0,0.0,0.0,0.0,0.0,9000,0.2000000000,0.0000000000
0.3,0,0.0,0.0,0.0,0.0,785,0.2999999998,0.0000000000
0.4,0,0.0,0.0,0.0,0.0,9001,0.3999999999,0.0000000000
0.5,0,0.0,0.0,0.0,0.0,785,0.5000000000,0.0000000000
0.6,0,0.0,0.0,0.0,0.0,768,0.5999999999,0.0000000000
0.7,0,0.0,0.0,0.0,0.0,786,0.7000000000,0.0000000000
0.8,0,0.0,0.0,0.0,0.0,785,0.7999999998,0.0000000000
0.9,0,0.0,0.0,0.0,0.0,770,0.8999999999,0.0000000000
1.0,0,0.0,0.0,0.0,0.0,33284,1.0000000000,0.0000000000
Time (s);Channel 0;Sampling Rate
0.000000;0.000000;32
0.031250;1.368734;
0.062500;0.083451;
0.093750;1.396507;
0.125000;2.346035;
0.156250;0.665258;
0.187500;1.634277;
0.218750;2.037404;
0.250000;0.022367;
0.281250;0.858778;
0.312500;1.060520;
0.343750;-0.852792;
0.375000;0.286299;
0.406250;0.674572;
0.437500;-0.846042;
0.468750;0.720929;
0.500000;1.256436;
0.531250;-0.063101;
0.562500;1.591261;
0.593750;1.856456;
0.625000;0.310024;
0.656250;1.653154;
0.687500;1.361267;
0.718750;-0.540488;
0.750000;0.518955;
0.781250;-0.124499;
0.812500;-2.025000;
0.843750;-0.813536;
0.875000;-1.330267;
0.906250;-2.777442;
0.937500;-1.073187;
0.968750;-1.256059;
Time:32Hz,Epoch,sinusOsc 1,Event Id,Event Date,Event Duration
0.0000000000,0,0.0000000000,,,
0.0312500000,1,1.3687341120,,,
0.0625000000,2,0.0834505686,,,
0.0937500000,3,1.3965074831,,,
0.1250000000,4,2.3460347303,,,
0.1562500000,5,0.6652579106,,,
0.1875000000,6,1.6342771847,,,
0.2187500000,7,2.0374036140,,,
0.2500000000,8,0.0223674799,,,
0.2812500000,9,0.8587778323,,,
0.3125000000,10,1.0605198516,,,
0.3437500000,11,-0.8527917255,,,
0.3750000000,12,0.2862985568,,,
0.4062500000,13,0.6745718556,,,
0.4375000000,14,-0.8460419110,,,
0.4687500000,15,0.7209285523,,,
0.5000000000,16,1.2564364343,,,
0.5312500000,17,-0.0631007468,,,
0.5625000000,18,1.5912609145,,,
0.5937500000,19,1.8564555014,,,
0.6250000000,20,0.3100244990,,,
0.6562500000,21,1.6531536145,,,
0.6875000000,22,1.3612667999,,,
0.7187500000,23,-0.5404879020,,,
0.7500000000,24,0.5189549878,,,
0.7812500000,25,-0.1244988728,,,
0.8125000000,26,-2.0249997390,,,
0.8437500000,27,-0.8135359478,,,
0.8750000000,28,-1.3302670931,,,
0.9062500000,29,-2.7774418870,,,
0.9375000000,30,-1.0731867792,,,
0.9687500000,31,-1.2560591950,,,
1.0000000000,32,-2.2082337379,,,
This diff is collapsed.