Skip to content

File types.h

Headers > cais > types.h

Go to the source code of this file

  • #include <stddef.h>

Types

Type Name
enum cais_bool_t
typedef cais_status_t cais_fs_status_t
enum cais_line_state_t
typedef cais_status_t cais_parallel_status_t
typedef cais_status_t cais_sandbox_status_t
typedef cais_status_t cais_serial_status_t
typedef cais_status_t cais_socket_status_t
enum cais_status_t

Functions

Type Name
void cais_set_err (char * err_buf, size_t err_cap, const char * msg)
void cais_set_err_fmt (char * err_buf, size_t err_cap, const char * fmt, ...)
const char * cais_strerror (cais_status_t status)

Macros

Type Name
define CAIS_FALSE CAIS\_FALSE
define CAIS_FS_EOF CAIS\_EOF
define CAIS_FS_ERROR CAIS\_ERROR
define CAIS_FS_OK CAIS\_OK
define CAIS_FS_UNSUPPORTED CAIS\_UNSUPPORTED
define CAIS_LINE_ACTIVE CAIS\_LINE\_HIGH
define CAIS_LINE_INACTIVE CAIS\_LINE\_LOW
define CAIS_LINE_OFF CAIS\_LINE\_LOW
define CAIS_LINE_ON CAIS\_LINE\_HIGH
define CAIS_PARALLEL_ERROR CAIS\_ERROR
define CAIS_PARALLEL_OK CAIS\_OK
define CAIS_PARALLEL_UNSUPPORTED CAIS\_UNSUPPORTED
define CAIS_SANDBOX_ERROR CAIS\_ERROR
define CAIS_SANDBOX_OK CAIS\_OK
define CAIS_SANDBOX_UNSUPPORTED CAIS\_UNSUPPORTED
define CAIS_SERIAL_ERROR CAIS\_ERROR
define CAIS_SERIAL_OK CAIS\_OK
define CAIS_SERIAL_UNSUPPORTED CAIS\_UNSUPPORTED
define CAIS_SOCK_AGAIN CAIS\_AGAIN
define CAIS_SOCK_CLOSED CAIS\_EOF
define CAIS_SOCK_ERROR CAIS\_ERROR
define CAIS_SOCK_OK CAIS\_OK
define CAIS_TRUE CAIS\_TRUE

Type Details

enum cais_bool_t

enum cais_bool_t {
    CAIS_FALSE = 0,
    CAIS_TRUE = 1
};

cais_fs_status_t

typedef cais_status_t cais_fs_status_t;

enum cais_line_state_t

enum cais_line_state_t {
    CAIS_LINE_ERROR = -1,
    CAIS_LINE_LOW =  0,
    CAIS_LINE_HIGH =  1
};

cais_parallel_status_t

typedef cais_status_t cais_parallel_status_t;

cais_sandbox_status_t

typedef cais_status_t cais_sandbox_status_t;

cais_serial_status_t

typedef cais_status_t cais_serial_status_t;

cais_socket_status_t

typedef cais_status_t cais_socket_status_t;

enum cais_status_t

enum cais_status_t {
    CAIS_OK =  0,
    CAIS_ERROR = -1,
    CAIS_AGAIN = -2,
    CAIS_EOF = -3,
    CAIS_UNSUPPORTED = -4
};

Function Details

cais_set_err

void cais_set_err (
    char * err_buf,
    size_t err_cap,
    const char * msg
) 

cais_set_err_fmt

void cais_set_err_fmt (
    char * err_buf,
    size_t err_cap,
    const char * fmt,
    ...
) 

cais_strerror

const char * cais_strerror (
    cais_status_t status
) 

Macro Details

CAIS_FALSE

#define CAIS_FALSE `CAIS_FALSE`

CAIS_FS_EOF

#define CAIS_FS_EOF `CAIS_EOF`

CAIS_FS_ERROR

#define CAIS_FS_ERROR `CAIS_ERROR`

CAIS_FS_OK

#define CAIS_FS_OK `CAIS_OK`

CAIS_FS_UNSUPPORTED

#define CAIS_FS_UNSUPPORTED `CAIS_UNSUPPORTED`

CAIS_LINE_ACTIVE

#define CAIS_LINE_ACTIVE `CAIS_LINE_HIGH`

CAIS_LINE_INACTIVE

#define CAIS_LINE_INACTIVE `CAIS_LINE_LOW`

CAIS_LINE_OFF

#define CAIS_LINE_OFF `CAIS_LINE_LOW`

CAIS_LINE_ON

#define CAIS_LINE_ON `CAIS_LINE_HIGH`

CAIS_PARALLEL_ERROR

#define CAIS_PARALLEL_ERROR `CAIS_ERROR`

CAIS_PARALLEL_OK

#define CAIS_PARALLEL_OK `CAIS_OK`

CAIS_PARALLEL_UNSUPPORTED

#define CAIS_PARALLEL_UNSUPPORTED `CAIS_UNSUPPORTED`

CAIS_SANDBOX_ERROR

#define CAIS_SANDBOX_ERROR `CAIS_ERROR`

CAIS_SANDBOX_OK

#define CAIS_SANDBOX_OK `CAIS_OK`

CAIS_SANDBOX_UNSUPPORTED

#define CAIS_SANDBOX_UNSUPPORTED `CAIS_UNSUPPORTED`

CAIS_SERIAL_ERROR

#define CAIS_SERIAL_ERROR `CAIS_ERROR`

CAIS_SERIAL_OK

#define CAIS_SERIAL_OK `CAIS_OK`

CAIS_SERIAL_UNSUPPORTED

#define CAIS_SERIAL_UNSUPPORTED `CAIS_UNSUPPORTED`

CAIS_SOCK_AGAIN

#define CAIS_SOCK_AGAIN `CAIS_AGAIN`

CAIS_SOCK_CLOSED

#define CAIS_SOCK_CLOSED `CAIS_EOF`

CAIS_SOCK_ERROR

#define CAIS_SOCK_ERROR `CAIS_ERROR`

CAIS_SOCK_OK

#define CAIS_SOCK_OK `CAIS_OK`

CAIS_TRUE

#define CAIS_TRUE `CAIS_TRUE`


The documentation was generated from the following file: include/cais/types.h