1.1.1.12 OcaFilterFIR

Class Hierarchy:

OcaRootOcaWorkerOcaActuatorOcaFilterFIR

class OcaFilterFIR : OcaActuator

A finite impulse response (FIR) filter.

Properties:

static const OcaClassID ClassID = "1.1.1.12"

Number that uniquely identifies the class. Note that this differs from the object number, which identifies the instantiated object. This property is an override of the OcaRoot property.

This property has id 4.1.

static const OcaClassVersionNumber ClassVersion = 2

Identifies the interface version of the class. Any change to the class definition leads to a higher class version. This property is an override of the OcaRoot property.

This property has id 4.2.

OcaUint32 Length

Length of the filter, in samples. Readonly. Value is set when SetCoefficients(…) method executes.

This property has id 4.1.

OcaList<OcaFloat32> Coefficients

Array of FIR Coefficients. The size of the array (number of entries) is equal to the Order property plus 1.

This property has id 4.2.

OcaFrequency SampleRate

Sample rate inside the filter. We can’t assume it’s the same as the device input or output rate.

This property has id 4.3.

Properties inherited from OcaWorker:

Properties inherited from OcaRoot:

Methods:

OcaStatus GetLength(OcaUint32 &Length, OcaUint32 &minLength, OcaUint32 &maxLength)

Gets the length of the FIR filter. The return value indicates whether the value was successfully retrieved.

This method has id 4.1.

Parameters
  • OcaUint32 Length – Output parameter.

  • OcaUint32 minLength – Output parameter.

  • OcaUint32 maxLength – Output parameter.

OcaStatus GetCoefficients(OcaList<OcaFloat32> &Coefficients)

Gets the coefficients of the FIR filter. The return value indicates whether the coefficients were successfully retrieved.

This method has id 4.2.

Parameters

OcaList<OcaFloat32> Coefficients – Output parameter.

OcaStatus SetCoefficients(OcaList<OcaFloat32> Coefficients)

Sets the value of the properties of the FIR filter. The return value indicates whether the properties were successfully set.

This method has id 4.3.

Parameters

OcaList<OcaFloat32> Coefficients – Input parameter.

OcaStatus GetSampleRate(OcaFrequency &Rate, OcaFrequency &minRate, OcaFrequency &maxRate)

Gets the sample rate of the FIR filter. The return value indicates whether the data was successfully retrieved.

This method has id 4.4.

Parameters
  • OcaFrequency Rate – Output parameter.

  • OcaFrequency minRate – Output parameter.

  • OcaFrequency maxRate – Output parameter.

OcaStatus SetSampleRate(OcaFrequency Rate)

Sets the sample rate of the FIR filter. The return value indicates whether the rate was successfully set.

This method has id 4.5.

Parameters

OcaFrequency Rate – Input parameter.

Methods inherited from OcaWorker:

Methods inherited from OcaRoot: