Skeleton legacy API
parent
b0f5ad0f7f
commit
1dcdb58008
|
|
@ -64,8 +64,16 @@ add_library(icsneoc SHARED
|
|||
${SRC_FILES}
|
||||
)
|
||||
|
||||
add_library(icsneolegacy SHARED
|
||||
api/icsneolegacy/icsneolegacy.cpp
|
||||
api/icsneoc/icsneoc.cpp
|
||||
api/icsneocpp/icsneocpp.cpp
|
||||
${SRC_FILES}
|
||||
)
|
||||
|
||||
target_compile_features(icsneocpp PRIVATE cxx_auto_type cxx_constexpr cxx_lambdas cxx_nullptr cxx_range_for cxx_rvalue_references cxx_sizeof_member cxx_strong_enums)
|
||||
target_compile_features(icsneoc PRIVATE cxx_auto_type cxx_constexpr cxx_lambdas cxx_nullptr cxx_range_for cxx_rvalue_references cxx_sizeof_member cxx_strong_enums)
|
||||
target_compile_features(icsneolegacy PRIVATE cxx_auto_type cxx_constexpr cxx_lambdas cxx_nullptr cxx_range_for cxx_rvalue_references cxx_sizeof_member cxx_strong_enums)
|
||||
|
||||
# libftdi
|
||||
if(NOT WIN32)
|
||||
|
|
@ -74,10 +82,13 @@ if(NOT WIN32)
|
|||
set_property(TARGET ftdipp1-static PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||
target_link_libraries(icsneocpp ftdipp1-static)
|
||||
target_link_libraries(icsneoc ftdipp1-static)
|
||||
target_link_libraries(icsneolegacy ftdipp1-static)
|
||||
target_link_libraries(icsneocpp ftdi1-static)
|
||||
target_link_libraries(icsneoc ftdi1-static)
|
||||
target_link_libraries(icsneolegacy ftdi1-static)
|
||||
target_link_libraries(icsneocpp ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries(icsneoc ${CMAKE_THREAD_LIBS_INIT})
|
||||
target_link_libraries(icsneolegacy ${CMAKE_THREAD_LIBS_INIT})
|
||||
endif()
|
||||
|
||||
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
|
||||
|
|
|
|||
|
|
@ -0,0 +1,233 @@
|
|||
//FILE: icsneo40DLLAPI.cpp
|
||||
#include "icsneo40DLLAPI.h"
|
||||
#include <Tchar.h>
|
||||
|
||||
//Basic Functions
|
||||
FINDNEODEVICES icsneoFindNeoDevices;
|
||||
OPENNEODEVICE icsneoOpenNeoDevice;
|
||||
CLOSEPORT icsneoClosePort;
|
||||
FREEOBJECT icsneoFreeObject;
|
||||
////OPENPORTEX icsneoOpenPortEx;
|
||||
SERIALNUMBERTOSTRING icsneoSerialNumberToString;
|
||||
|
||||
|
||||
//Message Functions
|
||||
GETMESSAGES icsneoGetMessages;
|
||||
TXMESSAGES icsneoTxMessages;
|
||||
TXMESSAGESEX icsneoTxMessagesEx;
|
||||
WAITFORRXMSGS icsneoWaitForRxMessagesWithTimeOut;
|
||||
GETTSFORMSG icsneoGetTimeStampForMsg;
|
||||
ENABLERXQUEUE icsneoEnableNetworkRXQueue;
|
||||
GETISO15765STATUS icsneoGetISO15765Status;
|
||||
SETISO15765RXPARMS icsneoSetISO15765RxParameters;
|
||||
////ENABLENETWORKCOM icsneoEnableNetworkCom;
|
||||
|
||||
|
||||
//Device Functions
|
||||
GETCONFIG icsneoGetConfiguration;
|
||||
SENDCONFIG icsneoSendConfiguration;
|
||||
GETFIRESETTINGS icsneoGetFireSettings;
|
||||
SETFIRESETTINGS icsneoSetFireSettings;
|
||||
GETVCAN3SETTINGS icsneoGetVCAN3Settings;
|
||||
SETVCAN3SETTINGS icsneoSetVCAN3Settings;
|
||||
|
||||
GETFIRE2SETTINGS icsneoGetFire2Settings;
|
||||
SETFIRE2SETTINGS icsneoSetFire2Settings;
|
||||
GETVCANRFSETTINGS icsneoGetVCANRFSettings;
|
||||
SETVCANRFSETTINGS icsneoSetVCANRFSettings;
|
||||
GETRADGalaxySETTINGS icsneoGetRADGalaxySettings;
|
||||
SETRADGalaxySETTINGS icsneoSetRADGalaxySettings;
|
||||
GETRADSTAR2SETTINGS icsneoGetRADStar2Settings;
|
||||
SETRADSTAR2SETTINGS icsneoSetRADStar2Settings;
|
||||
GETVCAN412SETTINGS icsneoGetVCAN412Settings;
|
||||
SETVCAN412SETTINGS icsneoSetVCAN412Settings;
|
||||
|
||||
SETBITRATE icsneoSetBitRate;
|
||||
GETDEVICEPARMS icsneoGetDeviceParameters;
|
||||
SETDEVICEPARMS icsneoSetDeviceParameters;
|
||||
|
||||
//Error Functions
|
||||
GETLASTAPIERROR icsneoGetLastAPIError;
|
||||
GETERRMSGS icsneoGetErrorMessages;
|
||||
GETERRORINFO icsneoGetErrorInfo;
|
||||
|
||||
//ISO15765-2
|
||||
ISO15765ENABLENETWORKS icsneoISO15765_EnableNetworks;
|
||||
ISO15765DISABLENETWORKS icsneoISO15765_DisableNetworks;
|
||||
ISO15765TXMSG icsneoISO15765_TransmitMessage;
|
||||
ISO15765RXMSG icsneoISO15765_ReceiveMessage;
|
||||
|
||||
//General Utility Functions
|
||||
VALIDATEHOBJECT icsneoValidateHObject;
|
||||
GETDLLVERSION icsneoGetDLLVersion;
|
||||
GETSERIALNUMBER icsneoGetSerialNumber;
|
||||
STARTSOCKSERVER icsneoStartSockServer;
|
||||
STOPSOCKSERVER icsneoStopSockServer;
|
||||
|
||||
//CoreMini Functions
|
||||
SCRIPTLOAD icsneoScriptLoad;
|
||||
SCRIPTSTART icsneoScriptStart;
|
||||
SCRIPTSTOP icsneoScriptStop;
|
||||
SCRIPTCLEAR icsneoScriptClear;
|
||||
SCRIPTSTARTFBLOCK icsneoScriptStartFBlock;
|
||||
SCRIPTSTOPFBLOCK icsneoScriptStopFBlock;
|
||||
SCRIPTGETFBLOCKSTATUS icsneoScriptGetFBlockStatus;
|
||||
SCRIPTGETSCRIPTSTATUS icsneoScriptGetScriptStatus;
|
||||
SCRIPTREADAPPSIGNAL icsneoScriptReadAppSignal;
|
||||
SCRIPTWRITEAPPSIGNAL icsneoScriptWriteAppSignal;
|
||||
//SCRIPTREADRXMESSAGE icsneoScriptReadRxMessage;
|
||||
//SCRIPTREADTXMESSAGE icsneoScriptReadTxMessage;
|
||||
//SCRIPTWRITERXMESSAGE icsneoScriptWriteRxMessage;
|
||||
//SCRIPTWRITETXMESSAGE icsneoScriptWriteTxMessage;
|
||||
|
||||
|
||||
//The following are valid strings for setting parameters on devices
|
||||
//using the icsneoGetDeviceParameters() and icsneoSetDeviceParameters() functions
|
||||
char *FireParameters[] =
|
||||
{
|
||||
"can1", "can2", "can3", "can4", "swcan", "lsftcan", "lin1", "lin2",
|
||||
"lin3", "lin4", "cgi_baud", "cgi_tx_ifs_bit_times",
|
||||
"cgi_rx_ifs_bit_times", "cgi_chksum_enable", "network_enables",
|
||||
"network_enabled_on_boot", "pwm_man_timeout", "pwr_man_enable",
|
||||
"misc_io_initial_ddr", "misc_io_initial_latch", "misc_io_analog_enable",
|
||||
"misc_io_report_period", "misc_io_on_report_events", "ain_sample_period",
|
||||
"ain_threshold", "iso15765_separation_time_offset", "iso9141_kwp_settings",
|
||||
"perf_en", "iso_parity", "iso_msg_termination", "network_enables_2"
|
||||
};
|
||||
|
||||
|
||||
char *VCAN3Parameters[] =
|
||||
{
|
||||
"can1", "can2", "network_enables", "network_enabled_on_boot", "iso15765_separation_time_offset",
|
||||
"perf_en", "misc_io_initial_ddr", "misc_io_initial_latch", "misc_io_report_period",
|
||||
"misc_io_on_report_events"
|
||||
};
|
||||
|
||||
char *CANParameters[] =
|
||||
{
|
||||
"Mode", "SetBaudrate", "Baudrate", "NetworkType", "TqSeg1",
|
||||
"TqSeg2", "TqProp", "TqSync", "BRP", "auto_baud"
|
||||
};
|
||||
|
||||
char *SWCANParameters[] =
|
||||
{
|
||||
"Mode", "SetBaudrate", "Baudrate", "NetworkType", "TqSeg1", "TqSeg2",
|
||||
"TqProp", "TqSync", "BRP", "high_speed_auto_switch", "auto_baud"
|
||||
};
|
||||
|
||||
char *LINParameters[] =
|
||||
{
|
||||
"Baudrate", "spbrg", "brgh", "MasterResistor", "Mode"
|
||||
};
|
||||
|
||||
char *ISOKWPParms[] =
|
||||
{
|
||||
"Baudrate", "spbrg", "brgh", "init_steps", "init_step_count",
|
||||
"p2_500us", "p3_500us", "p4_500us", "chksum_enabled"
|
||||
};
|
||||
|
||||
|
||||
bool LoadDLLAPI(HINSTANCE &hAPIDLL)
|
||||
{
|
||||
if((hAPIDLL = LoadLibrary(_T("icsneo40.dll"))) == NULL)
|
||||
return false;
|
||||
|
||||
|
||||
|
||||
icsneoFindNeoDevices = (FINDNEODEVICES) GetProcAddress(hAPIDLL, "icsneoFindNeoDevices");
|
||||
icsneoOpenNeoDevice = (OPENNEODEVICE) GetProcAddress(hAPIDLL, "icsneoOpenNeoDevice");
|
||||
icsneoClosePort = (CLOSEPORT) GetProcAddress(hAPIDLL, "icsneoClosePort");
|
||||
icsneoFreeObject = (FREEOBJECT) GetProcAddress(hAPIDLL, "icsneoFreeObject");
|
||||
//// icsneoOpenPortEx = (OPENPORTEX) GetProcAddress(hAPIDLL, "icsneoOpenPortEx");
|
||||
//// icsneoEnableNetworkCom = (ENABLENETWORKCOM) GetProcAddress(hAPIDLL, "icsneoEnableNetworkCom");
|
||||
icsneoGetDLLVersion = (GETDLLVERSION) GetProcAddress(hAPIDLL, "icsneoGetDLLVersion");
|
||||
icsneoSerialNumberToString = (SERIALNUMBERTOSTRING) GetProcAddress(hAPIDLL, "icsneoSerialNumberToString");
|
||||
|
||||
icsneoTxMessages = (TXMESSAGES) GetProcAddress(hAPIDLL, "icsneoTxMessages");
|
||||
icsneoTxMessagesEx = (TXMESSAGESEX) GetProcAddress(hAPIDLL, "icsneoTxMessagesEx");
|
||||
icsneoGetMessages = (GETMESSAGES) GetProcAddress(hAPIDLL, "icsneoGetMessages");
|
||||
icsneoWaitForRxMessagesWithTimeOut = (WAITFORRXMSGS) GetProcAddress(hAPIDLL, "icsneoWaitForRxMessagesWithTimeOut");
|
||||
icsneoGetTimeStampForMsg = (GETTSFORMSG) GetProcAddress(hAPIDLL, "icsneoGetTimeStampForMsg");
|
||||
icsneoEnableNetworkRXQueue = (ENABLERXQUEUE) GetProcAddress(hAPIDLL, "icsneoEnableNetworkRXQueue");
|
||||
icsneoGetISO15765Status = (GETISO15765STATUS) GetProcAddress(hAPIDLL, "icsneoGetISO15765Status");
|
||||
icsneoSetISO15765RxParameters = (SETISO15765RXPARMS) GetProcAddress(hAPIDLL, "icsneoSetISO15765RxParameters");
|
||||
|
||||
icsneoISO15765_EnableNetworks = (ISO15765ENABLENETWORKS) GetProcAddress(hAPIDLL, "icsneoISO15765_EnableNetworks");
|
||||
icsneoISO15765_DisableNetworks = (ISO15765DISABLENETWORKS) GetProcAddress(hAPIDLL, "icsneoISO15765_DisableNetworks");
|
||||
icsneoISO15765_TransmitMessage = (ISO15765TXMSG)GetProcAddress(hAPIDLL, "icsneoISO15765_TransmitMessage");
|
||||
icsneoISO15765_ReceiveMessage = (ISO15765RXMSG)GetProcAddress(hAPIDLL, "icsneoISO15765_ReceiveMessage");
|
||||
|
||||
icsneoGetConfiguration = (GETCONFIG) GetProcAddress(hAPIDLL, "icsneoGetConfiguration");
|
||||
icsneoSendConfiguration = (SENDCONFIG) GetProcAddress(hAPIDLL, "icsneoSendConfiguration");
|
||||
icsneoGetFireSettings = (GETFIRESETTINGS) GetProcAddress(hAPIDLL, "icsneoGetFireSettings");
|
||||
icsneoSetFireSettings = (SETFIRESETTINGS) GetProcAddress(hAPIDLL, "icsneoSetFireSettings");
|
||||
icsneoGetVCAN3Settings = (GETVCAN3SETTINGS) GetProcAddress(hAPIDLL, "icsneoGetVCAN3Settings");
|
||||
icsneoSetVCAN3Settings = (SETVCAN3SETTINGS) GetProcAddress(hAPIDLL, "icsneoSetVCAN3Settings");
|
||||
|
||||
|
||||
icsneoGetVCANRFSettings = (GETVCANRFSETTINGS) GetProcAddress(hAPIDLL, "icsneoGetVCANRFSettings");
|
||||
icsneoSetVCANRFSettings = (SETVCANRFSETTINGS) GetProcAddress(hAPIDLL, "icsneoSetVCANRFSettings");
|
||||
|
||||
icsneoGetFire2Settings = (GETFIRE2SETTINGS) GetProcAddress(hAPIDLL, "icsneoGetFire2Settings");
|
||||
icsneoSetFire2Settings = (SETFIRE2SETTINGS) GetProcAddress(hAPIDLL, "icsneoSetFire2Settings");
|
||||
|
||||
icsneoGetRADGalaxySettings = (GETRADGalaxySETTINGS) GetProcAddress(hAPIDLL, "icsneoGetRADGalaxySettings");
|
||||
icsneoSetRADGalaxySettings = (SETRADGalaxySETTINGS) GetProcAddress(hAPIDLL, "icsneoSetRADGalaxySettings");
|
||||
|
||||
icsneoGetRADStar2Settings = (GETRADSTAR2SETTINGS) GetProcAddress(hAPIDLL, "icsneoGetRADStar2Settings");
|
||||
icsneoSetRADStar2Settings = (SETRADSTAR2SETTINGS) GetProcAddress(hAPIDLL, "icsneoSetRADStar2Settings");
|
||||
|
||||
icsneoGetVCAN412Settings = (GETVCAN412SETTINGS) GetProcAddress(hAPIDLL, "icsneoGetVCAN412Settings");
|
||||
icsneoSetVCAN412Settings = (SETVCAN412SETTINGS) GetProcAddress(hAPIDLL, "icsneoSetVCAN412Settings");
|
||||
|
||||
|
||||
|
||||
icsneoSetBitRate = (SETBITRATE) GetProcAddress(hAPIDLL, "icsneoSetBitRate");
|
||||
icsneoGetDeviceParameters = (GETDEVICEPARMS) GetProcAddress(hAPIDLL, "icsneoGetDeviceParameters");
|
||||
icsneoSetDeviceParameters = (SETDEVICEPARMS) GetProcAddress(hAPIDLL, "icsneoSetDeviceParameters");
|
||||
|
||||
icsneoGetLastAPIError = (GETLASTAPIERROR) GetProcAddress(hAPIDLL, "icsneoGetLastAPIError");
|
||||
icsneoGetErrorMessages = (GETERRMSGS) GetProcAddress(hAPIDLL, "icsneoGetErrorMessages");
|
||||
icsneoGetErrorInfo = (GETERRORINFO) GetProcAddress(hAPIDLL, "icsneoGetErrorInfo");
|
||||
|
||||
icsneoScriptLoad = (SCRIPTLOAD) GetProcAddress(hAPIDLL, "icsneoScriptLoad");
|
||||
icsneoScriptStart = (SCRIPTSTART) GetProcAddress(hAPIDLL, "icsneoScriptStart");
|
||||
icsneoScriptStop = (SCRIPTSTOP) GetProcAddress(hAPIDLL, "icsneoScriptStop");
|
||||
icsneoScriptClear = (SCRIPTCLEAR) GetProcAddress(hAPIDLL, "icsneoScriptClear");
|
||||
icsneoScriptStartFBlock = (SCRIPTSTARTFBLOCK) GetProcAddress(hAPIDLL, "icsneoScriptStartFBlock");
|
||||
icsneoScriptStopFBlock = (SCRIPTSTOPFBLOCK) GetProcAddress(hAPIDLL, "icsneoScriptStopFBlock");
|
||||
icsneoScriptGetFBlockStatus = (SCRIPTGETFBLOCKSTATUS) GetProcAddress(hAPIDLL, "icsneoScriptGetFBlockStatus");
|
||||
icsneoScriptGetScriptStatus = (SCRIPTGETSCRIPTSTATUS) GetProcAddress(hAPIDLL, "icsneoScriptGetScriptStatus");
|
||||
icsneoScriptReadAppSignal = (SCRIPTREADAPPSIGNAL) GetProcAddress(hAPIDLL, "icsneoScriptReadAppSignal");
|
||||
icsneoScriptWriteAppSignal = (SCRIPTWRITEAPPSIGNAL) GetProcAddress(hAPIDLL, "icsneoScriptWriteAppSignal");
|
||||
|
||||
|
||||
|
||||
if(!icsneoFindNeoDevices || !icsneoOpenNeoDevice || !icsneoClosePort || !icsneoFreeObject ||
|
||||
!icsneoTxMessages || !icsneoGetMessages || !icsneoWaitForRxMessagesWithTimeOut ||
|
||||
!icsneoGetTimeStampForMsg || !icsneoEnableNetworkRXQueue || !icsneoGetISO15765Status || !icsneoTxMessagesEx ||
|
||||
!icsneoSetISO15765RxParameters || !icsneoGetConfiguration || !icsneoSendConfiguration ||
|
||||
!icsneoGetFireSettings || !icsneoSetFireSettings || !icsneoGetVCAN3Settings ||
|
||||
!icsneoSetVCAN3Settings || !icsneoGetVCANRFSettings || !icsneoSetVCANRFSettings || !icsneoGetFire2Settings ||
|
||||
!icsneoGetVCAN412Settings || !icsneoSetVCAN412Settings ||
|
||||
!icsneoSetFire2Settings || !icsneoGetRADGalaxySettings || !icsneoSetRADGalaxySettings ||
|
||||
!icsneoSetBitRate || !icsneoGetDeviceParameters || !icsneoSerialNumberToString ||
|
||||
!icsneoSetDeviceParameters || !icsneoGetLastAPIError || !icsneoGetErrorMessages ||
|
||||
!icsneoGetErrorInfo || !icsneoScriptLoad || !icsneoScriptStart || !icsneoScriptStop ||
|
||||
!icsneoScriptClear || !icsneoScriptStartFBlock || !icsneoScriptStopFBlock ||
|
||||
!icsneoScriptGetFBlockStatus || !icsneoScriptGetScriptStatus || !icsneoScriptReadAppSignal ||
|
||||
!icsneoScriptWriteAppSignal || !icsneoGetDLLVersion)
|
||||
{
|
||||
FreeLibrary(hAPIDLL);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void UnloadDLLAPI(HINSTANCE &hAPIDLL)
|
||||
{
|
||||
if(hAPIDLL)
|
||||
FreeLibrary(hAPIDLL);
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,201 @@
|
|||
//FILE: icsneo40DLLAPI.H
|
||||
|
||||
#include <windows.h>
|
||||
#include "icsnVC40.h"
|
||||
|
||||
|
||||
|
||||
bool LoadDLLAPI(HINSTANCE &hAPIDLL);
|
||||
void UnloadDLLAPI(HINSTANCE &hAPIDLL);
|
||||
|
||||
//Basic Functions
|
||||
typedef int (__stdcall *FINDNEODEVICES)(unsigned long DeviceTypes, NeoDevice *pNeoDevice, int *pNumDevices);
|
||||
typedef int (__stdcall *OPENNEODEVICE)(NeoDevice *pNeoDevice, void * hObject, unsigned char *bNetworkIDs, int bConfigRead, int bSyncToPC);
|
||||
typedef int (__stdcall *CLOSEPORT)(void * hObject, int *pNumberOfErrors);
|
||||
typedef void (__stdcall *FREEOBJECT)(void * hObject);
|
||||
typedef int (__stdcall *OPENPORTEX)(void * lPortNumber, int lPortType, int lDriverType, int lIPAddressMSB, int lIPAddressLSBOrBaudRate,
|
||||
int bConfigRead, unsigned char *bNetworkID, int * hObject);
|
||||
typedef int (__stdcall *SERIALNUMBERTOSTRING) (unsigned long serial, char *data,unsigned long data_size);
|
||||
|
||||
//Message Functions
|
||||
typedef int (__stdcall *GETMESSAGES)(void * hObject, icsSpyMessage *pMsg, int * pNumberOfMessages, int * pNumberOfErrors);
|
||||
typedef int (__stdcall *TXMESSAGES)(void * hObject, icsSpyMessage *pMsg, int lNetworkID, int lNumMessages);
|
||||
typedef int (__stdcall *TXMESSAGESEX)(void * hObject,icsSpyMessage *pMsg, unsigned int lNetworkID,unsigned int lNumMessages,unsigned int *NumTxed, unsigned int zero2);
|
||||
typedef int (__stdcall *WAITFORRXMSGS)(void * hObject, unsigned int iTimeOut);
|
||||
typedef int (__stdcall *ENABLERXQUEUE)(void * hObject, int iEnable);
|
||||
typedef int (__stdcall *GETTSFORMSG)(void * hObject, icsSpyMessage *pMsg, double *pTimeStamp);
|
||||
typedef void (__stdcall *GETISO15765STATUS)(void * hObject, int lNetwork, int lClearTxStatus,
|
||||
int lClearRxStatus, int *lTxStatus, int *lRxStatus);
|
||||
typedef void (__stdcall *SETISO15765RXPARMS)(void * hObject, int lNetwork, int lEnable,
|
||||
spyFilterLong *pFF_CFMsgFilter, icsSpyMessage *pTxMsg,
|
||||
int lCFTimeOutMs, int lFlowCBlockSize,
|
||||
int lUsesExtendedAddressing, int lUseHardwareIfPresent);
|
||||
typedef int (__stdcall *DOWNLOADISO15765_2_TXSCRIPT)(void * hObject, unsigned int NetworkID);
|
||||
typedef int (__stdcall *CLEARISO15765_2_TXSCRIPT)(void * hObject);
|
||||
typedef int (__stdcall *TXISO15765_2_MESSAGE)(void * hObject, stCM_ISO157652_TxMessage *pTxMessage);
|
||||
|
||||
//Device Functions
|
||||
typedef int (__stdcall *GETCONFIG)(void * hObject, unsigned char * pData, int * lNumBytes);
|
||||
typedef int (__stdcall *SENDCONFIG)(void * hObject, unsigned char * pData, int lNumBytes);
|
||||
typedef int (__stdcall *GETFIRESETTINGS)(void * hObject, SFireSettings *pSettings, int iNumBytes);
|
||||
typedef int (__stdcall *SETFIRESETTINGS)(void * hObject, SFireSettings *pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
typedef int (__stdcall *GETVCAN3SETTINGS)(void * hObject, SVCAN3Settings *pSettings, int iNumBytes);
|
||||
typedef int (__stdcall *SETVCAN3SETTINGS)(void * hObject, SVCAN3Settings *pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
typedef int (__stdcall *GETFIRE2SETTINGS)(void * hObject, SFire2Settings *pSettings, int iNumBytes);
|
||||
typedef int (__stdcall *SETFIRE2SETTINGS)(void * hObject, SFire2Settings *pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
typedef int (__stdcall *GETVCANRFSETTINGS)(void * hObject, SVCANRFSettings *pSettings, int iNumBytes);
|
||||
typedef int (__stdcall *SETVCANRFSETTINGS)(void * hObject, SVCANRFSettings *pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
typedef int (__stdcall *GETVCAN412SETTINGS)(void * hObject, SVCAN412Settings *pSettings, int iNumBytes);
|
||||
typedef int (__stdcall *SETVCAN412SETTINGS)(void * hObject, SVCAN412Settings *pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
typedef int (__stdcall *GETRADGalaxySETTINGS)(void * hObject, SRADGalaxySettings *pSettings, int iNumBytes);
|
||||
typedef int (__stdcall *SETRADGalaxySETTINGS)(void * hObject, SRADGalaxySettings *pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
typedef int (__stdcall *GETRADSTAR2SETTINGS)(void * hObject, SRADStar2Settings *pSettings, int iNumBytes);
|
||||
typedef int (__stdcall *SETRADSTAR2SETTINGS)(void * hObject, SRADStar2Settings *pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
|
||||
typedef int (__stdcall *SETBITRATE)(void * hObject, int BitRate, int NetworkID);
|
||||
typedef int (__stdcall *GETDEVICEPARMS)(void * hObject, char *pParameter, char *pValues, short ValuesLength);
|
||||
typedef int (__stdcall *SETDEVICEPARMS)(void * hObject, char *pParmValue, int *pErrorIndex, int bSaveToEEPROM);
|
||||
|
||||
//Error Functions
|
||||
typedef int (__stdcall *GETLASTAPIERROR)(void * hObject, unsigned long *pErrorNumber);
|
||||
typedef int (__stdcall *GETERRMSGS)(void * hObject, int * pErrorMsgs, int * pNumberOfErrors);
|
||||
typedef int (__stdcall *GETERRORINFO)(int lErrorNumber, TCHAR *szErrorDescriptionShort,
|
||||
TCHAR *szErrorDescriptionLong, int * lMaxLengthShort,
|
||||
int * lMaxLengthLong,int * lErrorSeverity,int * lRestartNeeded);
|
||||
|
||||
//ISO15765-2 Functions
|
||||
typedef int (__stdcall *ISO15765ENABLENETWORKS)(void * hObject, unsigned long ulNetworks);
|
||||
typedef int (__stdcall *ISO15765DISABLENETWORKS)(void * hObject);
|
||||
typedef int (__stdcall *ISO15765TXMSG)(void * hObject, unsigned long ulNetworkID,stCM_ISO157652_TxMessage *pMsg, unsigned long ulBlockingTimeout);
|
||||
typedef int (__stdcall *ISO15765RXMSG)(void * hObject,int ulNetworkID,stCM_ISO157652_RxMessage * pMsg);
|
||||
|
||||
//General Utility Functions
|
||||
typedef int (__stdcall *VALIDATEHOBJECT)(void * hObject);
|
||||
typedef int (__stdcall *GETDLLVERSION)(void);
|
||||
typedef int (__stdcall *GETSERIALNUMBER)(void * hObject, unsigned int *iSerialNumber);
|
||||
typedef int (__stdcall *STARTSOCKSERVER)(void * hObject, int iPort);
|
||||
typedef int (__stdcall *STOPSOCKSERVER)(void * hObject);
|
||||
|
||||
//CoreMini Script functions
|
||||
typedef int (__stdcall *SCRIPTSTART)(void * hObject, int iLocation);
|
||||
typedef int (__stdcall *SCRIPTSTOP)(void * hObject);
|
||||
typedef int (__stdcall *SCRIPTLOAD)(void * hObject, const unsigned char * bin, unsigned long len_bytes, int iLocation);
|
||||
typedef int (__stdcall *SCRIPTCLEAR)(void * hObject, int iLocation);
|
||||
typedef int (__stdcall *SCRIPTSTARTFBLOCK)(void * hObject,unsigned int fb_index);
|
||||
typedef int (__stdcall *SCRIPTGETFBLOCKSTATUS)(void * hObject, unsigned int fb_index, int *piRunStatus);
|
||||
typedef int (__stdcall *SCRIPTSTOPFBLOCK)(void * hObject,unsigned int fb_index);
|
||||
typedef int (__stdcall *SCRIPTGETSCRIPTSTATUS)(void * hObject, int *piStatus);
|
||||
typedef int (__stdcall *SCRIPTREADAPPSIGNAL)(void * hObject, unsigned int iIndex, double *dValue);
|
||||
typedef int (__stdcall *SCRIPTWRITEAPPSIGNAL)(void * hObject, unsigned int iIndex, double dValue);
|
||||
typedef int (__stdcall *SCRIPTREADISO15765TXMESSAGE)(void * hObject, unsigned int iIndex, stCM_ISO157652_TxMessage *pTxMessage);
|
||||
typedef int (__stdcall *SCRIPTWRITEISO15765TXMESSAGE)(void * hObject, unsigned int iIndex, const stCM_ISO157652_TxMessage *pTxMessage);
|
||||
|
||||
|
||||
//Deprecated (but still suppored in the DLL)
|
||||
//////typedef int (__stdcall *OPENPORTEX)(int lPortSerialNumber, int lPortType, int lDriverType,
|
||||
////// int lIPAddressMSB, int lIPAddressLSBOrBaudRate,int bConfigRead,
|
||||
////// unsigned char * bNetworkID, int * hObject);
|
||||
//////
|
||||
//////typedef int (__stdcall *OPENPORT)(int lPortNumber, int lPortType, int lDriverType,
|
||||
////// unsigned char *bNetworkID, unsigned char *bSCPIDs, int * hObject);
|
||||
//////typedef int (__stdcall *ENABLENETWORKCOM)(void * hObject, int Enable);
|
||||
//////typedef int (__stdcall *FINDCOMDEVICES)(int lDriverType, int lGetSerialNumbers, int lStopAtFirst, int lUSBCommOnly,
|
||||
////// int *p_lDeviceTypes, int *p_lComPorts, int *p_lSerialNumbers, int *lNumDevices);
|
||||
|
||||
|
||||
|
||||
//Basic Functions
|
||||
extern FINDNEODEVICES icsneoFindNeoDevices;
|
||||
extern OPENNEODEVICE icsneoOpenNeoDevice;
|
||||
extern CLOSEPORT icsneoClosePort;
|
||||
extern FREEOBJECT icsneoFreeObject;
|
||||
extern SERIALNUMBERTOSTRING icsneoSerialNumberToString;
|
||||
////extern OPENPORTEX icsneoOpenPortEx;
|
||||
////extern ENABLENETWORKCOM icsneoEnableNetworkCom;
|
||||
|
||||
//Message Functions
|
||||
extern GETMESSAGES icsneoGetMessages;
|
||||
extern TXMESSAGES icsneoTxMessages;
|
||||
extern TXMESSAGESEX icsneoTxMessagesEx;
|
||||
extern WAITFORRXMSGS icsneoWaitForRxMessagesWithTimeOut;
|
||||
extern GETTSFORMSG icsneoGetTimeStampForMsg;
|
||||
extern ENABLERXQUEUE icsneoEnableNetworkRXQueue;
|
||||
extern GETISO15765STATUS icsneoGetISO15765Status;
|
||||
extern SETISO15765RXPARMS icsneoSetISO15765RxParameters;
|
||||
extern DOWNLOADISO15765_2_TXSCRIPT icsneoDownloadISO15765_2_TXScript;
|
||||
extern CLEARISO15765_2_TXSCRIPT icsneoClearISO15765_2_TxScript;
|
||||
extern TXISO15765_2_MESSAGE icsneoTransmitISO15765_2_Message;
|
||||
|
||||
|
||||
//Device Functions
|
||||
extern GETCONFIG icsneoGetConfiguration;
|
||||
extern SENDCONFIG icsneoSendConfiguration;
|
||||
extern GETFIRESETTINGS icsneoGetFireSettings;
|
||||
extern SETFIRESETTINGS icsneoSetFireSettings;
|
||||
extern GETVCAN3SETTINGS icsneoGetVCAN3Settings;
|
||||
extern SETVCAN3SETTINGS icsneoSetVCAN3Settings;
|
||||
|
||||
|
||||
extern GETFIRE2SETTINGS icsneoGetFire2Settings;
|
||||
extern SETFIRE2SETTINGS icsneoSetFire2Settings;
|
||||
extern GETVCANRFSETTINGS icsneoGetVCANRFSettings;
|
||||
extern SETVCANRFSETTINGS icsneoSetVCANRFSettings;
|
||||
extern GETRADGalaxySETTINGS icsneoGetRADGalaxySettings;
|
||||
extern SETRADGalaxySETTINGS icsneoSetRADGalaxySettings;
|
||||
extern GETRADSTAR2SETTINGS icsneoGetRADStar2Settings;
|
||||
extern SETRADSTAR2SETTINGS icsneoSetRADStar2Settings;
|
||||
extern GETVCAN412SETTINGS icsneoGetVCAN412Settings;
|
||||
extern SETVCAN412SETTINGS icsneoSetVCAN412Settings;
|
||||
|
||||
extern SETBITRATE icsneoSetBitRate;
|
||||
extern GETDEVICEPARMS icsneoGetDeviceParameters;
|
||||
extern SETDEVICEPARMS icsneoSetDeviceParameters;
|
||||
|
||||
//Error Functions
|
||||
extern GETLASTAPIERROR icsneoGetLastAPIError;
|
||||
extern GETERRMSGS icsneoGetErrorMessages;
|
||||
extern GETERRORINFO icsneoGetErrorInfo;
|
||||
|
||||
//ISO15765-2
|
||||
extern ISO15765ENABLENETWORKS icsneoISO15765_EnableNetworks;
|
||||
extern ISO15765DISABLENETWORKS icsneoISO15765_DisableNetworks;
|
||||
extern ISO15765TXMSG icsneoISO15765_TransmitMessage;
|
||||
extern ISO15765RXMSG icsneoISO15765_ReceiveMessage;
|
||||
|
||||
//General Utility Functions
|
||||
extern VALIDATEHOBJECT icsneoValidateHObject;
|
||||
extern GETDLLVERSION icsneoGetDLLVersion;
|
||||
extern GETSERIALNUMBER icsneoGetSerialNumber;
|
||||
extern STARTSOCKSERVER icsneoStartSockServer;
|
||||
extern STOPSOCKSERVER icsneoStopSockServer;
|
||||
|
||||
//CoreMini Functions
|
||||
extern SCRIPTSTART icsneoScriptStart;
|
||||
extern SCRIPTSTOP icsneoScriptStop;
|
||||
extern SCRIPTLOAD icsneoScriptLoad;
|
||||
extern SCRIPTCLEAR icsneoScriptClear;
|
||||
extern SCRIPTSTARTFBLOCK icsneoScriptStartFBlock;
|
||||
extern SCRIPTGETFBLOCKSTATUS icsneoScriptGetFBlockStatus;
|
||||
extern SCRIPTSTOPFBLOCK icsneoScriptStopFBlock;
|
||||
extern SCRIPTGETSCRIPTSTATUS icsneoScriptGetScriptStatus;
|
||||
extern SCRIPTREADAPPSIGNAL icsneoScriptReadAppSignal;
|
||||
extern SCRIPTWRITEAPPSIGNAL icsneoScriptWriteAppSignal;
|
||||
//extern SCRIPTREADRXMESSAGE icsneoScriptReadRxMessage;
|
||||
//extern SCRIPTREADTXMESSAGE icsneoScriptReadTxMessage;
|
||||
//extern SCRIPTWRITERXMESSAGE icsneoScriptWriteRxMessage;
|
||||
//extern SCRIPTWRITETXMESSAGE icsneoScriptWriteTxMessage;
|
||||
extern SCRIPTREADISO15765TXMESSAGE icsneoScriptReadISO15765_2_TxMessage;
|
||||
extern SCRIPTWRITEISO15765TXMESSAGE icsneoScriptWriteISO15765_2_TxMessage;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,338 @@
|
|||
#define ICSNEOC_MAKEDLL
|
||||
#include "api/icsneolegacy/include/icsneolegacy.h"
|
||||
|
||||
#undef ICSNEOC_MAKEDLL
|
||||
#include "api/icsneoc/include/icsneoc.h"
|
||||
|
||||
static NeoDevice OldNeoDeviceFromNew(const neodevice_t* newnd) {
|
||||
NeoDevice oldnd = { 0 };
|
||||
oldnd.SerialNumber = icsneo_serialStringToNum(newnd->serial);
|
||||
oldnd.NumberOfClients = 0;
|
||||
oldnd.MaxAllowedClients = 1;
|
||||
static_assert(sizeof(neodevice_handle_t) <= sizeof(oldnd.Handle), "neodevice_handle_t size must be at least sizeof(int) for compatibility reasons");
|
||||
*(neodevice_handle_t*)(&oldnd.Handle) = newnd->handle;
|
||||
return oldnd;
|
||||
}
|
||||
|
||||
//Basic Functions
|
||||
int icsneoFindNeoDevices(unsigned long DeviceTypes, NeoDevice* pNeoDevice, int* pNumDevices) {
|
||||
constexpr size_t MAX_DEVICES = 255;
|
||||
size_t count = MAX_DEVICES;
|
||||
|
||||
if(pNumDevices == nullptr)
|
||||
return 0;
|
||||
|
||||
if(pNeoDevice == nullptr) {
|
||||
icsneo_findAllDevices(nullptr, &count);
|
||||
*pNumDevices = (int)count;
|
||||
return 1;
|
||||
}
|
||||
|
||||
size_t bufferSize = (size_t)*pNumDevices;
|
||||
if(*pNumDevices < 0 || bufferSize > MAX_DEVICES)
|
||||
return 0;
|
||||
|
||||
neodevice_t devices[MAX_DEVICES];
|
||||
icsneo_findAllDevices(devices, &count);
|
||||
if(bufferSize < count)
|
||||
count = bufferSize;
|
||||
*pNumDevices = (int)count;
|
||||
|
||||
for(int i = 0; i < count; i++)
|
||||
pNeoDevice[i] = OldNeoDeviceFromNew(&devices[i]);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
int icsneoOpenNeoDevice(NeoDevice* pNeoDevice, void* hObject, unsigned char* bNetworkIDs, int bConfigRead, int bSyncToPC) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoClosePort(void* hObject, int* pNumberOfErrors) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
void icsneoFreeObject(void* hObject) {
|
||||
// TODO Implement
|
||||
return;
|
||||
}
|
||||
|
||||
int icsneoSerialNumberToString(unsigned long serial, char* data, unsigned long data_size) {
|
||||
size_t length = (size_t)data_size;
|
||||
return icsneo_serialNumToString((uint32_t)serial, data, &length);
|
||||
}
|
||||
|
||||
//Message Functions
|
||||
int icsneoGetMessages(void* hObject, icsSpyMessage* pMsg, int* pNumberOfMessages, int* pNumberOfErrors) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoTxMessages(void* hObject, icsSpyMessage* pMsg, int lNetworkID, int lNumMessages) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoTxMessagesEx(void* hObject,icsSpyMessage* pMsg, unsigned int lNetworkID, unsigned int lNumMessages, unsigned int* NumTxed, unsigned int zero2) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoWaitForRxMessagesWithTimeOut(void* hObject, unsigned int iTimeOut) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoEnableNetworkRXQueue(void* hObject, int iEnable) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoGetTimeStampForMsg(void* hObject, icsSpyMessage* pMsg, double* pTimeStamp) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
void icsneoGetISO15765Status(void* hObject, int lNetwork, int lClearTxStatus, int lClearRxStatus, int*lTxStatus, int*lRxStatus) {
|
||||
// TODO Implement
|
||||
return;
|
||||
}
|
||||
|
||||
void icsneoSetISO15765RxParameters(void* hObject, int lNetwork, int lEnable, spyFilterLong* pFF_CFMsgFilter, icsSpyMessage* pTxMsg,
|
||||
int lCFTimeOutMs, int lFlowCBlockSize, int lUsesExtendedAddressing, int lUseHardwareIfPresent) {
|
||||
// TODO Implement
|
||||
return;
|
||||
}
|
||||
|
||||
//Device Functions
|
||||
int icsneoGetConfiguration(void* hObject, unsigned char* pData, int* lNumBytes) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoSendConfiguration(void* hObject, unsigned char* pData, int lNumBytes) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoGetFireSettings(void* hObject, SFireSettings* pSettings, int iNumBytes) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoSetFireSettings(void* hObject, SFireSettings* pSettings, int iNumBytes, int bSaveToEEPROM) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoGetVCAN3Settings(void* hObject, SVCAN3Settings* pSettings, int iNumBytes) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoSetVCAN3Settings(void* hObject, SVCAN3Settings* pSettings, int iNumBytes, int bSaveToEEPROM) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoGetFire2Settings(void* hObject, SFire2Settings* pSettings, int iNumBytes) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoSetFire2Settings(void* hObject, SFire2Settings* pSettings, int iNumBytes, int bSaveToEEPROM) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoGetVCANRFSettings(void* hObject, SVCANRFSettings* pSettings, int iNumBytes) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoSetVCANRFSettings(void* hObject, SVCANRFSettings* pSettings, int iNumBytes, int bSaveToEEPROM) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoGetVCAN412Settings(void* hObject, SVCAN412Settings* pSettings, int iNumBytes) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoSetVCAN412Settings(void* hObject, SVCAN412Settings* pSettings, int iNumBytes, int bSaveToEEPROM) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoGetRADGalaxySettings(void* hObject, SRADGalaxySettings* pSettings, int iNumBytes) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoSetRADGalaxySettings(void* hObject, SRADGalaxySettings* pSettings, int iNumBytes, int bSaveToEEPROM) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoGetRADStar2Settings(void* hObject, SRADStar2Settings* pSettings, int iNumBytes) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoSetRADStar2Settings(void* hObject, SRADStar2Settings* pSettings, int iNumBytes, int bSaveToEEPROM) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoSetBitRate(void* hObject, int BitRate, int NetworkID) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoGetDeviceParameters(void* hObject, char* pParameter, char* pValues, short ValuesLength) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoSetDeviceParameters(void* hObject, char* pParmValue, int* pErrorIndex, int bSaveToEEPROM) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
//Error Functions
|
||||
int icsneoGetLastAPIError(void* hObject, unsigned long* pErrorNumber) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoGetErrorMessages(void* hObject, int* pErrorMsgs, int* pNumberOfErrors) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoGetErrorInfo(int lErrorNumber, TCHAR*szErrorDescriptionShort, TCHAR*szErrorDescriptionLong, int* lMaxLengthShort, int* lMaxLengthLong,int* lErrorSeverity,int* lRestartNeeded) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
//ISO15765-2 Functions
|
||||
int icsneoISO15765_EnableNetworks(void* hObject, unsigned long ulNetworks) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoISO15765_DisableNetworks(void* hObject) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoISO15765_TransmitMessage(void* hObject, unsigned long ulNetworkID, stCM_ISO157652_TxMessage* pMsg, unsigned long ulBlockingTimeout) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoISO15765_ReceiveMessage(void* hObject,int ulNetworkID, stCM_ISO157652_RxMessage* pMsg) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
//General Utility Functions
|
||||
int icsneoValidateHObject(void* hObject) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoGetDLLVersion(void) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoGetSerialNumber(void* hObject, unsigned int*iSerialNumber) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoStartSockServer(void* hObject, int iPort) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoStopSockServer(void* hObject) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
//CoreMini Script functions
|
||||
int icsneoScriptStart(void* hObject, int iLocation) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoScriptStop(void* hObject) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoScriptLoad(void* hObject, const unsigned char* bin, unsigned long len_bytes, int iLocation) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoScriptClear(void* hObject, int iLocation) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoScriptStartFBlock(void* hObject,unsigned int fb_index) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoScriptGetFBlockStatus(void* hObject, unsigned int fb_index, int* piRunStatus) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoScriptStopFBlock(void* hObject,unsigned int fb_index) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoScriptGetScriptStatus(void* hObject, int* piStatus) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoScriptReadAppSignal(void* hObject, unsigned int iIndex, double*dValue) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoScriptWriteAppSignal(void* hObject, unsigned int iIndex, double dValue) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
//Deprecated (but still suppored in the DLL)
|
||||
int icsneoOpenPortEx(void* lPortNumber, int lPortType, int lDriverType, int lIPAddressMSB, int lIPAddressLSBOrBaudRate, int bConfigRead, unsigned char* bNetworkID, int* hObject) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoOpenPort(int lPortNumber, int lPortType, int lDriverType, unsigned char* bNetworkID, unsigned char* bSCPIDs, int* hObject) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoEnableNetworkCom(void* hObject, int Enable) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
||||
int icsneoFindAllCOMDevices(int lDriverType, int lGetSerialNumbers, int lStopAtFirst, int lUSBCommOnly, int* p_lDeviceTypes, int* p_lComPorts, int* p_lSerialNumbers, int*lNumDevices) {
|
||||
// TODO Implement
|
||||
return false;
|
||||
}
|
||||
|
|
@ -0,0 +1,100 @@
|
|||
#ifndef __ICSNEOLEGACY_H_
|
||||
#define __ICSNEOLEGACY_H_
|
||||
|
||||
#include "platform/include/dynamiclib.h" // Dynamic library loading and exporting
|
||||
|
||||
#include <stdint.h>
|
||||
typedef uint8_t byte; // Typedef helper for the following include
|
||||
#include "api/icsneolegacy/dllhelper/include/icsnVC40.h" // Definitions for structs
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//Basic Functions
|
||||
extern int DLLExport icsneoFindNeoDevices(unsigned long DeviceTypes, NeoDevice* pNeoDevice, int* pNumDevices);
|
||||
extern int DLLExport icsneoOpenNeoDevice(NeoDevice* pNeoDevice, void* hObject, unsigned char* bNetworkIDs, int bConfigRead, int bSyncToPC);
|
||||
extern int DLLExport icsneoClosePort(void* hObject, int* pNumberOfErrors);
|
||||
extern void DLLExport icsneoFreeObject(void* hObject);
|
||||
extern int DLLExport icsneoSerialNumberToString(unsigned long serial, char*data,unsigned long data_size);
|
||||
|
||||
//Message Functions
|
||||
extern int DLLExport icsneoGetMessages(void* hObject, icsSpyMessage* pMsg, int* pNumberOfMessages, int* pNumberOfErrors);
|
||||
extern int DLLExport icsneoTxMessages(void* hObject, icsSpyMessage* pMsg, int lNetworkID, int lNumMessages);
|
||||
extern int DLLExport icsneoTxMessagesEx(void* hObject,icsSpyMessage* pMsg, unsigned int lNetworkID, unsigned int lNumMessages, unsigned int* NumTxed, unsigned int zero2);
|
||||
extern int DLLExport icsneoWaitForRxMessagesWithTimeOut(void* hObject, unsigned int iTimeOut);
|
||||
extern int DLLExport icsneoEnableNetworkRXQueue(void* hObject, int iEnable);
|
||||
extern int DLLExport icsneoGetTimeStampForMsg(void* hObject, icsSpyMessage* pMsg, double* pTimeStamp);
|
||||
extern void DLLExport icsneoGetISO15765Status(void* hObject, int lNetwork, int lClearTxStatus, int lClearRxStatus, int*lTxStatus, int*lRxStatus);
|
||||
extern void DLLExport icsneoSetISO15765RxParameters(void* hObject, int lNetwork, int lEnable, spyFilterLong* pFF_CFMsgFilter, icsSpyMessage* pTxMsg,
|
||||
int lCFTimeOutMs, int lFlowCBlockSize, int lUsesExtendedAddressing, int lUseHardwareIfPresent);
|
||||
|
||||
//Device Functions
|
||||
extern int DLLExport icsneoGetConfiguration(void* hObject, unsigned char* pData, int* lNumBytes);
|
||||
extern int DLLExport icsneoSendConfiguration(void* hObject, unsigned char* pData, int lNumBytes);
|
||||
extern int DLLExport icsneoGetFireSettings(void* hObject, SFireSettings* pSettings, int iNumBytes);
|
||||
extern int DLLExport icsneoSetFireSettings(void* hObject, SFireSettings* pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
extern int DLLExport icsneoGetVCAN3Settings(void* hObject, SVCAN3Settings* pSettings, int iNumBytes);
|
||||
extern int DLLExport icsneoSetVCAN3Settings(void* hObject, SVCAN3Settings* pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
extern int DLLExport icsneoGetFire2Settings(void* hObject, SFire2Settings* pSettings, int iNumBytes);
|
||||
extern int DLLExport icsneoSetFire2Settings(void* hObject, SFire2Settings* pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
extern int DLLExport icsneoGetVCANRFSettings(void* hObject, SVCANRFSettings* pSettings, int iNumBytes);
|
||||
extern int DLLExport icsneoSetVCANRFSettings(void* hObject, SVCANRFSettings* pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
extern int DLLExport icsneoGetVCAN412Settings(void* hObject, SVCAN412Settings* pSettings, int iNumBytes);
|
||||
extern int DLLExport icsneoSetVCAN412Settings(void* hObject, SVCAN412Settings* pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
extern int DLLExport icsneoGetRADGalaxySettings(void* hObject, SRADGalaxySettings* pSettings, int iNumBytes);
|
||||
extern int DLLExport icsneoSetRADGalaxySettings(void* hObject, SRADGalaxySettings* pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
extern int DLLExport icsneoGetRADStar2Settings(void* hObject, SRADStar2Settings* pSettings, int iNumBytes);
|
||||
extern int DLLExport icsneoSetRADStar2Settings(void* hObject, SRADStar2Settings* pSettings, int iNumBytes, int bSaveToEEPROM);
|
||||
|
||||
extern int DLLExport icsneoSetBitRate(void* hObject, int BitRate, int NetworkID);
|
||||
extern int DLLExport icsneoGetDeviceParameters(void* hObject, char* pParameter, char* pValues, short ValuesLength);
|
||||
extern int DLLExport icsneoSetDeviceParameters(void* hObject, char* pParmValue, int* pErrorIndex, int bSaveToEEPROM);
|
||||
|
||||
//Error Functions
|
||||
extern int DLLExport icsneoGetLastAPIError(void* hObject, unsigned long* pErrorNumber);
|
||||
extern int DLLExport icsneoGetErrorMessages(void* hObject, int* pErrorMsgs, int* pNumberOfErrors);
|
||||
extern int DLLExport icsneoGetErrorInfo(int lErrorNumber, TCHAR*szErrorDescriptionShort, TCHAR*szErrorDescriptionLong, int* lMaxLengthShort, int* lMaxLengthLong,int* lErrorSeverity,int* lRestartNeeded);
|
||||
|
||||
//ISO15765-2 Functions
|
||||
extern int DLLExport icsneoISO15765_EnableNetworks(void* hObject, unsigned long ulNetworks);
|
||||
extern int DLLExport icsneoISO15765_DisableNetworks(void* hObject);
|
||||
extern int DLLExport icsneoISO15765_TransmitMessage(void* hObject, unsigned long ulNetworkID, stCM_ISO157652_TxMessage* pMsg, unsigned long ulBlockingTimeout);
|
||||
extern int DLLExport icsneoISO15765_ReceiveMessage(void* hObject,int ulNetworkID, stCM_ISO157652_RxMessage* pMsg);
|
||||
|
||||
//General Utility Functions
|
||||
extern int DLLExport icsneoValidateHObject(void* hObject);
|
||||
extern int DLLExport icsneoGetDLLVersion(void);
|
||||
extern int DLLExport icsneoGetSerialNumber(void* hObject, unsigned int*iSerialNumber);
|
||||
extern int DLLExport icsneoStartSockServer(void* hObject, int iPort);
|
||||
extern int DLLExport icsneoStopSockServer(void* hObject);
|
||||
|
||||
//CoreMini Script functions
|
||||
extern int DLLExport icsneoScriptStart(void* hObject, int iLocation);
|
||||
extern int DLLExport icsneoScriptStop(void* hObject);
|
||||
extern int DLLExport icsneoScriptLoad(void* hObject, const unsigned char* bin, unsigned long len_bytes, int iLocation);
|
||||
extern int DLLExport icsneoScriptClear(void* hObject, int iLocation);
|
||||
extern int DLLExport icsneoScriptStartFBlock(void* hObject,unsigned int fb_index);
|
||||
extern int DLLExport icsneoScriptGetFBlockStatus(void* hObject, unsigned int fb_index, int* piRunStatus);
|
||||
extern int DLLExport icsneoScriptStopFBlock(void* hObject,unsigned int fb_index);
|
||||
extern int DLLExport icsneoScriptGetScriptStatus(void* hObject, int* piStatus);
|
||||
extern int DLLExport icsneoScriptReadAppSignal(void* hObject, unsigned int iIndex, double*dValue);
|
||||
extern int DLLExport icsneoScriptWriteAppSignal(void* hObject, unsigned int iIndex, double dValue);
|
||||
|
||||
//Deprecated (but still suppored in the DLL)
|
||||
extern int DLLExport icsneoOpenPortEx(void* lPortNumber, int lPortType, int lDriverType, int lIPAddressMSB, int lIPAddressLSBOrBaudRate, int bConfigRead, unsigned char* bNetworkID, int* hObject);
|
||||
extern int DLLExport icsneoOpenPort(int lPortNumber, int lPortType, int lDriverType, unsigned char* bNetworkID, unsigned char* bSCPIDs, int* hObject);
|
||||
extern int DLLExport icsneoEnableNetworkCom(void* hObject, int Enable);
|
||||
extern int DLLExport icsneoFindAllCOMDevices(int lDriverType, int lGetSerialNumbers, int lStopAtFirst, int lUSBCommOnly, int* p_lDeviceTypes, int* p_lComPorts, int* p_lSerialNumbers, int*lNumDevices);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Loading…
Reference in New Issue