Showing posts with label Verifone. Show all posts
Showing posts with label Verifone. Show all posts

Friday, May 25, 2018

1,000 lines of Python


Did I ever think I'd intentionally write 1000 lines of python code?   Not really.   But I'm getting up there.

Python is pretty good for parsing through XML files and gathering the data.  From there, it can be used to compare that data to expected results.  Auditing.  

When I first thought of the idea of auditing Verifone Commander configurations, I never contemplated what it would take in time, code, and labor.   It's been a lot of all of.  But now I'm almost up to 1,000 lines of code to audit a Verifone Commander system.  

I wish Verifone would make their equipment scale better.  Enterprise level management would be awesome.  Then I wouldn't have to cobble tools together using Python, Powershell, and AutoIt.  

So how does all this work?   AutoIt is used to automatically backup every single site.   Once the backups are complete, the audit script will run over the files to examine what the settings are in comparison to what they should be.   


So at the point of originally writing this, the code was just barely reaching 1,000 lines.   It has since broken into numerous modules and is closer to 4,000 lines.  And I've still got about a dozen files to go.

Maybe I need to spend more time researching better Python coding.  Or a way to organize libraries better.  But going through 1 file that's more than a 1,000 lines of code is a pain.  So it's easier to break the things into separate modules. 


I guess the other part of this....  is it worth it spending probably 40 hours writing an estimated 6,000 lines of code to audit a system? 

Yes, yes it is.


Thursday, February 11, 2016

Wayne Hose Assignments in Base 39

So POP discount wouldn't work.  And POP discount is something the company wants working.  We were dealing with a Commander, running a base 39 application.   Verifone had told me I needed to set everything up for Wayne auto configuration.  My pumps are all 3+1. In layman's terms, that means I have two physical hoses on the pump.  One hose distributes 3 grades of fuel.  A 2nd hose distributes another grade of fuel.  In this case, the 3 represents Nolead, Plus, and Super.  The +1 represents Diesel.  Nolead and Super are pure grades, and Plus is a 60/40 blend.

Wayne says you should set up a 3+1 as Diesel, none, none, Super, Plus, Nolead.  Fuel assignments worked great, but POP discount didn't work

A short discussion on acronyms.  POP can either mean Point of Presence, or Point of Payment.  One refers to a gas pump.  The other refers to a pin pad.  At one point, I knew the story of who created two same lettered acryonyms in the Verifone world.

Anyways, the answer.  Or maybe not.

I asked a person who went to VASC school, taught by Verifone itself, back in December. Dude aced the test.  He had no idea what Wayne auto configuration was.

So, Verifone told me the hose assignment should be set up as Gilbarco normally set them up.  Gilbarco setups up their hose assignments on a 3+1 as Nolead, Plus, Super, none, none, Diesel.  Now, Verifone told me to use the "Gilbarco" method to assign hoses, but don't skip positions.  Great, so we just missed true Gilbarco setup.

So, the new hose assignment is Nolead, Plus, Super, Diesel.  I go check pumps.  And everything has hose assignments, but it's not right.

In the midst of the drive back to the town, I figure out the answer, and its back to SFC days.

SFC is the Smart Fuel Controller.  Imagine a box that is way too small fitting way too many wires and is a bit too complicated.

So...  Change the hose assignments to (and here's the real answer)....

Diesel, Super, Plus, Nolead, none, none, none, none

So...

That's it.