GQ Electronics Technical Support Forum Active Users: / Visits Today:
Highest Active Users:
GQ Electronics Technical Support Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 GQ Electronics Forums
 2.GQ Geiger Muller Counter
 Specification for model and revision naming
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

wikilicious

USA
22 Posts

Posted - 08/10/2024 :  13:17:12  Show Profile  Reply with Quote
Hi,
I want to extract model name and revision from the '<GETVER>>' command.

I have a few examples from users of pygmc:

<GETVER>>='GMC-800Re1.08'    -->  model='GMC-800'    re=1.08
<GETVER>>='GMC-600+Re 2.52'  -->  model='GMC-600+'   re=2.52
<GETVER>>='GMC-500+Re 2.22'  -->  model='GMC-500+'   re=2.22
<GETVER>>='GMC-320Re 4.26'   -->  model='GMC-320'    re=4.26
<GETVER>>='GMC-300SRe 1.14'  -->  model='GMC-300S'   re=1.14
<GETVER>>='GMC-SE Re 1.05'   -->  model='GMC-SE'     re=1.05

The Python regex I plan to use is
"([^ ]*) ?Re ?([0-9.]*)"


I have a few questions:
- Is there a naming/formatting specification?
- Is there or do you foresee a model with a space " " in its name?
- Does the revision always start with exactly "Re"?
- Is the revision always in the format "X.YY" where X & Y are always integers?


The intent is to auto-map a user's device to the correct config parser (since config structure can change with revision) in https://github.com/Wikilicious/pygmc
Reply #1

EmfDev

2234 Posts

Posted - 08/12/2024 :  09:57:55  Show Profile  Reply with Quote
model is everything before Re. and revision is everything after model including Re. Sometimes there are letters after ReX.YY like Re2.53G.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
GQ Electronics Technical Support Forum © Copyright since 2011 Go To Top Of Page
Generated in 0.08 sec. Snitz's Forums 2000