📄 utildefs.h
字号:
#define ARU_OUTPUT_LEVEL_ADJ_09 4108
#define ARU_OUTPUT_LEVEL_ADJ_10 4109
#define ARU_OUTPUT_LEVEL_ADJ_11 4110
#define ARU_OUTPUT_LEVEL_ADJ_12 4111
#define ARU_OUTPUT_LEVEL_ADJ_13 4112
#define ARU_OUTPUT_LEVEL_ADJ_14 4113
#define ARU_OUTPUT_LEVEL_ADJ_15 4114
#define ARU_OUTPUT_LEVEL_ADJ_16 4115
#define ARU_OUTPUT_LEVEL_ADJ_17 4116
#define ARU_OUTPUT_LEVEL_ADJ_18 4117
#define ARU_OUTPUT_LEVEL_ADJ_19 4118
#define ARU_OUTPUT_LEVEL_ADJ_20 4119
#define ARU_OUTPUT_LEVEL_ADJ_21 4120
#define ARU_OUTPUT_LEVEL_ADJ_22 4121
#define ARU_OUTPUT_LEVEL_ADJ_23 4122
#define ARU_OUTPUT_LEVEL_ADJ_24 4123
#define ARU_OUTPUT_LEVEL_ADJ_25 4124
#define ARU_OUTPUT_LEVEL_ADJ_26 4125
#define ARU_OUTPUT_LEVEL_ADJ_27 4126
#define ARU_OUTPUT_LEVEL_ADJ_28 4127
#define ARU_OUTPUT_LEVEL_ADJ_29 4128
#define ARU_OUTPUT_LEVEL_ADJ_30 4129
#define ARU_OUTPUT_LEVEL_ADJ_31 4130
#define ARU_OUTPUT_LEVEL_ADJ_32 4131
/*----------------------------------------------------------------------------*
* CEI-220 support; Only available if the PARAMETRIC option was purchased.
* Not available on the CEI-100/200 boards.
*----------------------------------------------------------------------------*/
#define ARU_RX1_4_THRESH_VALUE 160 /* Thresh = 10 * (2.5 - Vdac) */
#define ARU_RX5_8_THRESH_VALUE 161 /* Vdac = 5 * n / 256 Volts */
#define ARU_RX9_10_THRESH_VALUE 162 /* Thresh = 0x72 = 2.73 Volts default */
#define ARU_RX11_12_THRESH_VALUE 163
#define ARU_INPUT_THRESH_VALUE 164 /* Thresh = 20 * n / 256 Volts = 1.56V */
#define ARU_TRANSMIT_VOLT_VALUE 165 /* Level = 10 * n / 256 Volts = 9.96V */
/* See below for generic DAC commands. */
#define ARU_PARAMETRIC_SUPPORT 170 /* H/W supports variable parametrics? */
/* This includes Rcvr Thresh Adj, Xmt */
/* Output Adj and Extra/Too Few bits */
/* Returns AR_ON or AR_OFF */
/*----------------------------------------------------------------------------*
* CEI-x20 discrete input/output support
*----------------------------------------------------------------------------*/
#define ARU_DISCRETE_VALUES 175 /* Read/Write Discrete Inputs/Outputs */
/* Discretes are active high. */
#define ARU_DISCRETE_OUTPUTS 176 /* Read/Write discrete output values */
#define ARU_DISCRETE_INPUTS 177 /* Read discrete input values */
/*---------------------------------------------------------------------------*
* Old 16-channel-max item codes (superceded by codes allowing 200 rx/tx)
*---------------------------------------------------------------------------*/
#define ARU_OLD_RX_CH01_BIT_RATE 40 /* Configure receiver bit rate */
#define ARU_OLD_RX_CH16_BIT_RATE 55
#define ARU_OLD_TX_CH01_BIT_RATE 60 /* Configure transmitter bit rate */
#define ARU_OLD_TX_CH16_BIT_RATE 75
#define ARU_OLD_RX_CH01_PARITY 80 /* Configure receiver parity */
#define ARU_OLD_RX_CH16_PARITY 95
#define ARU_OLD_TX_CH01_PARITY 100 /* Configure transmitter parity */
#define ARU_OLD_TX_CH16_PARITY 115
#define ARU_OLD_RX_CH01_SDI_FILTER 120 /* Enable SDI prefilter */
#define ARU_OLD_RX_CH16_SDI_FILTER 135
#define ARU_OLD_RX_CH01_SDI_VALUE 140 /* SDI prefilter value */
#define ARU_OLD_RX_CH16_SDI_VALUE 155
#define ARU_OLD_TX_CH01_SHUT_OFF 240 /* Shut off the ARINC transmitter */
#define ARU_OLD_TX_CH16_SHUT_OFF 255
#define ARU_OLD_CH01_SCHEDULED_MODE 260 /* Set channel to scheduled mode */
#define ARU_OLD_CH16_SCHEDULED_MODE 275
#define ARU_OLD_CH01_BURST_MODE 280 /* Set channel to burst mode */
#define ARU_OLD_CH16_BURST_MODE 295
#define ARU_OLD_CH01_ENABLE_TIMETAG 300 /* Enable Time Tags for a channel */
#define ARU_OLD_CH16_ENABLE_TIMETAG 315
#define ARU_OLD_CH01_DISABLE_TIMETAG 320 /* Disable Time Tags for a channel */
#define ARU_OLD_CH16_DISABLE_TIMETAG 335
#define ARU_OLD_CH01_BUFFERED 340 /* Set a channel to buffered mode */
#define ARU_OLD_CH16_BUFFERED 355
#define ARU_OLD_CH01_DEDICATED 360 /* Set a channel to dedicated mode */
#define ARU_OLD_CH16_DEDICATED 375
#define ARU_OLD_CH01_MERGED 380 /* Set a channel to merged mode */
#define ARU_OLD_CH16_MERGED 395
#define ARU_OLD_TX_CH01_HB_INJ 180 /* Enable Extra Bit error inj */
#define ARU_OLD_TX_CH16_HB_INJ 195
#define ARU_OLD_TX_CH01_LB_INJ 200 /* Enable Too Few Bits error inj */
#define ARU_OLD_TX_CH16_LB_INJ 215
#define ARU_OLD_TX_CH01_GAP_INJ 220 /* Enable Short Gap error inj */
#define ARU_OLD_TX_CH16_GAP_INJ 235
#define ARU_OLD_DAC_VALUE_01 400 /* Raw value for DAC #1 */
#define ARU_OLD_DAC_VALUE_16 415
#define ARU_OLD_OUTPUT_LEVEL_ADJ_01 420 /* Adjustable ARINC output levels */
#define ARU_OLD_OUTPUT_LEVEL_ADJ_16 435
/*----------------------------------------------------------------------------*
* CEI-x20 Only:
* See top of file for the equates for the (VME-AIC)...
*
* These configuration equates are specific to ar_setchparms().
* ar_setchparms(board, channel, TransRcv, pAR_CHANNEL_PARMS def);
*----------------------------------------------------------------------------*/
#define CEIX20_DEFAULT_SEG 0xD000 /* default CEI-220/420 segment address */
/* TransRcv definitions: */
#define ARU_RECEIVER 0 /* Apply parameter to receiver */
#define ARU_TRANSMITTER 1 /* Apply parameter to transmitter */
#define ARU_DISCRETES 2 /* Apply parameter to discretes */
/* BaudRate definitions: */
/* For the ARU_RECEIVER or ARU_TRANSMITTER option, use the following speed */
/* constants. */
#define ARU_717_SPEED_384 0x000 /* Receiver subframe = 32 words */
#define ARU_717_SPEED_768 0x100 /* Receiver subframe = 64 words */
#define ARU_717_SPEED_1536 0x200 /* Receiver subframe = 128 words */
#define ARU_717_SPEED_3072 0x300 /* Receiver subframe = 256 words */
#define ARU_717_SPEED_6144 0x400 /* Receiver subframe = 512 words */
#define ARU_717_SPEED_12288 0x500 /* Receiver subframe = 1024 words */
#define ARU_717_SPEED_24576 0x600 /* Receiver subframe = 2048 words */
#define ARU_717_SPEED_49152 0x700 /* Receiver subframe = 4096 words */
// CSDB Baud Rates updated for CEI-x20 10-17-2000.V3.21.ajh
#define ARU_CSDB_SPEED_4800 0xCF00 /* CSDB 4800 baud */
#define ARU_CSDB_SPEED_9600 0x6700 /* CSDB 9600 baud */
#define ARU_CSDB_SPEED_12500 0x4F00 /* CSDB 12500 baud (same as AR_LOW) */
#define ARU_CSDB_SPEED_19200 0x3300 /* CSDB 19200 baud */
#define ARU_CSDB_SPEED_38400 0x1900 /* CSDB 38400 baud */
#define ARU_CSDB_SPEED_50000 0x1300 /* CSDB 50000 baud (same as AR_HIGH) */
#define ARU_CSDB_SPEED_76800 0x0C00 /* CSDB 76800 baud */
/* Constants for the ARU_RECEIVER Receiver def.AutoSync option */
#define ARU_717_AUTOSYNC 0x0000 /* Autosync mode */
#define ARU_717_RAW 0x2000 /* RAW mode */
/* Constants for the Receiver or Transmitter Encoding Mode option */
#define ARU_717_H_BI_PHASE 0x2000 /* Harvard Bi-Phase Encoding (HBP) */
#define ARU_717_BIPOLAR 0x1000 /* Bipolar R-T-Z Encoding (BPRZ) */
/* Constants for the -717 OperateMode mode definition */
#define ARU_FRAME 0x4000 /* Operate in FRAME mode */
/* Constants for the -429 OperateMode mode definition */
#define ARU_SCHEDULED 0x5000 /* Operate in SCHEDULED mode */
/* Constants for the Parity definition */
#define AR_RAW 0x2000 /* Parity is turned OFF */
/* Constants for special channel operations */
#define AR_CEI520J_573_DISABLE 0x0001 /* disable 573 channel on 520/520A-J */
/*----------------------------------------------------------------------------*
* Utility function codes
*----------------------------------------------------------------------------*/
#define ARU_ENABLE_INT 1 /* Enable interrupts to the host */
#define ARU_DISABLE_INT 2 /* Disable interrupts to the host */
#define ARU_ENABLE_TIMETAG 1 /* Enable receiver time tagging */
#define ARU_DISABLE_TIMETAG 0 /* Disable receiver time tagging */
#define ARU_ALL_LABELS 0x1FF /* Enable/disable ALL label filtering */
#define ARU_FILTER_OFF 0 /* Filter off--pass specified label(s) */
#define ARU_FILTER_ON 1 /* Filter on--delete specified label(s) */
#define ARU_BUFFERED 0 /* Set receiver to BUFFERED mode */
#define ARU_DEDICATED 1 /* Set receiver to DEDICATED mode */
#define ARU_MERGED 2 /* Set receiver to MERGED mode */
/*----------------------------------------------------------------------------*
* Utility return status codes. These error codes may be converted into a
* printable ASCII string by calling ar_get_error().
*----------------------------------------------------------------------------*/
#define ARS_FAILURE -1
#define ARS_NODATA 0 /* No data in receive buffer */
#define ARS_NORMAL 1 /* Function normal/successful completion*/
#define ARS_GOTDATA 4 /* Receiver returned data */
#define BTD_ERR_NOWINRT 50 /* WinRT driver not loaded/started */
#define BTD_ERR_BADREGISTER 51 /* WinRT parameters don't match registry*/
#define BTD_ERR_BADOPEN 52 /* WinRT device open failed */
#define BTD_NO_SUPPORT 53 /* Bus/Carrier/OS not supported by API */
#define ARS_INVHARCMD 1002 /* Invalid configuration command */
#define ARS_INVHARVAL 1003 /* Invalid configuration value */
#define ARS_XMITOVRFLO 1004 /* Transmit buffer full, no data inserted*/
#define ARS_INVBOARD 1005 /* Invalid board argument */
#define ARS_NOSYNC 1006 /* Timeout synchronizing with the ARINC */
#define ARS_BADLOAD 1007 /* Could not successfully load firmware */
#define ARS_BRDNOTLOAD 1008 /* Board micro-code load is not running */
/* or board has not been initialized. */
#define ARS_SYNCTIMEOUT 1009 /* Error initializing timer */
#define ARS_SYNCOVERRUN 1010 /* Host CPU can't keep up with data rate*/
#define ARS_BADINIT 1011 /* Can't initialize timer on slave */
#define ARS_MEMADERR 1012 /* Memory address mapping error */
#define ARS_MEMWRERR 1013 /* Dual-Port memory write/read-back error*/
#define ARS_INVSTRING 1014 /* Invalid string */
#define ARS_INVEQID 1015 /* Invalid equipment ID */
#define ARS_CHECKSUM 1016 /* Checksum error loading slave */
#define ARS_NORESPONSE 1017 /* No response on receiver */
#define ARS_UNSUPTYPE 1018 /* Translation not available for type */
#define ARS_INVARG 1019 /* Invalid argument to function */
#define ARS_INVLABEL 1020 /* Invalid label */
#define ARS_DRIVERFAIL 1021 /* Driver load failed */
#define ARS_WINRTFAIL 1022 /* WinRT Device Driver Error */
#define ARS_CHAN_TIMEOUT 1023 /* Time out while commanding CEI-x20 brd*/
#define ARS_NO_HW_SUPRT 1024 /* Function not supported by hardware */
#define ARS_BAD_DAC_VAL 1025 /* Specified DAC value bad (<0 or >255) */
#define ARS_BAD_FPGA 1026 /* Bad num of transmitters or receivers */
#define ARS_BAD_STATIC 1027 /* Internal memory read/write failure */
#define ARS_LAST_ERROR 1028 /* Returns addn'l info about prev error */
#define ARS_HW_CONSISTENCY 1029 /* Hardware config is not consistant */
#define ARS_HW_DETECT 1030 /* Failed to detect CEI-xxx hardware */
#define ARS_WRAP_DATA_FAIL 1031 /* Wrap Test invalid data failure */
#define ARS_WRAP_RATE_FAIL 1032 /* Wrap Test timetag/baud rate mismatch */
#define ARS_WRAP_FLUSH_FAIL 1035 /* Wrap Test initial flush failure */
#define ARS_WRAP_DROP_FAIL 1036 /* Wrap Test missing data failure */
#define INTFC_BASE_ERR_CODES 1900
#define INTFC_MAX_ERR_CODES 4
#define INTFC_ERR_NO_LIB 1900
#define INTFC_ERR_NO_FCN 1901
#define INTFC_ERR_NO_INSTALL 1902
#define INTFC_ERR_BOARD_UNSUPORTED 1903
/*---------------------------------------------------------------------------*
* Added to support the new CEI-520/620/820 functions.
* This structure defines the channel parameters that are to be set by a call
* to the new channel-based ar_setchparms() function.
*---------------------------------------------------------------------------*/
typedef struct ar_channel_parms
{
CEI_INT32 BaudRate; // One of the supported baud rates:
// For ARINC 573/717 channels, baud rate/sub frame size:
// ARU_717_SPEED_384 subframe size = 32 words
// ARU_717_SPEED_768 subframe size = 64 words
// ARU_717_SPEED_1536 subframe size = 128 words
// ARU_717_SPEED_3072 subframe size = 256 words
// ARU_717_SPEED_6144 subframe size = 512 words
// ARU_717_SPEED_12288 subframe size = 1024 words
// ARU_717_SPEED_24576 subframe size = 2048 words
// ARU_717_SPEED_49152 subframe size = 4096 words
// For CSDB channels:
// ARU_CSDB_SPEED_4800 4800 baud
// ARU_CSDB_SPEED_9600 9600 baud
// ARU_CSDB_SPEED_12500 12500 baud (same as AR_LOW)
// ARU_CSDB_SPEED_19200 19200 baud
// ARU_CSDB_SPEED_38400 38400 baud
// ARU_CSDB_SPEED_50000 50000 baud (same as AR_HIGH)
// ARU_CSDB_SPEED_76800 76800 baud
// For all ARINC channels:
// AR_HIGH Set HIGH speed (100 Kbaud(50KB if CSDB))
// AR_LOW Set LOW speed (12.5 Kbaud)
// In addition to the standard AR_HIGH and AR_LOW baud rate
// flags, the CEI-820 also allows the user to specify any
// desired transmit/receive baud rate between 5 KHz and
// 200 KHz. Simply specify the desired baud rate (in Hz).
// For example, to set the baud rate of a particular
// transmit/receive channel to 98 KHz, set 'BaudRate' to
// 98000.
CEI_INT32 ChannelType; // Channel type (returned by function call):
// CHAN_NOT_IMPLEMENTED Channel is not implemented
// CHAN_ARINC429 Channel is an ARINC-429 channel
// CHAN_ARINC717 Channel is an ARINC-573/717 channel
// CHAN_CSDB Channel is a CSDB channel
// When using the CEI22032.dll interface, this value must
// be correctly set by the caller before calling ar_setchparms!
CEI_INT32 InternalWrap; // Internal wrap-around enable (receiver only)
// AR_WRAP_ON Enables internal wrap-around mode
// AR_WRAP_OFF Disables internal wrap-around mode
CEI_INT32 IntCount; // Enable interrupt every "IntCount" labels rcv/x
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -