//
// Auto-generated by dnne-gen
//
// .NET Assembly: OmsiLCDPlugin
//

//
// Declare exported functions
//
#ifndef __DNNE_GENERATED_HEADER_OMSILCDPLUGIN__
#define __DNNE_GENERATED_HEADER_OMSILCDPLUGIN__

#include <stddef.h>
#include <stdint.h>
#ifdef DNNE_COMPILE_AS_SOURCE
    #include <dnne.h>
#else
    // When used as a header file, the assumption is
    // dnne.h will be next to this file.
    #include "dnne.h"
#endif // !DNNE_COMPILE_AS_SOURCE

#if (defined(DNNE_WINDOWS))
// Computed from OmsiLCDPlugin.OmsiLCDPlugin.PluginStart
DNNE_EXTERN_C DNNE_API void DNNE_CALLTYPE_CDECL PluginStart(intptr_t aOwner);
#endif // (DNNE_WINDOWS)

#if (defined(DNNE_WINDOWS))
// Computed from OmsiLCDPlugin.OmsiLCDPlugin.PluginFinalize
DNNE_EXTERN_C DNNE_API void DNNE_CALLTYPE_CDECL PluginFinalize(void);
#endif // (DNNE_WINDOWS)

#if (defined(DNNE_WINDOWS))
// Computed from OmsiLCDPlugin.OmsiLCDPlugin.AccessVariable
DNNE_EXTERN_C DNNE_API void DNNE_CALLTYPE_CDECL AccessVariable(uint16_t variableIndex, float* value, __crt_bool* writeValue);
#endif // (DNNE_WINDOWS)

#if (defined(DNNE_WINDOWS))
// Computed from OmsiLCDPlugin.OmsiLCDPlugin.AccessTrigger
DNNE_EXTERN_C DNNE_API void DNNE_CALLTYPE_CDECL AccessTrigger(uint16_t variableIndex, __crt_bool* triggerScript);
#endif // (DNNE_WINDOWS)

#if (defined(DNNE_WINDOWS))
// Computed from OmsiLCDPlugin.OmsiLCDPlugin.AccessStringVariable
DNNE_EXTERN_C DNNE_API void DNNE_CALLTYPE_CDECL AccessStringVariable(uint16_t variableIndex, char* firstCharacterAddress, __crt_bool* writeValue);
#endif // (DNNE_WINDOWS)

#if (defined(DNNE_WINDOWS))
// Computed from OmsiLCDPlugin.OmsiLCDPlugin.AccessSystemVariable
DNNE_EXTERN_C DNNE_API void DNNE_CALLTYPE_CDECL AccessSystemVariable(uint16_t variableIndex, float* value, __crt_bool* writeValue);
#endif // (DNNE_WINDOWS)

#endif // __DNNE_GENERATED_HEADER_OMSILCDPLUGIN__

//
// Define exported functions
//
#ifdef DNNE_COMPILE_AS_SOURCE

#ifdef DNNE_WINDOWS
    #ifdef _WCHAR_T_DEFINED
        typedef wchar_t char_t;
    #else
        typedef unsigned short char_t;
    #endif
#else
    typedef char char_t;
#endif

//
// Forward declarations
//

extern void* get_callable_managed_function(
    const char_t* dotnet_type,
    const char_t* dotnet_type_method,
    const char_t* dotnet_delegate_type);

extern void* get_fast_callable_managed_function(
    const char_t* dotnet_type,
    const char_t* dotnet_type_method);

//
// String constants
//

#ifdef DNNE_TARGET_NET_FRAMEWORK
    static const char_t* t1_name = DNNE_STR("OmsiLCDPlugin.OmsiLCDPlugin");
#else
    static const char_t* t1_name = DNNE_STR("OmsiLCDPlugin.OmsiLCDPlugin, OmsiLCDPlugin");
#endif // !DNNE_TARGET_NET_FRAMEWORK


//
// Exports
//

#if (defined(DNNE_WINDOWS))
// Computed from OmsiLCDPlugin.OmsiLCDPlugin.PluginStart
static void (DNNE_CALLTYPE_CDECL* PluginStart_ptr)(intptr_t aOwner);
DNNE_EXTERN_C DNNE_API void DNNE_CALLTYPE_CDECL PluginStart(intptr_t aOwner)
{
    if (PluginStart_ptr == NULL)
    {
        const char_t* methodName = DNNE_STR("PluginStart");
        PluginStart_ptr = (void(DNNE_CALLTYPE_CDECL*)(intptr_t aOwner))get_fast_callable_managed_function(t1_name, methodName);
    }
    PluginStart_ptr(aOwner);
}
#endif // (DNNE_WINDOWS)

#if (defined(DNNE_WINDOWS))
// Computed from OmsiLCDPlugin.OmsiLCDPlugin.PluginFinalize
static void (DNNE_CALLTYPE_CDECL* PluginFinalize_ptr)(void);
DNNE_EXTERN_C DNNE_API void DNNE_CALLTYPE_CDECL PluginFinalize(void)
{
    if (PluginFinalize_ptr == NULL)
    {
        const char_t* methodName = DNNE_STR("PluginFinalize");
        PluginFinalize_ptr = (void(DNNE_CALLTYPE_CDECL*)(void))get_fast_callable_managed_function(t1_name, methodName);
    }
    PluginFinalize_ptr();
}
#endif // (DNNE_WINDOWS)

#if (defined(DNNE_WINDOWS))
// Computed from OmsiLCDPlugin.OmsiLCDPlugin.AccessVariable
static void (DNNE_CALLTYPE_CDECL* AccessVariable_ptr)(uint16_t variableIndex, float* value, __crt_bool* writeValue);
DNNE_EXTERN_C DNNE_API void DNNE_CALLTYPE_CDECL AccessVariable(uint16_t variableIndex, float* value, __crt_bool* writeValue)
{
    if (AccessVariable_ptr == NULL)
    {
        const char_t* methodName = DNNE_STR("AccessVariable");
        AccessVariable_ptr = (void(DNNE_CALLTYPE_CDECL*)(uint16_t variableIndex, float* value, __crt_bool* writeValue))get_fast_callable_managed_function(t1_name, methodName);
    }
    AccessVariable_ptr(variableIndex, value, writeValue);
}
#endif // (DNNE_WINDOWS)

#if (defined(DNNE_WINDOWS))
// Computed from OmsiLCDPlugin.OmsiLCDPlugin.AccessTrigger
static void (DNNE_CALLTYPE_CDECL* AccessTrigger_ptr)(uint16_t variableIndex, __crt_bool* triggerScript);
DNNE_EXTERN_C DNNE_API void DNNE_CALLTYPE_CDECL AccessTrigger(uint16_t variableIndex, __crt_bool* triggerScript)
{
    if (AccessTrigger_ptr == NULL)
    {
        const char_t* methodName = DNNE_STR("AccessTrigger");
        AccessTrigger_ptr = (void(DNNE_CALLTYPE_CDECL*)(uint16_t variableIndex, __crt_bool* triggerScript))get_fast_callable_managed_function(t1_name, methodName);
    }
    AccessTrigger_ptr(variableIndex, triggerScript);
}
#endif // (DNNE_WINDOWS)

#if (defined(DNNE_WINDOWS))
// Computed from OmsiLCDPlugin.OmsiLCDPlugin.AccessStringVariable
static void (DNNE_CALLTYPE_CDECL* AccessStringVariable_ptr)(uint16_t variableIndex, char* firstCharacterAddress, __crt_bool* writeValue);
DNNE_EXTERN_C DNNE_API void DNNE_CALLTYPE_CDECL AccessStringVariable(uint16_t variableIndex, char* firstCharacterAddress, __crt_bool* writeValue)
{
    if (AccessStringVariable_ptr == NULL)
    {
        const char_t* methodName = DNNE_STR("AccessStringVariable");
        AccessStringVariable_ptr = (void(DNNE_CALLTYPE_CDECL*)(uint16_t variableIndex, char* firstCharacterAddress, __crt_bool* writeValue))get_fast_callable_managed_function(t1_name, methodName);
    }
    AccessStringVariable_ptr(variableIndex, firstCharacterAddress, writeValue);
}
#endif // (DNNE_WINDOWS)

#if (defined(DNNE_WINDOWS))
// Computed from OmsiLCDPlugin.OmsiLCDPlugin.AccessSystemVariable
static void (DNNE_CALLTYPE_CDECL* AccessSystemVariable_ptr)(uint16_t variableIndex, float* value, __crt_bool* writeValue);
DNNE_EXTERN_C DNNE_API void DNNE_CALLTYPE_CDECL AccessSystemVariable(uint16_t variableIndex, float* value, __crt_bool* writeValue)
{
    if (AccessSystemVariable_ptr == NULL)
    {
        const char_t* methodName = DNNE_STR("AccessSystemVariable");
        AccessSystemVariable_ptr = (void(DNNE_CALLTYPE_CDECL*)(uint16_t variableIndex, float* value, __crt_bool* writeValue))get_fast_callable_managed_function(t1_name, methodName);
    }
    AccessSystemVariable_ptr(variableIndex, value, writeValue);
}
#endif // (DNNE_WINDOWS)

#endif // DNNE_COMPILE_AS_SOURCE
