swc_stats.h

SPARK Wireless Core statistics.

Copyright

Copyright (C) 2026 SPARK Microsystems International Inc. All rights reserved.

License

This source code is proprietary and subject to the SPARK Microsystems Software EULA found in this package in file EULA.txt.

Author

SPARK FW Team.

Functions

swc_statistics_t *swc_connection_update_stats(swc_connection_t *const conn, swc_error_t *err)

Update connection statistics.

Note

After calling this function, the statistics inside the connection handle will be updated. The function also returns a reference to these internal statistics so they can be used by the caller.

Parameters:
  • conn[in] Connection handle.

  • err[out] Wireless Core error code.

Returns:

Reference to the statistics.

int swc_connection_format_stats(const swc_connection_t *const conn, char *const buffer, uint16_t size, swc_error_t *err)

Format the connection statistics as a string of characters.

Parameters:
  • conn[in] Connection handle.

  • buffer[out] Buffer where to put the formatted string.

  • size[in] Size of the buffer.

  • err[out] Wireless Core error code.

Returns:

The formated string length, excluding the NULL terminator.

void swc_connection_reset_stats(swc_connection_t *const conn, swc_error_t *err)

Reset all the connection statistics.

Parameters:
  • conn[in] Connection handle.

  • err[out] Wireless Core error code.