
#ifndef ETHERCAT_STATICS_KERNEL_GUARD_H
#define ETHERCAT_STATICS_KERNEL_GUARD_H

#pragma once

#include "../ethercat_types.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
    DARRA_KERNEL_OK              = 0,
    DARRA_KERNEL_NOT_INSTALLED   = 1,
    DARRA_KERNEL_STOPPED         = 2,
    DARRA_KERNEL_ACCESS_DENIED   = 3,
    DARRA_KERNEL_SIGNATURE_FAIL  = 4,
    DARRA_KERNEL_BLOCKED         = 5,
    DARRA_KERNEL_DEVICE_MISSING  = 6,
    DARRA_KERNEL_DISABLED        = 7,
    DARRA_KERNEL_UNKNOWN_ERROR   = 99
} darra_kernel_status_t;

int         DarraEcat_KernelProbe(void);

const char* DarraEcat_KernelStatusMessage(int status);

const char* DarraEcat_KernelInstallerUrl(void);

static inline darra_kernel_status_t darra_kernel_probe(void) {
    return (darra_kernel_status_t)DarraEcat_KernelProbe();
}

static inline const char* darra_kernel_status_message(int status) {
    return DarraEcat_KernelStatusMessage(status);
}

static inline const char* darra_kernel_installer_url(void) {
    return DarraEcat_KernelInstallerUrl();
}

static inline int darra_kernel_assert_available(void) {
    return DarraEcat_KernelProbe();
}

#ifdef __cplusplus
}
#endif

#endif
