/* Copyright 2013 The MathWorks, Inc. */ #ifndef __XILSERVICE_H__ #define __XILSERVICE_H__ /* Shipping C interface to the SIL/PIL service in the libmwxilservice * shared library. */ #ifndef EXTERN_C #ifdef __cplusplus /* support C++ call sites */ #define EXTERN_C extern "C" #else /* support C call sites */ #define EXTERN_C extern #endif #endif /* detect shipping call site */ #ifndef LIBMWXILSERVICE_API /* default definition */ #define LIBMWXILSERVICE_API #endif const boolean_T XILSERVICE_ERROR = 1; const boolean_T XILSERVICE_SUCCESS = 0; /* define an I/O buffer type */ typedef struct { void* data; mwSize size; } XIL_IOBuffer_T; /* C interface */ EXTERN_C LIBMWXILSERVICE_API boolean_T xilServiceCreate( void** const ppXILService, void* const pCommService, void* const pXILUtils, XIL_IOBuffer_T* const pIOBuffer, const uint8_T memUnitSize, const uint8_T ioDataTypeSize); EXTERN_C LIBMWXILSERVICE_API const uint8_T xilServiceGetIsCommandComplete( const void* const pXILService); EXTERN_C LIBMWXILSERVICE_API void xilServiceSetIsCommandComplete( void* const pXILService, const uint8_T val); EXTERN_C LIBMWXILSERVICE_API const mwSize xilServiceGetPayloadSizeForOneStep( const void* const pXILServiceVoid); EXTERN_C LIBMWXILSERVICE_API boolean_T xilServiceGrowIOBuffer( const void* const pXILService, XIL_IOBuffer_T* const IOBuffer, const mwSize requiredSize, const uint8_T isVerbose); EXTERN_C LIBMWXILSERVICE_API boolean_T xilServiceSend( const void* const pXILService, void* const src, const mwSize size); EXTERN_C LIBMWXILSERVICE_API void xilServiceDestroy( void* const pXILServiceVoid); #endif