cml_filter.h

来自「美国COPLEY驱动器,程序开发工具之一.」· C头文件 代码 · 共 59 行

H
59
字号
/************************************************************/
/*                                                          */
/*  Copley Motion Libraries                                 */
/*                                                          */
/*  Author: Stephen Glow                                    */
/*                                                          */
/*  Copyright (c) 2002-2005 Copley Controls Corp.           */
/*                          http://www.copleycontrols.com   */
/*                                                          */
/************************************************************/

/** \file

This file defines the Filter object.

The Filter object represents a two pole filter structure used
in various locations within the amplifier.

*/

#ifndef _DEF_INC_FILTER
#define _DEF_INC_FILTER

#include "CML_Settings.h"
#include "CML_Utils.h"

CML_NAMESPACE_START()

/***************************************************************************/
/**
Generic filter structure.  This structure holds the coefficients used by the
amplifier in various configurable filters.
*/
/***************************************************************************/
class Filter
{
   public:
      /// These three words hold information about the filter.  They are 
      /// presently reserved for use by the CME program.
      uint16 info[3];

      /// Filter coefficients
      int16 a0,a1,a2,b1,b2;

      /// Scaling factor for coefficients
      int16 k;

   public:
      Filter( void );
      void toBytes( byte data[] );
      void fromBytes( byte data[] );
      void fromWords( int16 data[] );
};

CML_NAMESPACE_END()

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?