LibJuno 0.42.0
LibJuno is a lightweight C99 library designed specifically for embedded systems.
Loading...
Searching...
No Matches
juno_sch_api.h
Go to the documentation of this file.
1/*
2 MIT License
3
4 Copyright (c) 2025 Robin A. Onsay
5
6 Permission is hereby granted, free of charge, to any person obtaining
7 a copy of this software and associated documentation files
8 (the "Software"), to deal in the Software without restriction,
9 including without limitation the rights to use, copy, modify, merge,
10 publish, distribute, sublicense, and/or sell copies of the Software,
11 and to permit persons to whom the Software is furnished to do so,
12 subject to the following conditions:
13
14 The above copyright notice and this permission notice shall be
15 included in all copies or substantial portions of the Software.
16*/
17
27#ifndef JUNO_SCH_API_H
28#define JUNO_SCH_API_H
29#include "juno/app/app_api.h"
30#include "juno/status.h"
31#include "juno/module.h"
32#include "juno/time/time_api.h"
33#include "juno/types.h"
34#ifdef __cplusplus
35extern "C"
36{
37#endif
38
40
41typedef union JUNO_SCH_TAG JUNO_SCH_T;
42typedef struct JUNO_SCH_ROOT_TAG JUNO_SCH_ROOT_T;
43
44#define JUNO_SCH_TABLE_NEW(ptArrName, zAppsPerMinorFrame, zNumMinorFrames, ...) \
45JUNO_APP_T *ptArrName[zNumMinorFrames * zAppsPerMinorFrame] = {__VA_ARGS__}
46
47struct JUNO_SCH_ROOT_TAG JUNO_MODULE_ROOT(JUNO_SCH_API_T,
48 JUNO_TIME_T *ptTime;
49 JUNO_APP_T **ptArrSchTable;
50 size_t zAppsPerMinorFrame;
51 size_t zNumMinorFrames;
52 JUNO_TIMESTAMP_T tMinorFramePeriod;
53);
54
56{
58 JUNO_TIMESTAMP_RESULT_T (*GetMinorFramePeriod)(JUNO_SCH_T *ptJunoSch);
59 JUNO_TIMESTAMP_RESULT_T (*GetMajorFramePeriod)(JUNO_SCH_T *ptJunoSch);
60};
61
62#ifdef __cplusplus
63}
64#endif
65#endif // JUNO_SCH_API_H
union JUNO_APP_T JUNO_APP_T
Definition app_api.h:38
struct JUNO_SCH_ROOT_TAG JUNO_SCH_ROOT_T
Definition juno_sch_api.h:42
union JUNO_SCH_TAG JUNO_SCH_T
Definition juno_sch_api.h:41
#define JUNO_MODULE_ROOT(API_T,...)
Definition module.h:182
int32_t JUNO_STATUS_T
Definition status.h:23
Definition juno_sch_api.h:56
JUNO_TIMESTAMP_RESULT_T(* GetMajorFramePeriod)(JUNO_SCH_T *ptJunoSch)
Definition juno_sch_api.h:59
JUNO_TIMESTAMP_RESULT_T(* GetMinorFramePeriod)(JUNO_SCH_T *ptJunoSch)
Definition juno_sch_api.h:58
JUNO_STATUS_T(* Execute)(JUNO_SCH_T *ptJunoSch)
Definition juno_sch_api.h:57
Definition time_api.h:63
union JUNO_TIME_TAG JUNO_TIME_T
Definition time_api.h:34