pylsl icon indicating copy to clipboard operation
pylsl copied to clipboard

Use Enum classes for the channel value formats and post processing flags

Open LiamOverett-AMRC opened this issue 6 months ago • 0 comments

Use Python's Enum class to group the channel value formats and post processing flags.

Doing this groups the two sets of variables into semantically meaningful classes and now the attributes within are commented in a way to show up in IntelliSense. By also grouping this way, the cf_ and proc_ prefixes can be removed to aid in readability.

image

Code changes:

  • Create Enum classes
  • Remove comments from original variables and place them under the "Compatibility Interface for old pylsl API" section
  • Update examples to use enum classes
  • Update examples to no longer use the aliased resolve_stream() function and instead replace with resolve_byprop() where appropriate

LiamOverett-AMRC avatar Aug 14 '24 11:08 LiamOverett-AMRC