Skip to content

Make the return values of Client.transport_query() more Pythonic - #12

Merged
mgeier merged 3 commits into
masterfrom
issue-12
May 26, 2015
Merged

mgeier merged 3 commits into
masterfrom
issue-12

Conversation

@mgeier

@mgeier mgeier commented May 23, 2015

Copy link
Copy Markdown
Member

I want to rename transport_query() to transport_query_struct() to still have a low-overhead way to get the information, which might probably even be somewhat realtime safe.

Any suggestions for a better name?

Then I want to implement a new transport_query() method which calls the old transport_query_struct() and prepares the results to be nicer to handle:

  • Create a jack.TransportState class to wrap the "state" integer
    • return an instance of this class from transport_query()
    • change the module constants (e.g. jack.ROLLING) to instances of this class
  • Convert the fields from the jack_position_t struct into a Python dict that only contains the valid information

@mgeier mgeier added this to the 0.3.0 milestone May 20, 2015
@Vampouille

Copy link
Copy Markdown
Contributor

transport_query_struct() is a good name for me. It would be nice to have a dict with only valid fields.

mgeier added 3 commits May 23, 2015 18:15
... and add __slots__.
... create a new transport_query() and a TransportState class.

See #12.
@mgeier
mgeier merged commit 3020a0b into master May 26, 2015
@mgeier
mgeier deleted the issue-12 branch May 28, 2015 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants