@@ -93,13 +93,24 @@ Processes the controller impl block. Distinguishes between:
9393* Creates ` <StructName><MethodName> ` stream type and ` <StructName><MethodName>Args ` struct.
9494* Signal methods are NOT exposed in the client API (controller emits them directly).
9595
96+ ** Poll methods** (marked with ` #[controller(poll_*)] ` ):
97+ * Methods are called periodically at the specified interval.
98+ * Three time unit attributes are supported:
99+ * ` #[controller(poll_seconds = N)] ` - Poll every N seconds.
100+ * ` #[controller(poll_millis = N)] ` - Poll every N milliseconds.
101+ * ` #[controller(poll_micros = N)] ` - Poll every N microseconds.
102+ * Methods with the same timeout value (same unit and value) are grouped into a single ticker arm.
103+ * All methods in a group are called sequentially when the ticker fires (in declaration order).
104+ * Poll methods are NOT exposed in the client API (internal to the controller).
105+ * Uses ` embassy_time::Ticker::every() ` for timing.
106+
96107** Getter/setter methods** (from struct field attributes):
97108* Receives getter/setter field info from struct processing.
98109* Generates client-side getter methods that request current field value.
99110* Generates client-side setter methods that update field value (and broadcast if published).
100111
101112The generated ` run() ` method contains a ` select_biased! ` loop that receives method calls from
102- clients and dispatches them to the user's implementations.
113+ clients, dispatches them to the user's implementations, and handles periodic poll method calls .
103114
104115### Utilities (` src/util.rs ` )
105116Case conversion functions (` pascal_to_snake_case ` , ` snake_to_pascal_case ` ) used for generating type and method names.
@@ -109,6 +120,7 @@ Case conversion functions (`pascal_to_snake_case`, `snake_to_pascal_case`) used
109120User code must have these dependencies (per README):
110121* ` futures ` with ` async-await ` feature.
111122* ` embassy-sync ` for channels and synchronization.
123+ * ` embassy-time ` for poll method timing (only required if using poll methods).
112124
113125Dev dependencies include ` embassy-executor ` and ` embassy-time ` for testing.
114126
0 commit comments