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

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an Image File
Check here to include your profile signature.
    

T O P I C    R E V I E W
wikilicious Posted - 08/10/2024 : 13:17:12
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
1   L A T E S T    R E P L I E S    (Newest First)
EmfDev Posted - 08/12/2024 : 09:57:55
model is everything before Re. and revision is everything after model including Re. Sometimes there are letters after ReX.YY like Re2.53G.

GQ Electronics Technical Support Forum © Copyright since 2011 Go To Top Of Page
Generated in 0.03 sec. Snitz's Forums 2000