forked from leiferlab/internal.mindcontrolAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
45 lines (31 loc) · 1.37 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Andrew Leifer
The MindControl API is a DLL and associated .h header file that allows other
software to read and write certain information from the MindControl software
side-by-side in real-time as the mindcontrol software runs.
For example, the following C code will display the current frame number from
a running MindControl process, provided that it can access the mc_api.dll file.
#include <stdio.h>
#include "mc_api_dll.h"
int main(){
SharedMemory_t sm= MC_API_StartClient();
int f= MC_API_GetCurrentFrame(sm);
printf("Current frame is %d\n.",f);
MC_API_StopClient(sm);
return 0;
}
The mc_api.dll file is generated by running make and is located in bin/.
The MindContol API rests on top of a more general memory sharing library called
InterProcess available at http://github.com/samuellab/InterProcess
Normally only the MindControl software would be a host. But for testing purposes
there is also a mock-up host process in samples/mc_host.c and a sample client
process in samples/mc_client.c
Under normal use, only the MindControl software should access:
MC_API_StartServer()
MC_API_StopServer()
MC_API_SetCurrentFrame()
MC_API_SetDLPOnOff()
The client can access all other functions.
A .zip file of precompiled binaries of the samples and DLL can be found in the
download sections, although you should check the commit number to make sure it is
up to date.