RTEMS  5.0.0
ratemon.h
Go to the documentation of this file.
1 
21 /* COPYRIGHT (c) 1989-2009, 2016.
22  * On-Line Applications Research Corporation (OAR).
23  * COPYRIGHT (c) 2016-2017 Kuan-Hsun Chen.
24  *
25  * The license and distribution terms for this file may be
26  * found in the file LICENSE in this distribution or at
27  * http://www.rtems.org/license/LICENSE.
28  */
29 
30 #ifndef _RTEMS_RTEMS_RATEMON_H
31 #define _RTEMS_RTEMS_RATEMON_H
32 
33 #include <rtems/rtems/types.h>
34 #include <rtems/rtems/status.h>
35 
36 struct rtems_printer;
37 
38 #ifdef __cplusplus
39 extern "C" {
40 #endif
41 
58 typedef struct timespec rtems_rate_monotonic_period_time_t RTEMS_DEPRECATED;
59 
64 typedef enum {
70 
77 
85 
90 #define RTEMS_PERIOD_STATUS WATCHDOG_NO_TIMEOUT
91 
99 typedef struct {
101  uint32_t count;
103  uint32_t missed_count;
104 
106  struct timespec min_cpu_time;
108  struct timespec max_cpu_time;
110  struct timespec total_cpu_time;
111 
113  struct timespec min_wall_time;
115  struct timespec max_wall_time;
117  struct timespec total_wall_time;
119 
123 typedef struct {
126 
128  rtems_rate_monotonic_period_states state;
129 
135  struct timespec since_last_period;
136 
142  struct timespec executed_since_last_period;
143 
147 
158  rtems_name name,
159  rtems_id *id
160 );
161 
178  rtems_name name,
179  rtems_id *id
180 );
181 
196  rtems_id id
197 );
198 
212  rtems_id id
213 );
214 
230  rtems_id id,
232 );
233 
246  rtems_id id,
247  rtems_rate_monotonic_period_statistics *statistics
248 );
249 
259  rtems_id id
260 );
261 
269 
280  const struct rtems_printer *printer
281 );
282 
290 
305  rtems_id id,
306  rtems_interval length
307 );
308 
311 #ifdef __cplusplus
312 }
313 #endif
314 
315 #endif
316 /* end of include file */
rtems_status_code rtems_rate_monotonic_create(rtems_name name, rtems_id *id)
Create a Period.
Definition: ratemoncreate.c:29
Definition: ratemon.h:69
rtems_status_code rtems_rate_monotonic_period(rtems_id id, rtems_interval length)
RTEMS Rate Monotonic Period.
Definition: ratemonperiod.c:305
Watchdog_Interval rtems_interval
Used to manage and manipulate intervals specified by clock ticks.
Definition: types.h:127
rtems_status_code rtems_rate_monotonic_get_status(rtems_id id, rtems_rate_monotonic_period_status *status)
RTEMS Rate Monotonic Get Status.
Definition: ratemongetstatus.c:25
uint32_t rtems_name
Classic API object name type.
Definition: types.h:77
void rtems_rate_monotonic_reset_all_statistics(void)
rtems_rate_monotonic_reset_all_statistics
Definition: ratemonresetall.c:26
uint32_t postponed_jobs_count
Definition: ratemon.h:145
rtems_status_code rtems_rate_monotonic_ident(rtems_name name, rtems_id *id)
RTEMS Rate Monotonic Name to Id.
Definition: ratemonident.c:27
Definition: printer.h:55
Definition: ratemon.h:123
Definition: ratemon.h:76
rtems_status_code
Classic API Status.
Definition: status.h:43
uint32_t missed_count
Definition: ratemon.h:103
Definition: ratemon.h:83
uint32_t count
Definition: ratemon.h:101
rtems_id owner
Definition: ratemon.h:125
rtems_status_code rtems_rate_monotonic_reset_statistics(rtems_id id)
RTEMS Rate Monotonic Reset Statistics.
Definition: ratemonresetstatistics.c:23
void rtems_rate_monotonic_report_statistics_with_plugin(const struct rtems_printer *printer)
RTEMS Report Rate Monotonic Statistics.
rtems_status_code rtems_rate_monotonic_cancel(rtems_id id)
RTEMS Rate Monotonic Cancel.
Definition: ratemoncancel.c:49
rtems_rate_monotonic_period_states
Definition: ratemon.h:64
Objects_Id rtems_id
Used to manage and manipulate RTEMS object identifiers.
Definition: types.h:83
rtems_rate_monotonic_period_states state
Definition: ratemon.h:128
rtems_status_code rtems_rate_monotonic_delete(rtems_id id)
RTEMS Delete Rate Monotonic.
Definition: ratemondelete.c:24
rtems_status_code rtems_rate_monotonic_get_statistics(rtems_id id, rtems_rate_monotonic_period_statistics *statistics)
RTEMS Rate Monotonic Get Statistics.
Definition: ratemongetstatistics.c:24
void rtems_rate_monotonic_report_statistics(void)
RTEMS Report Rate Monotonic Statistics.
Definition: ratemonreportstatistics.c:157