Releases: pupil-labs/pyndsi
pyndsi v1.4
pyndsi v1.3
Bug Fixes
- Fix H264 to BGR conversion - #56
pyndsi v1.2
pyndsi v1.1
This release is based on #53
event sensor
- NDSI sensor type
event
- Supports data subscription
- Header:
timestamp
:int64
, little endian, nanoseconds since unix epochbody length
:uint32
, little endian, number of bytes in bodyencoding
:uint32
, little endian, integer value representing encoding used to encode body- Currently only
0
(utf-8
) is supported.
- Currently only
- Body:
body length
bytes representing a string encoded withencoding
Sending "events" to the host
Hosts with an event
sensor support receiving external events from clients. This is implemented via ZRE whispers whose content is a json encoded object with the following fields:
"name"
: required, value is the event's title/label/name as a json string"timestamp"
: optional, value is the external event's timestamp in nanoseconds since Unix epoch as a json number. If this field is not provided, the host will use the reception time as timestamp.
Valid events received by the host will be published to the event
sensor. As a result, clients can receive an echo of their own events if they subscribe to the event
sensor.
This can be used by the client to calculate the round trip time and time offset to the host. The client procedure looks like this:
1. Connect and subscribe to `event` sensor
2. Save current client timestamp `t0`
3. Send `{"name": "<<time>>"}` event to host
4. On receiving the echo, save the current client timestamp `t1`
5. The echo includes the host's reception time `t_host`
6. Round trip time: `t1 - t0`
7. Client-host time difference: `(t0 + t1) / 2 - t_host`
pyndsi v1.0
This release of pyndsi
introduces v4
of the Network Device Sensor Interface Protocol Specification. This version is used to communicate with the Pupil Invisible headset, and has a number of format changes incompatible with the previous version.
The release also includes support for multiple protocol versions within the same library. Users can choose which version of the NDSI protocol to use (v3
, v4
, or both) when creating the Network
instance.
import ndsi
# This is source-compatible with the previous version of the library.
# By default, it will only try to communicate with devices using the latest protocol version
# format (which in this release is `v4`).
network_default = ndsi.Network()
# To use a specific protocol version, the user can provide the `formats` argument with the
# desired format.
# This instance can be used to communicate with older devices.
network_v3 = ndsi.Network(formats={ndsi.DataFormat.V3})
# This instance can be used to communicate with Pupil Invisible headset.
network_v4 = ndsi.Network(formats={ndsi.DataFormat.V4})
# Since `formats` is a `set`, the user can specify multiple protocol versions, which will be
# handled transparently. In this way, the network instance will be able to communicate both
# with older devices, and with Pupil Invisible headsets at the same time.
multiversion_network = ndsi.Network(formats={ndsi.DataFormat.V3, ndsi.DataFormat.V4})
v0.5
v0.4
Windows 10
Download the .whl
file for Python36.
pip install --upgrade ndsi-0.4-cp36-cp36m-win_amd64.whl
v0.3.2
Windows 10
Download the .whl
file for Windows 10 x64 for Python35 of Python36.
pip install ndsi-0.3.2-cp35-cp35m-win_amd64.whl
or
pip install ndsi-0.3.2-cp36-cp36m-win_amd64.whl
v0.3.1
Windows 10
Download the .whl
file for Windows 10 x64 for Python3.5.
pip install ndsi-0.3.1-cp35-cp35m-win_amd64.whl
pyndsi release v0.2.16
Windows 10
Download the .whl
file for Windows 10 x64 for Python3.5.
pip install ndsi-0.2.16-cp35-cp35m-win_amd64.whl