3D-ICE 3.0.0
Data Structures | Typedefs | Functions
output.h File Reference
#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.

Data Structures

struct  Output_t
 Informations about the type of thermal simulation to be run and its initial settings. More...
 

Typedefs

typedef struct Output_t Output_t
 

Functions

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)
 

Typedef Documentation

◆ Output_t

typedef struct Output_t Output_t

Definition of the type Output_t

Definition at line 89 of file output.h.

Function Documentation

◆ add_inspection_point()

void add_inspection_point ( Output_t output,
InspectionPoint_t ipoint 
)

Inserts an inspection point into the corresponding queue

Parameters
outputpointer to the output structure
ipointpointer to the inspection point to add

Definition at line 161 of file output.c.

◆ fill_output_message()

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 
)

Fills a network message with thermal outputs for a specific set of inspection points

Parameters
outputpointer to the output structure
dimensionsthe address of the dimension structure
temperaturespointer to the first element of the temparature array
sourcespointer to the first element of the source array
output_instantthe instant of the output (slot, step, final)
output_typethe type of the ispection point to generate
output_quantitythe quantity to report (max, min, avg)
messagethe 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()

Error_t generate_output ( Output_t output,
Dimensions_t dimensions,
Temperature_t temperatures,
Source_t sources,
Time_t  current_time,
OutputInstant_t  output_instant 
)

Generates thermal outputs for each inspection point

Parameters
outputpointer to the output structure
dimensionsthe address of the dimension structure
temperaturespointer to the first element of the temparature array
sourcespointer to the first element of the source array
current_timethe time instant at which the output is printed
output_instantthe 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()

Error_t generate_output_headers ( Output_t output,
Dimensions_t dimensions,
String_t  prefix 
)

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
outputpointer to the output structure
dimensionsthe address of the dimension structure
prefixstring 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()

Quantity_t get_number_of_inspection_points ( Output_t output,
OutputInstant_t  instant,
OutputType_t  type,
OutputQuantity_t  quantity 
)

Returns the number of a specific type of insection point

Parameters
outputthe address of the output structure to query
instantthe instant of the output (slot, step, final)
typethe type of the inspection point (tcell, tmap, ...)
quantitythe 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()

void output_copy ( Output_t dst,
Output_t src 
)

Copies the structure src into dst , as an assignement

The function destroys the content of dst and then makes the copy

Parameters
dstthe address of the left term sructure (destination)
srcthe 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
outputthe address of the structure to destroy

Definition at line 74 of file output.c.

◆ output_init()

void output_init ( Output_t output)

Inits the fields of the output structure with default values

Parameters
outputthe address of the structure to initalize

Definition at line 46 of file output.c.

◆ output_print()

void output_print ( Output_t output,
FILE *  stream,
String_t  prefix 
)

Prints the output declaration as it looks in the stack file

Parameters
outputthe address of the structure to print
streamthe output stream (must be already open)
prefixa string to be printed as prefix at the beginning of each line

Definition at line 134 of file output.c.