Embedded Python Real-Time FrameWork : API  Build 20250616.1
 All Classes Namespaces Files Functions Variables Pages
pyRT.gatea.sys.Digest.Digester Class Reference

Simple thread-safe event digester, that conflates "bursty" events that you wish to be alerted to, such as cross-market conditions or latent market data. More...

Public Member Functions

def __init__
 Constructor. More...
 
def IsAllowed
 Determine we should digest (i.e., conflate) More...
 

Detailed Description

Simple thread-safe event digester, that conflates "bursty" events that you wish to be alerted to, such as cross-market conditions or latent market data.

A simple thread-safe design allows 1 event every configurable interval. Allows 1st one through, then conflates.

Member Description
_name Name event or alert
_tInterval Interval
_tAllowed Time of last allowed event
_NumAgg Num conflated
_mtx gatea.sys.Thread.Mutex

Constructor & Destructor Documentation

def pyRT.gatea.sys.Digest.Digester.__init__ (   self,
  name,
  tInterval 
)

Constructor.

Parameters
name- Name
tInterval- Conflation interval

Member Function Documentation

def pyRT.gatea.sys.Digest.Digester.IsAllowed (   self,
  now 
)

Determine we should digest (i.e., conflate)

Call this method every time the digestable event happens:

Return Allow? Description
Non-Zero YES Number of events conflated since last time
Zero NO N/A
Parameters
now- Current time as Unix Time
Returns
Non-zero if allowed; 0 if not allowed

The documentation for this class was generated from the following file: