FpgaManager
Software API Documentation
AnsiC

Modules

 Types
 

Typedefs

typedef void(* FMmAccessStatusEvtCallbackFct) (const EProtocolStatus statusOld, const EProtocolStatus statusNew, MmAccessHandle const mmAccess_p, void *const arg_p)
 Callback function to be execute on change of the MmAccess status. More...
 
typedef void(* FMmAccessSlaveStatusEvtCallbackFct) (const EProtocolStatus statusOld, const EProtocolStatus statusNew, MmAccessSlaveHandle const mmAccess_p, void *const arg_p)
 Callback function to be execute on change of the MmAccessSlave status. More...
 
typedef bool(* FMmAccessSlaveOperationCallbackFct) (const en_uint32 address, en_byte *const buffer_p, const en_uint32 accessSize, const bool noAddrInc, MmAccessSlaveHandle const mmAccess_p, void *const arg_p)
 Callback function to be execute on operations (Read/Write) to be executed. More...
 
typedef void(* FStreamStatusEvtCallbackFct) (const EProtocolStatus statusOld, const EProtocolStatus statusNew, StreamHandle const stream_p, void *const arg_p)
 Callback function to be execute on change of the stream status. More...
 
typedef void(* FTransferCallbackFct) (const EN_RESULT error, TransferHandle const transfer_p, void *const arg_p)
 Callback function to be execute on completion of a transfer. More...
 

Functions

FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Delete (DeviceHandle *const handle_p)
 Delete Device and set handle to nullptr. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Create (DeviceHandle *const handle_p, const char *url, const en_uint8 streams)
 Creator with Transfer handle as parameter and error code as return value. More...
 
FPGAMANAGER_DLL_FCT DeviceHandle DeviceApi_CreateObj (const char *url, const en_uint8 streams, EN_RESULT *const retVal_p)
 Creator with Device handle as return value and error code as parameter. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Open (DeviceHandle const handle)
 Open device. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Close (DeviceHandle const handle, const bool forcing)
 Close device. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_CreateMmAccess (DeviceHandle const deviceHandle, MmAccessHandle const mmAccessHandle, const en_uint8 streamNr)
 Create and get memory mapped access object. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_CreateStream (DeviceHandle const deviceHandle, StreamHandle const streamHandle, const en_uint8 streamNr, const bool frameBased, const bool upStreamEna, const bool downStreamEna)
 Create and get streaming access object. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_SetProperty (DeviceHandle const deviceHandle, const char *const name, const en_uint32 value)
 Set property value. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_GetProperty (DeviceHandle const deviceHandle, const char *const name, en_uint32 *const value_p)
 Get property value. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_Delete (DeviceSlaveHandle *const handle_p)
 Delete Device slave and set handle to nullptr. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_Create (DeviceSlaveHandle *const handle_p, const char *url, const en_uint8 streams)
 Creator with Device slave handle as parameter and error code as return value. More...
 
FPGAMANAGER_DLL_FCT DeviceSlaveHandle DeviceSlaveApi_CreateObj (const char *url, const en_uint8 streams, EN_RESULT *const retVal_p)
 Creator with Device slave handle as return value and error code as parameter. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_Open (DeviceSlaveHandle const handle)
 Open device. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_Close (DeviceSlaveHandle const handle, const bool forcing)
 Close device slave. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_CreateMmAccess (DeviceSlaveHandle const deviceHandle, MmAccessSlaveHandle const mmAccessHandle, const en_uint8 streamNr)
 Create and get memory mapped slave access object. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_CreateStream (DeviceSlaveHandle const deviceHandle, StreamHandle const streamHandle, const en_uint8 streamNr, const bool frameBased, const bool upStreamEna, const bool downStreamEna)
 Create and get streaming access object. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_SetProperty (DeviceSlaveHandle const deviceHandle, const char *const name, const en_uint32 value)
 Set property value. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_GetProperty (DeviceSlaveHandle const deviceHandle, const char *const name, en_uint32 *const value_p)
 Get property value. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Delete (MmAccessHandle *const handle_p)
 Delete MmAccess and set handle to nullptr. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Create (MmAccessHandle *const handle_p)
 Creator with MmAccess handle as parameter and error code as return value. More...
 
FPGAMANAGER_DLL_FCT MmAccessHandle MmAccessApi_CreateObj (EN_RESULT *const retVal_p)
 Creator with MmAccess handle as return value and error code as parameter. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Open (MmAccessHandle const handle)
 Open memory-mapped access port. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Close (MmAccessHandle const handle, const bool forcing)
 Close memory-mapped access port. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Read (MmAccessHandle const mmAccessHandle, en_byte *const buffer_p, const en_uint32 bufSize, const en_uint32 address, const bool burst, const bool noAddrInc, TransferHandle const transferHandle)
 Read operation. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Write (MmAccessHandle const mmAccessHandle, en_byte *const buffer_p, const en_uint32 bufSize, const en_uint32 address, const bool burst, const bool noAddrInc, TransferHandle const transferHandle)
 Write operation. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_GetStatus (MmAccessHandle const mmAccessHandle, EProtocolStatus *const status_p)
 Get MmAccess status. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_SetStatusEvtCallback (MmAccessHandle const mmAccessHandle, const FMmAccessStatusEvtCallbackFct callback, void *const arg_p)
 Set status event callback function. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_SetProperty (MmAccessHandle const mmAccessHandle, const char *const name, const en_uint32 value)
 Set property value. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_GetProperty (MmAccessHandle const mmAccessHandle, const char *const name, en_uint32 *const value_p)
 Get property value. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_Delete (MmAccessSlaveHandle *const handle_p)
 Delete MmAccessSlave and set handle to nullptr. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_Create (MmAccessSlaveHandle *const handle_p)
 Creator with MmAccessSlave handle as parameter and error code as return value. More...
 
FPGAMANAGER_DLL_FCT MmAccessSlaveHandle MmAccessSlaveApi_CreateObj (EN_RESULT *const retVal_p)
 Creator with MmAccessSlave handle as return value and error code as parameter. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_Listen (MmAccessSlaveHandle const handle)
 Set Memory-mapped access slave port to listen. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_Close (MmAccessSlaveHandle const handle, const bool forcing)
 Close memory-mapped access slave. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_GetStatus (MmAccessSlaveHandle const handle, EProtocolStatus *const status_p)
 Get MmAccess slavestatus. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_SetStatusEvtCallback (MmAccessSlaveHandle const mmAccessHandle, const FMmAccessSlaveStatusEvtCallbackFct callback, void *const arg_p)
 Set status event callback function. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_SetReadCallback (MmAccessSlaveHandle const mmAccessHandle, const FMmAccessSlaveOperationCallbackFct callback, void *const arg_p)
 Set read operation callback function. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_SetWriteCallback (MmAccessSlaveHandle const mmAccessHandle, const FMmAccessSlaveOperationCallbackFct callback, void *const arg_p)
 Set write operation callback function. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_SetProperty (MmAccessSlaveHandle const mmAccessHandle, const char *const name, const en_uint32 value)
 Set property value. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_GetProperty (MmAccessSlaveHandle const mmAccessHandle, const char *const name, en_uint32 *const value_p)
 Get property value. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Delete (StreamHandle *const handle_p)
 Delete Stream and set handle to nullptr. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Create (StreamHandle *const handle_p)
 Creator with Stream handle as parameter and error code as return value. More...
 
FPGAMANAGER_DLL_FCT StreamHandle StreamApi_CreateObj (EN_RESULT *const retVal_p)
 Creator with Stream handle as return value and error code as parameter. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Open (StreamHandle const handle)
 Open stream. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Close (StreamHandle const handle, const bool forcing)
 Close stream. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Receive (StreamHandle const streamHandle, en_byte *const buffer_p, const en_uint32 bufSize, TransferHandle const transferHandle)
 Receive operation. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Send (StreamHandle const streamHandle, en_byte *const buffer_p, const en_uint32 bufSize, TransferHandle const transferHandle)
 Send operation. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_GetStatus (StreamHandle const streamHandle, EProtocolStatus *const status_p)
 Get stream status. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_SetStatusEvtCallback (StreamHandle const streamHandle, const FStreamStatusEvtCallbackFct callback, void *const arg_p)
 Set status event callback function. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_SetProperty (StreamHandle const streamHandle, const char *const name, const en_uint32 value)
 Set property value. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_GetProperty (StreamHandle const streamHandle, const char *const name, en_uint32 *const value_p)
 Get property value. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_Delete (SystemHandle *const handle_p)
 Delete System object and set handle to nullptr. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_Create (SystemHandle *const handle_p)
 Creator with System handle as parameter and error code as return value. More...
 
FPGAMANAGER_DLL_FCT SystemHandle SystemApi_CreateObj (EN_RESULT *const retVal_p)
 Creator with System object handle as return value and error code as parameter. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_GetSwVersion (SystemHandle const handle, en_uint8 *const major_p, en_uint8 *const minor_p)
 Get SW version. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_GetErrorTrace (SystemHandle const handle, char **trace_p)
 Get error trace. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_GetErrorMessage (SystemHandle const handle, const EN_RESULT error, char **message_p)
 Get error message for a given error code. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_Delete (TransferHandle *const handle_p)
 Delete transfer and set handle to nullptr. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_Create (TransferHandle *const handle_p)
 Creator with Transfer handle as parameter and error code as return value. More...
 
FPGAMANAGER_DLL_FCT TransferHandle TransferApi_CreateObj (EN_RESULT *const retVal_p)
 Creator with Transfer handle as return value and error code as parameter. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_GetStatus (TransferHandle const handle, ETransferStatus *const transferStatus_p)
 Get transfer status. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_GetTransferredBytes (TransferHandle const handle, en_uint32 *const bytes_p)
 Get the number of bytes transferred. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_GetFrameNumber (TransferHandle const handle, en_uint16 *const frameNumber_p)
 Get received UniSCP frame number. More...
 
FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_SetCallback (TransferHandle const handle, FTransferCallbackFct callback, void *const arg_p)
 Set callback function to be executed if the transfer is completed. More...
 

Detailed Description

Typedef Documentation

◆ FMmAccessSlaveOperationCallbackFct

typedef bool(* FMmAccessSlaveOperationCallbackFct) (const en_uint32 address, en_byte *const buffer_p, const en_uint32 accessSize, const bool noAddrInc, MmAccessSlaveHandle const mmAccess_p, void *const arg_p)

Callback function to be execute on operations (Read/Write) to be executed.

The user has to impelement the Read/Write operations within the callbacks registered.

Parameters
addressAddress to access
buffer_ppData buffer.
Write: The write data is stored within this buffer
Read: The read data must be copied into this buffer.
accessSizeSize of the access in bytes
noAddrIncIf true, all DWORDs are written to / read from the same address
mm_access_pMemory mapped access slave which called the callback function
arg_pArgument list
See also
MmAccessSlaveApi_SetReadCallback()
MmAccessSlaveApi_SetWriteCallback

◆ FMmAccessSlaveStatusEvtCallbackFct

typedef void(* FMmAccessSlaveStatusEvtCallbackFct) (const EProtocolStatus statusOld, const EProtocolStatus statusNew, MmAccessSlaveHandle const mmAccess_p, void *const arg_p)

Callback function to be execute on change of the MmAccessSlave status.

Note that a MmAccessSlave does not necessarily need to be linked with a callback function. If no callback function is set for the MmAccessSlave, no callback function is executed.

Parameters
statusOldProtocol status before transition
statusNewProtocol status after transition
mmAccess_pMmAccessSlave that called the callback function
arg_pArgument list
See also
MmAccessSlaveApi_SetStatusEvtCallback()

◆ FMmAccessStatusEvtCallbackFct

typedef void(* FMmAccessStatusEvtCallbackFct) (const EProtocolStatus statusOld, const EProtocolStatus statusNew, MmAccessHandle const mmAccess_p, void *const arg_p)

Callback function to be execute on change of the MmAccess status.

Note that a MmAccess does not necessarily need to be linked with a callback function. If no callback function is set for the MmAccess, no callback function is executed.

Parameters
statusOldProtocol status before transition
statusNewProtocol status after transition
stream_pMmAccess that called the callback function
arg_pArgument list
See also
MmAccessApi_SetStatusEvtCallback()

◆ FStreamStatusEvtCallbackFct

typedef void(* FStreamStatusEvtCallbackFct) (const EProtocolStatus statusOld, const EProtocolStatus statusNew, StreamHandle const stream_p, void *const arg_p)

Callback function to be execute on change of the stream status.

Note that a stream does not necessarily need to be linked with a callback function. If no callback function is set for the stream, no callback function is executed.

Parameters
statusOldProtocol status before transition
statusNewProtocol status after transition
stream_pStream that called the callback function
arg_pArgument list
See also
StreamApi_SetStatusEvtCallback()

◆ FTransferCallbackFct

typedef void(* FTransferCallbackFct) (const EN_RESULT error, TransferHandle const transfer_p, void *const arg_p)

Callback function to be execute on completion of a transfer.

The callback function is executed if a transfer completes independently of whether the transfer was successful or contained an error.
Note that a transfer does not necessarily need to be linked with a callback function. If no callback function is set for the transfer, no callback function is executed.

Parameters
errorError code (error occured during reception)
transfer_pTransfer which was completed
arg_pCallback argument list
See also
SetCallback()

Function Documentation

◆ DeviceApi_Close()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Close ( DeviceHandle const  handle,
const bool  forcing 
)

Close device.

Close device must be called before the device is destructed. This command closes the link to the device.

Parameters
handleHandle for the Device to be close
forcingForcing close
Value Forcing close
True Device is closed even if transfers are pending. Pending transfers are discarded.
False If transfers are pending, an error is thrown and the device is not closed.
Returns
Error code
Note
The forcing version of the close command is significantly slower than the non-forcing version. Use non-forcing close whenever possible and only use forcing close to recover from unclean closes (e.g. if the device was disconnected while the connection was open).

◆ DeviceApi_Create()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Create ( DeviceHandle *const  handle_p,
const char *  url,
const en_uint8  streams 
)

Creator with Transfer handle as parameter and error code as return value.

Parameters
handle_pPointer to write the handle for the created Device into.
urlURL of the device to create
Examples:
Protocol URL Comment
UDP udp://192.168.1.12 Access slave via UDP at known IP address
USB FTDI ftd2xx://serialnumber/FT123456A Access slave with known serial number
USB FX3 fx3://vendor=204A/product=1001 Access slave with given product and vendor ID
fx3://vendor=204A/product=1001/index=0 Access slave with given product and vendor ID and zero-based index
fx3://path=USB&PID_1001\6&33F677BA&0&4 Access slave with given device instance path
PCIe pcie://device=0 Access slave by zero-based index within the list of Enclustra FPGA Manager devices
streamsNumber of streams.
Note that the memory mapped access also counts as one stream.
Returns
Error code
Note
handle_p must be set to nullptr prior to this function call. Otherwise an error is returned.

◆ DeviceApi_CreateMmAccess()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_CreateMmAccess ( DeviceHandle const  deviceHandle,
MmAccessHandle const  mmAccessHandle,
const en_uint8  streamNr 
)

Create and get memory mapped access object.

Parameters
deviceHandleHandle to the Device to create memory mapped access object for
mmAccessHandleHandle to the Memory Mapped Access to assign the newly created access to.
streamNrStream number to use for the memory mapped access
Returns
Error code
Note
The Memory Mapped Access object described by mmAccessHandle must be crated with MmAccessApi_Create() or MmAccessApi_CreateObj() prior to this function call.
The created memory-mapped access port stays alive until the device is deleted. It is not possible to create the same memory-mapped access port a second time. Therefore the user has to hold the reference for its whole lifetime.

◆ DeviceApi_CreateObj()

FPGAMANAGER_DLL_FCT DeviceHandle DeviceApi_CreateObj ( const char *  url,
const en_uint8  streams,
EN_RESULT *const  retVal_p 
)

Creator with Device handle as return value and error code as parameter.

Parameters
urlURL of the device to create
Examples:
Protocol URL Comment
UDP udp://192.168.1.12 Access slave via UDP at known IP address
USB FTDI ftd2xx://serialnumber/FT123456A Access slave with known serial number
USB FX3 fx3://vendor=204A/product=1001 Access slave with given product and vendor ID
fx3://vendor=204A/product=1001/index=0 Access slave with given product and vendor ID and zero-based index
fx3://path=USB&PID_1001\6&33F677BA&0&4 Access slave with given device instance path
PCIe pcie://device=0 Access slave by zero-based index within the list of Enclustra FPGA Manager devices
streamsNumber of streams.
Note that the memory mapped access also counts as one stream.
retVal_pError code
Returns
Created Handle for the created Device

◆ DeviceApi_CreateStream()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_CreateStream ( DeviceHandle const  deviceHandle,
StreamHandle const  streamHandle,
const en_uint8  streamNr,
const bool  frameBased,
const bool  upStreamEna,
const bool  downStreamEna 
)

Create and get streaming access object.

Parameters
deviceHandleHandle to the Device to create stream access object for
streamHandleHandle to the Stream to assign the newly created access to.
streamNrStream number to create
frameBasedStream type
Value Stream type
True Frame based
False Byte stream
downStreamEnaDownstream data (from master to slave)
Value Downstream
True Enabled
False Disabled
upStreamEnaUpstream data (from slave to master)
Value Upstream
True Enabled
False Disabled
Returns
Error code
Note
The stream object described by streamHandle must be created with StreamApi_Create() or StreamApi_CreateObj() prior to this function call.
The created stream stays alive until the device is deleted. It is not possible to create the same stream a second time. Therefore the user has to hold the reference for its whole lifetime.

◆ DeviceApi_Delete()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Delete ( DeviceHandle *const  handle_p)

Delete Device and set handle to nullptr.

Parameters
handle_pDevice to delete
Is set to nullptr during the function call.
Returns
Error code

◆ DeviceApi_GetProperty()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_GetProperty ( DeviceHandle const  deviceHandle,
const char *const  name,
en_uint32 *const  value_p 
)

Get property value.

Parameters
deviceHandleHandle for the Device to get the property value from
nameName of the property to get the value for
value_pPointer to write the property value into
Returns
Error code

◆ DeviceApi_Open()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Open ( DeviceHandle const  handle)

Open device.

Open device must be called before any other operation can be used. This command opens the link to the device.

Parameters
handleHandle for the Device to be open
Returns
Error code

◆ DeviceApi_SetProperty()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_SetProperty ( DeviceHandle const  deviceHandle,
const char *const  name,
const en_uint32  value 
)

Set property value.

Properties:

Property Default Min Max Description
Fx3FifoMode 0 0 1 Available for FX3 devices only!
0: 16-bit FIFO interface
1: 32-bit FIFO interface
Fx3PacketSizeMultiplier 1 1 64 Available for FX3 devices only!
FX3 packet size in 16kB units. Use low values for fast roundtrip delay and high values for high streaming bandwidth.
This value must match the setting of the FPGA firmware.
Fx3OpenTransfers 2 2 64000 Available for FX3 devices only!
Open transfers on FX3 layer. This has no relation to open UniSCP or MM transfers. The maximum allowed value is host controller dependent.
UniScpVendorId 0xDEADBEEF 0 0xFFFFFFFF UniSCP vendor ID
- must match slave setting for opening it
- must be set prior CreateStream() and CreateMmAccess() calls
- Not available for PCIe
UniScpProductId 0xCAFEBABE 0 0xFFFFFFFF UniSCP product ID
- must match slave setting for opening it
- must be set prior CreateStream() and CreateMmAccess() calls
- Not available for PCIe
Parameters
deviceHandleHandle for the Device to set the property value for
nameName of the property to set
valueNew value of the property
Returns
Error code

◆ DeviceSlaveApi_Close()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_Close ( DeviceSlaveHandle const  handle,
const bool  forcing 
)

Close device slave.

Close device slave must be called before the device slave is destructed. This command closes the link to the device slave.

Parameters
handleHandle for the Device slave to be close
forcingForcing close
Value Forcing close
True Device is closed even if transfers are pending. Pending transfers are discarded.
False If transfers are pending, an error is thrown and the device is not closed.
Returns
Error code
Note
The forcing version of the close command is significantly slower than the non-forcing version. Use non-forcing close whenever possible and only use forcing close to recover from unclean closes (e.g. if the device was disconnected while the connection was open).

◆ DeviceSlaveApi_Create()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_Create ( DeviceSlaveHandle *const  handle_p,
const char *  url,
const en_uint8  streams 
)

Creator with Device slave handle as parameter and error code as return value.

Parameters
handle_pPointer to write the handle for the created Device slave into.
urlURL of the device slave to create
Examples:
Protocol URL Comment
TCP tcp://192.168.1.12 Allow master to access slave over TCP via this slave-IP-address
UDP udp://192.168.1.12 Allow master to access slave over UDP via this slave-IP-address
streamsNumber of streams.
Note that the memory mapped access also counts as one stream.
Returns
Error code
Note
handle_p must be set to nullptr prior to this function call. Otherwise an error is returned.

◆ DeviceSlaveApi_CreateMmAccess()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_CreateMmAccess ( DeviceSlaveHandle const  deviceHandle,
MmAccessSlaveHandle const  mmAccessHandle,
const en_uint8  streamNr 
)

Create and get memory mapped slave access object.

Parameters
deviceHandleHandle to the Device slave to create memory mapped access object for
mmAccessHandleHandle to the Memory Mapped Access slave to assign the newly created access to.
streamNrStream number to use for the memory mapped access
Returns
Error code
Note
The Memory Mapped Access Slave object described by mmAccessHandle must be crated with MmAccessSlaveApi_Create() or MmAccessSlaveApi_CreateObj() prior to this function call.
The created memory-mapped access slave port stays alive until the device is deleted. It is not possible to create the same memory-mapped access slave port a second time. Therefore the user has to hold the reference for its whole lifetime.

◆ DeviceSlaveApi_CreateObj()

FPGAMANAGER_DLL_FCT DeviceSlaveHandle DeviceSlaveApi_CreateObj ( const char *  url,
const en_uint8  streams,
EN_RESULT *const  retVal_p 
)

Creator with Device slave handle as return value and error code as parameter.

Parameters
urlURL of the device slave to create
Examples:
Protocol URL Comment
TCP tcp://192.168.1.12 Allow master to access slave over TCP via this slave-IP-address
UDP udp://192.168.1.12 Allow master to access slave over UDP via this slave-IP-address
streamsNumber of streams.
Note that the memory mapped access also counts as one stream.
retVal_pError code
Returns
Created Handle for the created Device

◆ DeviceSlaveApi_CreateStream()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_CreateStream ( DeviceSlaveHandle const  deviceHandle,
StreamHandle const  streamHandle,
const en_uint8  streamNr,
const bool  frameBased,
const bool  upStreamEna,
const bool  downStreamEna 
)

Create and get streaming access object.

Parameters
deviceHandleHandle to the Device slave to create stream access object for
streamHandleHandle to the Stream to assign the newly created access to.
streamNrStream number to create
frameBasedStream type
Value Stream type
True Frame based
False Byte stream
downStreamEnaDownstream data (from master to slave)
Value Downstream
True Enabled
False Disabled
upStreamEnaUpstream data (from slave to master)
Value Upstream
True Enabled
False Disabled
Returns
Error code
Note
The stream object described by streamHandle must be created with StreamApi_Create() or StreamApi_CreateObj() prior to this function call.
The created stream stays alive until the device is deleted. It is not possible to create the same stream a second time. Therefore the user has to hold the reference for its whole lifetime.

◆ DeviceSlaveApi_Delete()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_Delete ( DeviceSlaveHandle *const  handle_p)

Delete Device slave and set handle to nullptr.

Parameters
handle_pDevice slave to delete
Is set to nullptr during the function call.
Returns
Error code

◆ DeviceSlaveApi_GetProperty()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_GetProperty ( DeviceSlaveHandle const  deviceHandle,
const char *const  name,
en_uint32 *const  value_p 
)

Get property value.

Parameters
deviceHandleHandle for the Device to get the property value from
nameName of the property to get the value for
value_pPointer to write the property value into
Returns
Error code

◆ DeviceSlaveApi_Open()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_Open ( DeviceSlaveHandle const  handle)

Open device.

Open device must be called before any other operation can be used. This command opens the link to the device slave.

Parameters
handleHandle for the Device slave to be open
Returns
Error code

◆ DeviceSlaveApi_SetProperty()

FPGAMANAGER_DLL_FCT EN_RESULT DeviceSlaveApi_SetProperty ( DeviceSlaveHandle const  deviceHandle,
const char *const  name,
const en_uint32  value 
)

Set property value.

Properties:

Property Default Min Max Description
UniScpVendorId 0xDEADBEEF 0 0xFFFFFFFF UniSCP vendor ID
- must match slave setting for opening it
- must be set prior CreateStream() and CreateMmAccess() calls
UniScpProductId 0xCAFEBABE 0 0xFFFFFFFF UniSCP product ID
- must match slave setting for opening it
- must be set prior CreateStream() and CreateMmAccess() calls
Parameters
deviceHandleHandle for the Device to set the property value for
nameName of the property to set
valueNew value of the property
Returns
Error code

◆ MmAccessApi_Close()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Close ( MmAccessHandle const  handle,
const bool  forcing 
)

Close memory-mapped access port.

Parameters
handleHandle for the MmAccess to be closed
forcingForcing close
Value Forcing close
True Memory mapped access is closed even if transfers are pending. Pending transfers are discarded.
False If transfers are pending, an error is thrown and the memory mapped access is not closed.
Returns
Error code
Note
The forcing version of the close command is significantly slower than the non-forcing version. Use non-forcing close whenever possible and only use forcing close to recover from unclean closes (e.g. if the device was disconnected while the connection was open).

◆ MmAccessApi_Create()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Create ( MmAccessHandle *const  handle_p)

Creator with MmAccess handle as parameter and error code as return value.

Parameters
handle_pPointer to write the handle to the created MmAccess into
Returns
Error code
Note
handle_p must be set to nullptr prior to this function call. Otherwise an error is returned.

◆ MmAccessApi_CreateObj()

FPGAMANAGER_DLL_FCT MmAccessHandle MmAccessApi_CreateObj ( EN_RESULT *const  retVal_p)

Creator with MmAccess handle as return value and error code as parameter.

Parameters
retVal_pError code
Returns
Handle for the created MmAccess

◆ MmAccessApi_Delete()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Delete ( MmAccessHandle *const  handle_p)

Delete MmAccess and set handle to nullptr.

Parameters
handle_pMmAccess to delete
Is set to nullptr during the function call.
Returns
Error code

◆ MmAccessApi_GetProperty()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_GetProperty ( MmAccessHandle const  mmAccessHandle,
const char *const  name,
en_uint32 *const  value_p 
)

Get property value.

Parameters
mmAccessHandleHandle for the MmAccess to get the property value from
nameName of the property to get the value for
value_pPointer to write the property value into
Returns
Error code

◆ MmAccessApi_GetStatus()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_GetStatus ( MmAccessHandle const  mmAccessHandle,
EProtocolStatus *const  status_p 
)

Get MmAccess status.

Parameters
mmAccessHandleHandle for the MmAccess to get the status of
status_pPointer to write the MmAccess status into
Returns
Error code

◆ MmAccessApi_Open()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Open ( MmAccessHandle const  handle)

Open memory-mapped access port.

The memory-mapped access port must be opened before MmAccessApi_Read() and MmAccessApi_Write() can be used.

Parameters
handleHandle for the MmAccess to be opened
Returns
Error code

◆ MmAccessApi_Read()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Read ( MmAccessHandle const  mmAccessHandle,
en_byte *const  buffer_p,
const en_uint32  bufSize,
const en_uint32  address,
const bool  burst,
const bool  noAddrInc,
TransferHandle const  transferHandle 
)

Read operation.

Read from a memory location within the FPGA.

Parameters
mmAccessHandleHandle for the MmAccess to read from
buffer_pBuffer to write read data into
This buffer must be kept alive until the transfer completed. It is suggested to allocate this buffer on the heap ond not on the stack.
bufSizeSize of buffer_p in bytes
transferHandleHandle to the Transfer to track the status of non-blocking transfers.
Pass nullptr for blocking transfers.
addressAddress start reading from.
burstEnable burst transfers
Value Burst Transfer
True Transfer is executed as one burst transfer
False Transfer is executed as multiple single DWORD transfers
noAddrIncDisable address increment
Value Auto Address Increment
True Address increment disabled, all DWORDs are written to the same address
False Address increment enabled, data is written to a continuous memory range
Returns
Error code
Note
Do not set burst to true if the accessed slave is not able to handle burst transfers!
The MmAccess must be opened (see MmAccessApi_Open()) prior to this function call

◆ MmAccessApi_SetProperty()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_SetProperty ( MmAccessHandle const  mmAccessHandle,
const char *const  name,
const en_uint32  value 
)

Set property value.

Properties:

Property Default Min Max Description
MaxUniScpPacketSize 1400 16 64000 Maximum UniSCP packet size in bytes
- Must match for master and slave
- Must fit into one ethernet frame for UDP
- Not applicable for PCIe implementation
MaxMmCommandSize 1388 16 64000 Maximum memory mapped command size in bytes
- Must be smaller or equal to the maximum expected size on slave side
MaxMmResponseSize 1388 16 64000 Maximum memory mapped response size in bytes
MaxOpenMmTransfers 2 2 256 Maximum number of open memory mapped transfers.
- Must be set according the the generic set for the FPGA IP-Core
MaxUniScpPendingPackets 1024 1 64000 Maximum number of pending UniSCP packets. Note that memory is required for each packet.
Suggestions:
- UDP/TCP/USB 2.0: 16
- USB 3.0: 1024
- Not applicable for PCIe implementation
UniScpUpPktRate 0 0 1000000 Minimum delay between two packets sent by the slave
- Can be used to prevent packet loss for slow masters
- Is rounded internally by up to 12.5%
- 0 = no limitation
- Not applicable for PCIe implementation
UniScpKeepAliveTimeout 0 0 64000 Time between KeepAlive packets in milliseconds
- 0 = No KeepAlive packets
- Not applicable for PCIe implementation
Parameters
mmAccessHandleHandle for the MmAccess to set the property value for
nameName of the property to set
valueNew value of the property
Returns
Error code

◆ MmAccessApi_SetStatusEvtCallback()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_SetStatusEvtCallback ( MmAccessHandle const  mmAccessHandle,
const FMmAccessStatusEvtCallbackFct  callback,
void *const  arg_p 
)

Set status event callback function.

Parameters
mmAccessHandleHandle for the MmAccess to register the callback for
callbackCallback function (use nullptr for unregistering a callback)
arg_pArgument list to pass when calling the callback
Returns
Error code

◆ MmAccessApi_Write()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessApi_Write ( MmAccessHandle const  mmAccessHandle,
en_byte *const  buffer_p,
const en_uint32  bufSize,
const en_uint32  address,
const bool  burst,
const bool  noAddrInc,
TransferHandle const  transferHandle 
)

Write operation.

Write to a memory location within the FPGA.

Parameters
mmAccessHandleHandle for the MmAccess to write to
buffer_pBuffer which contains the write data
This buffer must be kept alive until the transfer completed. It is suggested to allocate this buffer on the heap ond not on the stack.
bufSizeSize of buffer_p in bytes
transferHandleHandle to the Transfer to track the status of non-blocking transfers.
Pass nullptr for blocking transfers.
addressAddress to start writing at.
burstEnable burst transfers
Value Burst Transfer
True Transfer is executed as one burst transfer
False Transfer is executed as multiple single DWORD transfers
noAddrIncDisable address increment
Value Auto Address Increment
True Address increment disabled, all DWORDs are written to the same address
False Address increment enabled, data is written to a continuous memory range
Returns
Error code
Note
Do not set burst to true if the accessed slave is not able to handle burst transfers!
The MmAccess must be opened (see MmAccessApi_Open()) prior to this function call

◆ MmAccessSlaveApi_Close()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_Close ( MmAccessSlaveHandle const  handle,
const bool  forcing 
)

Close memory-mapped access slave.

Parameters
handleHandle for the MmAccessSlave to be closed
forcingForcing close
Value Forcing close
True Memory mapped access is closed even if transfers are pending. Pending transfers are discarded.
False If transfers are pending, an error is thrown and the memory mapped access is not closed.
Returns
Error code
Note
In the normal use case, the port should always be closed by a close command of the master. This function should only be used if the master lost connection or in other special cases.
The forcing version of the close command is significantly slower than the non-forcing version. Use non-forcing close whenever possible and only use forcing close to recover from unclean closes (e.g. if the device was disconnected while the connection was open).

◆ MmAccessSlaveApi_Create()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_Create ( MmAccessSlaveHandle *const  handle_p)

Creator with MmAccessSlave handle as parameter and error code as return value.

Parameters
handle_pPointer to write the handle to the created MmAccessSlave into
Returns
Error code
Note
handle_p must be set to nullptr prior to this function call. Otherwise an error is returned.

◆ MmAccessSlaveApi_CreateObj()

FPGAMANAGER_DLL_FCT MmAccessSlaveHandle MmAccessSlaveApi_CreateObj ( EN_RESULT *const  retVal_p)

Creator with MmAccessSlave handle as return value and error code as parameter.

Parameters
retVal_pError code
Returns
Handle for the created MmAccessSlave

◆ MmAccessSlaveApi_Delete()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_Delete ( MmAccessSlaveHandle *const  handle_p)

Delete MmAccessSlave and set handle to nullptr.

Parameters
handle_pMmAccessSlave to delete
Is set to nullptr during the function call.
Returns
Error code

◆ MmAccessSlaveApi_GetProperty()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_GetProperty ( MmAccessSlaveHandle const  mmAccessHandle,
const char *const  name,
en_uint32 *const  value_p 
)

Get property value.

Parameters
mmAccessHandleHandle for the MmAccessSlave to get the property value from
nameName of the property to get the value for
value_pPointer to write the property value into
Returns
Error code

◆ MmAccessSlaveApi_GetStatus()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_GetStatus ( MmAccessSlaveHandle const  handle,
EProtocolStatus *const  status_p 
)

Get MmAccess slavestatus.

Parameters
handleHandle for the MmAccess slave to get the status of
status_pPointer to write the MmAccess slavestatus into
Returns
Error code

◆ MmAccessSlaveApi_Listen()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_Listen ( MmAccessSlaveHandle const  handle)

Set Memory-mapped access slave port to listen.

The memory-mapped access port must be set to listen and opened by the master before any read or write operations are accepted.

Parameters
handleHandle for the MmAccessSlave to be opened
Returns
Error code
Note
The callbacks for Read and Write operations must be set prior to calling this function.
See also
MmAccessSlaveApi_SetReadCallback()
MmAccessSlaveApi_SetWriteCallback()

◆ MmAccessSlaveApi_SetProperty()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_SetProperty ( MmAccessSlaveHandle const  mmAccessHandle,
const char *const  name,
const en_uint32  value 
)

Set property value.

Properties:

Property Default Min Max Description
MaxUniScpPacketSize 1400 16 64000 Maximum UniSCP packet size in bytes
- Must match for master and slave
- Must fit into one ethernet frame for UDP
- Not applicable for PCIe implementation
MaxMmCommandSize 1388 16 64000 Maximum memory mapped command size in bytes
- Must be smaller or equal to the maximum expected size on slave side
MaxMmResponseSize 1388 16 64000 Maximum memory mapped response size in bytes
MaxOpenMmTransfers 2 2 256 Maximum number of open memory mapped transfers.
- Must be set according the the generic set for the FPGA IP-Core
MaxUniScpPendingPackets 1024 1 64000 Maximum number of pending UniSCP packets. Note that memory is required for each packet.
Suggestions:
- UDP/TCP/USB 2.0: 16
- USB 3.0: 1024
- Not applicable for PCIe implementation
UniScpUpPktRate 0 0 1000000 Minimum delay between two packets sent by the slave
- Can be used to prevent packet loss for slow masters
- Is rounded internally by up to 12.5%
- 0 = no limitation
- Not applicable for PCIe implementation
UniScpKeepAliveTimeout 0 0 64000 Time between KeepAlive packets in milliseconds
- 0 = No KeepAlive packets
- Not applicable for PCIe implementation
Parameters
mmAccessHandleHandle for the MmAccessSlave to set the property value for
nameName of the property to set
valueNew value of the property
Returns
Error code

◆ MmAccessSlaveApi_SetReadCallback()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_SetReadCallback ( MmAccessSlaveHandle const  mmAccessHandle,
const FMmAccessSlaveOperationCallbackFct  callback,
void *const  arg_p 
)

Set read operation callback function.

Parameters
mmAccessHandleHandle for the MmAccessSlave to register the callback for
callbackCallback function (use nullptr for unregistering a callback)
arg_pArgument list to pass when calling the callback
Returns
Error code
Note
This function is only allowed to be called in closed state.

◆ MmAccessSlaveApi_SetStatusEvtCallback()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_SetStatusEvtCallback ( MmAccessSlaveHandle const  mmAccessHandle,
const FMmAccessSlaveStatusEvtCallbackFct  callback,
void *const  arg_p 
)

Set status event callback function.

Parameters
mmAccessHandleHandle for the MmAccessSlave to register the callback for
callbackCallback function (use nullptr for unregistering a callback)
arg_pArgument list to pass when calling the callback
Returns
Error code
Note
This function is only allowed to be called in closed state.

◆ MmAccessSlaveApi_SetWriteCallback()

FPGAMANAGER_DLL_FCT EN_RESULT MmAccessSlaveApi_SetWriteCallback ( MmAccessSlaveHandle const  mmAccessHandle,
const FMmAccessSlaveOperationCallbackFct  callback,
void *const  arg_p 
)

Set write operation callback function.

Parameters
mmAccessHandleHandle for the MmAccessSlave to register the callback for
callbackCallback function (use nullptr for unregistering a callback)
arg_pArgument list to pass when calling the callback
Returns
Error code
Note
This function is only allowed to be called in closed state.

◆ StreamApi_Close()

FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Close ( StreamHandle const  handle,
const bool  forcing 
)

Close stream.

Parameters
handleHandle for the Stream to be closed
forcingForcing close
Value Forcing close
True Stream is closed even if transfers are pending. Pending transfers are discarded.
False If transfers are pending, an error is thrown and the stream is not closed.
Returns
Error code
Note
The forcing version of the close command is significantly slower than the non-forcing version. Use non-forcing close whenever possible and only use forcing close to recover from unclean closes (e.g. if the device was disconnected while the connection was open).

◆ StreamApi_Create()

FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Create ( StreamHandle *const  handle_p)

Creator with Stream handle as parameter and error code as return value.

Parameters
handle_pPointer to write the handle to the created Stream into.
Returns
Error code
Note
handle_p must be set to nullptr prior to this function call. Otherwise an error is returned.

◆ StreamApi_CreateObj()

FPGAMANAGER_DLL_FCT StreamHandle StreamApi_CreateObj ( EN_RESULT *const  retVal_p)

Creator with Stream handle as return value and error code as parameter.

Parameters
retVal_pError code
Returns
Handle to the created Stream

◆ StreamApi_Delete()

FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Delete ( StreamHandle *const  handle_p)

Delete Stream and set handle to nullptr.

Parameters
handle_pStream to delete
Is set to nullptr during the function call.
Returns
Error code

◆ StreamApi_GetProperty()

FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_GetProperty ( StreamHandle const  streamHandle,
const char *const  name,
en_uint32 *const  value_p 
)

Get property value.

Parameters
streamHandleHandle for the Stream to get the property value from
nameName of the property to get the value for
value_pPointer to write the property value into
Returns
Error code

◆ StreamApi_GetStatus()

FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_GetStatus ( StreamHandle const  streamHandle,
EProtocolStatus *const  status_p 
)

Get stream status.

Parameters
streamHandleHandle for the Stream to get the status of
status_pPointer to write the stream status into
Returns
Error code

◆ StreamApi_Open()

FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Open ( StreamHandle const  handle)

Open stream.

The stream must be opened before StreamApi_Send() and StreamApi_Receive() can be used.

Parameters
handleHandle for the Stream to be opened
Returns
Error code

◆ StreamApi_Receive()

FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Receive ( StreamHandle const  streamHandle,
en_byte *const  buffer_p,
const en_uint32  bufSize,
TransferHandle const  transferHandle 
)

Receive operation.

For frame based streams, one frame is received. If the frame does not fit into the buffer, an error is generated.
For byte streams, the transfer is finished as soon as the buffer is full (and not earlier).

Parameters
streamHandleHandle for the Stream to receive data from
buffer_pBuffer to write received data into
This buffer must be kept alive until the transfer completed. It is suggested to allocate this buffer on the heap ond not on the stack.
bufSizeSize of buffer_p in bytes
transferHandleHandle for the Transfer to track the status of non-blocking transfers.
Pass nullptr for blocking transfers.
Returns
Error code
Note
The Stream must be opened (see StreamApi_Open()) prior to this function call
Warning
Do not use blocking operations within callbacks of non-blocking operations of the same stream

◆ StreamApi_Send()

FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_Send ( StreamHandle const  streamHandle,
en_byte *const  buffer_p,
const en_uint32  bufSize,
TransferHandle const  transferHandle 
)

Send operation.

Parameters
streamHandleHandle for the Stream to send data to
buffer_pBuffer containing the data to send
This buffer must be kept alive until the transfer completed. It is suggested to allocate this buffer on the heap ond not on the stack.
bufSizeSize of buffer_p in bytes
transferHandleHandle for the Transfer to track the status of non-blocking transfers. Pass nullptr for blocking transfers.
Returns
Error code
Note
The Stream must be opened (see StreamApi_Open()) prior to this function call
Warning
Do not use blocking operations within callbacks of non-blocking operations of the same stream

◆ StreamApi_SetProperty()

FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_SetProperty ( StreamHandle const  streamHandle,
const char *const  name,
const en_uint32  value 
)

Set property value.

Properties:

Property Default Min Max Description
MaxUniScpPacketSize 1400 16 64000 Maximum UniSCP packet size in bytes
- Must match for master and slave
- Must fit into one ethernet frame for UDP
- Not applicable for PCIe implementation
MaxUniScpPendingPackets 1024 1 64000 Maximum number of pending UniSCP packets. Note that memory is required for each packet.
Suggestions:
- UDP/TCP/USB 2.0: 16
- USB 3.0: 1024
- Not applicable for PCIe implementation
UniScpUpPktRate 0 0 1000000 Minimum delay between two packets sent by the slave
- Can be used to prevent packet loss for slow masters
- Is rounded internally by up to 12.5%
- 0 = no limitation
- Not applicable for PCIe implementation
OperationMode 0 0 1 Operation mode:
- 0: Continuous (no callbacks for packets lost completely)
- 1: Synchronous (callback for every packet, also for lost packets)
- Not applicable for PCIe implementation
UniScpKeepAliveTimeout 0 0 64000 Time between KeepAlive packets in milliseconds
- 0 = No KeepAlive packets
- Not applicable for PCIe implementation
Parameters
streamHandleHandle for the Stream to set the property value for
nameName of the property to set
valueNew value of the property
Returns
Error code

◆ StreamApi_SetStatusEvtCallback()

FPGAMANAGER_DLL_FCT EN_RESULT StreamApi_SetStatusEvtCallback ( StreamHandle const  streamHandle,
const FStreamStatusEvtCallbackFct  callback,
void *const  arg_p 
)

Set status event callback function.

Parameters
streamHandleHandle for the Stream to register the callback for
callbackCallback function (use nullptr for unregistering a callback)
arg_pArgument list to pass when calling the callback
Returns
Error code

◆ SystemApi_Create()

FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_Create ( SystemHandle *const  handle_p)

Creator with System handle as parameter and error code as return value.

Parameters
handle_pPointer to write the handle to the created System object into
Returns
Error code
Note
handle_p must be set to nullptr prior to this function call. Otherwise an error is returned.

◆ SystemApi_CreateObj()

FPGAMANAGER_DLL_FCT SystemHandle SystemApi_CreateObj ( EN_RESULT *const  retVal_p)

Creator with System object handle as return value and error code as parameter.

Parameters
retVal_pError code
Returns
Created Handle for the System object created

◆ SystemApi_Delete()

FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_Delete ( SystemHandle *const  handle_p)

Delete System object and set handle to nullptr.

Parameters
handle_pHandle to System object to delete
Is set to nullptr during the function call.
Returns
Error code

◆ SystemApi_GetErrorMessage()

FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_GetErrorMessage ( SystemHandle const  handle,
const EN_RESULT  error,
char **  message_p 
)

Get error message for a given error code.

The error strings are held inside the FPGA manager. Only a pointer to the corresponding error string is returned.
The error message can be used to print user messages for handled and/or unhandled errors.

Parameters
handleSystem object to use
errorError code to get error message for
message_pPointer to set to the error message
Returns
Error code

◆ SystemApi_GetErrorTrace()

FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_GetErrorTrace ( SystemHandle const  handle,
char **  trace_p 
)

Get error trace.

The error trace string is held inside the FPGA manager. Only a pointer to it is returned.
The error trace helps to track errors.

Parameters
handleHandle to the System object to get the error trace from
trace_pPointer to set to the error trace
Returns
Error code

◆ SystemApi_GetSwVersion()

FPGAMANAGER_DLL_FCT EN_RESULT SystemApi_GetSwVersion ( SystemHandle const  handle,
en_uint8 *const  major_p,
en_uint8 *const  minor_p 
)

Get SW version.

Parameters
handleHandle to the System object to get the SW version from
major_pPointer to write the major version number into
minor_pPointer to write the minor version number into
Returns
Error code

◆ TransferApi_Create()

FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_Create ( TransferHandle *const  handle_p)

Creator with Transfer handle as parameter and error code as return value.

Parameters
handle_pPointer to write the handle for the created Transfer into.
Returns
Error code
Note
handle_p must be set to nullptr prior to this function call. Otherwise an error is returned.

◆ TransferApi_CreateObj()

FPGAMANAGER_DLL_FCT TransferHandle TransferApi_CreateObj ( EN_RESULT *const  retVal_p)

Creator with Transfer handle as return value and error code as parameter.

Parameters
retVal_pError code
Returns
Handle for the created Transfer.

◆ TransferApi_Delete()

FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_Delete ( TransferHandle *const  handle_p)

Delete transfer and set handle to nullptr.

Parameters
handle_pTransfer to delete
Is set to nullptr during the function call.
Returns
Error code

◆ TransferApi_GetFrameNumber()

FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_GetFrameNumber ( TransferHandle const  handle,
en_uint16 *const  frameNumber_p 
)

Get received UniSCP frame number.

For streaming transfers, the frame number is returned. For memory mapped transfers an error is returned.
The frame number can be used to detect if frames are missing.

Parameters
handleHandle for the Transfer to get the frame number from
frameNumber_pTarget to write frame number into.
Returns
Error code
Note
This method does not work for the PCIe implementation since the PCIe implementation does not rely on the UniSCP protocol. Therefore the frame nubmer is not applicable.

◆ TransferApi_GetStatus()

FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_GetStatus ( TransferHandle const  handle,
ETransferStatus *const  transferStatus_p 
)

Get transfer status.

The transfer status is updated while the transfer is executed. It can be read safely during transfer execution.

Parameters
handleHandle for the Transfer to get the status for
transferStatus_pTarget to write the transfer status into.
Returns
Error code

◆ TransferApi_GetTransferredBytes()

FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_GetTransferredBytes ( TransferHandle const  handle,
en_uint32 *const  bytes_p 
)

Get the number of bytes transferred.

The number of bytes transferred is updated while the transfer is in progress.
At the end of the transfer it can be used to find out the number of bytes really transferred.

Parameters
handleHandle for the Transfer to get the number of transferred bytes from
bytes_pTarget to write the number of transferred bytes into.
Returns
Error code

◆ TransferApi_SetCallback()

FPGAMANAGER_DLL_FCT EN_RESULT TransferApi_SetCallback ( TransferHandle const  handle,
FTransferCallbackFct  callback,
void *const  arg_p 
)

Set callback function to be executed if the transfer is completed.

The callback function is executed independently of whether the transfer was successful or was aborted due to an error.
It is allowed to not set any callback function.

Parameters
handleHandle for the Transfer to set the callback for
callbackCallback function, use nullptr to unregister the callback.
arg_pPointer to an argument list for the callback to call.
Returns
Error code