Closed npetersen2 closed 2 years ago
Closes #233
This PR adds the ability to easily find (i.e. register) many log variables using Regular Expressions (regex).
Consider a system with 6 current signals to log, current_1..6.
current_1..6
Instead of writing:
vars_to_log = 'current_1 current_2 current_3 current_4 current_5 current_6' logger.register(vars_to_log)
you can explore all your source code and automatically find all log variables that match a given regex:
vars_to_log = logger.auto_find_vars(root, regex='current_*')[0] logger.register(vars_to_log)
This can be very helpful as the number of log variables grows with complex control algorithms.
@elsevers this PR is ready for review. The capability will be added in v1.0.2 release.
v1.0.2
This needs to be tested
Closes #233
This PR adds the ability to easily find (i.e. register) many log variables using Regular Expressions (regex).
Example Usage:
Consider a system with 6 current signals to log,
current_1..6
.Instead of writing:
you can explore all your source code and automatically find all log variables that match a given regex:
This can be very helpful as the number of log variables grows with complex control algorithms.