49 lines
1.2 KiB
C
49 lines
1.2 KiB
C
/******************************************************************************
|
|
*
|
|
* Copyright (c) 2017-2019 by Löwenware Ltd
|
|
* Please, refer LICENSE file for legal information
|
|
*
|
|
******************************************************************************/
|
|
|
|
/**
|
|
* @file context.h
|
|
* @author Ilja Kartašov <ik@lowenware.com>
|
|
* @brief
|
|
*
|
|
* @see https://lowenware.com/aisl/
|
|
*/
|
|
|
|
#ifndef AISLX_CTX_H_683B0A86_2A15_483D_B0F9_7BFBB4BA068F
|
|
#define AISLX_CTX_H_683B0A86_2A15_483D_B0F9_7BFBB4BA068F
|
|
|
|
#define AISLX_CTX(x) ((aislx_ctx_t)x)
|
|
|
|
#include <mods/module.h>
|
|
|
|
/** @brief Root level ASIL mod's context structure
|
|
*/
|
|
struct aislx_ctx {
|
|
aislx_module_t mod; /**< Mod's pointer */
|
|
};
|
|
|
|
/** @brief Root level ASIL mod's context structure pointer
|
|
*/
|
|
typedef struct aislx_ctx * aislx_ctx_t;
|
|
|
|
|
|
/** @brief Allocates zeroed #aislx_t context
|
|
* @param mod an instance of #aislx_t
|
|
* @return pointer to newly allocated #aisl_mox_ctx_t
|
|
*/
|
|
aislx_ctx_t
|
|
aislx_ctx_new(aislx_module_t mod);
|
|
|
|
|
|
/** @brief Frees previosly allocated #aislx_ctx_t
|
|
* @param ctx an instance of mod's context structure
|
|
* */
|
|
void
|
|
aislx_ctx_free(aislx_ctx_t ctx);
|
|
|
|
#endif /* !AISLX_CTX_H */
|