03-12-2021 02:34 AM
Well, a brief summary of what I need to do.
I need to generate a range of addresses (comprised of eight bytes) and I made a RegEx to verify if it's a valid address.
Is there anyway, thru LabVIEW, I can generate a random string from the said RegEx?
Solved! Go to Solution.
03-12-2021 02:39 AM - edited 03-12-2021 02:40 AM
Hi kagaoanjc,
@kagaoanjc wrote:
I need to generate a range of addresses (comprised of eight bytes) and I made a RegEx to verify if it's a valid address.
Is there anyway, thru LabVIEW, I can generate a random string from the said RegEx?
From what I know a RegEx is used to parse an already existing string, but not to create a new string.
To create a random string of 8 chars/bytes you just need a few nodes:
Mind to explain your specific rules?
03-12-2021 03:06 AM
Well yeah, just wondering if there's a way, else I'd be using some libraries on the web and execute it on Python
The address is formatted the same way that of a MAC address (separated by colons)
first three bytes are already defined, then we were tasked to generate approx 1M addresses where X are the values we can change or play around with.
CC:CC:CC:00:00:2X:XX:XX
03-12-2021 03:30 AM
03-12-2021 04:00 AM - edited 03-12-2021 04:01 AM
Hi kaga,
@kagaoanjc wrote:
first three bytes are already defined, then we were tasked to generate approx 1M addresses where X are the values we can change or play around with.
CC:CC:CC:00:00:2X:XX:XX
Your "approx 1M addresses" probably means exactly 2^20 possible values:
You just need to add some string formatting…
03-12-2021 04:24 AM
Yeah roughly 1M devices will be produced
To make the story clearer, these "addresses" are the DevEUI of LoRA devices we're gonna produce, was overthinking on how to generate such that it satisfies their requirements and the format.
now that VI opened my mind that some solutions can be that simple. Thanks! Had initially thought of generating one at a time while the software checks if the unit is a fresh one or not (if not, it's gonna reuse the same DevEUI during flashing)
I now face the challenge of ensuring that each of these DevEUIs must be used once and if the DUT must be retested, my software must not get a DevEUI from the generated pool, but that's another story, I have a test database to tinker around with