RTEMS 6.1-rc4
Loading...
Searching...
No Matches
ratemon.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/*
12 * Copyright (C) 2020, 2021 embedded brains GmbH & Co. KG
13 * Copyright (C) 2017 Kuan-Hsun Chen
14 * Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 */
37
38/*
39 * This file is part of the RTEMS quality process and was automatically
40 * generated. If you find something that needs to be fixed or
41 * worded better please post a report or patch to an RTEMS mailing list
42 * or raise a bug report:
43 *
44 * https://www.rtems.org/bugs.html
45 *
46 * For information on updating and regenerating please refer to the How-To
47 * section in the Software Requirements Engineering chapter of the
48 * RTEMS Software Engineering manual. The manual is provided as a part of
49 * a release. For development sources please refer to the online
50 * documentation at:
51 *
52 * https://docs.rtems.org
53 */
54
55/* Generated from spec:/rtems/ratemon/if/header */
56
57#ifndef _RTEMS_RTEMS_RATEMON_H
58#define _RTEMS_RTEMS_RATEMON_H
59
60#include <stdint.h>
61#include <sys/_timespec.h>
62#include <rtems/rtems/status.h>
63#include <rtems/rtems/types.h>
65
66#ifdef __cplusplus
67extern "C" {
68#endif
69
70/* Generated from spec:/rtems/ratemon/if/group */
71
84/* Generated from spec:/rtems/ratemon/if/period-states */
85
91typedef enum {
97
103
111
112/* Generated from spec:/rtems/ratemon/if/period-statistics */
113
119typedef struct {
123 uint32_t count;
124
128 uint32_t missed_count;
129
134 struct timespec min_cpu_time;
135
140 struct timespec max_cpu_time;
141
146 struct timespec total_cpu_time;
147
152 struct timespec min_wall_time;
153
158 struct timespec max_wall_time;
159
164 struct timespec total_wall_time;
166
167/* Generated from spec:/rtems/ratemon/if/period-status */
168
174typedef struct {
179
184
192 struct timespec since_last_period;
193
201 struct timespec executed_since_last_period;
202
208
209/* Generated from spec:/rtems/ratemon/if/period-status-define */
210
217#define RTEMS_PERIOD_STATUS WATCHDOG_NO_TIMEOUT
218
219/* Generated from spec:/rtems/ratemon/if/printer */
220
221/* Forward declaration */
222struct rtems_printer;
223
224/* Generated from spec:/rtems/ratemon/if/create */
225
281
282/* Generated from spec:/rtems/ratemon/if/ident */
283
330
331/* Generated from spec:/rtems/ratemon/if/cancel */
332
365
366/* Generated from spec:/rtems/ratemon/if/delete */
367
406
407/* Generated from spec:/rtems/ratemon/if/period */
408
464 rtems_id id,
465 rtems_interval length
466);
467
468/* Generated from spec:/rtems/ratemon/if/get-status */
469
522 rtems_id id,
524);
525
526/* Generated from spec:/rtems/ratemon/if/get-statistics */
527
584 rtems_id id,
586);
587
588/* Generated from spec:/rtems/ratemon/if/reset-statistics */
589
617
618/* Generated from spec:/rtems/ratemon/if/reset-all-statistics */
619
639
640/* Generated from spec:/rtems/ratemon/if/report-statistics */
641
661
662/* Generated from spec:/rtems/ratemon/if/report-statistics-with-plugin */
663
685 const struct rtems_printer *printer
686);
687
688#ifdef __cplusplus
689}
690#endif
691
692#endif /* _RTEMS_RTEMS_RATEMON_H */
This header file provides types used by the Classic API.
void rtems_rate_monotonic_report_statistics_with_plugin(const struct rtems_printer *printer)
Reports the period statistics using the printer plugin.
rtems_rate_monotonic_period_states
This enumeration defines the states in which a period may be.
Definition: ratemon.h:91
rtems_status_code rtems_rate_monotonic_get_statistics(rtems_id id, rtems_rate_monotonic_period_statistics *status)
Gets the statistics of the period.
Definition: ratemongetstatistics.c:45
rtems_status_code rtems_rate_monotonic_cancel(rtems_id id)
Cancels the period.
Definition: ratemoncancel.c:71
rtems_status_code rtems_rate_monotonic_period(rtems_id id, rtems_interval length)
Concludes the current period and start the next period, or gets the period status.
Definition: ratemonperiod.c:313
rtems_status_code rtems_rate_monotonic_delete(rtems_id id)
Deletes the period.
Definition: ratemondelete.c:45
void rtems_rate_monotonic_report_statistics(void)
Reports the period statistics using the printk() printer.
Definition: ratemonreportstatistics.c:178
rtems_status_code rtems_rate_monotonic_get_status(rtems_id id, rtems_rate_monotonic_period_status *status)
Gets the detailed status of the period.
Definition: ratemongetstatus.c:46
rtems_status_code rtems_rate_monotonic_ident(rtems_name name, rtems_id *id)
Identifies a period by the object name.
Definition: ratemonident.c:45
rtems_status_code rtems_rate_monotonic_create(rtems_name name, rtems_id *id)
Creates a period.
Definition: ratemoncreate.c:50
void rtems_rate_monotonic_reset_all_statistics(void)
Resets the statistics of all periods.
Definition: ratemonresetall.c:47
rtems_status_code rtems_rate_monotonic_reset_statistics(rtems_id id)
Resets the statistics of the period.
Definition: ratemonresetstatistics.c:44
@ RATE_MONOTONIC_ACTIVE
This status indicates the period is on the watchdog chain, and running. The owner may be executing or...
Definition: ratemon.h:102
@ RATE_MONOTONIC_EXPIRED
This status indicates the period is off the watchdog chain, and has expired. The owner may still exec...
Definition: ratemon.h:109
@ RATE_MONOTONIC_INACTIVE
This status indicates the period is off the watchdog chain, and has never been initialized.
Definition: ratemon.h:96
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
uint32_t rtems_name
This type represents Classic API object names.
Definition: types.h:226
Objects_Id rtems_id
This type represents RTEMS object identifiers.
Definition: types.h:94
Watchdog_Interval rtems_interval
This type represents clock tick intervals.
Definition: types.h:114
This header file provides the status codes of Classic API directives and support functions.
Definition: printer.h:76
This structure provides the statistics of a period.
Definition: ratemon.h:119
uint32_t missed_count
This member contains the number of periods missed.
Definition: ratemon.h:128
uint32_t count
This member contains the number of periods executed.
Definition: ratemon.h:123
This structure provides the detailed status of a period.
Definition: ratemon.h:174
uint32_t postponed_jobs_count
This member contains the count of jobs which are not released yet.
Definition: ratemon.h:206
rtems_rate_monotonic_period_states state
This member contains the state of the period.
Definition: ratemon.h:183
rtems_id owner
This member contains the identifier of the owner task of the period.
Definition: ratemon.h:178
This header file provides the interfaces of the Watchdog Handler related to watchdog ticks which are ...