CogStatistics ClassCognex VisionPro 9.23
The object that buffers consecutive values in order to compute statistics and produce a tolerance result. It is meant to be used stand-alone and not in conjunction with the CogDataAnalysisTool.
Inheritance Hierarchy

System Object
  System MarshalByRefObject
    Cognex.VisionPro.Implementation CogObjectBase
      Cognex.VisionPro CogStatistics

Namespace: Cognex.VisionPro
Assembly: Cognex.VisionPro.Core (in Cognex.VisionPro.Core.dll) Version: 91.0.0.0
Syntax

[SerializableAttribute]
public class CogStatistics : CogObjectBase, 
	ICogNetInternal, IDisposable, ICloneable, ISerializable, ICogHasChanged, 
	ICogChangedEvent

The CogStatistics type exposes the following members.

Constructors

  NameDescription
Public methodCogStatistics 
Constructs a new instance of this class.
Public methodCogStatistics(IntPtr)
Constructs a new instance of this class using com pointer.
Public methodCogStatistics(CogStatistics)
Constructs a new instance of this class as a deep copy of the given instance.
Top
Methods

  NameDescription
Public methodAddEmptyValue
Adds an empty entry to the buffer. The entry will be marked in the buffer as an invalid data value. When GetBufferedValues is called these entries can be substituted by any appropriate value for display.
Public methodAddValue
Adds a value to the buffer and generates a tolerance status according to the specified limits.
Protected methodattachCom
Protected methodClone
Returns a deep copy of this class instance. Derived classes that implement Clone should override this method; other clients who wish to clone this instance should call ICloneable.Clone. See also CogSerializer.DeepCopyObject
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDispose 
Protected methodDispose(Boolean)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize (Overrides Object Finalize .)
Protected methodGetAttributes
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetBufferedMaxValue
The maximum value sampled over the specified range of buffered values. Index 0 represents the oldest value. Index NumBufferedValues-1 represents the most recent value.
Public methodGetBufferedMean
The mean (average) value generated over the specified range of buffered values. Index 0 represents the oldest value. Index NumBufferedValues-1 represents the most recent value.
Public methodGetBufferedMinValue
The minimum value sampled over the specified range of buffered values. Index 0 represents the oldest value. Index NumBufferedValues-1 represents the most recent value.
Public methodGetBufferedNumSamples
The number of samples over the specified range of buffered values. Invalid values will not be included in the value returned. Index 0 represents the oldest value. Index NumBufferedValues-1 represents the most recent value.
Public methodGetBufferedStandardDeviation
The standard deviation value generated over the specified range of buffered values. Index 0 represents the oldest value. Index NumBufferedValues-1 represents the most recent value.
Public methodGetBufferedValues
Get the values buffered. BufferedValues may include entries that were invalid. These entries will be substituted with InvalidDataValue. Returned value Index 0 represents the oldest value. Index NumBufferedValues-1 represents the most recent value.
Protected methodGetClassName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetComponentName
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetConverter
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultEvent
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetDefaultProperty
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEditor
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetEvents( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodGetLimitEnables
Get one or more of the tolerance limit enable flags.
Public methodGetLimits
Get one or more of the tolerance limit values.
Protected methodGetObjectData
Protected methodGetProperties 
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetProperties( Attribute )
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Protected methodGetPropertyOwner
Implements the corresponding member of the ICustomTypeDescriptor interface. May be overridden in derived classes to provide custom type information.
(Inherited from CogObjectBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone 
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Public methodResetBufferedValues
Clears the buffered values. Sets NumBufferedValues to zero.
Public methodResetRunningStatistics
Resets the running statistics. Sets RunningNumSamples to zero.
Public methodResumeAndRaiseChangedEvent
Re-enables raising of the Changed event after SuspendChangedEvent has been called. Also raises the Changed event if the ChangedEventSuspended count is reduced to zero and any changes were made while events were suspended. Must be called once for each call to SuspendChangedEvent.
Public methodSetLimitEnables
Set all of the tolerance limit enable flags.
Public methodSetLimits
Set all of the tolerance limit values.
Public methodSuspendChangedEvent
Temporarily suspends the raising of the Changed event. May be called more than once, and a corresponding call to ResumeAndRaiseChangedEvent must be made for each call to SuspendChangedEvent.
Public methodToString
Returns a String that represents the current Object.
(Inherited from Object.)
Top
Fields

  NameDescription
Protected field__com
Protected field__disposed
Protected fieldStatic member__factory
Protected fieldStatic memberCreator
Public fieldStatic memberSfBufferLength
This bit will be set in the EventArgs of a Changed event every time the value returned by BufferLength may have changed.
Public fieldStatic memberSfCurrentValue
This bit will be set in the EventArgs of a Changed event every time the value returned by CurrentValue may have changed.
Public fieldStatic memberSfCurrentValueIsInvalid
This bit will be set in the EventArgs of a Changed event every time the value returned by CurrentValueIsInvalid may have changed.
Public fieldStatic memberSfDescription
This bit will be set in the EventArgs of a Changed event every time the value returned by Description may have changed.
Public fieldStatic memberSfName
This bit will be set in the EventArgs of a Changed event every time the value returned by Name may have changed.
Public fieldStatic memberSfNominalValue
This bit will be set in the EventArgs of a Changed event every time the value returned by NominalValue may have changed.
Public fieldStatic memberSfNumBufferedValues
This bit will be set in the EventArgs of a Changed event every time the value returned by NumBufferedValues may have changed.
Public fieldStatic memberSfRejectHighLimit
This bit will be set in the EventArgs of a Changed event every time the value returned by RejectHighLimit may have changed.
Public fieldStatic memberSfRejectHighLimitEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by RejectHighLimitEnabled may have changed.
Public fieldStatic memberSfRejectLowLimit
This bit will be set in the EventArgs of a Changed event every time the value returned by RejectLowLimit may have changed.
Public fieldStatic memberSfRejectLowLimitEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by RejectLowLimitEnabled may have changed.
Public fieldStatic memberSfRunningMaxValue
This bit will be set in the EventArgs of a Changed event every time the value returned by RunningMaxValue may have changed.
Public fieldStatic memberSfRunningMean
This bit will be set in the EventArgs of a Changed event every time the value returned by RunningMean may have changed.
Public fieldStatic memberSfRunningMinValue
This bit will be set in the EventArgs of a Changed event every time the value returned by RunningMinValue may have changed.
Public fieldStatic memberSfRunningNumSamples
This bit will be set in the EventArgs of a Changed event every time the value returned by RunningNumSamples may have changed.
Public fieldStatic memberSfRunningStandardDeviation
This bit will be set in the EventArgs of a Changed event every time the value returned by RunningStandardDeviation may have changed.
Public fieldStatic memberSfWarnHighLimit
This bit will be set in the EventArgs of a Changed event every time the value returned by WarnHighLimit may have changed.
Public fieldStatic memberSfWarnHighLimitEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by WarnHighLimitEnabled may have changed.
Public fieldStatic memberSfWarnLowLimit
This bit will be set in the EventArgs of a Changed event every time the value returned by WarnLowLimit may have changed.
Public fieldStatic memberSfWarnLowLimitEnabled
This bit will be set in the EventArgs of a Changed event every time the value returned by WarnLowLimitEnabled may have changed.
Top
Properties

  NameDescription
Public propertyBufferLength
Returns/sets the number of values to buffer.
Public propertyChangedEventSuspended
If nonzero, indicates that the raising of the Changed event has been suspended. This value is incremented when SuspendChangedEvent is called and decremented when ResumeAndRaiseChangedEvent is called.
Public propertyCurrentValue
Returns/sets the value that will be used by Execute to compute the tolerance status for this channel. If the value is invalid (it hasn't been updated since the last call to Execute), the status will be set to cogDataAnalysisToleranceStatusInvalidValue.
Public propertyCurrentValueIsInvalid
Returns the flag that specifies whether or not the CurrentValue has been used by Execute. If true, the status for the channel will be set to cogDataAnalysisToleranceStatusInvalidValue.
Public propertyDescription
Returns/sets a description string for the object. The Description may be optionally set to store a readable description of the use of the channel.
Public propertyHasChanged
If true, the serializable state of this object has changed since the last time it was serialized.
Public propertyName
Returns the name of the channel. This is the same as the Key that was used when the channel was created via AddNew.
Public propertyNominalValue
Returns/sets the nominal or expected value of the current value. This value is not used to produce the tolerance result, but is merely provided as a reference for the expected value.
Public propertyNumBufferedValues
Returns the number of values that are currently held in the buffer. Entries that are marked with No Value (by calling AddEmptyValue) will be included in this count. This count will not exceed BufferLength.
Public propertyRejectHighLimit
Returns/sets the tolerance limit that triggers a reject-high status, if enabled and the value exceeds it. Setting may cause the other limit values to be adjusted so that the RejectHighLimit remains the highest limit.
Public propertyRejectHighLimitEnabled
Returns/sets the use of the RejectHighLimit to generate a tolerance status.
Public propertyRejectLowLimit
Returns/sets the tolerance limit that triggers a reject-low status, if enabled and the value falls below it. Setting may cause the other limit values to be adjusted so that the RejectLowLimit remains the lowest limit.
Public propertyRejectLowLimitEnabled
Returns/sets the use of the RejectLowLimit to generate a tolerance status.
Public propertyRunningMaxValue
Returns the maximum value sampled since last reset. Calling ResetRunningStatistics() will restart this calculation.
Public propertyRunningMean
Returns the mean (average) value generated from sampled data since last reset. Calling ResetRunningStatistics() will restart this calculation.
Public propertyRunningMinValue
Returns the minimum value sampled since last reset. Calling ResetRunningStatistics() will restart this calculation.
Public propertyRunningNumSamples
Returns the number of samples (valid values) used to compute the running statistics. Running statistics are not affected by the buffer size; they are calculated from all samples since last reset. Calling ResetRunningStatistics() will set this to zero.
Public propertyRunningStandardDeviation
Returns the standard deviation value generated from sampled data since last reset. Calling ResetRunningStatistics() will restart this calculation.
Public propertyWarnHighLimit
Returns/sets the tolerance limit that triggers a warn-high status, if enabled and the value exceeds it but does not exceed the RejectHighLimit. Setting may cause the other limit values to be adjusted so that the limit values remain consistent.
Public propertyWarnHighLimitEnabled
Returns/sets the use of the WarnHighLimit to generate a tolerance status.
Public propertyWarnLowLimit
Returns/sets the tolerance limit that triggers a warn-low status, if enabled and the value falls below it but does not fall below the RejectLowLimit. Setting may cause the other limit values to be adjusted so that the limit values remain consistent.
Public propertyWarnLowLimitEnabled
Returns/sets the use of the WarnLowLimit to generate a tolerance status.
Top
Events

  NameDescription
Public eventChanged
Occurs when one or more parts of the object's state may have changed.
Top
Remarks

This interface provides functions and properties that let you compute statistical measures of a set of data, where the individual data values are supplied in sequence.

This interface is very similar to CogStatistics. Unlike that interface, which can only be used as part of a CogDataAnalysis tool, CogStatistics is intended for stand-alone use.

See Also