26 #ifndef SYSTEM_CORE_INC_KERNEL_OC_SERVICE_H_ 27 #define SYSTEM_CORE_INC_KERNEL_OC_SERVICE_H_ 29 #include <oc_errors.h> 39 #define _________________________________________TYPES_SECTION______________________________________________________________________________ 43 typedef oC_ErrorCode_t (*oC_Service_StartFunction_t)( oC_Service_Context_t * outContext );
44 typedef oC_ErrorCode_t (*oC_Service_StopFunction_t) ( oC_Service_Context_t * Context );
46 typedef oC_ErrorCode_t (*oC_Service_MainFunction_t)( oC_Service_Context_t Context );
53 oC_Service_StartFunction_t StartFunction;
54 oC_Service_StopFunction_t StopFunction;
55 oC_Service_MainFunction_t MainFunction;
56 oC_MemorySize_t MainThreadStackSize;
57 oC_MemorySize_t HeapMapSize;
58 oC_MemorySize_t AllocationLimit;
59 oC_Module_RequiredArray_t RequiredModules;
60 oC_Process_Priority_t Priority;
72 #undef _________________________________________TYPES_SECTION______________________________________________________________________________ 79 #define _________________________________________PROTOTYPES_SECTION_________________________________________________________________________ 90 #undef _________________________________________PROTOTYPES_SECTION_________________________________________________________________________ The file with interface for thread managing.
oC_Service_t oC_Service_New(const oC_Service_Registration_t *Registration)
allocates memory for a new service
oC_Process_t oC_Service_GetProcess(oC_Service_t Service)
returns process associated with the service
const char * oC_Service_GetName(oC_Service_t Service)
returns name of the service
The file with interface for the module library.
bool oC_Service_Delete(oC_Service_t *Service)
releases memory allocated for a service
oC_ErrorCode_t oC_Service_Start(oC_Service_t Service)
starts the service
bool oC_Service_IsActive(oC_Service_t Service)
returns true if the service is correct and active
oC_ErrorCode_t oC_Service_Stop(oC_Service_t Service)
stops the service
The file with interface for process mechanism.
struct Service_t * oC_Service_t
object for storing service data
bool oC_Service_IsCorrect(oC_Service_t Service)
returns true if the service object is correct