📄 ab_cfg.h
字号:
** in 10us ticks
**
** Example: If CPU_CN_NUT_CONSTANT is 85000000 and the NUT is
** 2ms, we would calculate a CPU usage of 42.5%
**
** 85000000 / 200 = 425000
**
** This value is to be determined emperically.
** An example value is 85000000L derived for a 16Mhz 186 platform.
**
** The default value is 0. Therefore, no CPU resource will be
** reserved for the CD task unless this value is changed.
*/
/*---------------------------------------------------------------------------
** Current CPU Bandwidth Values
**
** CPU_BANDWIDTH__USE_NULL_PASSES_TO_CALC_PERCENTAGE
** Define this value if your system has a null task and you want to
** use the os_lNullPasses counter to calculate the CPU loading
** percentage. See os_Null.h and os_Null.c
**
** IMPROTANT: GS_SYSTEM_TIME_SUPPORT must also be enabled for the
** CPU bandwidth code to work. See above.
**
** CPU_BANDWIDTH__MAX_NULL_PASSES
** Set this to the maximum value of null passes per second.
** This value is to be determined empirically by running only the
** null task.
** An example value is 250000L derived for a 16Mhz 186 platform.
**
**---------------------------------------------------------------------------
*/
/*#define CPU_BANDWIDTH__USE_NULL_PASSES_TO_CALC_PERCENTAGE */
#define CPU_BANDWIDTH__MAX_NULL_PASSES 250000L
/****************************************************************************
**
** ID component (Identity Object)
**
*****************************************************************************
*/
/*---------------------------------------------------------------------------
** Device serial number.
**
** If the serial number is available at a fixed location in memory,
** define a value for ID_SERIAL_NUMBER_ADDRESS that corresponds to the
** address and leave ID_SERIAL_NUMBER undefined.
**
** If the serial number is set at compile time, define a value
** for ID_SERIAL_NUMBER that is the serial number itself and leave
** ID_SERIAL_NUMBER_ADDRESS undefined. Generally, this method is only used
** for development and debug. Products will most likely have the
** serial number programmed at a fixed address in non-volatile memory.
**
**
** For example:
**
** If the serial number is programmed at address 0x4000:0x0100 on
** an Intel based product, do the following:
**
** #define DO_SERIAL_NUMBER_ADDRESS IntelMakePtr( 0x4000, 0x0100 )
**
**
** If the serial number is fixed as 0x12345678 for debug purposes,
** do the following:
**
** #define ID_SERIAL_NUMBER 0x12345678L
**---------------------------------------------------------------------------
*/
/****************************************************************************
**
** MR component (Message Router)
**
*****************************************************************************
*/
/*---------------------------------------------------------------------------
** Max size of the message routing table.
** (Max number of object instances that may be registered at any one time.
** (Min number of object instances required is 6).
**---------------------------------------------------------------------------
*/
#define MR_MAX_OBJECTS 20
/*---------------------------------------------------------------------------
** Max number of messaging connections allowed to the message router.
**---------------------------------------------------------------------------
*/
#define MR_MAX_CONNECTIONS 10
/****************************************************************************
**
** OS component (Example Operating System)
**
*****************************************************************************
*/
/****************************************************************************
**
** RK Component (Rack Object Configuration Parameters)
**
*****************************************************************************
*/
/*---------------------------------------------------------------------------
** Total (max) number of "slots" in the rack.
** Initial input and output data sizes (in 16 bit words).
**
** All other rack configuration information is calculated from these.
** Rack is assumed to be single slot/double density with all inputs
** in the left hand side of the rack, and all outputs to the right.
** These initial settings can be changed later by adjusting the
** variables RK_iInputDataSize and RK_iOutputDataSize (when there are
** no active connections to the rack object).
**---------------------------------------------------------------------------
*/
/*---------------------------------------------------------------------------
** Rack object input/output status/data areas.
**
** If one or more of these areas are at fixed locations in memory,
** define appropriate address constant(s) for:
**
** RK_INPUT_STATUS_ADDRESS
** RK_INPUT_DATA_ADDRESS
** RK_OUTPUT_STATUS_ADDRESS
** RK_OUTPUT_DATA_ADDRESS
**
** If one or more of these areas are not required to be located at a
** fixed memory address, leave the appropriate address constant(s) undefined.
**
** For example:
**
** If the input and output data areas are to be located at addresses
** 0x4000:0x0200 and 0x4000:0x0400 respectively in an Intel based product,
** and the locations of the input and output status areas are not critical,
** do the following:
**
** #define RK_INPUT_DATA_ADDRESS IntelMakePtr( 0x4000, 0x0200 )
** #define RK_OUTPUT_DATA_ADDRESS IntelMakePtr( 0x4000, 0x0400 )
**---------------------------------------------------------------------------
*/
/* #define RK_INPUT_STATUS_ADDRESS IntelMakePtr( 0x4000, 0x0100 ) */
/* #define RK_INPUT_DATA_ADDRESS IntelMakePtr( 0x4000, 0x0200 ) */
/* #define RK_OUTPUT_STATUS_ADDRESS IntelMakePtr( 0x4000, 0x0300 ) */
/* #define RK_OUTPUT_DATA_ADDRESS IntelMakePtr( 0x4000, 0x0400 ) */
/*---------------------------------------------------------------------------
** Copy class 1 connection inputs data (from the INPUT_DATA_ADDRESS
** defined above) to the appropriate transmit transport
** every time we receive outputs data on a class 1 connection.
**---------------------------------------------------------------------------
*/
/****************************************************************************
**
** SD component (Serial Driver)
**
*****************************************************************************
*/
/*---------------------------------------------------------------------------
** Type of serial driver supported.
** Low priority polling task or interrupt driven.
** Only one of these two should be defined.
**---------------------------------------------------------------------------
*/
/*---------------------------------------------------------------------------
** Sizes of the receive and transmit buffers.
**---------------------------------------------------------------------------
*/
/****************************************************************************
**
** UM component (Unconnected Message Manager UCMM)
**
*****************************************************************************
*/
/*---------------------------------------------------------------------------
** Max number of active client transactions (min is 0).
**---------------------------------------------------------------------------
*/
#define UM_UCMM_MAX_CLIENT_TRANS_RECS 8
/****************************************************************************
**
** ED component (Extended Device Object)
**
*****************************************************************************
*/
/****************************************************************************
**
** ET component (ENET-Tcp/Ip Link Object)
**
*****************************************************************************
*/
/*---------------------------------------------------------------------------
** Max number of active server transactions (min is 4).
**---------------------------------------------------------------------------
*/
#define UM_UCMM_MAX_SERVER_TRANS_RECS 8
/****************************************************************************
**
** Task stack sizes
**
*****************************************************************************
*/
/*---------------------------------------------------------------------------
** The task stack sizes.
**---------------------------------------------------------------------------
*/
#define SB STACK_BLOCK
#define AD_STACK_SIZE 8*SB /* Application Data Area Handler */
#define BF_STACK_SIZE 8*SB /* Buffer Fragment Mapper */
#define CD_CONFIG_STACK_SIZE 6*SB /* Comm Device configuration */
#define CD_TX_UNSCHED_STACK_SIZE 8*SB /* Comm Device TX fixed tag msg */
#define CM_STACK_SIZE 8*SB /* Connection Manager object */
#define DB_STACK_SIZE 6*SB /* Debug object */
#define ED_STACK_SIZE 8*SB /* Extended Device object */
#define ET_STACK_SIZE 10*SB /* Enet-Tcp/Ip Link object */
#define EL_STACK_SIZE 8*SB /* Ethernet Link object */
#define EI_STACK_SIZE 8*SB /* TCPIP Interface object */
#define EN_CD_CONFIG_STACK_SIZE 6*SB /* Comm Device configuration jjw 11/1/99 */
#define EN_CD_TX_UNSCHED_STACK_SIZE 8*SB /* Comm Device TX fixed tag msg jjw 11/1/99 */
#define GS_EVENT_STACK_SIZE 12*SB /* Event handler */
#define GS_TIMER_STACK_SIZE 4*SB /* Timer service */
#define ID_STACK_SIZE 8*SB /* Identity object */
#define MR_STACK_SIZE 8*SB /* Message router object */
#define NS_STACK_SIZE 12*SB /* Non-Volatile Storage utility */
#define SY_STACK_SIZE 10*SB /* Assembly object */
#define UM_UCMM_STACK_SIZE 8*SB /* UCMM object */
#ifdef CD_EN_OBJECTS
#define EP_MNG_OUTGOING_STACK_SIZE 32*SB /* Call to getHostByName uses apx 6000 bytes */
#define EN_SOCKET_STACK_SIZE 8*SB /* All the socket tasks use the same amount of stack */
#endif
#define USERDEFINED_STACK_SIZE 32*SB
/****************************************************************************
**
** Task priorities
**
*****************************************************************************
*/
/*---------------------------------------------------------------------------
** Priorities:
** Tasks are listed here in priority order, high to low.
** 0 = Highest Priority, Lower Priorities are Higher Values.
**---------------------------------------------------------------------------
*/
typedef enum TaskPriorityEnumType
{
INITIAL_THREAD_PRIO, /* Initial Thread */
GS_TIMER_TASK_PRIO, /* Timer service */
#ifdef CD_EN_OBJECTS
CLASS1_SEND_TASK_PRIO, /* Transmit task for CLASS 1 messages */
TM_API_TX_TASK_PRIO, /* Ethernet Actual Packet Interval */
#endif
#ifdef BUFFER_FRAGMENT_MAPPER
AD_TASK_PRIO, /* App Data Area Handler */
#endif
GS_EVENT_TASK_PRIO, /* Event Handler */
#ifdef CD_EN_OBJECTS
EN_CD_CONFIG_TASK_PRIO, /* TCPIP Comm Device Configuration */
EN_CD_TX_UNSCHED_TASK_PRIO, /* TCPIP Comm Device TX Unscheduled */
#endif /* CD_EN_OBJECTS */
#ifdef CORE_OBJECTS
MR_TASK_PRIO, /* Message Router */
#endif
#ifdef BUFFER_FRAGMENT_MAPPER
BF_TASK_PRIO, /* Buffer Fragment Mapper */
#endif
#ifdef ASSEMBLY_OBJECT
SY_TASK_PRIO, /* Assembly Object Server */
#endif
#ifdef PCCC_OBJECT
P3_TASK_PRIO, /* PCCC Server Object */
#endif
#ifdef CORE_OBJECTS
CLASS1_RECV_TASK_PRIO, /* Recv task priority for Class 1 messages */
UM_UCMM_TASK_PRIO, /* UCMM processing */
ID_TASK_PRIO, /* Identity Object */
#endif
CM_TASK_PRIO, /* Connection Manager */
#ifdef CD_EN_OBJECTS
ENCAP_MNG_TASK_PRIO, /* Manages outgoing ENCAP sessions (ethernet) */
ORG_SEND_TASK_PRIO, /* Transmit task for connections originated locally */
IN_SEND_TASK_PRIO, /* Transmit task for connections originated offboard */
#endif
#ifdef CD_EN_OBJECTS
UDP_SEND_TASK_PRIO, /* Transmit task for UDP messages (core functions) */
ORG_RECV_TASK_PRIO, /* Receive task for connections originated locally */
#endif
/* ! ConformanceTestProblem */
#ifdef ETHERNET_LINK_OBJECT
EL_TASK_PRIO, /* Ethernet Link Object */
#endif
#ifdef TCPIP_INTERFACE_OBJECT
EI_TASK_PRIO, /* TCPIP Interface Object */
#endif
#ifdef NV_STORAGE_UTIL
NS_TASK_PRIO, /* Non-Volatile Storage Utility */
#endif
#ifdef NVS_OBJECT
NV_TASK_PRIO, /* Non-Volatile Storage Object */
#endif
#ifdef DEBUG_OBJECT
DB_TASK_PRIO, /* Debug Object */
#endif
#ifdef CD_EN_OBJECTS
PSV_WAIT_TASK_PRIO, /* Passive wait task for incomming connections */
IN_RECV_TASK_PRIO, /* Receive task for connections originated off board */
UDP_RECV_TASK_PRIO, /* Receive task for UDP messages (core functions) */
#endif
USERDEFINED_TASK_PRIO,
BD_TASK_PRIO /* Background Diagnostics */
}
TaskPriorityEnumType;
#endif /* inclusion lock */
/****************************************************************************
**
** End of AB_CFG.H
**
*****************************************************************************
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -