EtherNet/IP™ Adapter3.09.00
 
Loading...
Searching...
No Matches

◆ DIO_DEVICE_CFG_callback()

bool DIO_DEVICE_CFG_callback ( EI_API_CIP_NODE_T *  pCipNode,
uint16_t  classId,
uint16_t  instanceId,
uint16_t  attrId,
EI_API_CIP_ESc_t  serviceCode,
int16_t  serviceFlag 
)

Configuration callback to synchronize discrete io device profile non-volatile values with actual stack attribute values. Sets the new non-volatile data, if necessary.

Called by DEVICE_PROFILE_INTF_cfgCallback function of device profile interface. Function needs to be registered by DEVICE_PROFILE_register call.

Remarks
If actual stack attribute values are same as discrete IO device profile non volatile values then there is no need to write them to the non volatile memory.
Parameters
[in]pCipNodePointer to CIP object.
[in]classIdClass identifier.
[in]instanceIdInstance identifier.
[in]attrIdAttribute identifier.
[in]serviceCodeService code.
[in]serviceFlagService flag.
Returns
value as bool.
Return values
trueNon volatile discrete IO device profile configuration part was changed.
falseNo change.
Example
#include "device_profiles/discrete_io_device/discrete_io_device_cfg.h"
{
uint32_t error = DEVICE_PROFILE_INTF_ERR_General;
if (NULL == pIntf)
{
error = DEVICE_PROFILE_INTF_ERR_PtrInvalid;
goto laError;
}
...
...
error = DEVICE_PROFILE_INTF_ERR_OK;
laError:
return error;
}
bool DIO_DEVICE_CFG_callback(EI_API_CIP_NODE_T *pCipNode, uint16_t classId, uint16_t instanceId, uint16_t attrId, EI_API_CIP_ESc_t serviceCode, int16_t serviceFlag)
Configuration callback to synchronize discrete io device profile non-volatile values with actual stac...
Definition discrete_io_device_cfg.c:283
uint32_t DEVICE_PROFILE_register(DEVICE_PROFILE_INTF_Interface_t *pIntf)
Registers discrete IO device profile interface functions.
Definition discrete_io_device.c:251
bool(* callback)(EI_API_CIP_NODE_T *pCipNode, uint16_t classId, uint16_t instanceId, uint16_t attrId, EI_API_CIP_ESc_t serviceCode, int16_t serviceFlag)
Definition device_profile_intf_intern.h:55
struct DEVICE_PROFILE_INTF_Interface::@7 cfg
Definition device_profile_intf_intern.h:46
See also
DEVICE_PROFILE_register DEVICE_PROFILE_INTF_cfgCallback