Skip to content

Commit 4192264

Browse files
authored
Ephys socket update - Add HTTP documentation (#40)
* Add HTTP documentation * Remove caching of dependencies
1 parent 0bd4655 commit 4192264

File tree

2 files changed

+18
-8
lines changed

2 files changed

+18
-8
lines changed

.github/workflows/sphinx-build.yml

-7
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,7 @@ jobs:
2525
run: |
2626
python -m pip install --upgrade pipenv wheel
2727
28-
- id: cache-pipenv
29-
uses: actions/cache@v1
30-
with:
31-
path: ~/.local/share/virtualenvs
32-
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
33-
3428
- name: Install dependencies
35-
if: steps.cache-pipenv.outputs.cache-hit != 'true'
3629
run: |
3730
pipenv install --deploy --dev
3831

source/User-Manual/Plugins/Ephys-Socket.rst

+18-1
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,28 @@ An example Python script is included in the `Resources <https://github.com/open-
110110
"**Variable**", "**Data Type**", "**Description**"
111111
"Offset", "`int32`", "Integer defining the offset in the data stream. For TCP sockets, value must always be set to **0**."
112112
"Number of Bytes", "`int32`", "Total number of bytes sent in each packet. Calculated as :code:`num_bytes = num_channels * num_samples * element_size`. This does **not** include the header bytes."
113-
"Bit Depth", "int16", "Depth defines the OpenCV.Mat `Depth <https://github.com/horizongir/opencv.net/blob/main/src/OpenCV.Net/CoreTypes.cs#L93>`__, an enumeration defined as :code:`[U8, S8, U16, S16, S32, F32, F64]`, where U is 'unsigned', S is 'signed', F is 'float', and the number indicates the number of bits. For example, :code:`U16` means 'unsigned integer with 16 bits'. Note that the enumeration is zero-indexed, where :code:`U8 = 0`, and :code:`F64 = 6`"
113+
"Bit Depth", "`int16`", "Depth defines the OpenCV.Mat `Depth <https://github.com/horizongir/opencv.net/blob/main/src/OpenCV.Net/CoreTypes.cs#L93>`__, an enumeration defined as :code:`[U8, S8, U16, S16, S32, F32, F64]`, where U is 'unsigned', S is 'signed', F is 'float', and the number indicates the number of bits. For example, :code:`U16` means 'unsigned integer with 16 bits'. Note that the enumeration is zero-indexed, where :code:`U8 = 0`, and :code:`F64 = 6`"
114114
"Element Size", "`int32`", "Number of bytes needed for each sample. For :code:`U16`, :code:`element_size = 2`, while for :code:`F64`, :code:`element_size = 8`."
115115
"Number of Channels", "`int32`", "Number of channels per packet."
116116
"Number of Samples", "`int32`", "Number of samples sent per channel per packet."
117117

118118
.. note::
119119

120120
Pay attention to the order of data samples in the example script. Samples are not interleaved, but rather in each packet the samples for channel 1 are sent, followed by the samples for channel 2, and so on.
121+
122+
Remote Control
123+
#################
124+
125+
Some Ephys Socket settings can be modified via the GUI's built-in HTTP server. Commands are sent as "config messages" to the Ephys Socket node.
126+
127+
.. note::
128+
129+
Parameters cannot be modified while acquisition is running, nor can they be modified if the port is connected. To change any settings remotely, the port must be disconnected in the GUI
130+
131+
The following commands are available:
132+
133+
1. :code:`ES INFO` : returns a JSON string containing information about all available variables (i.e., scale, offset, port, and frequency)
134+
2. :code:`ES SCALE <data_scale>` : set the data scale
135+
3. :code:`ES OFFSET <data_offset>` : set the data offset
136+
4. :code:`ES PORT <port>` : set the port number
137+
5. :code:`ES FREQUENCY <sample_rate>` : set the sampling frequency

0 commit comments

Comments
 (0)