Up | Draw | Overlay | Tool | Toollist | Timer | SPB | Camera | CameraImage | Bitmap | Historylist - ImageBuffer | Clipboard | ScorpionGeometry | Statistics | Curve | States | Logging | Panels | Shared Memory | BarCode Reader | StdCtrls

Release Notes
 

  

 
Statistics

Use the GetStatistics() to get the access to the Scorpion statistics

The Stateistics object:

Method Returns Description
getStatistics(name) (int,int,int) Returns a tuple of (current,previous,total) for named item. The name is the non-localized name of states and 'UnknownItem' or 'Sum'
zero() bool Transfers current statistics to previous period and resets current current period
reset() bool Resets all statistics

Example 1, list all statistics

def TestStatistics():
  states=GetStateList()
  stat=GetStatistics()
  for i in range(states.count):
    print states.get(i).name,stat.getStatistics(states.get(i).name)
  print 'UnknownItem',stat.getStatistics('UnknownItem')
  print 'Sum',stat.getStatistics('Sum')

output :

Pass (0, 1435, 1435)
Fail (0, 0, 0)
Error (0, 0, 0)
UnknownItem (0, 0, 0)
Sum (0, 1435, 1435)

 

 

Scorpion Vision Version XII : Build 665 - Date: 20170919
Scorpion Vision Software® is a registered trademark of Tordivel AS.
Copyright © 2000 - 2017 Tordivel AS.