diff --git a/bfs/CMakeLists.txt b/bfs/CMakeLists.txt index 09168f8..bc4ae62 100644 --- a/bfs/CMakeLists.txt +++ b/bfs/CMakeLists.txt @@ -26,6 +26,7 @@ message("") # Including all tools file(GLOB TOOL_INCLUDES CONFIGURE_DEPENDS "${PROJECT_SOURCE_DIR}/tools/*") +# Adding tools foreach(X IN LISTS TOOL_INCLUDES) message("Including library with ${X}") add_subdirectory(${X}) @@ -42,7 +43,16 @@ configure_file ( # Adding public includes to include search path include_directories("${CMAKE_INCLUDE_PATH}") # Adding private include files from source tree -include_directories("${CMAKE_SOURCE_DIR}") +include_directories("${CMAKE_SOURCE_DIR}")# Including dll header files +file(GLOB LIB_INCLUDES CONFIGURE_DEPENDS "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/*/") +foreach(X IN LISTS LIB_INCLUDES) + message("Including lib headers: ${X}") + include_directories(${X}) +endforeach() + +find_library(TactorInterface NAME TactorInterface.lib PATHS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ea_tdk) +message("====> ${TactorInterface}") +find_library(TActionManager NAME TActionManager.lib PATHS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/ea_tdk) # puts all .cpp files inside src to the SOURCES variable # TODO: replace this with a script for collecting cpp files @@ -51,7 +61,12 @@ file(GLOB_RECURSE BFS_SOURCE CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/*.cpp") file(GLOB IMPLEMENTAIONS CONFIGURE_DEPENDS "${IMPLEMENATION_PATH}/*/") foreach(IMPL IN LISTS IMPLEMENTAIONS) - message("Starting implementation(${IMPL}) build...\n") + message("\n=== Starting implementation(${IMPL}) build... ===") + # Check if implementation config file exists + if(EXISTS "${IMPL}/CMakeLists.txt") + message("Found configuration file!") + add_subdirectory(${IMPL}) + endif() set(IMPL_ALGO_PATH ${IMPL}/algos) # BFS Implemenation algo source file path set(IMPL_IO_PROCS_PATH ${IMPL}/io_procs) @@ -100,6 +115,11 @@ foreach(IMPL IN LISTS IMPLEMENTAIONS) get_filename_component(N ${X} NAME_WE) message(STATUS "Generating Executable: ${N}.exe Main File: ${X}"}) add_executable(${N} ${IMPL_SRC} ${X} ${BFS_SOURCE}) + + # All exe's depend on tinyxml target_link_libraries(${N} tinyxml2) + target_link_libraries(${N} ${TactorInterface}) + target_link_libraries(${N} ${TActionManager}) + endforeach() endforeach() diff --git a/bfs/implementations/breadcrumbs/CMakeLists.txt b/bfs/implementations/breadcrumbs/CMakeLists.txt new file mode 100644 index 0000000..2ee81a5 --- /dev/null +++ b/bfs/implementations/breadcrumbs/CMakeLists.txt @@ -0,0 +1,4 @@ + +set (VirtualOutputIOProcessor_IMPL_DLLS + ea_tdk + PARENT_SCOPE) diff --git a/bfs/lib/.blank b/bfs/lib/.blank deleted file mode 100644 index e69de29..0000000 diff --git a/bfs/lib/ea_tdk/API_Reference_Windows.pdf b/bfs/lib/ea_tdk/API_Reference_Windows.pdf new file mode 100644 index 0000000..8dca30b Binary files /dev/null and b/bfs/lib/ea_tdk/API_Reference_Windows.pdf differ diff --git a/bfs/lib/ea_tdk/EAI_Defines.h b/bfs/lib/ea_tdk/EAI_Defines.h new file mode 100644 index 0000000..d595894 --- /dev/null +++ b/bfs/lib/ea_tdk/EAI_Defines.h @@ -0,0 +1,147 @@ +/* + This software is the copyrighted work of Engineering Acoustics, Inc. and/or its suppliers and may not be + reproduced or redistributed without prior written permission. + Engineering Acoustics, Inc (EAI) provides this software “as is," and use the software is at your own risk. + EAI make no warranties as to performance, merchantability, fitness for a particular purpose, or any + other warranties whether expressed or implied. Under no circumstances shall EAI be liable for direct, + indirect, special, incidental, or consequential damages resulting from the use, misuse, or inability to use + this software, even if EAI has been advised of the possibility of such damages. + + Copyright 2015(c) Engineering Acoustics, Inc. All rights reserved. +*/ + +/************************************************************************ +* * +* EAI_Defines.h -- error code definitions for the EAI Software * +* * +* Copyright 2015(c) Engineering Acoustics Inc. All rights reserved. * +* * +************************************************************************/ + + +#ifndef _EAIDEFINES_ +#define _EAIDEFINES_ + +// Default value to play a TAction at it's default location +#define TACTION_LOCATION_DEFAULT 0xDF + +// Number of device types. +#define DEVICE_TYPE_COUNT 5 + +// Flags for device types! +// Change in 0.1.0.7: These were integers, and are now bitflags! +#define DEVICE_TYPE_UNKNOWN 0x00 +#define DEVICE_TYPE_SERIAL 0x01 +#define DEVICE_TYPE_WINUSB 0x02 +#define DEVICE_TYPE_ANDROIDBLUETOOTH 0x04 +#define DEVICE_TYPE_ANDROIDUSB 0x08 +#define DEVICE_TYPE_ANDROIDBLE 0x10 + +#define TDK_LINEAR_RAMP 0x01 + +// values for command bytes +#define TDK_COMMAND_PULSE 0x11 +#define TDK_COMMAND_READFW 0x42 +#define TDK_COMMAND_READ_CURRENT 0x53 +#define TDK_COMMAND_STOP 0x01 +#define TDK_COMMAND_GAIN 0x20 +#define TDK_COMMAND_FREQ 0x12 +#define TDK_COMMAND_SETSIGSOURCE 0x15 +#define TDK_COMMAND_RAMP 0x2A +#define TDK_COMMAND_SELFTEST 0x30 +#define TDK_COMMAND_READ_BAT_DATA 0x3a +#define TDK_COMMAND_GETSEGMENTLIST 0x45 +#define TDK_COMMAND_SET_TACTORS 0x80 +#define TDK_COMMAND_SET_TACTOR_TYPE 0x33 +#define TDK_COMMAND_TACTION_PLAY 0x1A +#define TDK_COMMAND_TACTION_START 0x1B +#define TDK_COMMAND_ACTION_WAIT 0x1F +//#define TDK_COMMAND_TACTION_??? 0x1C +#define TDK_COMMAND_TACTION_END 0x1D +#define TDK_COMMAND_SET_FREQ_TIME_DELAY 0xA2 + +// SetSigSource type values. Can be bit-or'd together. +#define TDK_SIG_SRC_PRIMARY 0x01 +#define TDK_SIG_SRC_MODULATION 0x02 +#define TDK_SIG_SRC_NOISE 0x04 + +// Pre-done SigSource combinations. +#define TDK_SIG_SRC_PRIMARY_AND_MOD (TDK_SIG_SRC_PRIMARY | TDK_SIG_SRC_MODULATION) +#define TDK_SIG_SRC_PRIMARY_AND_NOISE (TDK_SIG_SRC_PRIMARY | TDK_SIG_SRC_NOISE) +#define TDK_SIG_SRC_MOD_AND_NOISE (TDK_SIG_SRC_MODULATION | TDK_SIG_SRC_NOISE ) +#define TDK_SIG_SRC_PRIMARY_MOD_NOISE (TDK_SIG_SRC_PRIMARY | TDK_SIG_SRC_MODULATION | TDK_SIG_SRC_NOISE) + + +#define MAX_ACTION_DURATION 2500 // the maximum length of an action duration +#define MIN_ACTION_DURATION 10 // the minimum length of an action duration. +#define MAX_ACTION_FREQUENCY 3500 // the maximum frequency of an action. +#define MIN_ACTION_FREQUENCY 300 // the minimum frequency of an action. +#define MAX_ACTION_GAIN 255 // the maximum gain of an action. +#define MIN_ACTION_GAIN 1 // the minimum gain of an action. + +#define TDK_MAX_STORED_TACTIONS 10 // the number of TActions the device can hold +#define TDK_MAX_STORED_TACTION_LENGTH 64 // the number of actions a stored TAction can h old + +// tactor type values +#define TDK_TACTOR_TYPE_C3 0x11 +#define TDK_TACTOR_TYPE_C2 0x12 +#define TDK_TACTOR_TYPE_EMS 0x21 +#define TDK_TACTOR_TYPE_EMR 0x22 + +#define ERROR_NOINIT 202000 +#define ERROR_CONNECTION 202001 +#define ERROR_BADPARAMETER 202002 +#define ERROR_INTERNALERROR 202003 +#define ERROR_PARTIALREAD 202004 +#define ERROR_HANDLE_NULL 202005 +#define ERROR_WIN_ERROR 202006 +#define ERROR_EAITIMEOUT 202007 +#define ERROR_EAINOREAD 202008 +#define ERROR_FAILED_TO_CLOSE 202009 +#define ERROR_MORE_TO_READ 202010 +#define ERROR_FAILED_TO_READ 202011 +#define ERROR_FAILED_TO_WRITE 202012 +#define ERROR_NO_SUPPORTED_DRIVER 202013 + +#define ERROR_PARSE_ERROR 203000 + +#define ERROR_DM_ACTION_LIMIT_REACHED 204010 +#define ERROR_DM_FAILED_TO_GENERATE_DEVICE_ID 204011 + +#define ERROR_JNI_UNKNOWN 205000 +#define ERROR_JNI_BAD 205001 +#define ERROR_JNI_FIND_CLASS_ERROR 205002 +#define ERROR_JNI_FIND_FIELD_ERROR 205003 +#define ERROR_JNI_FIND_METHOD_ERROR 205004 +#define ERROR_JNI_CALL_METHOD_ERROR 205005 +#define ERROR_JNI_RESOURCE_ACQUISITION_ERROR 205006 +#define ERROR_JNI_RESOURCE_RELEASE_ERROR 205007 + +#define ERROR_SI_ERROR 302000 + +#define ERROR_TM_NOT_INITIALIZED 402000 +#define ERROR_TM_NO_DEVICE 402001 +#define ERROR_TM_CANT_MAP 402002 +#define ERROR_TM_FAILED_TO_OPEN 402003 +#define ERROR_TM_INVALID_PARAM 402004 +#define ERROR_TM_TACTION_MISSING_CONNECTED_SEGEMENT 402005 +#define ERROR_TM_GENERATECOMMANDBUFFER_BAD_PARAMETER 402006 +#define ERROR_TM_TACTIONID_DOESNT_EXIST 402007 +#define ERROR_TM_DATABASE_NOT_INITIALIZED 402008 +#define ERROR_TM_MAX_CONTROLLER_LIMIT_REACHED 402009 +#define ERROR_TM_MAX_ACTION_LIMIT_REACHED 402010 +#define ERROR_TM_CONTROLLER_NOT_FOUND 402011 +#define ERROR_TM_MAX_TACTORLOCATION_LIMIT_REACHED 402012 +#define ERROR_TM_TACTION_NOT_FOUND 402013 +#define ERROR_TM_FAILED_TO_UNLOAD 402014 +#define ERROR_TM_NO_TACTIONS_IN_DATABASE 402015 +#define ERROR_TM_DATABASE_FAILED_TO_OPEN 402016 +#define ERROR_TM_FAILED_PACKET_PARSE 402017 +#define ERROR_TM_FAILED_TO_CLONE_TACTION 402018 + +#define EAI_DBM_ERROR 502000 +#define EAI_DBM_NO_ERROR 502001 + +#define ERROR_BAD_DATA 602000 + +#endif diff --git a/bfs/lib/ea_tdk/TActionInterface.h b/bfs/lib/ea_tdk/TActionInterface.h new file mode 100644 index 0000000..89291df --- /dev/null +++ b/bfs/lib/ea_tdk/TActionInterface.h @@ -0,0 +1,163 @@ +/* + This software is the copyrighted work of Engineering Acoustics, Inc. and/or its suppliers and may not be + reproduced or redistributed without prior written permission. + Engineering Acoustics, Inc (EAI) provides this software “as is," and use the software is at your own risk. + EAI make no warranties as to performance, merchantability, fitness for a particular purpose, or any + other warranties whether expressed or implied. Under no circumstances shall EAI be liable for direct, + indirect, special, incidental, or consequential damages resulting from the use, misuse, or inability to use + this software, even if EAI has been advised of the possibility of such damages. + + Copyright 2015(c) Engineering Acoustics, Inc. All rights reserved. +*/ + +#ifndef TACTION_INTERFACE_H_ +#define TACTION_INTERFACE_H_ + + +//#undef TACTIONSYSTEM + +#ifdef WIN32 +#pragma warning(disable : 4996)// _CRT_SECURE_NO_WARNINGS +#ifdef BUILD_TACTIONINTERFACE_DLL +#define EXPORTtactionInterface extern "C" __declspec(dllexport) +#else +#define EXPORTtactionInterface extern "C" __declspec(dllimport) +#endif +#else +#define EXPORTtactionInterface extern "C" +#endif + + +#ifdef TACTIONSYSTEM + +/**************************************************************************** +*FUNCTION: LoadTActionDatabase +*DESCRIPTION Loads the TAction Database file "tactionFile" +*PARAMETERS +*IN: char* tactionFile - the filename of the sqlite database to load +* +*RETURNS: +* on success: Number of TActions Found +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int LoadTActionDatabase(char * tactionFile); + +/**************************************************************************** +*FUNCTION: IsDatabaseLoaded +*DESCRIPTION Determines if there is a database currently loaded +* +*RETURNS: +* on success: 1. there is a database currently loaded +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int IsDatabaseLoaded(); + +/**************************************************************************** +*FUNCTION: GetLoadedTActionSize +*DESCRIPTION Gets how many TActions are currently loaded. +* +*RETURNS: +* on success: Number of TActions Loaded +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int GetLoadedTActionSize(); + +/**************************************************************************** +*FUNCTION: GetTActionDuration +*DESCRIPTION Gets the total time in milliseconds that it takes for a TAction to complely play. +*PARAMETERS +*IN: int tacID - the tacID of the TAction to be measured +* +*RETURNS: +* on success: The total duration of the TAction in milliseconds +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int GetTActionDuration(int tacID); + +/**************************************************************************** +*FUNCTION: UnloadTActions +*DESCRIPTION Unloads all the currently loaded TActions +* +*RETURNS: +* on success: 0 +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int UnloadTActions(); + +/**************************************************************************** +*FUNCTION: GetTActionName +*DESCRIPTION Gets the name of a specified TAction +*PARAMETERS +*IN: int tacID - The ID of the TAction to get the name of. +* +*RETURNS: +* on success: the name of the TAction. +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +char* GetTActionName(int tacID); + +/**************************************************************************** +*FUNCTION: CanTActionMap +*DESCRIPTION Determines if a taction can map to the given tactor device. +*PARAMETERS +*IN: int DeviceID - the device id to play the TAction on. +int tacID - the id of the TAction to play. +int tactorID - the id of the tactor to play the TAction on. + +* +*RETURNS: +* on success: 0 successfully mapped and played. +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int CanTActionMap(int boardID, int tacID, int tactorID); + +/**************************************************************************** +*FUNCTION: PlayTAction +*DESCRIPTION Plays the given taction to the given controller with the given scalefactors. +*PARAMETERS +*IN: int DeviceID - the device id to play the TAction on. + int tacID - the id of the TAction to play. + int tactorID - the id of the tactor to play the TAction on. + float gainScale - how much to scale the entire gain of the TAction by. + float freq1 - how much to scale the entire freq1 of the TAction by. + float freq2 - how much to scale the entire freq2 of the TAction by. + float timeScale - how much to scale the entire time of the TAction by. + +* +*RETURNS: +* on success: 0 successfully mapped and played. +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int PlayTAction(int boardID, int tacID, int tactorID, float gainScale, float freq1Scale, float freq2Scale, float timeScale); + +/**************************************************************************** +*FUNCTION: PlayTActionToSegment +*DESCRIPTION Plays the given taction to the given controller segment with the given scalefactors. +*PARAMETERS +*IN: int DeviceID - the device id to play the TAction on. + int tacID - the id of the TAction to play. + int tactorIDOffset - the id of the tactor to play the TAction on within the segment + int controllerSegmentID - the segment ID of the controller segment list to map to. + float gainScale - how much to scale the entire gain of the TAction by. + float freq1 - how much to scale the entire freq1 of the TAction by. + float freq2 - how much to scale the entire freq2 of the TAction by. + float timeScale - how much to scale the entire time of the TAction by. + +* +*RETURNS: +* on success: 0 successfully mapped and played. +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int PlayTActionToSegment(int boardID, int tacID, int tactorIDOffset,int controllerSegmentID, float gainScale, float freq1Scale, float freq2Scale, float timeScale); + +#endif +#endif diff --git a/bfs/lib/ea_tdk/TActionManager.dll b/bfs/lib/ea_tdk/TActionManager.dll new file mode 100644 index 0000000..8223921 Binary files /dev/null and b/bfs/lib/ea_tdk/TActionManager.dll differ diff --git a/bfs/lib/ea_tdk/TActionManager.lib b/bfs/lib/ea_tdk/TActionManager.lib new file mode 100644 index 0000000..010e825 Binary files /dev/null and b/bfs/lib/ea_tdk/TActionManager.lib differ diff --git a/bfs/lib/ea_tdk/TactorInterface.dll b/bfs/lib/ea_tdk/TactorInterface.dll new file mode 100644 index 0000000..7483333 Binary files /dev/null and b/bfs/lib/ea_tdk/TactorInterface.dll differ diff --git a/bfs/lib/ea_tdk/TactorInterface.h b/bfs/lib/ea_tdk/TactorInterface.h new file mode 100644 index 0000000..0b7050b --- /dev/null +++ b/bfs/lib/ea_tdk/TactorInterface.h @@ -0,0 +1,515 @@ +/* + This software is the copyrighted work of Engineering Acoustics, Inc. and/or its suppliers and may not be + reproduced or redistributed without prior written permission. + Engineering Acoustics, Inc (EAI) provides this software “as is," and use the software is at your own risk. + EAI make no warranties as to performance, merchantability, fitness for a particular purpose, or any + other warranties whether expressed or implied. Under no circumstances shall EAI be liable for direct, + indirect, special, incidental, or consequential damages resulting from the use, misuse, or inability to use + this software, even if EAI has been advised of the possibility of such damages. + + Copyright 2015(c) Engineering Acoustics, Inc. All rights reserved. +*/ + + +#ifndef _EAITACINT_ +#define _EAITACINT_ + +#include + +#ifdef WIN32 + #ifdef BUILD_TACTIONINTERFACE_DLL + #define EXPORTtactionInterface extern "C" __declspec(dllexport) + #else + #define EXPORTtactionInterface extern "C" __declspec(dllimport) + #endif +#else + #define EXPORTtactionInterface extern "C" +#endif + +/**************************************************************************** +*FUNCTION: InitializeTI +*DESCRIPTION Sets up TDK +* +* +*RETURNS: +* on success: 0 +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int InitializeTI(); + + +/**************************************************************************** +*FUNCTION: ShutdownTI +*DESCRIPTION Shuts down and cleans up the TDK +* +* +*RETURNS: +* on success: 0 +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int ShutdownTI(); + +/**************************************************************************** +*FUNCTION: GetVersionNumber +*DESCRIPTION Version Identification of TDK +* +* +*RETURNS: +* on success: value Version Number +*****************************************************************************/ +EXPORTtactionInterface +const char* GetVersionNumber(); + +/**************************************************************************** +*FUNCTION: Connect +*DESCRIPTION Connect to a Tactor Controller +*PARAMETERS +*IN: const char* _name - Tactor Controller Name (proper name or COM Port) +*IN: int _type - Tactor Controller Type (see list of types in +*IN: void* _callback - reponse packet return function (can be null) +* (see function declaration in +* +*RETURNS: +* on success: Board Identification Number +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int Connect(const char* name, int type, void* _callback); + +/**************************************************************************** +*FUNCTION: Discover +*DESCRIPTION Scan Available Ports on computer for Tactor Controller +*PARAMETERS +*IN: int _type - Type of Controllers to Scan For (bitfield, +* multiple types can be ORd together.) +* +*RETURNS: +* on success: Number of Devices Found +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int Discover(int type); + +/**************************************************************************** +*FUNCTION: DiscoverLimited +*DESCRIPTION Scan Available Ports on computer for Tactor Controller with alotted amount +*PARAMETERS +*IN: int _type - Type of Controllers to Scan For (bitfield, +* multiple types can be ORd together.) +* _amount - the alotted amount. +* +*RETURNS: +* on success: Number of Devices Found +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int DiscoverLimited(int type,int amount); + +/**************************************************************************** +*FUNCTION: GetDiscoveredDeviceName +*DESCRIPTION Scan Available Ports on computer for Tactor Controller +*PARAMETERS +*IN: int index - Device To Get Name From (Index from Discover) NOT BOARD ID +* +*RETURNS: +* on success: const char* Name +* on failure: NULL check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +const char* GetDiscoveredDeviceName(int index); + +/**************************************************************************** +*FUNCTION: GetDiscoveredDeviceType +*DESCRIPTION Scan Available Ports on computer for Tactor Controller +*PARAMETERS +*IN: int index - Device To Get Name From (Index from Discover) NOT BOARD ID +* +*RETURNS: +* on success: integer representing the device discovered's type +* on failure: 0 check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int GetDiscoveredDeviceType(int index); + +/**************************************************************************** +*FUNCTION: Close +*DESCRIPTION Closes Connection with Selected Device +*PARAMETERS +*IN: int _deviceID - Tactor Controller Device ID (returned from Connect) +* +*RETURNS: +* on success: 0 +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int Close(int deviceID); + +/**************************************************************************** +*FUNCTION: CloseAll +*DESCRIPTION Closes All Active Connections +* +*RETURNS: +* on success: 0 +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int CloseAll(); + +/**************************************************************************** +*FUNCTION: Pulse +*DESCRIPTION Command Sent to the Tactor Controller +* Pulses Specified Tactor +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _tacNum - Tactor Number For Command +*IN: int _msDuration - Duration of Pulse +*IN: int _delay - Delay before running Command (ms) +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int Pulse(int deviceID, int _tacNum, int _msDuration, int _delay); +/**************************************************************************** +*FUNCTION: SendActionWait +*DESCRIPTION Command Sent to the Tactor Controller +* Waits all actions for given time. +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _msDuration - Duration of Wait +*IN: int _delay - Delay before running Command (ms) +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int SendActionWait(int deviceID, int _msDuration, int _delay); + +/**************************************************************************** +*FUNCTION: ChangeGain +*DESCRIPTION Command Sent to the Tactor Controller +* Changes the Gain For Specified Tactor +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _tacNum - Tactor Number For Command +*IN: int _gainVal - Gain Value (0-255) +*IN: int _delay - Delay before running Command (ms) +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int ChangeGain(int deviceID, int _tacNum, int gainval, int _delay); + +/**************************************************************************** +*FUNCTION: RampGain +*DESCRIPTION Command Sent to the Tactor Controller +* Changes the Gain From start to end within the duration specified for the tactor number specified +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _tacNum - Tactor Number For Command +*IN: int _gainStart - Start Gain Value (0-255) +*IN: int _gainEnd - End Gain Value (0-255) +*IN: int _duration - Duration of Ramp (ms) +*IN: int _func - Function Type +*IN: int _delay - Delay before running Command (ms) +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int RampGain(int deviceID, int _tacNum, int _gainStart, int _gainEnd, + int _duration, int _func, int _delay); + +/**************************************************************************** +*FUNCTION: ChangeFreq +*DESCRIPTION Command Sent to the Tactor Controller +* Changes the Frequency For Specified Tactor +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _tacNum - Tactor Number For Command +*IN: int _freqVal - Freq Value (300-3550) +*IN: int _delay - Delay before running Command (ms) +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int ChangeFreq(int deviceID, int _tacNum, int freqVal, int _delay); + +/**************************************************************************** +*FUNCTION: RampFreq +*DESCRIPTION Command Sent to the Tactor Controller +* Changes the Freq From start to end within the duration specified for the tactor number specified +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _tacNum - Tactor Number For Command +*IN: int _freqStart - Start Freq Value (300-3550) +*IN: int _freqEnd - End Freq Value (300-3550) +*IN: int _duration - Duration of Ramp (ms) +*IN: int _func - Function Type +*IN: int _delay - Delay before running Command (ms) +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int RampFreq(int deviceID, int _tacNum, int _freqStart, int _freqEnd, + int _duration, int _func, int _delay); + +/**************************************************************************** +*FUNCTION: ChangeSigSource +*DESCRIPTION Command Sent to the Tactor Controller +* Changes the Sig Source For Specified Tactor +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _tacNum - Tactor Number For Command +*IN: int _type - New Sig Source Type +*IN: int _delay - Delay before running Command (ms) +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int ChangeSigSource(int _device, int _tacNum, int _type, int _delay); + +/**************************************************************************** +*FUNCTION: ReadFW +*DESCRIPTION Command Sent to the Tactor Controller +* Requests Firmware Version From Tactor Controller +*PARAMETERS +*IN: int _deviceID - Device To apply Command +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int ReadFW(int deviceID); + +/**************************************************************************** +*FUNCTION: TactorSelfTest +*DESCRIPTION Command Sent to the Tactor Controller +* Self Test Tactor Controller +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _delay - Delay before running Command (ms) +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int TactorSelfTest(int deviceID, int _delay); + +/**************************************************************************** +*FUNCTION: ReadSegmentList +*DESCRIPTION Command Sent to the Tactor Controller +* Request for Segment List From Tactor Controller +* Represents Number of Tactors connected to Tactor Controller +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _delay - Delay before running Command (ms) +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int ReadSegmentList(int deviceID, int _delay); + +/**************************************************************************** +*FUNCTION: ReadBatteryLevel +*DESCRIPTION Command Sent to the Tactor Controller +* Request for Battery Level From Tactor Controller +* +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _delay - Delay before running Command (ms) +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int ReadBatteryLevel(int deviceID, int _delay); + +/**************************************************************************** +*FUNCTION: Stop +*DESCRIPTION Command Sent to the Tactor Controller +* Requests Tactor Controller To Stop All Commands +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _delay - Delay before running Command (ms) +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int Stop(int deviceID, int _delay); + +/**************************************************************************** +*FUNCTION: SetTactors +*DESCRIPTION Command Sent to the Tactor Controller +* Sets the tactors on or off based on the byte array given. +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _delay - Delay before running Command (ms) +*IN: unsigned char* states - An 8-byte array of boolean values representing +* the desired tactor states. Tactor 1 is at +* the LSB of byte 1, tactor 64 is the MSB +* of byte 8. +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int SetTactors(int device_id, int delay, unsigned char* states); + +/**************************************************************************** +*FUNCTION: SetTactorType +*DESCRIPTION Command Sent to the Tactor Controller +* Sets the given tactor to the type described. +*PARAMETERS +*IN: int device_id - Device To apply Command +*IN: int delay - Delay before running Command (ms) +*IN: int tactor - The tactor to modify +*IN: type type - The type to set the tactor to +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int SetTactorType(int device_id, int delay, int tactor, int type); + +/**************************************************************************** +*FUNCTION: UpdateTI +*DESCRIPTION Update The TactorInterface for house maintence +* - will check for errors with internal threads +* +*PARAMETERS +* +*RETURNS: +* on success: value(0) +* on failure: Error code - See EAI_Defines.h for reason +*****************************************************************************/ +EXPORTtactionInterface +int UpdateTI(); + +/**************************************************************************** +*FUNCTION: GetLastEAIError +*DESCRIPTION Returns EAI Error Code (See full list of error codes in EAI_ErrorCodes.h) +* +*PARAMETERS +* +* +*RETURNS: Last ErrorCode +*****************************************************************************/ +EXPORTtactionInterface +int GetLastEAIError(); + +/**************************************************************************** +*FUNCTION: SetLastEAIError +*DESCRIPTION Sets EAI Error Code (See full list of error codes in EAI_ErrorCodes.h) +* +*PARAMETERS +*IN: int e the last error code.. ***internal use. +* +*RETURNS: Last ErrorCode +*****************************************************************************/ +EXPORTtactionInterface +int SetLastEAIError(int e); + +/**************************************************************************** +*FUNCTION: SetTimeFactor +*DESCRIPTION Set DLL Time Factor to be passed with each Action List +* 10 is the default +* +*PARAMETERS +*IN: int _timeFactor (1-255) multiple delay value * timefactor for actual delay +* +*RETURNS: +* on success: 0 +* on failure: -1, and sets last EAI error as ERROR_BADPARAMETER +* +*****************************************************************************/ +EXPORTtactionInterface +int SetTimeFactor(int value); + +/**************************************************************************** +*FUNCTION: BeginStoreTAction +*DESCRIPTION Sets the tactor controller in the 'recording TAction' mode. +* +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int tacID - The the address of the TAction to store (1-10) +* +*RETURNS: +* on success: 0 +* on failure: -1, and sets last EAI error as ERROR_BADPARAMETER +* +*****************************************************************************/ +EXPORTtactionInterface +int BeginStoreTAction(int _deviceID, int tacID); + +/**************************************************************************** +*FUNCTION: FinishStoreTAction +*DESCRIPTION Finishes the 'recording TAction' mode. +* +*PARAMETERS +*IN: int _deviceID - Device To apply Command +* +*RETURNS: +* on success: 0 +* on failure: -1, and sets last EAI error as ERROR_BADPARAMETER +* +*****************************************************************************/ +EXPORTtactionInterface +int FinishStoreTAction(int _deviceID); + +/**************************************************************************** +*FUNCTION: PlayStoredTAction +*DESCRIPTION Plays a TAction stored on the tactor device. +* +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _delay - Delay before running Command (ms) +*IN: int tacId - The the address of the TAction to play (1-10) +* +*RETURNS: +* on success: 0 +* on failure: -1, and sets last EAI error as ERROR_BADPARAMETER +* +*****************************************************************************/ +EXPORTtactionInterface +int PlayStoredTAction(int _deviceID, int _delay, int tacId); + +/**************************************************************************** +*FUNCTION: SetFreqTimeDelay +*DESCRIPTION Disables or enables the pulse to end on the sin wave reaching +* zero or the duration of the pulse +* +*PARAMETERS +*IN: int _deviceID - Device To apply Command +*IN: int _delayOn - False to end with duration, True to end when +* sin reaches zero after duration. +* +*RETURNS: +* on success: value(0) +* on failure: value(-1) check GetLastEAIError() for Error Code +*****************************************************************************/ +EXPORTtactionInterface +int SetFreqTimeDelay(int _deviceID, bool _delayOn); +#endif diff --git a/bfs/lib/ea_tdk/TactorInterface.lib b/bfs/lib/ea_tdk/TactorInterface.lib new file mode 100644 index 0000000..c84f9ea Binary files /dev/null and b/bfs/lib/ea_tdk/TactorInterface.lib differ diff --git a/bfs/lib/ea_tdk/eai_common.dll b/bfs/lib/ea_tdk/eai_common.dll new file mode 100644 index 0000000..a1d6aa6 Binary files /dev/null and b/bfs/lib/ea_tdk/eai_common.dll differ diff --git a/bfs/lib/ea_tdk/eai_serial.dll b/bfs/lib/ea_tdk/eai_serial.dll new file mode 100644 index 0000000..8ee0841 Binary files /dev/null and b/bfs/lib/ea_tdk/eai_serial.dll differ diff --git a/bfs/lib/ea_tdk/eai_winbluetooth.dll b/bfs/lib/ea_tdk/eai_winbluetooth.dll new file mode 100644 index 0000000..61d08c8 Binary files /dev/null and b/bfs/lib/ea_tdk/eai_winbluetooth.dll differ diff --git a/bfs/lib/ea_tdk/eai_winusb.dll b/bfs/lib/ea_tdk/eai_winusb.dll new file mode 100644 index 0000000..6c5831e Binary files /dev/null and b/bfs/lib/ea_tdk/eai_winusb.dll differ