Main AppΒΆ
This is the main application running on LuckyLoop.
During boot, it creates an interface to the hardware (as defined in hw_config) with iobuffer. It creates an LSL oulet with publish, based on the EEG channels defined via iobuffer in hw_config.
Subsequently, it initializes the hardware, e.g. the Analog-Digital Converter (ADC) or stimulators, depending on availability.
It fills a ringbuffer, and once this buffer is full, it is reading state flags from the LuckyServer using the shared memory interface from libsri.so.
Preparations: In order to use the Server - Real-Time Interface (SRI) the library has to be linked (done in the makefile) To enable the loading of the library during runtime it needs to be added to /usr/lib/ or the following command needs to be executed $ LD_LIBRARY_PATH=/full/path/to/library/directory:${LD_LIBRARY_PATH} $ export LD_LIBRARY_PATH any change in the SRI needs a recopying to /usr/lib!
Defines
-
CYCLE_TIME
the cycle time in microseconds defines the frequency of the loop
-
ADAPTER_NAME
for which adapter to print the IP address
-
sleep_one_cycle
()
-
buffer_failure
()
-
servername
-
SYSTEM_INIT
-
SYSTEM_FILL_BUFFER
-
SYSTEM_RUN