aboutsummaryrefslogtreecommitdiff
path: root/examples/sms-send-python
diff options
context:
space:
mode:
authorDan Williams <dan@ioncontrol.co>2025-02-08 10:08:26 -0600
committerDan Williams <dan@ioncontrol.co>2025-05-23 18:46:53 -0500
commita769bbed6d0d9dcbc5bb6f0f66dcbdfb8fa1ab0c (patch)
tree289b86fd8dc62124ad162e60f3efea35524bdf65 /examples/sms-send-python
parentb24615d8018c7cd78a744db0372c09c07543b763 (diff)
port-serial: add serial port command scheduler
Add an interface and implementation for a port scheduler that round- robins between ports the scheduler is attached to, serializing command execution among one or more MMPortSerial instances. Theory of operation: Sources (e.g. MMPort subclasses) register themselves with the scheduler. Each source notifies the scheduler whenever its command queue depth changes, for example when new commands are submitted, when commands are completed, or when commands are canceled. The scheduler will round-robin between all sources with pending commands, sleeping when there are no pending commands from any source. For each source with a pending command the scheduler will emit the 'send-command' signal with that source's ID. The given source should send the next command in its queue to the modem. When that command is finished (either successfully or with an error/timeout) the source must call mm_port_scheduler_notify_command_done() to notify the scheduler that it may advance to the next source with a pending command, if any. If the 'send-command' signal and the notify_command_done() call are not balanced the scheduler may stall. Signed-off-by: Dan Williams <dan@ioncontrol.co>
Diffstat (limited to 'examples/sms-send-python')
0 files changed, 0 insertions, 0 deletions