#include <stdio.h>
#include "types.h"
#include "string_t.h"
#include "dimensions.h"
#include "inspection_point_list.h"
#include "network_message.h"
Go to the source code of this file.
|
struct | Output_t |
| Informations about the type of thermal simulation to be run and its initial settings. More...
|
|
|
void | output_init (Output_t *output) |
|
void | output_copy (Output_t *dst, Output_t *src) |
|
void | output_destroy (Output_t *output) |
|
void | output_print (Output_t *output, FILE *stream, String_t prefix) |
|
Quantity_t | get_number_of_inspection_points (Output_t *output, OutputInstant_t instant, OutputType_t type, OutputQuantity_t quantity) |
|
void | add_inspection_point (Output_t *output, InspectionPoint_t *ipoint) |
|
Error_t | generate_output_headers (Output_t *output, Dimensions_t *dimensions, String_t prefix) |
|
Error_t | generate_output (Output_t *output, Dimensions_t *dimensions, Temperature_t *temperatures, Source_t *sources, Time_t current_time, OutputInstant_t output_instant) |
|
Error_t | fill_output_message (Output_t *output, Dimensions_t *dimensions, Temperature_t *temperatures, Source_t *sources, OutputInstant_t output_instant, OutputType_t output_type, OutputQuantity_t output_quantity, NetworkMessage_t *message) |
|
◆ Output_t
◆ add_inspection_point()
Inserts an inspection point into the corresponding queue
- Parameters
-
output | pointer to the output structure |
ipoint | pointer to the inspection point to add |
Definition at line 161 of file output.c.
◆ fill_output_message()
Fills a network message with thermal outputs for a specific set of inspection points
- Parameters
-
output | pointer to the output structure |
dimensions | the address of the dimension structure |
temperatures | pointer to the first element of the temparature array |
sources | pointer to the first element of the source array |
output_instant | the instant of the output (slot, step, final) |
output_type | the type of the ispection point to generate |
output_quantity | the quantity to report (max, min, avg) |
message | the message to fill |
- Returns
TDICE_SUCCESS
if the operation terminates with success
-
TDICE_FAILURE
if one of the output cannot be generated
Definition at line 290 of file output.c.
◆ generate_output()
Generates thermal outputs for each inspection point
- Parameters
-
output | pointer to the output structure |
dimensions | the address of the dimension structure |
temperatures | pointer to the first element of the temparature array |
sources | pointer to the first element of the source array |
current_time | the time instant at which the output is printed |
output_instant | the instant of the output (slot, step, final) |
- Returns
TDICE_SUCCESS
if the operation terminates with success
-
TDICE_FAILURE
if one of the output cannot be generated
Definition at line 237 of file output.c.
◆ generate_output_headers()
Initializes output files for each inspection point
Generates, for every inspection point, the output file and print the header. If the target output file is already there, it will be overwritten.
- Parameters
-
output | pointer to the output structure |
dimensions | the address of the dimension structure |
prefix | string to be printed as prefix for every line in the header |
- Returns
TDICE_SUCCESS
if the operation terminates with success
-
TDICE_FAILURE
if one of the files can not be created
Definition at line 190 of file output.c.
◆ get_number_of_inspection_points()
Returns the number of a specific type of insection point
- Parameters
-
output | the address of the output structure to query |
instant | the instant of the output (slot, step, final) |
type | the type of the inspection point (tcell, tmap, ...) |
quantity | the quantity to be measured (max, min, avg) |
- Returns
- the number of inspection points recorded in output
-
0
if either instant or type are not known
Definition at line 85 of file output.c.
◆ output_copy()
Copies the structure src into dst , as an assignement
The function destroys the content of dst and then makes the copy
- Parameters
-
dst | the address of the left term sructure (destination) |
src | the address of the right term structure (source) |
Definition at line 55 of file output.c.
◆ output_destroy()
void output_destroy |
( |
Output_t * |
output | ) |
|
Destroys the content of the fields of the structure output
The function releases any dynamic memory used by the structure and resets its state calling output_init .
- Parameters
-
output | the address of the structure to destroy |
Definition at line 74 of file output.c.
◆ output_init()
Inits the fields of the output structure with default values
- Parameters
-
output | the address of the structure to initalize |
Definition at line 46 of file output.c.
◆ output_print()
Prints the output declaration as it looks in the stack file
- Parameters
-
output | the address of the structure to print |
stream | the output stream (must be already open) |
prefix | a string to be printed as prefix at the beginning of each line |
Definition at line 134 of file output.c.