public void UpdateInventoryStats( )
{
if ( RawAntennaCycleCount > _inventoryMatrix.Periods )
{
lock ( _tagInventoryData )
{
foreach ( DatabaseRowTemplate row in TagInventoryData )
{
TagInventory tag = row as TagInventory;
if ( tag != null )
{
tag.averageReadsPerCycle = -1;
TagCycleEMA data = TagCycleEMA.Empty;
try
{
data = _inventoryMatrix.GetEMAReadsPerCycle( tag.TagIdData, RawAntennaCycleCount - 1 );
if ( data != TagCycleEMA.Empty && data.HasEMA )
{
tag.averageReadsPerCycle = data.EMA.Value;
}
// PacketLogger.Comment(String.Format("TagCycleEMA {0}", data));
}
catch ( Exception e )
{
SysLogger.LogWarning( "Unable to get EMAReadesPerCycle: " + e.Message );
System.Diagnostics.Debug.Assert( false, e.Message );
}
}
// tag.sumReadDelta = 0xb0b;
}
}
}
}