Newbie question: accessing parameters

Forum for software developers to discuss BCI2000 software development
Post Reply
victor_uva
Posts: 9
Joined: 13 Jan 2014, 07:13

Newbie question: accessing parameters

Post by victor_uva » 11 Dec 2015, 06:58

Hi,

In my custom application, I write the SWLDA scores into a file when the P3Speller flashes finish. To do so, I modified "Association.cpp" and "Association.h" files. However, the output file was located in a rigid filepath (e.g., "../data/SWLDAscores.txt").

Now I want to store that file dinamically inside the P3Speller data directory and rename it as the data file name in each run. For instance, the folder might be "data/test001" and the file (for the first run) might be "data/test001/testS001R01.txt".

In order to do that, I thought that I could access to the environment parameters inside "Association.cpp" and stablish the output file name checking the DataDirectory, SubjectName, SubjectSession and SubjectRun parameters, but I do not know how to do it.

In "P3SpellerTask.cpp", for example, it is enough to check them doing something like this:

Code: Select all

string d_dir = Parameter("DataDirectory");
But I cannot do it inside "Association.cpp" class. I guessed that is because that class does not inherit from the Environment class, so I tried to follow "Your's code environment" section from here: http://www.bci2000.org/wiki/index.php/P ... ment_Class, without results.

I do not really understand what I should do. Can someone help me?

Thanks in advance,
Víctor.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest