/** * @file * * @author Max Lammers * @author Mamadou Babaei * * @section LICENSE * * Copyright (c) 2020 - 2023 SenseGlove * * @section DESCRIPTION * */ #pragma once #include #include "Platform.hpp" namespace SGConnect { /// Exit Codes for the Disconnect function, which tells us why it has been disconnected. enum class EExitCode : int8_t { /// Unknown Exit Code Unknown = -1, /// Exited because the Connection was destructed. ConnectionDestructed, /// Exited because there was an error while opening. ConnectionOpenError, /// Exited because there was an error while sending. ConnectionSendError, /// Exited because the unmanaged thread of this connection has ended. ConnectionThreadEnded, /// Exited because the DeviceScanner does not think this is a Sense Glove Device DeviceScannerNotSenseGloveDevice, /// Exited because there was an error in opening the port. DeviceScannerNotOpened, /// Exited because this port is no longer connected to the system. DeviceScannerPortGone, /// Exited because the DeviceScanner is cleaning up DeviceScannerEndConnection, /// Exited because this SenseGlove device is not yet ready. Trying again later. DeviceScannerIdleDevice, /// Exited because this SenseGlove device is not yet ready. Trying again later. DeviceScannerNoConnection, /// Exited because the SGDevice is being reconnected with another connection. DeviceReconnect, /// Exited because the parent SGDevice is being cleaned up. DeviceDestructor, /// The device has requested a reset. DeviceResetRequest, /// No packets have been received for the longest time. DeviceNoPackets, /// Connection Test Destructor ConnectionTestDestructor, /// Connection Test Thread Exit ConnectionTestExitCheck, }; }