Kallisto Linux API
Library for interacting with Kallisto devices
|
#include <string>
#include <sstream>
Go to the source code of this file.
Data Structures | |
class | KallistoDetailedResult |
Class that encapsulates a result. More... | |
Macros | |
#define | KALLISTO_ERROR_HPP_ |
#define | KALLISTO_ERROR_HANDLER(ERR_CODE) |
#define | KALLISTO_ERROR_CHECK(ERR_CODE) |
Enumerations | |
enum | KallistoResult { SUCCESS, ERROR_INTERNAL, ERROR_NO_MEM, ERROR_NOT_FOUND, ERROR_NOT_SUPPORTED, ERROR_INVALID_PARAM, ERROR_INVALID_STATE, ERROR_INVALID_LENGTH, ERROR_INVALID_FLAGS, ERROR_INVALID_DATA, ERROR_DATA_SIZE, ERROR_TIMEOUT, ERROR_NULL, ERROR_FORBIDDEN, ERROR_INVALID_ADDR, ERROR_BUSY, ERROR_BLUETOOTH_ADAPTER, ERROR_BLUETOOTH_DEVICE } |
Set of error code defines. More... | |
Functions | |
void | kallisto_error_handler (unsigned int &error_code, const char *file, unsigned int line, const char *function) |
Copyright (c) 2019, Sensry GmbH
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY SENSRY GMBH "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SENSRY GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define KALLISTO_ERROR_CHECK | ( | ERR_CODE | ) |
Macro for calling error handler function if supplied error code any other than KALLISTO_SUCCESS.
[in] | ERR_CODE | Error code supplied to the error handler. |
#define KALLISTO_ERROR_HANDLER | ( | ERR_CODE | ) |
Macro for calling error handler function.
[in] | ERR_CODE | Error code supplied to the error handler. |
enum KallistoResult |
Set of error code defines.
void kallisto::error::kallisto_error_handler | ( | unsigned int & | error_code, |
const char * | file, | ||
unsigned int | line, | ||
const char * | function | ||
) |
Function for error handling, which is called when an error has occurred. To be used with the macro KALLISTO_ERROR_CHECK.
[in] | error_code | Error code supplied to the handler. |
[in] | line_num | Line number where the handler is called. |
[in] | p_file_name | Pointer to the file name. |