Skip to content

pyndsi v1.0

Compare
Choose a tag to compare
@papr papr released this 12 Sep 09:55
· 140 commits to master since this release

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})