You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allows the user to choose between different _opts_ by tapping buttons to scroll through them. Holding right will confirm, blink the choice, and return the index of the option chosen. Holding left or waiting longer than _timeout_ will cancel and return -1. If _passlong_ is _True_, and the user has been holding the button since _choose_opt_ was called, for a total of _LONG_TIME_ seconds, the method returns -1 so this state can be processed by the main loop. If _passlong_ is _False_ long button holds are ignored.
53
+
Allows the user to choose between different _opts_ by tapping buttons to scroll through them. Holding right will confirm, blink the choice, and return the index of the option chosen. Holding left or waiting longer than _timeout_ will cancel and return -1. If _passlong_ is _True_, and the user has been holding the button since _choose_opt_ was called, for a total of _LONG_TIME_ seconds, the method returns -1 so this state can be processed by the main loop. If _passlong_ is _False_ long button holds are ignored.
Lets the user choose a numeric value between _minval_ and _maxval_, with a starting value of _val_. Tapping buttons increases or decreases the value by _inc_, and holding buttons increments the value quickly. The value is displayed according to _format_. The value is returned when the user waits ~5s without pressing a button.
57
+
Lets the user choose a numeric value between _minval_ and _maxval_, with a starting value of _val_. Tapping buttons increases or decreases the value by _inc_, and holding buttons increments the value quickly. The value is displayed according to _format_. The value is returned when the user waits ~5s without pressing a button.
Allows a user to enter text strings charater by character. Tapping buttons changes the current character, and holding a button down moves the cursor. When the user moves the cursor to the end of the string they can also choose the accept and delete characters. Holding right on accept will return the text, and waiting ~5s cancels the text entry.
61
+
Allows a user to enter text strings charater by character. Tapping buttons changes the current character, and holding a button down moves the cursor. When the user moves the cursor to the end of the string they can also choose the accept and delete characters. Holding right on accept will return the text, and waiting ~5s cancels the text entry.
62
62
63
63
### Example
64
64
@@ -105,8 +105,7 @@ To use this for your own purposes, import `netlink` in the two scripts that you
105
105
106
106
Message objects are used by clients and servers to encode requests and replies into text streams that can be sent via sockets. You don't need to create them yourself - they are created internally when you call _Client.request()_ and _Server.reply()_.
107
107
108
-
Public Attributes:
109
-
108
+
#### Public Attributes:
110
109
-_type_: one of the integer constants defined at the top of _netlink.py_
111
110
-_body_: the text of the request or reply
112
111
-_id_: Each request has a unique ID - the server tags its responses with the request ID so that the client can match responses with requests
Starts a client and connects to IP address _server_ on _port_ with _passkey_.
133
+
Starts a client and connects to IP address _server_ on _port_ with _passkey_.
134
+
135
+
#### Methods:
133
136
134
137
**request**(_type, body='', blocking=1_)
135
138
136
-
Sends a request to the server, where message _type_ is one of the integer constants defined at the top of the file. If _blocking_ evaluates as **True**, waits until the server responds and returns the response as a _Message_ object.
139
+
Sends a request to the server, where message _type_ is one of the integer constants defined at the top of the file. If _blocking_ evaluates as **True**, waits until the server responds and returns the response as a _Message_ object.
137
140
138
141
**check**()
139
142
140
-
Checks to see if a reply to any non-blocking requests has arrived. If so, remove the request from the list and return a _Message_ object for the response.
143
+
Checks to see if a reply to any non-blocking requests has arrived. If so, remove the request from the list and return a _Message_ object for the response.
0 commit comments