From 8c2d731135e0d8dbcaab8fdfe04f20dd7dceb50e Mon Sep 17 00:00:00 2001
From: "Querejeta Lomas, Leire" <leire.querejeta@tecnalia.com>
Date: Tue, 30 Aug 2022 09:42:41 +0200
Subject: [PATCH] Subir nuevo archivo

---
 src/api/class/include/class/class_error.hpp | 40 +++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 src/api/class/include/class/class_error.hpp

diff --git a/src/api/class/include/class/class_error.hpp b/src/api/class/include/class/class_error.hpp
new file mode 100644
index 0000000..3626520
--- /dev/null
+++ b/src/api/class/include/class/class_error.hpp
@@ -0,0 +1,40 @@
+/**
+ * @file   class_error.hpp
+ * @author Alfonso Dominguez <alfonso.dominguez@tecnalia.com> and Leire Querejeta Lomas <leire.querejeta@tecnalia.com>
+ * @date   2020
+ *
+ * Copyright 2020 Tecnalia Research & Innovation.
+ * Distributed under the GNU GPL v3.
+ * For full terms see https://www.gnu.org/licenses/gpl.txt
+ *
+ * @brief Errors thrown by the API methods
+ */
+
+#pragma once
+
+//! Errors thrown by the API methods.
+class ClassError
+{
+  public: 
+    //! Enum for errors
+    enum Error 
+    {
+      CLASS_NO_ERROR = 0, ///< No error
+      ERROR_CORE_NULL = -1, ///< Core object is null
+      ERROR_SENDING_MSG = -2, ///< Error sending msg to server
+      ERROR_NO_ELEC_WITH_ID = -3, ///< There is no electrode with the specified ID
+      ERROR_CATHODE_AMP_DIFFERENT_SIZE = -4, ///< Cathode and Amp vectors have different size
+      ERROR_NO_VELEC_WITH_ID = -5, ///< There is no virtual electrode with the specified ID
+      ERROR_NO_VELEC_WITH_NAME = -6, ///< There is no virtual electrode with the specified name
+      ERROR_DEVICE_NOT_ACQUIRING = -7, ///< The device is not acquiring frames/impedances. Have you configured for it?
+      ERROR_UDP_CLIENT_NULL = -8, ///< The sender object is null
+      ERROR_NOT_VALID_ORDER = -9, ///< Filter order is negative. It must be a integer > 0
+      ERROR_NOT_VALID_MS = -10, ///< Duration for buffer is negative. It must be a double > 0
+      ERROR_CB_NULL = -11, ///< Class callback is NULL. A callback must be set before getting any value
+      ERROR_DIF_VECTOR_SIZE = -12, ///< Vector sizes are different
+      ERROR_EMPTY_CATHODE = -13, ///< Cathode vector is empty
+      ERROR_EMPTY_ANODE = -14, ///< Cathode vector is empty
+      ERROR_NOT_VALID_CHANNEL_ID = -15, ///< Channel id is not in the limits (>=1 and <=16)
+      ERROR_NOT_VALID_VALUE = -16 ///< Out of range value
+    };
+};
\ No newline at end of file
-- 
GitLab