From 3cd5e6fce02fd06abbc124570d38136783f8acef Mon Sep 17 00:00:00 2001 From: "m4gn3to@gmail.com" Date: Mon, 9 Jun 2025 15:17:53 +0200 Subject: [PATCH] primeros intentos --- .vscode/c_cpp_properties.json | 19 +++++++++++ .vscode/launch.json | 13 ++++++++ .vscode/settings.json | 59 +++++++++++++++++++++++++++++++++++ class/SMARTComm70.cpp | 1 - connect.cpp | 14 +++++++++ 5 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 .vscode/c_cpp_properties.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 connect.cpp diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 0000000..0947479 --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,19 @@ +{ + "configurations": [ + { + "name": "macos-clang-x64", + "includePath": [ + "${workspaceFolder}/**", + "${workspaceFolder}" + ], + "compilerPath": "/usr/bin/clang", + "cStandard": "${default}", + "cppStandard": "${default}", + "intelliSenseMode": "macos-clang-x64", + "compilerArgs": [ + "" + ] + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..1ca3993 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,13 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "C/C++ Runner: Debug Session", + "type": "lldb", + "request": "launch", + "args": [], + "cwd": "/Users/m4gn3to/App-Tarjetas-SMART70", + "program": "/Users/m4gn3to/App-Tarjetas-SMART70/build/Debug/outDebug" + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..4365e03 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,59 @@ +{ + "C_Cpp_Runner.cCompilerPath": "clang", + "C_Cpp_Runner.cppCompilerPath": "clang++", + "C_Cpp_Runner.debuggerPath": "lldb", + "C_Cpp_Runner.cStandard": "", + "C_Cpp_Runner.cppStandard": "", + "C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat", + "C_Cpp_Runner.useMsvc": false, + "C_Cpp_Runner.warnings": [ + "-Wall", + "-Wextra", + "-Wpedantic", + "-Wshadow", + "-Wformat=2", + "-Wcast-align", + "-Wconversion", + "-Wsign-conversion", + "-Wnull-dereference" + ], + "C_Cpp_Runner.msvcWarnings": [ + "/W4", + "/permissive-", + "/w14242", + "/w14287", + "/w14296", + "/w14311", + "/w14826", + "/w44062", + "/w44242", + "/w14905", + "/w14906", + "/w14263", + "/w44265", + "/w14928" + ], + "C_Cpp_Runner.enableWarnings": true, + "C_Cpp_Runner.warningsAsError": false, + "C_Cpp_Runner.compilerArgs": [], + "C_Cpp_Runner.linkerArgs": [], + "C_Cpp_Runner.includePaths": [], + "C_Cpp_Runner.includeSearch": [ + "*", + "**/*" + ], + "C_Cpp_Runner.excludeSearch": [ + "**/build", + "**/build/**", + "**/.*", + "**/.*/**", + "**/.vscode", + "**/.vscode/**" + ], + "C_Cpp_Runner.useAddressSanitizer": false, + "C_Cpp_Runner.useUndefinedSanitizer": false, + "C_Cpp_Runner.useLeakSanitizer": false, + "C_Cpp_Runner.showCompilationTime": false, + "C_Cpp_Runner.useLinkTimeOptimization": false, + "C_Cpp_Runner.msvcSecureNoWarnings": false +} \ No newline at end of file diff --git a/class/SMARTComm70.cpp b/class/SMARTComm70.cpp index 61af857..b4f03e8 100644 --- a/class/SMARTComm70.cpp +++ b/class/SMARTComm70.cpp @@ -1,4 +1,3 @@ -#include "stdafx.h" #include "SMARTComm70.h" #include "SmartErrcodes.h" diff --git a/connect.cpp b/connect.cpp new file mode 100644 index 0000000..ada0630 --- /dev/null +++ b/connect.cpp @@ -0,0 +1,14 @@ +// Ejemplo de conexión básica +HSMART70 printerHandle; +SMART70_PRINTER_LIST printerList; + +// Obtener lista de impresoras disponibles +Smart70_GetDeviceList(&printerList); + +// Conectar con la primera impresora encontrada (modo DCL) +Smart70DCL_OpenDevice(&printerHandle, printerList.item[0].desc, + SMART70_OPENDEVICE_BYDESC, DMORIENT_LANDSCAPE); + +// Verificar módulos conectados +SMART70_DEVCONNLIST moduleList; +Smart70_GetConnectedModules(printerHandle, &moduleList); \ No newline at end of file