Datafox DFCom - API 04.03.22
Dokumentation zur Datafox Kommunikationsbibliothek (DFComDLL.dll / DFCom_x64.dll)
df_api.h
gehe zur Dokumentation dieser Datei
1/*
2 \brief Hauptinclude mit den allgemeinen Funktionen und Einbindung aller Untermodule.
3
4 \author Bernd Ottmann
5 \date 21.02.2003
6*/
7#pragma once
8#ifndef DATAFOX_API_H
9#ifndef DOXYGEN_SHOULD_SKIP_THIS
10#define DATAFOX_API_H
11#endif
12
13#include "df_defines.h"
14#include "df_access_control.h"
17#include "df_active_mode.h"
18#include "df_connection.h"
19#include "df_defines.h"
20#include "df_files.h"
21#include "df_fingerprint.h"
22#include "df_lists.h"
23#include "df_logging.h"
24#include "df_setup_lists.h"
25#include "df_setup_records.h"
26#include "df_system_records.h"
27#include "df_timeboy_lists.h"
28
29#ifdef DOC_LANG_EN
45#else
61#endif
62DF_API_EXTERN_DECORATE int DF_API_CALL DFCCheckAE( int connectionNumber, int deviceAddress );
63
64#ifdef DOC_LANG_EN
84#else
104#endif
105DF_API_EXTERN_DECORATE int DF_API_CALL DFCCheckDevice( int connectionNumber, int deviceAddress, int *errorNumber, int devicePollRetry );
106
107#ifdef DOC_LANG_EN
126#else
145#endif
146DF_API_EXTERN_DECORATE int DF_API_CALL DFCComSetTime( int connectionNumber, int deviceAddress, const unsigned char *dateTimeBuffer );
147
148#ifdef DOC_LANG_EN
165#else
182#endif
183DF_API_EXTERN_DECORATE int DF_API_CALL DFCComGetTime( int connectionNumber, int deviceAddress, unsigned char *dateTimeBuffer );
184
185#ifdef DOC_LANG_EN
236#else
288#endif
289DF_API_EXTERN_DECORATE int DF_API_CALL DFCComSendMessage( int connectionNumber, int deviceAddress, unsigned char visibleTime,
290 unsigned char doAction, unsigned char audibleSignal, const char *text, int textLength );
291
292#ifdef DOC_LANG_EN
310#else
329#endif
330DF_API_EXTERN_DECORATE int DF_API_CALL DFCComSendInfotext( int connectionNumber, int deviceAddress, const char *text, int textLength );
331
332#ifdef DOC_LANG_EN
353#else
374#endif
375DF_API_EXTERN_DECORATE int DF_API_CALL DFCGetSeriennummer( int connectionNumber, int deviceAddress, int *errorNumber, int *value );
376
377#ifdef DOC_LANG_EN
393#else
409#endif
410DF_API_EXTERN_DECORATE void DF_API_CALL DFCSetCallBack( int connectionNumber, int (*functionPointer)(void) );
411
412#ifdef DOC_LANG_EN
433#else
455#endif
456DF_API_EXTERN_DECORATE void DF_API_CALL DFCGetErrorText( int connectionNumber, int errorNumber, int languageId, char *value, int valueLength );
457
458#ifdef DOC_LANG_EN
490#else
524#endif
525DF_API_EXTERN_DECORATE int DF_API_CALL DFCSetGlobVar( int connectionNumber, int deviceAddress, const char *name, int nameType, const char *value, int *errorNumber );
526
527#ifdef DOC_LANG_EN
560#else
595#endif
596DF_API_EXTERN_DECORATE int DF_API_CALL DFCGetGlobVar( int connectionNumber, int deviceAddress, const char *name, int nameType, char *value, int valueLength, int *errorNumber );
597
598#ifdef DOC_LANG_EN
618#else
638#endif
639DF_API_EXTERN_DECORATE int DF_API_CALL DFCCloseRelay( int connectionNumber, int deviceAddress, int number, int timeout, int *errorNumber );
640
641#ifdef DOC_LANG_EN
661#else
681#endif
682DF_API_EXTERN_DECORATE int DF_API_CALL DFCGetRelayState( int connectionNumber, int deviceAddress, int number, int *state, int *timeout, int *errorNumber );
683
684#ifdef DOC_LANG_EN
702#else
720#endif
721DF_API_EXTERN_DECORATE int DF_API_CALL DFCOpenRelay( int connectionNumber, int deviceAddress, int number, int *errorNumber );
722
723#ifdef DOC_LANG_EN
738#else
754#endif
756
757#ifdef DOC_LANG_EN
815#else
873#endif
874DF_API_EXTERN_DECORATE int DF_API_CALL DFCGetVersionFirmware( int connectionNumber, int deviceAddress, char *value, int *errorNumber );
875
876#ifndef DOXYGEN_SHOULD_SKIP_THIS
877// \export{_DFCGetVersionFirmwareFromFile@16, DFCGetVersionFirmwareFromFile}
878DF_API_EXTERN_DECORATE int DF_API_CALL DFCGetVersionFirmwareFromFile( int connectionNumber, const char *filePath, char *value, int *errorNumber );
879
880#ifdef DOC_LANG_EN
900#else
920#endif
921DF_API_EXTERN_DECORATE int DF_API_CALL DFCReadHardwareInfo( int connectionNumber, int deviceAddress, char *value,
922 int *valueLength, int flags, int *errorNumber );
923#endif
924
925
926#if (DF_API_VERSION >= 0x04010600)
927#ifdef DOC_LANG_EN
982#else
1037#endif
1038DF_API_EXTERN_DECORATE int DF_API_CALL DFCSetOptionFirmware( int connectionNumber, int deviceAddress, int mask, int options, int *errorNumber );
1039
1040#ifdef DOC_LANG_EN
1105#else
1169#endif
1170DF_API_EXTERN_DECORATE int DF_API_CALL DFCGetOptionFirmware( int connectionNumber, int deviceAddress, int *mask, int *options, int *errorNumber );
1171
1172#endif
1173
1174
1175#if (DF_API_VERSION >= 0x04010700)
1176
1177#ifdef DOC_LANG_EN
1209#else
1242#endif
1243DF_API_EXTERN_DECORATE int DF_API_CALL DFCSetFontType( int connectionNumber, int deviceAddress, int type, int *errorNumber );
1244
1245#ifdef DOC_LANG_EN
1293#else
1342#endif
1343DF_API_EXTERN_DECORATE int DF_API_CALL DFCPressVirtualKey( int connectionNumber, int deviceAddress, int keyCode, int flags, int *errorNumber );
1344
1345#ifndef DOXYGEN_SHOULD_SKIP_THIS
1346#ifdef DOC_LANG_EN
1347#else
1367#endif
1368DF_API_EXTERN_DECORATE int DF_API_CALL DFCGetPasswordKey( int connectionNumber, int deviceAddress, char *value, int *valueLength, int *errorNumber );
1369#endif
1370
1371#ifdef DOC_LANG_EN
1392#else
1413#endif
1414DF_API_EXTERN_DECORATE int DF_API_CALL DFCSetPassword( int connectionNumber, const char *value, int *errorNumber );
1415
1416#ifdef DOC_LANG_EN
1442#else
1469#endif
1470DF_API_EXTERN_DECORATE int DF_API_CALL DFCReset( int connectionNumber, int deviceAddress, int mode, int *errorNumber );
1471
1472#ifndef DOXYGEN_SHOULD_SKIP_THIS
1473#ifdef DOC_LANG_EN
1474#else
1494#endif
1495DF_API_EXTERN_DECORATE int DF_API_CALL DFCGetFlashStatus( int connectionNumber, int deviceAddress, int *value, int *errorNumber );
1496#endif
1497
1498#endif
1499
1500#if (DF_API_VERSION >= 0x04020300)
1501
1502#ifdef DOC_LANG_EN
1527#else
1552#endif
1553DF_API_EXTERN_DECORATE int DF_API_CALL DFCSetCommunicationPassword( int connectionNumber, const char *value, int valueLength, int sessionTimeout, int *errorNumber );
1554
1555#endif
1556
1557// \export{_DFCRecordVolume@24, DFCRecordVolume}
1558DF_API_EXTERN_DECORATE int DF_API_CALL DFCRecordVolume( int connectionNumber, int deviceAddress, int *recordCount, int *memoryUsage, int *memorySize, int *errorNumber );
1559
1560#if (DF_API_VERSION >= 0x04010400)
1561
1562#ifdef DOC_LANG_EN
1623#else
1686#endif
1687DF_API_EXTERN_DECORATE int DF_API_CALL DFCGetInfo( int connectionNumber, int deviceAddress, const char *name, const char *params,
1688 char *text, int *textLength, int *errorNumber );
1689
1690#ifndef DOXYGEN_SHOULD_SKIP_THIS
1691// \export{_DFCOpenComServerMode@40, DFCOpenComServerMode}
1692DF_API_EXTERN_DECORATE int DF_API_CALL DFCOpenComServerMode( int connectionNumber, int deviceAddress, const char *comm,
1693 int baudRate, int byteSize, int parity, int stopBits, int flags, int timeoutToClose, int *errorNumber );
1694// \export{_DFCCloseComServerMode@12, DFCCloseComServerMode}
1695DF_API_EXTERN_DECORATE int DF_API_CALL DFCCloseComServerMode( int connectionNumber, int deviceAddress, int *errorNumber );
1696#endif
1697
1698#endif
1699
1700// ########################################################
1701// ########### FUNKTIONEN FUER ERWEITERUNGEN ##############
1702// ########################################################
1703
1704#if (DF_API_VERSION >= 0x04030001)
1705
1723DF_API_EXTERN_DECORATE int DF_API_CALL DFCVersionLibrary( char *value, int valueLength );
1724
1725#endif
1726
1727#ifndef DOXYGEN_SHOULD_SKIP_THIS
1728#if (DF_API_VERSION >= 0x04030500)
1729// \export{_DFCStartTransparencyMode@32, DFCStartTransparencyMode}
1730DF_API_EXTERN_DECORATE int DF_API_CALL DFCStartTransparencyMode( int connectionNumber, int deviceAddress, int id, int flags,
1731 unsigned int sizeBufferRead, unsigned int sizeBufferWrite, int timeout, int *errorNumber );
1732
1733// \export{_DFCStopTransparencyMode@12, DFCStopTransparencyMode}
1734DF_API_EXTERN_DECORATE int DF_API_CALL DFCStopTransparencyMode( int connectionNumber, int deviceAddress, int *errorNumber );
1735
1736// \export{_DFCIsTransparencyMode@4, DFCIsTransparencyMode}
1737DF_API_EXTERN_DECORATE int DF_API_CALL DFCIsTransparencyMode( int connectionNumber );
1738
1739#endif
1740
1741
1742#if (DF_API_VERSION >= 0x04030600)
1743// \export{_DFCCustomCommand@36, DFCCustomCommand}
1744DF_API_EXTERN_DECORATE int DF_API_CALL DFCCustomCommand( int connectionNumber, int deviceAddress, int identification, int customCommand, const char *dataIn, int sizeIn, char *dataOut, int *sizeOut, int *errorNumber );
1745
1746#endif
1747#endif
1748
1749#if (DF_API_VERSION >= 0x04030800)
1750
1751#ifdef DOC_LANG_EN
1766#else
1781#endif
1782DF_API_EXTERN int DF_API_CALL DFCGetLastErrorNumber( int connectionNumber, int deviceAddress );
1783
1784#ifdef DOC_LANG_EN
1813#else
1843#endif
1844DF_API_EXTERN int DF_API_CALL DFCBlockTransferSetDuration( int connectionNumber, int deviceAddress, int blockTypesAllowed, int duration );
1845
1846
1847#ifdef DOC_LANG_EN
1863#else
1879#endif
1880DF_API_EXTERN int DF_API_CALL DFCBlockTransferResume( int connectionNumber, int deviceAddress );
1881
1882#ifdef DOC_LANG_EN
1910#else
1938#endif
1939DF_API_EXTERN int DF_API_CALL DFCBlockTransferGetState( int connectionNumber, int deviceAddress, int *currentType, int *currentState );
1940
1941#ifdef DOC_LANG_EN
1957#else
1973#endif
1974DF_API_EXTERN int DF_API_CALL DFCBlockTransferDiscard( int connectionNumber, int deviceAddress );
1975
1976#endif
1977
1978#if (DF_API_VERSION >= 0x04030C00)
1979#ifdef DOC_LANG_EN
2013#else
2048#endif
2049DF_API_EXTERN int DF_API_CALL DFCReadDataBlock( int connectionNumber, int deviceAddress, const char *name, char *data, int *length, int flags );
2050#endif
2051
2052#if (DF_API_VERSION >= 0x04031500)
2053#ifdef DOC_LANG_EN
2072#else
2091#endif
2092DF_API_EXTERN int DF_API_CALL DFCGetDeviceId( int connectionNumber, int deviceAddress, int *value );
2093#endif
2094
2095// ########################################################
2096// #############* PRIVATE FUNKTIONEN* #################
2097// ########################################################
2098
2099// Funktionen sind nicht dokumentiert.
2100// Sie werden von AESetup oder Talk verwendet.
2101// Unterliegen evntl. Aenderungen.
2102
2103#if defined( USE_PRIVATE )
2104
2105#if defined( _MSC_VER ) && defined( DF_API_EXPORT )
2106
2107// \export{DllGetVersion, DllGetVersion}
2108DF_API_EXTERN HRESULT DF_API_CALL DllGetVersion( DLLVERSIONINFO *pdvi );
2109
2110#endif
2111
2112// \export{_DFCComVersion@12, DFCComVersion}
2113DF_API_EXTERN_DECORATE int DF_API_CALL DFCComVersion( int connectionNumber, int deviceAddress, int *errorNumber );
2114
2115// \export{_DFCGetClass@8, DFCGetClass}
2116DF_API_EXTERN_DECORATE void* DF_API_CALL DFCGetClass( int connectionNumber, int classId );
2117
2118#ifdef DOC_LANG_EN
2119#else
2120/*
2121 \brief Ausführen eines Prüfplatzkommandos.
2122
2123 Über diese Funktion werden der Firmware auszuführende Kommandos gesendet und die Resultate als Ergebnis geliefert.
2124 Die sendbare Anfrage und zu erwartende Antwort hängt von der implementierten Routine auf Firmwareseite ab.
2125
2126 \ingroup library
2127
2128 \export{_DFCCommandInspectionStation@36, DFCCommandInspectionStation}
2129
2130 \note Zu diesem Befehl muss ein entsprechendes zusätzliches Dokument beachtet werden in welchem die übermittelten Daten
2131 beschrieben sind.
2132
2133 \param[in] connectionNumber Zu verwendende Verbindungsnummer.
2134 \param[in] deviceAddress Anzusprechende Geräteadresse.
2135 \param[in] requestAddress Ein Wert zwischen 0 - 255, der eine Befehlsadresse darstellt.
2136 \param[in] requestParams Eine zu sendende Zeichenfolge, kann auch ein Bytearray sein.
2137 \param[in] requestParamsSize Länge des auf \c requestParams verweisenden Puffers.
2138 \param[out] answerAddress Ein Wert zwischen 0 - 255, der die Antwortadresse darstellt.
2139 \param[out] answerParams Eine zu empfangende Zeichenfolge, kann auch ein Bytearray sein.
2140 \param[in, out] answerParamsSize Als Eingabe die maximal hinter \c answerParams zur verfügbung stehenden Pufferlänge,
2141 als Ausgabe die nach \c answerParams kopierte Anzahl Zeichen.
2142 \param[in] secondsToWaitForAnswer Angabe in Sekunden, wie lange maximal auf die Antwort gewartet wird.
2143
2144 \returns Liefert 0 bei Erfolgreicher ausführung, ansonsten den auszuwertenden Fehlercode.
2145*/
2146#endif
2147DF_API_EXTERN_DECORATE int DF_API_CALL DFCCommandInspectionStation( int connectionNumber, int deviceAddress, int requestAddress,
2148 const char *requestParams, int requestParamsSize, int *answerAddress, char *answerParams, int *answerParamsSize, int secondsToWaitForAnswer );
2149
2150// \export{_DFCPing@16, DFCPing}
2151DF_API_EXTERN_DECORATE int DF_API_CALL DFCPing( int connectionNumber, int deviceAddress, int attempts, int *errorNumber );
2152
2153#endif // USE_PRIVATE
2154
2155#endif
2156
2157
int DF_API_CALL DFCCloseRelay(int connectionNumber, int deviceAddress, int number, int timeout, int *errorNumber)
Schliessen eines Ausgangs (Relais).
int DF_API_CALL DFCGetDevicePollRetry(int connectionNumber)
Abfrage der zuletzt mit DFCCheckDevice() benötigten Anzahl Versuche.
int DF_API_CALL DFCVersionLibrary(char *value, int valueLength)
Ermitteln der Libraryversion.
void DF_API_CALL DFCSetCallBack(int connectionNumber, int(*functionPointer)(void))
Setzen einer Rückruffunktion.
int DF_API_CALL DFCGetGlobVar(int connectionNumber, int deviceAddress, const char *name, int nameType, char *value, int valueLength, int *errorNumber)
Lesen des Wertes einer Setup- oder Systemvariablen.
DF_API_EXTERN int DF_API_CALL DFCBlockTransferSetDuration(int connectionNumber, int deviceAddress, int blockTypesAllowed, int duration)
Setzt für die entsprechende Geräteadresse oder die gesamte Verbindungsnummer eine Unterbrechungszeit.
DF_API_EXTERN int DF_API_CALL DFCReadDataBlock(int connectionNumber, int deviceAddress, const char *name, char *data, int *length, int flags)
Lesen eines Datenblocks. Dieses kann der Wert einer Systemvariablen oder der Inhalt einer Datei sein.
int DF_API_CALL DFCComGetTime(int connectionNumber, int deviceAddress, unsigned char *dateTimeBuffer)
Liest das Datum und die Uhrzeit aus dem Gerät.
int DF_API_CALL DFCGetInfo(int connectionNumber, int deviceAddress, const char *name, const char *params, char *text, int *textLength, int *errorNumber)
Lesen der Information eines bestimmten Moduls.
DF_API_EXTERN int DF_API_CALL DFCGetLastErrorNumber(int connectionNumber, int deviceAddress)
Liefert die Fehlernummer welche zuletzt aufgetreten ist.
int DF_API_CALL DFCComSendMessage(int connectionNumber, int deviceAddress, unsigned char visibleTime, unsigned char doAction, unsigned char audibleSignal, const char *text, int textLength)
Sendet eine Meldung ggf. zur Anzeige auf einem Display.
int DF_API_CALL DFCSetOptionFirmware(int connectionNumber, int deviceAddress, int mask, int options, int *errorNumber)
Setzt benötigte Zusatzoptionen der Firmware.
int DF_API_CALL DFCGetRelayState(int connectionNumber, int deviceAddress, int number, int *state, int *timeout, int *errorNumber)
Abfragen des aktuellen Zustandes und der verbleibenden Zeit eines geschalteten Ausgangs (Relais).
int DF_API_CALL DFCGetSeriennummer(int connectionNumber, int deviceAddress, int *errorNumber, int *value)
Die Seriennummer des Gerätes auslesen.
int DF_API_CALL DFCPressVirtualKey(int connectionNumber, int deviceAddress, int keyCode, int flags, int *errorNumber)
Über diese Funktion können Sie einen Tastendruck auslösen.
int DF_API_CALL DFCRecordVolume(int connectionNumber, int deviceAddress, int *recordCount, int *memoryUsage, int *memorySize, int *errorNumber)
int DF_API_CALL DFCComSetTime(int connectionNumber, int deviceAddress, const unsigned char *dateTimeBuffer)
Setzt das übergebene Datum und die Uhrzeit in dem Gerät.
int DF_API_CALL DFCCheckDevice(int connectionNumber, int deviceAddress, int *errorNumber, int devicePollRetry)
Prüft ob das Gerät erreichbar ist.
int DF_API_CALL DFCGetOptionFirmware(int connectionNumber, int deviceAddress, int *mask, int *options, int *errorNumber)
Liest die Werte der Zusatzoptionen zur Firmware.
DF_API_EXTERN int DF_API_CALL DFCBlockTransferGetState(int connectionNumber, int deviceAddress, int *currentType, int *currentState)
Ruft den Typen und Zustand der ggf. vorhandenen Blockübertragung ab.
int DF_API_CALL DFCReset(int connectionNumber, int deviceAddress, int mode, int *errorNumber)
Reset je nach gewähltem Modus durchführen.
int DF_API_CALL DFCSetGlobVar(int connectionNumber, int deviceAddress, const char *name, int nameType, const char *value, int *errorNumber)
Setzen des Wertes einer Setup- oder Systemvariablen.
DF_API_EXTERN int DF_API_CALL DFCBlockTransferDiscard(int connectionNumber, int deviceAddress)
Verwirft eine aktuell laufende Blockübertragung. Die bis dahin übertragenen Daten werden verworfen.
int DF_API_CALL DFCOpenRelay(int connectionNumber, int deviceAddress, int number, int *errorNumber)
Öffnen eines Ausgangs (Relais).
DF_API_EXTERN int DF_API_CALL DFCGetDeviceId(int connectionNumber, int deviceAddress, int *value)
Lesen einer eindeutigen Geräte-Id, alternativ zur Seriennummer und dem Gerätetypen.
int DF_API_CALL DFCSetCommunicationPassword(int connectionNumber, const char *value, int valueLength, int sessionTimeout, int *errorNumber)
Setzen des zu verwendenden Verschlüsselungspasswortes der Kommunikation.
void DF_API_CALL DFCGetErrorText(int connectionNumber, int errorNumber, int languageId, char *value, int valueLength)
Auflösen einer Fehlernummer in seine Textentsprechung.
int DF_API_CALL DFCComSendInfotext(int connectionNumber, int deviceAddress, const char *text, int textLength)
Sendet eine Memonachricht an Geräte.
DF_API_EXTERN int DF_API_CALL DFCBlockTransferResume(int connectionNumber, int deviceAddress)
Setzt eine bestehende Blockübertragung fort.
int DF_API_CALL DFCSetPassword(int connectionNumber, const char *value, int *errorNumber)
Setzen des zu verwendenden Setuppasswortes für diese Verbindung.
int DF_API_CALL DFCCheckAE(int connectionNumber, int deviceAddress)
Prüft ob das Gerät erreichbar ist.
int DF_API_CALL DFCSetFontType(int connectionNumber, int deviceAddress, int type, int *errorNumber)
Setzt den zu verwendenden Schrifttyp zur Darstellung der Nachrichten.
int DF_API_CALL DFCGetVersionFirmware(int connectionNumber, int deviceAddress, char *value, int *errorNumber)
Liefert die im Gerät befindliche Firmwareversion und den Namenskürzel.
#define DF_API_CALL
Definition df_defines.h:82
#define DF_API_EXTERN_DECORATE
Definition df_defines.h:80
#define DF_API_EXTERN
Definition df_defines.h:81

© 2003-2024 Datafox GmbH