3D-ICE 3.0.0
Data Structures | Typedefs | Functions
analysis.h File Reference
#include <stdio.h>
#include "types.h"
#include "string_t.h"

Go to the source code of this file.

Data Structures

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

Typedefs

typedef struct Analysis_t Analysis_t
 

Functions

void analysis_init (Analysis_t *analysis)
 
void analysis_copy (Analysis_t *dst, Analysis_t *src)
 
void analysis_destroy (Analysis_t *analysis)
 
Analysis_tanalysis_calloc (void)
 
Analysis_tanalysis_clone (Analysis_t *analysis)
 
void analysis_free (Analysis_t *analysis)
 
void analysis_print (Analysis_t *analysis, FILE *stream, String_t prefix)
 
Time_t get_simulated_time (Analysis_t *analysis)
 
void increase_by_step_time (Analysis_t *analysis)
 
bool slot_completed (Analysis_t *analysis)
 

Typedef Documentation

◆ Analysis_t

typedef struct Analysis_t Analysis_t

Definition of the type Analysis_t

Definition at line 93 of file analysis.h.

Function Documentation

◆ analysis_calloc()

Analysis_t * analysis_calloc ( void  )

Allocates memory for a structure of type Analysis_t

The content of the new structure is set to default values calling analysis_init

Returns
the pointer to the new structure
NULL if the memory allocation fails

Definition at line 80 of file analysis.c.

◆ analysis_clone()

Analysis_t * analysis_clone ( Analysis_t analysis)

Allocates memory for a new copy of the structure analysis

Parameters
analysisthe address of the structure to clone
Returns
a pointer to a new structure
NULL if the memory allocation fails
NULL if the parameter analysis is NULL

Definition at line 93 of file analysis.c.

◆ analysis_copy()

void analysis_copy ( Analysis_t dst,
Analysis_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 57 of file analysis.c.

◆ analysis_destroy()

void analysis_destroy ( Analysis_t analysis)

Destroys the content of the fields of the structure analysis

The function releases any dynamic memory used by the structure and resets its state calling analysis_init .

Parameters
analysisthe address of the structure to destroy

Definition at line 71 of file analysis.c.

◆ analysis_free()

void analysis_free ( Analysis_t analysis)

Frees the memory space pointed by analysis

The function destroys the structure analysis and then frees its memory. The pointer analysis must have been returned by a previous call to analysis_calloc or analysis_clone .

If analysis is NULL, no operation is performed.

Parameters
analysisthe pointer to free

◆ analysis_init()

void analysis_init ( Analysis_t analysis)

Inits the fields of the analysis structure with default values

Parameters
analysisthe address of the structure to initalize

Definition at line 45 of file analysis.c.

◆ analysis_print()

void analysis_print ( Analysis_t analysis,
FILE *  stream,
String_t  prefix 
)

Prints the analysis declaration as it looks in the stack file

Parameters
analysisthe 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 123 of file analysis.c.

◆ get_simulated_time()

Time_t get_simulated_time ( Analysis_t analysis)

Returns the time, in seconds, sum of the time steps emulated so far

Parameters
analysisthe address of the analysis structure
Returns
the simulated amount of time in seconds

Definition at line 144 of file analysis.c.

◆ increase_by_step_time()

void increase_by_step_time ( Analysis_t analysis)

Increase the simulation time by a step

Parameters
analysisthe address of the analysis structure

Definition at line 152 of file analysis.c.

◆ slot_completed()

bool slot_completed ( Analysis_t analysis)

Returns the state of the slot simulation

Parameters
analysisthe address of the analysis structure
Returns
TRUE if the number of simulation steps done so far matches a multiple of the slot length, i.e. it is time to update the source vector with new power values
FALSE otherwise

Definition at line 159 of file analysis.c.