📄 eiu_obj.h
字号:
/****************************************************************************
*****************************************************************************
**
** File Name
** ---------
**
** EIU_OBJ.H
**
*****************************************************************************
*****************************************************************************
**
** Description
** -----------
**
** User provided interfaces for the TCP/IP Interface Object.
**
*****************************************************************************
*****************************************************************************
**
** Source Change Indices
** ---------------------
**
** Porting: <none>----4<major> Customization: <none>----4<major>
**
*****************************************************************************
*****************************************************************************
**
** Services List
** -------------
**
** eiu_GetCurrentNetworkConfig() - Get the current Network Configuration
** eiu_SetCurrentNetworkConfig() - Set the current Network Configuration
**
*****************************************************************************
*****************************************************************************
** **
** ETHERNET/IP EXAMPLE CODE **
** COPYRIGHT (c) 2000-2005 ODVA (Open DeviceNet Vendor Association) **
** & ControlNet International Ltd. **
** **
** All rights reserved, except as specifically licensed in writing. **
** Use of the Ethernet/IP Example Protocol Software is subject to **
** ODVA's and ControlNet International's Terms of Use Agreement. **
** The following work constitutes example program code and is intended **
** merely to illustrate useful programming techniques. The user is **
** responsible for applying the code correctly. The code is provided **
** AS IS without warranty and is in no way guaranteed to be error-free. **
** **
*****************************************************************************
*****************************************************************************
*/
/****************************************************************************
*****************************************************************************
**
** Change Log
** ----------
**
**
*****************************************************************************
*****************************************************************************
*/
#ifndef EIU_OBJ_H
#define EIU_OBJ_H
/*
** See if this code is to be included.
*/
#ifdef TCPIP_INTERFACE_OBJECT
/****************************************************************************
**
** Constants
**
*****************************************************************************
*/
/*
** Set the User-defined bitmaps used for network configuration options
** These should be or'd values of the EI_CAPABILITY_xxx and EI_CONTROL_xxx
** literals defined in ei.h.
*/
#define EIU_CONFIG_CAPABILITY ( EI_CAPABILITY_DNS | EI_CAPABILITY_DHCP )
#define EIU_CONFIG_CONTROL ( EI_CONTROL_DNS_ENABLE )
/*
** Set the User-defined path to the object associated with the underlying physical
** communication interface (e.g., an [F6] Ethernet Link Object Class).
*/
#define EIU_LINK_PATH_LENGTH 4
#define EIU_LINK_PATH_SEGMENT {0x20, 0xF6, 0x24, 0x01}
/****************************************************************************
**
** Typedefs
**
*****************************************************************************
*/
/****************************************************************************
**
** Services
**
*****************************************************************************
*/
/*---------------------------------------------------------------------------
**
** eiu_GetCurrentNetworkConfig()
**
** User routine to obtain the current Interface Configuration from either
** the TCP/IP stack API or non-volatile storage. This routine is called
** BEFORE any GET/SET attribute processing is performed. Copy the current
** Interface Configuration to the private TCP/IP interface object data
** "ei_DataType ei_s".
**
**---------------------------------------------------------------------------
**
** Inputs:
** none
**
** Outputs:
** ei_DataType ei_s - Updated with current Interface Configuration
**
** Usage:
** eiu_GetCurrentNetworkConfig();
**
**---------------------------------------------------------------------------
*/
EXTFUNC void eiu_GetCurrentNetworkConfig( void );
#if ( EIU_CONFIG_CAPABILITY & EI_CAPABILITY_SETTABLE_CONFIG )
/*---------------------------------------------------------------------------
**
** eiu_SetCurrentNetworkConfig()
**
** User routine to store the Interface data to non-volatile storage and to apply
** the new configuration as needed. This routine is called AFTER SET attribute
** processing is performed. Use the private TCP/IP interface object data
** "ei_DataType ei_s" as input.
**
**---------------------------------------------------------------------------
**
** Inputs:
** ei_DataType ei_s - current Interface Configuration
**
** Outputs:
** CI_GRC_SUCCESS - Interface Configuration successfully stored/applied
** CI_GRC_xxx - appropriate error code
**
** Usage:
** iStatus = eiu_SetCurrentNetworkConfig();
**
**---------------------------------------------------------------------------
*/
EXTFUNC UINT16 eiu_SetCurrentNetworkConfig( void );
#endif
#endif /* #ifdef TCPIP_INTERFACE_OBJECT */
#endif /* inclusion lock */
/****************************************************************************
**
** End of EI_OBJ.H
**
*****************************************************************************
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -