Merged
Conversation
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
Signed-off-by: jaenrig-ifx <enriquezgarcia.external@infineon.com>
NikhitaR-IFX
approved these changes
Nov 24, 2025
| assert(dev_querier.query("address") == None) | ||
|
|
||
| print("---- deep query ---") | ||
| assert(dev_querier.query_deep("name") == "CY8CKIT-062S2-AI") |
Member
There was a problem hiding this comment.
What is query_deep providing differently? Maybe I could also run the test and see :)
Member
Author
There was a problem hiding this comment.
Normal query will search for valid type (str, int) attributes of the first level object (Device object). And "Deep" query will also consider the attributes of "attribute objects". So in this case, it will make queryable the attributes of DevSwitch and DevAccessSerial.
So, without "deep" -> you could only query "name, uid", with deeps, you can also query "access, serial_number" and "hub, port".
But that I did not make it CLI configurable. The CLI is set to deep_query.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By creating this pull request you agree to the terms in CONTRIBUTING.md.
https://github.com/Infineon/.github/blob/master/CONTRIBUTING.md
--- DO NOT DELETE ANYTHING ABOVE THIS LINE ---
CONTRIBUTING.md also tells you what to expect in the PR process.
In devs.py:
serial_numberattribute toDevAccessSerialclass. It will match theuidof theDeviceclass. But allows direct handling of serial ports.This for example will be useful when locally testing devices, and we don´t have or want to create a device yaml. We just have 2 devices connected, and these will be used for testing.
scan()function is added toDevAccessSerial. See how this is used indevs_query.main_devs_query_cli().devs_query.pyto enable simple command line queries of connected devices, either provided explicitly in a .yml file, or just by scanning the available serial devices. This is currently used by the micropythonmake deploy_multitarget, which can be both used locally (during development) and it is as well used in CI to flash in the same jobs, the same type of boards. See Replace get devs micropython#239run_test_plan.pynow handles devices rather than just serial ports. And keep the serial port and switchable capabilities abstracted until required for communication and switching the devices.uhubctl.pywill not raise any exception is not available. In that case a device won´t have switching capabilities. This should enable a transparent management of the devices of uhubctl, or in future, any underlying reset/power-switch or comparable hardware/software mechanism.The
devs**will eventually moved out of this repository, as this is independent of micropython. Therun_test_plan.pyusesdevs.py. Butdevs**.py anduhubctl.py` does not need to know anything about micropython ecosystem (and it should remain like this is to extend this utility to arduino or any future ecosystem).