Comments (9)
I guess the win32com method is not cross-platform so I would shy away from that. Is the second cross-platform? Do you have that in a repo somewhere that I can look at?
One of the advantages of breaking out the repositories is that we have a little more freedom to add things. I think we could add a subfolder to this repo containing these types of interfaces. Would you like to make a pull request?
from app-labrecorder.
What does win32com offer? If it just starts LabRecorderCLI and inputs data / reads output the subprocess is a much better option.
As for b) I'm still not entirely happy because Qt only allows one-way communication so there's no good way to get the results of an action back. Also, I don't know yet what everyone wants to do - setting an output file name, starting and stopping recordings is working right now but with Chad's BIDS support and other ideas that might be coming in I suspect the current design won't hold up for long.
from app-labrecorder.
Thanks for the feedback, and @tstenner's update about the limits of QT.
I fully appreciate that the remote control interfaces to LabRecorder are early beta, and likely to change. For testing purposes, and as i want to reduce point&click for my students as much as possible, i have written the code anyways. I'm fine in attempting to update the clients as development progresses. I guess i might have to get a compilation workflow set up though, or rely on you handing me over the binaries.
a) subprocess.Popen was actually my first approach. But i could not find a way to send keystroke events like {Enter} to close the process gracefully. (see also https://stackoverflow.com/questions/3531953/send-keyboard-event-using-subprocess). Terminating the subprocess lead to not saving the footer. So i used the win32com approach.
b) Regarding the TCP/IP client, it is pretty simple so far, and only implements starting and stopping and waiting for the confirmation from LabRecorder. How is the protocol to change the filename? Couldn't find it in https://github.com/labstreaminglayer/App-LabRecorder/blob/rcs/tcpinterface.cpp
For completeness: Here https://gist.github.com/agricolab/47d3126d9f150b6584d6ec8c7bc791e7 is the gist with both implementations. I tested them both using the python example streams (Fake EEG and Markers) and inspected the resulting xdf with XDFBrowser.
from app-labrecorder.
I guess i might have to get a compilation workflow set up though, or rely on you handing me over the binaries.
The CI should take care of that, building labrecorder takes about a minute.
a) subprocess.Popen was actually my first approach. But i could not find a way to send keystroke events like {Enter} to close the process gracefully.
That answer's highly misleading, see https://stackoverflow.com/a/32570656 for an example. At least on my PC, p = Popen(['./test'],stdout=PIPE, stdin=PIPE, stderr=PIPE); p.communicate(b'\n')
lets the process think enter was pressed.
Terminating the subprocess lead to not saving the footer.
Good catch, I've opened that in #8
How is the protocol to change the filename?
You're right, I thought I'd already implemented that but I think there should be better ways to do this (e.g. with templates with settable variables).
from app-labrecorder.
Oh boy, you're right: I did p.stdin.write('b\n')
but did not p.stdin.flush()
. Stupid. Cool beans, anyways, that means the CLI interface is platform independent now, too. Updated the gist accordingly.
from app-labrecorder.
Sorry for hijacking. I, too, will soon be interested in minimizing things-that-need-to-be-clicked. What is the latest/best version of Remote LabRecorder?
I noticed that tcpinterface.cpp is in master but empty. The one in the rcs
branch seems to be missing features that @agricolab is already using, so it exists somewhere, I guess.
from app-labrecorder.
I had started a prototype Qt Signals, but they are one-way only so it's practically impossible to get any feedback to commands and I haven't found a better solution yet. For a command line usage, the CLI recorder with the unintended remote control @agricolab found should be your best bet.
from app-labrecorder.
just for reference, my most recent version currently lives at https://github.com/pyreiz/pyliesl/blob/master/liesl/files/labrecorder/cli_wrapper.py
from app-labrecorder.
@Doug1983 put some work into making the GUI-version of RCS implementation more useful. That's now been merged into master (see #19). It's not perfect but it does the job for us and allows us to control LabRecorder from Unity.
As discussed previously, we currently have no way of knowing if the commands sent over RCS were successful. I think if someone wanted to do a Python wrapper for this then they might check names of running processes and check if the prescribed filename exists.
I suppose we should create some docs demonstrating how to use this from C#, Python, and Matlab. Wiki? README? Something else?
from app-labrecorder.
Related Issues (20)
- Timestamps of Kinect recording is different from other streams HOT 3
- How does LSL log time_stamps HOT 22
- Does not install on MacOS HOT 1
- The readme claims the Windows release includes all needed dependencies but the Visual Studio runtime is not included HOT 1
- LabRecorder quit unexpectedly - MacBook Pro 2022 (M2) HOT 4
- Code only run when "yes" in the eye tracking box
- LabRecorder crashed while closing the file; saved XDF cannot be read by load_xdf HOT 1
- can we prevent spacebar from stopping a recording? HOT 4
- Can't open Labrecorder on M1 Mac HOT 3
- Setting `PathTemplate` in the configurations file unsets other fields
- all streams selected using RCS HOT 2
- LSL Playback HOT 3
- LabRecorder from version 1.16.0 not working with Presentation LSL streams HOT 16
- MacOS .app fails to run due to bad RPATH HOT 7
- LabRecorder (LSL?) Record with different timestamps from different OS:es HOT 4
- Support for 22.04 LTS HOT 4
- Bug in which LabRecorder does not record data if the file name ends with a space HOT 4
- RequiredStreams fails for streams with whitespace
- Data conversion HOT 2
- Multiple streams with same name HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from app-labrecorder.