3D-ICE 3.0.0
powers_queue.h
Go to the documentation of this file.
1/******************************************************************************
2 * This file is part of 3D-ICE, version 3.1.0 . *
3 * *
4 * 3D-ICE is free software: you can redistribute it and/or modify it under *
5 * the terms of the GNU General Public License as published by the Free *
6 * Software Foundation, either version 3 of the License, or any later *
7 * version. *
8 * *
9 * 3D-ICE is distributed in the hope that it will be useful, but WITHOUT *
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for *
12 * more details. *
13 * *
14 * You should have received a copy of the GNU General Public License along *
15 * with 3D-ICE. If not, see <http://www.gnu.org/licenses/>. *
16 * *
17 * Copyright (C) 2021 *
18 * Embedded Systems Laboratory - Ecole Polytechnique Federale de Lausanne *
19 * All Rights Reserved. *
20 * *
21 * Authors: Arvind Sridhar Alessandro Vincenzi *
22 * Giseong Bak Martino Ruggiero *
23 * Thomas Brunschwiler Eder Zulian *
24 * Federico Terraneo Darong Huang *
25 * Luis Costero Marina Zapater *
26 * David Atienza *
27 * *
28 * For any comment, suggestion or request about 3D-ICE, please register and *
29 * write to the mailing list (see http://listes.epfl.ch/doc.cgi?liste=3d-ice) *
30 * Any usage of 3D-ICE for research, commercial or other purposes must be *
31 * properly acknowledged in the resulting products or publications. *
32 * *
33 * EPFL-STI-IEL-ESL Mail : 3d-ice@listes.epfl.ch *
34 * Batiment ELG, ELG 130 (SUBSCRIPTION IS NECESSARY) *
35 * Station 11 *
36 * 1015 Lausanne, Switzerland Url : http://esl.epfl.ch/3d-ice *
37 ******************************************************************************/
38
39#ifndef _3DICE_POWERSQUEUE_H_
40#define _3DICE_POWERSQUEUE_H_
41
44#ifdef __cplusplus
45extern "C"
46{
47#endif
48
49/******************************************************************************/
50
51#include <stdio.h> // For the file type FILE
52
53#include "types.h"
54#include "string_t.h"
55
56/******************************************************************************/
57
63 {
67
71
75
79
83 } ;
84
88
89
90
91/******************************************************************************/
92
93
94
100 void powers_queue_init (PowersQueue_t *pqueue) ;
101
102
103
119
120
121
131 void powers_queue_build (PowersQueue_t *pqueue, Quantity_t capacity) ;
132
133
134
143 void powers_queue_destroy (PowersQueue_t *pqueue) ;
144
145
146
157
158
159
170
171
172
184 void powers_queue_free (PowersQueue_t *pqueue) ;
185
186
187
197
198 (PowersQueue_t *pqueue, FILE *stream, String_t prefix) ;
199
200
201
210 bool is_empty_powers_queue (PowersQueue_t *pqueue) ;
211
212
213
222 bool is_full_powers_queue (PowersQueue_t *pqueue) ;
223
224
225
234 void put_into_powers_queue (PowersQueue_t *pqueue, Power_t power) ;
235
236
237
247
248/******************************************************************************/
249
250#ifdef __cplusplus
251}
252#endif
253
254#endif /* _3DICE_POWERSQUEUE_H_ */
void powers_queue_copy(PowersQueue_t *dst, PowersQueue_t *src)
Definition: powers_queue.c:87
PowersQueue_t * powers_queue_calloc(void)
Definition: powers_queue.c:119
PowersQueue_t * powers_queue_clone(PowersQueue_t *pqueue)
Definition: powers_queue.c:132
bool is_full_powers_queue(PowersQueue_t *pqueue)
Definition: powers_queue.c:197
bool is_empty_powers_queue(PowersQueue_t *pqueue)
Definition: powers_queue.c:190
void powers_queue_print(PowersQueue_t *pqueue, FILE *stream, String_t prefix)
Definition: powers_queue.c:163
void powers_queue_init(PowersQueue_t *pqueue)
Definition: powers_queue.c:45
void powers_queue_build(PowersQueue_t *pqueue, Quantity_t capacity)
Definition: powers_queue.c:56
void powers_queue_free(PowersQueue_t *pqueue)
Definition: powers_queue.c:149
Power_t get_from_powers_queue(PowersQueue_t *pqueue)
Definition: powers_queue.c:244
void powers_queue_destroy(PowersQueue_t *pqueue)
Definition: powers_queue.c:76
void put_into_powers_queue(PowersQueue_t *pqueue, Power_t power)
Definition: powers_queue.c:204
char * String_t
Definition: string_t.h:55
A First In - First Out circular queue to store power values.
Definition: powers_queue.h:63
Power_t * Memory
Definition: powers_queue.h:70
Quantity_t Size
Definition: powers_queue.h:74
Quantity_t End
Definition: powers_queue.h:78
Quantity_t Start
Definition: powers_queue.h:82
Quantity_t Capacity
Definition: powers_queue.h:66
uint32_t Quantity_t
Definition: types.h:59
double Power_t
Definition: types.h:83