rbtest: timed small messages, one 50 kB message, and MT checks
`rbtest` in the shell sample sends test messages with a 16-byte header and a counting ramp, so every byte can be checked at the other end. `rbtest small` sends a few 32-byte messages and logs how long each took, `rbtest large` sends one of up to 50000 bytes and only with `confirm`, and `rbtest mt` shows the last MT and checks it. `rb9704 pattern make` and `check` in python/ make and check the same messages. rb9704_send_fill writes a message straight into the module's buffer, so a large generated one is not held twice. overlay-large.conf raises the limit to 50000 bytes; on the M5Stamp-C3 that links on the USB console and not beside WiFi, which overflows by 11 kB. Run against the fake modem on native_sim only; not yet on a real modem.
This commit is contained in:
1 parent
9f68104ac6
commit
144efe683e
15 files changed
+798
-6
No files matched your search
@@ -145,6 +145,16 @@ int rb9704_end(k_timeout_t timeout);
|
||||
*/
|
||||
int rb9704_send(uint16_t topic, const void *data, size_t len, k_timeout_t timeout);
|
||||
|
||||
/* Writes len bytes of a message into buf. */
|
||||
typedef void (*rb9704_fill_t)(uint8_t *buf, size_t len, void *user);
|
||||
|
||||
/* As rb9704_send, with the message written straight into this module's
|
||||
* buffer by fill, on the caller's thread, once the request slot is taken.
|
||||
* A generated message near CONFIG_RB9704_MESSAGE_MAX then needs no buffer
|
||||
* of the caller's as well: the library already keeps two of that size. */
|
||||
int rb9704_send_fill(uint16_t topic, size_t len, rb9704_fill_t fill, void *user,
|
||||
k_timeout_t timeout);
|
||||
|
||||
/* Ask the modem to abandon the message in flight. Returns 0 once the
|
||||
* request is on the wire; the outcome, -ECANCELED when the modem agrees,
|
||||
* comes through mo_done, and until then the message counts as in flight.
|
||||
|
||||
Reference in new issue
Block a user