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

◆ PN_API_IOD_unlockDbaiBuf()

uint32_t PN_API_IOD_unlockDbaiBuf ( PN_API_IOD_Handle_t *const  pnHandle,
PN_API_IOD_BufferLock_t *const  lock 
)

Unlocks a data buffer associated with a specified output IOCR used for direct IO data access.

A buffer that was requested using PN_API_IOD_lockDbaiBuf() is returned to the stack after processing.

Parameters
[in]pnHandleProfinet API Handle.
[in]lockPointer to the same data of PN_API_IOD_lockDbaiBuf().
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_dbai.h"
PN_API_IOD_Handle_t* pnHandle = NULL;
uint32_t status;
pnHandle = PN_API_IOD_new();
//Fill up lock
status = PN_API_IOD_lockDbaiBuf(pnHandle, lock);
//do work
status = PN_API_IOD_unlockDbaiBuf(pnHandle, lock);
status = PN_API_IOD_exitDbai(pnHandle);
uint32_t PN_API_IOD_enterDbai(PN_API_IOD_Handle_t *const pnHandle)
Acquires the semaphore of the IOD thread.
uint32_t PN_API_IOD_lockDbaiBuf(PN_API_IOD_Handle_t *const pnHandle, PN_API_IOD_BufferLock_t *const lock)
Locks a data buffer for a designated output IOCR to enable direct access to IO data.
uint32_t PN_API_IOD_unlockDbaiBuf(PN_API_IOD_Handle_t *const pnHandle, PN_API_IOD_BufferLock_t *const lock)
Unlocks a data buffer associated with a specified output IOCR used for direct IO data access.
uint32_t PN_API_IOD_exitDbai(PN_API_IOD_Handle_t *const pnHandle)
Releases the semaphore of the IOD thread.
PN_API_IOD_Handle_t * PN_API_IOD_new(void)
Creates Profinet API handle.
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
Data buffer (DBAI).
Definition pn_api_iod_types.h:835