Bruce A. Johnson Chantilly, Virginia OpenPGP key ID: 296D1CD6F2B84CAB https://keys.openpgp.org/
On 14/12/2021 11:46, Bruce A. Johnson wrote:
I'm trying to obtain modem status information using the Python API, and I'm confused about the return values for the get_current_bands() method in the SimpleStatus object. My reading of the document leads me to expect a tuple containing an array and a count of the items in it, but I'm seeing a tuple containing a single enum value and a count greater than 1.Code:band_list, count= status_obj.get_current_bands() logger.debug('band_list: {!r}, count: {!r}'.format(band_list, count))Output:mmg[937]: MMGCmd status[425] band_list: <enum 469902384 of type ModemManager.ModemBand>, count: 21My C skills aren't that great, but it looks to me like mm_simple_status_get_current_bands is returning the Right Stuff. I'm building ModemManager 1.18.4 in OpenEmbedded off of the Yocto dunfell branch. Does anyone have suggestions of what else I need to look at?-- Bruce A. Johnson Chantilly, Virginia OpenPGP key ID: 296D1CD6F2B84CABhttps://keys.openpgp.org/Reference <https://lazka.github.io/pgi-docs/index.html#ModemManager-1.0/classes/SimpleStatus.html#ModemManager.SimpleStatus.get_current_bands>|get_current_bands|() Returns: bands: location for an array of |ModemManager.ModemBand| <https://lazka.github.io/pgi-docs/ModemManager-1.0/enums.html#ModemManager.ModemBand> values. Do not free the returned value, it is owned by self. n_bands: number of elements in bands. Return type: (*bands*: |ModemManager.ModemBand| <https://lazka.github.io/pgi-docs/ModemManager-1.0/enums.html#ModemManager.ModemBand>, *n_bands*: |int| <http://docs.python.org/3/library/functions.html#int>) Gets the currently used frequency bands.
OpenPGP_signature
Description: OpenPGP digital signature