6
* \mainpage PFConfig DLL Documentation
8
* \author Photonfocus AG
11
* \section intro Introduction
12
* The software package that comes with a Photonfocus camera contains an
13
* application and a SDK to evaluate the camera. With PFRemote, all camera
14
* parameters can be configured. Next to the pflib SDK for C++ application
15
* development there is also a PFConfig DLL for an independent integration
16
* in several 3rd party application like Labview, Mathlab, VB, C#, etc.
18
* The PFConfig DLL is a software development kit as well as for the
19
* Photonfocus USB camera as for the camealink camera. With the PFConfig,
20
* all camera parameters such as exposure time, ROI, etc. can be configured.
21
* The PFConfig DLL is based on the pflib library and also on the fglib2.2.lib
22
* display_lib.lib for USB cameras.
24
* Most of the functions return an error code in the case the function fails.
25
* Please refer to the documentation of the pflib for a detailed description
26
* of the error codes. You can also call the function pfGetErrorMsg() which
27
* returns the latest error message. This function should be called if the
28
* return code of any function is unlike 0.
31
* There are examples available about how to use the PFConfig DLL.
37
* \example PFConfig_Example.vbproj
38
* VB 2008 - Example shows how to configure (read/write) the camera.
42
* \example PFConfig_Example.vcproj
43
* VC 2008 - Example shows how to configure (read/write) the camera.
46
#ifdef PFCONFIG_EXPORTS
49
#define PFCONFIG_API extern "C" __declspec(dllexport)
51
#define PFCONFIG_API __declspec(dllexport)
56
#define PFCONFIG_API extern "C" __declspec(dllimport)
58
#define PFCONFIG_API __declspec(dllimport)
67
/// \brief Get the version of the PFConfig Dll.
68
/// \param[in] iPort Port number [0...(NumPort-1)].
70
/// \return A pointer to a array of character containing a version.
72
PFCONFIG_API char* pfGetVersion(int iPort);
76
/// \brief Init of the USB camera frame grabber with a camera-dll.
77
/// This function is only needed when using a USB camera.
78
/// \param[in] pDllName The name of the camera-dll, (i,e mv_d640_48_u2.dll, mv_d1024e_40_u2.dll)
80
/// \return Error code or 0 if DLL successfully loaded.
82
PFCONFIG_API int pfInitUsb(char* pDllName);
86
/// \brief Returns The number of available ports.
88
/// \return The number of available ports or error code.
90
PFCONFIG_API int pfGetNumPort(void);
94
/// \brief Returns the current port information of the given port.
95
/// The port information is returned in the following structure:
96
/// "Portnumber, Manufactor, Portname, Version, Type". The
97
/// parameters are summarized in a string and separated by a comma.
98
/// \param[in] iPort Port number [0...(NumPort-1)].
100
/// \return A pointer to a string containing the port description.
102
PFCONFIG_API const char* pfGetPortInfo(int iPort);
106
/// \brief Returns the current property description by the given token ID.
107
/// A full list with all properties will be created when the pfOpenPort()
108
/// gets called. Use the function pfGetNumProperties() to get the total
109
/// number of available properties made available from the connected camera.
110
/// \param[in] iPort Port number [0...(NumPort-1)].
111
/// \param[out] iProperty Property token ID [0...(NumProperties-1)].
112
/// \param[out] iPropType The type of the property.
113
/// Following types are supported by Library
121
/// \param[in] iPropFlag The property flags.
122
/// These flags are queried via pfProperty_GetFlags().
123
/// 0 : Readable/Writeable
124
/// 2 : Property is private
125
/// 4 : Big endian, if Register node (not used)
128
/// 64 : Property is currently inactive
131
/// \return A pointer to a string with the property description from the given ID.
133
PFCONFIG_API const char* pfGetPropertyInfo(int iPort, int iProperty, int* iPropType, int* iPropFlag);
137
/// \brief Returns The number of available camera properties.
138
/// \param[in] iPort Port number [0...(NumPort-1)].
140
/// \return The number of available camera properties or error code.
142
PFCONFIG_API int pfGetNumProperties(int iPort);
146
/// \brief Returns the latest error message. This function should be called
147
/// if the return code of any function is unlike 0. Please refer to the pflib
148
/// documentation for a detailed description of all error codes.
149
/// \param[in] iPort Port number [0...(NumPort-1)].
151
/// \return Pointer to the latest error message.
153
PFCONFIG_API const char* pfGetErrorMsg(int iPort);
157
/// \brief Close the camera port if there is any open port.
158
/// \param[in] iPort Port number [0...(NumPort-1)].
160
/// \return Error code or 0 if port successfully closed.
162
PFCONFIG_API int pfClosePort(int iPort);
166
/// \brief Open the camera port from the given port ID.
168
/// \param[in] iPort The camera port number to open for communicaton.
169
/// \param[in] iCheckHigherBaudrate Check if the camera supports a higher baudrate than 9600.
170
/// If the camera supports a higher baudrate switch to 57600bps.
171
/// \return Error code or 0 if port successfully opened.
173
PFCONFIG_API int pfOpenPort(int iPort, int iCheckHigherBaudrate=false);
177
/// \brief Sets the given camera property value.
178
/// \param[in] iPort Port number [0...(NumPort-1)].
179
/// \param[in] pProperty The camera property name to set.
180
/// \param[in] pValue The string value to set.
182
/// \return Return 0 if property has been successfully write.
183
/// Otherwise return Error code.
185
PFCONFIG_API int pfSetCameraPropertyS(int iPort, const char* pProperty, const char* pValue);
189
/// \brief Gets the given camera property value.
190
/// \param[in] iPort Port number [0...(NumPort-1)].
191
/// \param[in] pProperty The camera property name to read.
192
/// \param[in] pValue The string (pointer) to save the property value.
193
/// \param[in] iSize The maximum memory size for the property to save.
195
/// \return Return 0 if property has been successfully read.
196
/// Otherwise return Error code.
198
PFCONFIG_API int pfGetCameraPropertyS(int iPort, const char* pProperty, char* pValue, int iSize);
202
/// \brief Sets the given camera property value.
203
/// \param[in] iPort Port number [0...(NumPort-1)].
204
/// \param[in] pProperty The camera property name to set.
205
/// \param[in] fValue The floating value to set.
207
/// \return Return 0 if property has been successfully write.
208
/// Otherwise return Error code.
210
PFCONFIG_API int pfSetCameraPropertyF(int iPort, const char* pProperty, float fValue);
214
/// \brief Gets the given camera property value.
215
/// \param[in] iPort Port number [0...(NumPort-1)].
216
/// \param[in] pProperty The camera property to set.
218
/// \return Property floating value if property has been successfully read.
219
/// Otherwise return Error code.
221
PFCONFIG_API float pfGetCameraPropertyF(int iPort, const char* pProperty);
225
/// \brief Gets the given camera property value.
226
/// \param[in] iPort Port number [0...(NumPort-1)].
227
/// \param[in] pProperty The camera property to set.
228
/// \param[in] fValue Property floating value.
230
/// \return Return 0 if property has been successfully read.
231
/// Otherwise return Error code.
233
PFCONFIG_API int pfGetCameraPropertyFloat(int iPort, const char* pProperty, float *fValue);
237
/// \brief Sets the given camera property value.
238
/// \param[in] iPort Port number [0...(NumPort-1)].
239
/// \param[in] pProperty The camera property name to set.
240
/// \param[in] iValue The integer value to set.
242
/// \return Return 0 if property has been successfully write.
243
/// Otherwise return Error code.
245
PFCONFIG_API int pfSetCameraPropertyI(int iPort, const char* pProperty, int iValue);
249
/// \brief Gets the given camera property value.
250
/// \param[in] iPort Port number [0...(NumPort-1)].
251
/// \param[in] pProperty The camera property name to set.
253
/// \return Property integer value if property has been successfully read.
254
/// Otherwise return Error code.
256
PFCONFIG_API int pfGetCameraPropertyI(int iPort, const char *pProperty);
260
/// \brief Gets the given camera property value.
261
/// \param[in] iPort Port number [0...(NumPort-1)].
262
/// \param[in] pProperty The camera property name to set.
263
/// \param[in] iValue Property integer value.
265
/// \return Return 0 if property has been successfully read.
266
/// Otherwise return Error code.
268
PFCONFIG_API int pfGetCameraPropertyInt(int iPort, const char *pProperty, int *iValue);