PROFINET Device4.2.0
 
Loading...
Searching...
No Matches

◆ PN_API_IOD_sendUploadRetrievalAlarm()

uint32_t PN_API_IOD_sendUploadRetrievalAlarm ( PN_API_IOD_Handle_t *const  pnHandle,
const uint32_t  api,
PN_API_IOD_DevAddr_t *const  addr,
uint8_t *const  data,
const uint32_t  dataSize,
const uint32_t  userHandle 
)

This function sends an event to a central parameter server. As a result of this event, the server runs a record read service to retrieve a set of parameters from the device or a record write service to transmit a set of parameters to it. Part of the alarm data header indicates which record index is being utilized and whether the data is intended to be written or read.

Parameters
[in]pnHandleProfinet API Handle.
[in]apiApplication Process Identifier.
[in]addrGeographical address (slot/subslot) of the module/submodule.
[in]dataAlarm data.
[in]dataSizeSize of alarm data in bytes.
[in]userHandleUser defined handle.
Returns
result of the operation as uint32_t.
Return values
PN_API_OKSuccess.
PN_API_NOT_OKSomething went wrong.
PN_API_ERR_PARAMInvalid parameter.
Example
#include "pn_api_iod_alarm.h"
PN_API_IOD_Handle_t* pnHandle = NULL;
uint32_t status, api = 0, userHandle = 0;
addr.Type = PN_API_IOD_AddrGeo;
addr.address.geo.slot = 0;
addr.address.geo.subslot = 0;
uint8_t buf[64];
uint8_t bufSize = 64:
pnHandle = PN_API_IOD_new();
status = PN_API_IOD_sendUploadRetrievalAlarm(pnHandle, api, &addr, &buf, bufSize, userHandle);
uint32_t PN_API_IOD_sendUploadRetrievalAlarm(PN_API_IOD_Handle_t *const pnHandle, const uint32_t api, PN_API_IOD_DevAddr_t *const addr, uint8_t *const data, const uint32_t dataSize, const uint32_t userHandle)
This function sends an event to a central parameter server. As a result of this event,...
PN_API_IOD_Handle_t * PN_API_IOD_new(void)
Creates Profinet API handle.
@ PN_API_IOD_AddrGeo
Definition pn_api_iod_types.h:155
struct PN_API_IOD_Handle PN_API_IOD_Handle_t
API handle instance which holds IO device's info.
Definition pn_api_iod_types.h:61
union PN_API_IOD_DevAddr_t::@0 address
struct PN_API_IOD_DevAddr_t::@0::@1 geo
uint32_t subslot
Definition pn_api_iod_types.h:453
uint32_t slot
Definition pn_api_iod_types.h:452
Module/Submodule address (logical/geographical).
Definition pn_api_iod_types.h:445