/*
 *  Do not modify this file; it is automatically 
 *  generated and any modifications will be overwritten.
 *
 * @(#) xdc-x20
 */

/*
 * ======== GENERATED SECTIONS ========
 *     
 *     PROLOGUE
 *     INCLUDES
 *     
 *     PER-INSTANCE TYPES
 *     VIRTUAL FUNCTIONS
 *     FUNCTION STUBS
 *     FUNCTION SELECTORS
 *     CONVERTORS
 *     
 *     EPILOGUE
 *     PREFIX ALIASES
 */


/*
 * ======== PROLOGUE ========
 */

#ifndef ti_uiactools_runtime_IUIAPacketTransfer__include
#define ti_uiactools_runtime_IUIAPacketTransfer__include

#ifndef __nested__
#define __nested__
#define ti_uiactools_runtime_IUIAPacketTransfer__top__
#endif

#ifdef __cplusplus
#define __extern extern "C"
#else
#define __extern extern
#endif

#define ti_uiactools_runtime_IUIAPacketTransfer___VERS 150


/*
 * ======== INCLUDES ========
 */

#include <xdc/std.h>

#include <xdc/runtime/xdc.h>
#include <xdc/runtime/Types.h>
#include <xdc/runtime/IInstance.h>
#include <ti/uiactools/runtime/package/package.defs.h>

#include <ti/uia/events/IUIAMetaProvider.h>


/*
 * ======== AUXILIARY DEFINITIONS ========
 */

/* TransferType */
enum ti_uiactools_runtime_IUIAPacketTransfer_TransferType {
    ti_uiactools_runtime_IUIAPacketTransfer_TransferType_RELIABLE = 0,
    ti_uiactools_runtime_IUIAPacketTransfer_TransferType_LOSSY = 1
};
typedef enum ti_uiactools_runtime_IUIAPacketTransfer_TransferType ti_uiactools_runtime_IUIAPacketTransfer_TransferType;

/* Priority */
enum ti_uiactools_runtime_IUIAPacketTransfer_Priority {
    ti_uiactools_runtime_IUIAPacketTransfer_Priority_LOW = 0,
    ti_uiactools_runtime_IUIAPacketTransfer_Priority_STANDARD = 1,
    ti_uiactools_runtime_IUIAPacketTransfer_Priority_HIGH = 2,
    ti_uiactools_runtime_IUIAPacketTransfer_Priority_SYNC = 3
};
typedef enum ti_uiactools_runtime_IUIAPacketTransfer_Priority ti_uiactools_runtime_IUIAPacketTransfer_Priority;


/*
 * ======== PER-INSTANCE TYPES ========
 */

/* Params */
struct ti_uiactools_runtime_IUIAPacketTransfer_Params {
    size_t __size;
    const void* __self;
    void* __fxns;
    xdc_runtime_IInstance_Params* instance;
    ti_uiactools_runtime_IUIAPacketTransfer_TransferType transferType;
    ti_uiactools_runtime_IUIAPacketTransfer_Priority priority;
};


/*
 * ======== VIRTUAL FUNCTIONS ========
 */

/* Fxns__ */
struct ti_uiactools_runtime_IUIAPacketTransfer_Fxns__ {
    xdc_runtime_Types_Base* __base;
    const xdc_runtime_Types_SysFxns2* __sysp;
    xdc_Bool (*enable)(void*);
    xdc_Bool (*disable)(void*);
    ti_uiactools_runtime_IUIAPacketTransfer_TransferType (*getTransferType)(void*);
    xdc_Bool (*isEmpty)(void*);
    xdc_UInt32 (*poll)(void*);
    xdc_Bool (*readyToSend)(void*);
    xdc_Bool (*transferData)(void*, xdc_UInt32);
    xdc_Bool (*prime)(void*, xdc_Ptr);
    xdc_runtime_Types_SysFxns2 __sfxns;
};

/* Interface__BASE__C */
__extern const xdc_runtime_Types_Base ti_uiactools_runtime_IUIAPacketTransfer_Interface__BASE__C;


/*
 * ======== FUNCTION STUBS ========
 */

/* delete */
static inline void ti_uiactools_runtime_IUIAPacketTransfer_delete( ti_uiactools_runtime_IUIAPacketTransfer_Handle* instp )
{
    (*instp)->__fxns->__sysp->__delete(instp);
}

/* Handle_to_Module */
static inline ti_uiactools_runtime_IUIAPacketTransfer_Module ti_uiactools_runtime_IUIAPacketTransfer_Handle_to_Module( ti_uiactools_runtime_IUIAPacketTransfer_Handle inst )
{
    return inst->__fxns;
}

/* Handle_label */
static inline xdc_runtime_Types_Label* ti_uiactools_runtime_IUIAPacketTransfer_Handle_label( ti_uiactools_runtime_IUIAPacketTransfer_Handle inst, xdc_runtime_Types_Label* lab )
{
    return inst->__fxns->__sysp->__label(inst, lab);
}

/* Module_id */
static inline xdc_runtime_Types_ModuleId ti_uiactools_runtime_IUIAPacketTransfer_Module_id( ti_uiactools_runtime_IUIAPacketTransfer_Module mod )
{
    return mod->__sysp->__mid;
}

/* enable */
static inline xdc_Bool ti_uiactools_runtime_IUIAPacketTransfer_enable( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return __inst->__fxns->enable((void*)__inst);
}

/* disable */
static inline xdc_Bool ti_uiactools_runtime_IUIAPacketTransfer_disable( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return __inst->__fxns->disable((void*)__inst);
}

/* getTransferType */
static inline ti_uiactools_runtime_IUIAPacketTransfer_TransferType ti_uiactools_runtime_IUIAPacketTransfer_getTransferType( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return __inst->__fxns->getTransferType((void*)__inst);
}

/* isEmpty */
static inline xdc_Bool ti_uiactools_runtime_IUIAPacketTransfer_isEmpty( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return __inst->__fxns->isEmpty((void*)__inst);
}

/* poll */
static inline xdc_UInt32 ti_uiactools_runtime_IUIAPacketTransfer_poll( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return __inst->__fxns->poll((void*)__inst);
}

/* readyToSend */
static inline xdc_Bool ti_uiactools_runtime_IUIAPacketTransfer_readyToSend( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return __inst->__fxns->readyToSend((void*)__inst);
}

/* transferData */
static inline xdc_Bool ti_uiactools_runtime_IUIAPacketTransfer_transferData( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst, xdc_UInt32 maxNumPackets )
{
    return __inst->__fxns->transferData((void*)__inst, maxNumPackets);
}

/* prime */
static inline xdc_Bool ti_uiactools_runtime_IUIAPacketTransfer_prime( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst, xdc_Ptr buffer )
{
    return __inst->__fxns->prime((void*)__inst, buffer);
}


/*
 * ======== FUNCTION SELECTORS ========
 */

/* enable_{FxnT,fxnP} */
typedef xdc_Bool (*ti_uiactools_runtime_IUIAPacketTransfer_enable_FxnT)(void*);
static inline ti_uiactools_runtime_IUIAPacketTransfer_enable_FxnT ti_uiactools_runtime_IUIAPacketTransfer_enable_fxnP( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return (ti_uiactools_runtime_IUIAPacketTransfer_enable_FxnT)__inst->__fxns->enable;
}

/* disable_{FxnT,fxnP} */
typedef xdc_Bool (*ti_uiactools_runtime_IUIAPacketTransfer_disable_FxnT)(void*);
static inline ti_uiactools_runtime_IUIAPacketTransfer_disable_FxnT ti_uiactools_runtime_IUIAPacketTransfer_disable_fxnP( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return (ti_uiactools_runtime_IUIAPacketTransfer_disable_FxnT)__inst->__fxns->disable;
}

/* getTransferType_{FxnT,fxnP} */
typedef ti_uiactools_runtime_IUIAPacketTransfer_TransferType (*ti_uiactools_runtime_IUIAPacketTransfer_getTransferType_FxnT)(void*);
static inline ti_uiactools_runtime_IUIAPacketTransfer_getTransferType_FxnT ti_uiactools_runtime_IUIAPacketTransfer_getTransferType_fxnP( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return (ti_uiactools_runtime_IUIAPacketTransfer_getTransferType_FxnT)__inst->__fxns->getTransferType;
}

/* isEmpty_{FxnT,fxnP} */
typedef xdc_Bool (*ti_uiactools_runtime_IUIAPacketTransfer_isEmpty_FxnT)(void*);
static inline ti_uiactools_runtime_IUIAPacketTransfer_isEmpty_FxnT ti_uiactools_runtime_IUIAPacketTransfer_isEmpty_fxnP( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return (ti_uiactools_runtime_IUIAPacketTransfer_isEmpty_FxnT)__inst->__fxns->isEmpty;
}

/* poll_{FxnT,fxnP} */
typedef xdc_UInt32 (*ti_uiactools_runtime_IUIAPacketTransfer_poll_FxnT)(void*);
static inline ti_uiactools_runtime_IUIAPacketTransfer_poll_FxnT ti_uiactools_runtime_IUIAPacketTransfer_poll_fxnP( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return (ti_uiactools_runtime_IUIAPacketTransfer_poll_FxnT)__inst->__fxns->poll;
}

/* readyToSend_{FxnT,fxnP} */
typedef xdc_Bool (*ti_uiactools_runtime_IUIAPacketTransfer_readyToSend_FxnT)(void*);
static inline ti_uiactools_runtime_IUIAPacketTransfer_readyToSend_FxnT ti_uiactools_runtime_IUIAPacketTransfer_readyToSend_fxnP( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return (ti_uiactools_runtime_IUIAPacketTransfer_readyToSend_FxnT)__inst->__fxns->readyToSend;
}

/* transferData_{FxnT,fxnP} */
typedef xdc_Bool (*ti_uiactools_runtime_IUIAPacketTransfer_transferData_FxnT)(void*, xdc_UInt32);
static inline ti_uiactools_runtime_IUIAPacketTransfer_transferData_FxnT ti_uiactools_runtime_IUIAPacketTransfer_transferData_fxnP( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return (ti_uiactools_runtime_IUIAPacketTransfer_transferData_FxnT)__inst->__fxns->transferData;
}

/* prime_{FxnT,fxnP} */
typedef xdc_Bool (*ti_uiactools_runtime_IUIAPacketTransfer_prime_FxnT)(void*, xdc_Ptr);
static inline ti_uiactools_runtime_IUIAPacketTransfer_prime_FxnT ti_uiactools_runtime_IUIAPacketTransfer_prime_fxnP( ti_uiactools_runtime_IUIAPacketTransfer_Handle __inst )
{
    return (ti_uiactools_runtime_IUIAPacketTransfer_prime_FxnT)__inst->__fxns->prime;
}


/*
 * ======== CONVERTORS ========
 */

/* Module_upCast */
static inline ti_uia_events_IUIAMetaProvider_Module ti_uiactools_runtime_IUIAPacketTransfer_Module_upCast( ti_uiactools_runtime_IUIAPacketTransfer_Module m )
{
    return(ti_uia_events_IUIAMetaProvider_Module)m;
}

/* Module_to_ti_uia_events_IUIAMetaProvider */
#define ti_uiactools_runtime_IUIAPacketTransfer_Module_to_ti_uia_events_IUIAMetaProvider ti_uiactools_runtime_IUIAPacketTransfer_Module_upCast

/* Module_downCast */
static inline ti_uiactools_runtime_IUIAPacketTransfer_Module ti_uiactools_runtime_IUIAPacketTransfer_Module_downCast( ti_uia_events_IUIAMetaProvider_Module m )
{
    xdc_runtime_Types_Base* b; for (b = m->__base; b; b = b->base) {
        if (b == &ti_uiactools_runtime_IUIAPacketTransfer_Interface__BASE__C) return (ti_uiactools_runtime_IUIAPacketTransfer_Module)m;
    } return 0;
}

/* Module_from_ti_uia_events_IUIAMetaProvider */
#define ti_uiactools_runtime_IUIAPacketTransfer_Module_from_ti_uia_events_IUIAMetaProvider ti_uiactools_runtime_IUIAPacketTransfer_Module_downCast


/*
 * ======== EPILOGUE ========
 */

#ifdef ti_uiactools_runtime_IUIAPacketTransfer__top__
#undef __nested__
#endif

#endif /* ti_uiactools_runtime_IUIAPacketTransfer__include */


/*
 * ======== PREFIX ALIASES ========
 */

#if !defined(__nested__) && !defined(ti_uiactools_runtime_IUIAPacketTransfer__nolocalnames)

#ifndef ti_uiactools_runtime_IUIAPacketTransfer__localnames__done
#define ti_uiactools_runtime_IUIAPacketTransfer__localnames__done

/* module prefix */
#define IUIAPacketTransfer_Instance ti_uiactools_runtime_IUIAPacketTransfer_Instance
#define IUIAPacketTransfer_Handle ti_uiactools_runtime_IUIAPacketTransfer_Handle
#define IUIAPacketTransfer_Module ti_uiactools_runtime_IUIAPacketTransfer_Module
#define IUIAPacketTransfer_TransferType ti_uiactools_runtime_IUIAPacketTransfer_TransferType
#define IUIAPacketTransfer_Priority ti_uiactools_runtime_IUIAPacketTransfer_Priority
#define IUIAPacketTransfer_TransferType_RELIABLE ti_uiactools_runtime_IUIAPacketTransfer_TransferType_RELIABLE
#define IUIAPacketTransfer_TransferType_LOSSY ti_uiactools_runtime_IUIAPacketTransfer_TransferType_LOSSY
#define IUIAPacketTransfer_Priority_LOW ti_uiactools_runtime_IUIAPacketTransfer_Priority_LOW
#define IUIAPacketTransfer_Priority_STANDARD ti_uiactools_runtime_IUIAPacketTransfer_Priority_STANDARD
#define IUIAPacketTransfer_Priority_HIGH ti_uiactools_runtime_IUIAPacketTransfer_Priority_HIGH
#define IUIAPacketTransfer_Priority_SYNC ti_uiactools_runtime_IUIAPacketTransfer_Priority_SYNC
#define IUIAPacketTransfer_Params ti_uiactools_runtime_IUIAPacketTransfer_Params
#define IUIAPacketTransfer_enable ti_uiactools_runtime_IUIAPacketTransfer_enable
#define IUIAPacketTransfer_enable_fxnP ti_uiactools_runtime_IUIAPacketTransfer_enable_fxnP
#define IUIAPacketTransfer_enable_FxnT ti_uiactools_runtime_IUIAPacketTransfer_enable_FxnT
#define IUIAPacketTransfer_disable ti_uiactools_runtime_IUIAPacketTransfer_disable
#define IUIAPacketTransfer_disable_fxnP ti_uiactools_runtime_IUIAPacketTransfer_disable_fxnP
#define IUIAPacketTransfer_disable_FxnT ti_uiactools_runtime_IUIAPacketTransfer_disable_FxnT
#define IUIAPacketTransfer_getTransferType ti_uiactools_runtime_IUIAPacketTransfer_getTransferType
#define IUIAPacketTransfer_getTransferType_fxnP ti_uiactools_runtime_IUIAPacketTransfer_getTransferType_fxnP
#define IUIAPacketTransfer_getTransferType_FxnT ti_uiactools_runtime_IUIAPacketTransfer_getTransferType_FxnT
#define IUIAPacketTransfer_isEmpty ti_uiactools_runtime_IUIAPacketTransfer_isEmpty
#define IUIAPacketTransfer_isEmpty_fxnP ti_uiactools_runtime_IUIAPacketTransfer_isEmpty_fxnP
#define IUIAPacketTransfer_isEmpty_FxnT ti_uiactools_runtime_IUIAPacketTransfer_isEmpty_FxnT
#define IUIAPacketTransfer_poll ti_uiactools_runtime_IUIAPacketTransfer_poll
#define IUIAPacketTransfer_poll_fxnP ti_uiactools_runtime_IUIAPacketTransfer_poll_fxnP
#define IUIAPacketTransfer_poll_FxnT ti_uiactools_runtime_IUIAPacketTransfer_poll_FxnT
#define IUIAPacketTransfer_readyToSend ti_uiactools_runtime_IUIAPacketTransfer_readyToSend
#define IUIAPacketTransfer_readyToSend_fxnP ti_uiactools_runtime_IUIAPacketTransfer_readyToSend_fxnP
#define IUIAPacketTransfer_readyToSend_FxnT ti_uiactools_runtime_IUIAPacketTransfer_readyToSend_FxnT
#define IUIAPacketTransfer_transferData ti_uiactools_runtime_IUIAPacketTransfer_transferData
#define IUIAPacketTransfer_transferData_fxnP ti_uiactools_runtime_IUIAPacketTransfer_transferData_fxnP
#define IUIAPacketTransfer_transferData_FxnT ti_uiactools_runtime_IUIAPacketTransfer_transferData_FxnT
#define IUIAPacketTransfer_prime ti_uiactools_runtime_IUIAPacketTransfer_prime
#define IUIAPacketTransfer_prime_fxnP ti_uiactools_runtime_IUIAPacketTransfer_prime_fxnP
#define IUIAPacketTransfer_prime_FxnT ti_uiactools_runtime_IUIAPacketTransfer_prime_FxnT
#define IUIAPacketTransfer_Module_name ti_uiactools_runtime_IUIAPacketTransfer_Module_name
#define IUIAPacketTransfer_delete ti_uiactools_runtime_IUIAPacketTransfer_delete
#define IUIAPacketTransfer_Handle_label ti_uiactools_runtime_IUIAPacketTransfer_Handle_label
#define IUIAPacketTransfer_Handle_to_Module ti_uiactools_runtime_IUIAPacketTransfer_Handle_to_Module
#define IUIAPacketTransfer_Module_upCast ti_uiactools_runtime_IUIAPacketTransfer_Module_upCast
#define IUIAPacketTransfer_Module_to_ti_uia_events_IUIAMetaProvider ti_uiactools_runtime_IUIAPacketTransfer_Module_to_ti_uia_events_IUIAMetaProvider
#define IUIAPacketTransfer_Module_downCast ti_uiactools_runtime_IUIAPacketTransfer_Module_downCast
#define IUIAPacketTransfer_Module_from_ti_uia_events_IUIAMetaProvider ti_uiactools_runtime_IUIAPacketTransfer_Module_from_ti_uia_events_IUIAMetaProvider

#endif /* ti_uiactools_runtime_IUIAPacketTransfer__localnames__done */
#endif
