FpgaManager
Software API Documentation
DeviceApi.h
1 /**************************************************************************************************
2 ** Copyright (c) 2013 by Enclustra, Switzerland
3 ** All rights reserved.
4 **************************************************************************************************/
5 
6 #ifndef _DeviceApi_h
7 #define _DeviceApi_h
8 
9 #include "DllImportExport.h"
10 #include "MmAccessApi.h"
11 #include "StreamApi.h"
12 
13 typedef void* DeviceHandle;
14 
22 //*************************************************************************
23 // Construct / Destruct
24 //*************************************************************************
32 FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Delete(DeviceHandle* const handle_p);
33 
54 FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Create( DeviceHandle* const handle_p,
55  const char* url,
56  const en_uint8 streams);
75 FPGAMANAGER_DLL_FCT DeviceHandle DeviceApi_CreateObj( const char* url,
76  const en_uint8 streams,
77  EN_RESULT* const retVal_p);
78 
79 //*************************************************************************
80 // Methods
81 //*************************************************************************
90 FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Open( DeviceHandle const handle);
91 
110 FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Close( DeviceHandle const handle,
111  const bool forcing);
112 
127 FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_CreateMmAccess( DeviceHandle const deviceHandle,
128  MmAccessHandle const mmAccessHandle,
129  const en_uint8 streamNr);
130 
160 FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_CreateStream( DeviceHandle const deviceHandle,
161  StreamHandle const streamHandle,
162  const en_uint8 streamNr,
163  const bool frameBased,
164  const bool upStreamEna,
165  const bool downStreamEna);
166 
184 FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_SetProperty( DeviceHandle const deviceHandle,
185  const char* const name,
186  const en_uint32 value);
195 FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_GetProperty( DeviceHandle const deviceHandle,
196  const char* const name,
197  en_uint32* const value_p);
198 
205 #endif
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.
Definition: DeviceApi.cpp:113
unsigned char en_uint8
Definition: Types.h:719
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.
Definition: DeviceApi.cpp:51
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_CreateMmAccess(DeviceHandle const deviceHandle, MmAccessHandle const mmAccessHandle, const en_uint8 streamNr)
Create and get memory mapped access object.
Definition: DeviceApi.cpp:96
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.
Definition: DeviceApi.cpp:32
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Close(DeviceHandle const handle, const bool forcing)
Close device.
Definition: DeviceApi.cpp:84
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Delete(DeviceHandle *const handle_p)
Delete Device and set handle to nullptr.
Definition: DeviceApi.cpp:18
EN_RESULT
Definition: Types.h:28
unsigned int en_uint32
Definition: Types.h:715
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_SetProperty(DeviceHandle const deviceHandle, const char *const name, const en_uint32 value)
Set property value.
Definition: DeviceApi.cpp:133
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_Open(DeviceHandle const handle)
Open device.
Definition: DeviceApi.cpp:73
FPGAMANAGER_DLL_FCT EN_RESULT DeviceApi_GetProperty(DeviceHandle const deviceHandle, const char *const name, en_uint32 *const value_p)
Get property value.
Definition: DeviceApi.cpp:146