YetAnotherCoupler 3.2.0_a
Loading...
Searching...
No Matches
Enumerations | Functions | Variables
event.h File Reference
#include "mtime_datetime.h"
#include "mtime_timedelta.h"
#include "mtime_eventHandling.h"
#include "couple_config.h"
Include dependency graph for event.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  yac_action_type {
  NONE = 0 , REDUCTION = 1 , COUPLING = 2 , RESTART = 3 ,
  GET_FOR_RESTART = 4 , PUT_FOR_RESTART = 5 , GET_FOR_CHECKPOINT = 6 , PUT_FOR_CHECKPOINT = 7 ,
  OUT_OF_BOUND = 8
}
 

Functions

struct eventyac_event_new ()
 
void yac_event_add (struct event *event, char const *model_time_step, char const *coupling_time_step, int lag, enum yac_reduction_type time_operation, const char *start_date, const char *stop_date)
 
void yac_event_delete (struct event *event)
 
enum yac_action_type yac_event_check (struct event *event)
 
void yac_event_update (struct event *event)
 
int yac_get_event_lag (struct event *event)
 
int yac_get_event_time_operation (struct event *event)
 
char * yac_get_event_coupling_timestep (struct event *event, char *timedelta_str)
 
char * yac_get_event_model_timestep (struct event *event, char *timedelta_str)
 
char * yac_get_event_current_datetime (struct event *event, char *datetime_str)
 
char const * yac_time_to_ISO (char const *time, enum yac_time_unit_type time_unit)
 

Variables

int yac_number_of_events
 

Enumeration Type Documentation

◆ yac_action_type

Enumerator
NONE 
REDUCTION 
COUPLING 
RESTART 
GET_FOR_RESTART 
PUT_FOR_RESTART 
GET_FOR_CHECKPOINT 
PUT_FOR_CHECKPOINT 
OUT_OF_BOUND 

Definition at line 17 of file event.h.

Function Documentation

◆ yac_event_add()

void yac_event_add ( struct event event,
char const *  model_time_step,
char const *  coupling_time_step,
int  lag,
enum yac_reduction_type  time_operation,
const char *  start_date,
const char *  stop_date 
)

Fill in the information for an event

Parameters
[in]eventevent
[in]model_time_stepmodel time step as ISO 8061 string
[in]coupling_time_stepcoupling period as ISO 8061 string
[in]lagtime lag (in model time steps)
[in]time_operationonline processing of coupling fields /average/minimum/maximum/accumulate/instant
[in]start_datestart date of the job
[in]stop_dateend date of the job

Definition at line 55 of file event.c.

Here is the caller graph for this function:

◆ yac_event_check()

enum yac_action_type yac_event_check ( struct event event)

Check for an event

Parameters
[in]eventevent

Definition at line 171 of file event.c.

Here is the caller graph for this function:

◆ yac_event_delete()

void yac_event_delete ( struct event event)

Delete an event

Parameters
[in]eventevent

Definition at line 258 of file event.c.

Here is the caller graph for this function:

◆ yac_event_new()

struct event * yac_event_new ( )

Event constructor

Returns
event event

Definition at line 36 of file event.c.

Here is the caller graph for this function:

◆ yac_event_update()

void yac_event_update ( struct event event)

Add delta time to an event

Parameters
[in]eventevent

Definition at line 159 of file event.c.

Here is the caller graph for this function:

◆ yac_get_event_coupling_timestep()

char * yac_get_event_coupling_timestep ( struct event event,
char *  timedelta_str 
)

Get the coupling time step for an event

Parameters
[in]eventevent
[in]timedelta_strstring memory

Definition at line 291 of file event.c.

◆ yac_get_event_current_datetime()

char * yac_get_event_current_datetime ( struct event event,
char *  datetime_str 
)

Get the current datetime for an event

Parameters
[in]eventevent
[in]datetime_strstring memory
Returns
pointer to datetime_str on success, NULL otherwise
Remarks
the buffer associated to datetime_str has to have at least a size of MAX_DATETIME_STR_LEN

Definition at line 314 of file event.c.

Here is the caller graph for this function:

◆ yac_get_event_lag()

int yac_get_event_lag ( struct event event)

Get the time lag of an event

Parameters
[in]eventevent

Definition at line 277 of file event.c.

◆ yac_get_event_model_timestep()

char * yac_get_event_model_timestep ( struct event event,
char *  timedelta_str 
)

Get the model time step for an event

Parameters
[in]eventevent
[in]timedelta_strstring memory

Definition at line 304 of file event.c.

◆ yac_get_event_time_operation()

int yac_get_event_time_operation ( struct event event)

Get the time operation of an event

Parameters
[in]eventevent

Definition at line 284 of file event.c.

Here is the caller graph for this function:

◆ yac_time_to_ISO()

char const * yac_time_to_ISO ( char const *  time,
enum yac_time_unit_type  time_unit 
)

Converts time string to ISO 8601 time string

Parameters
[in]timetime string
[in]time_unitunit of time string
Returns
ISO 8601 time string

Definition at line 329 of file event.c.

Variable Documentation

◆ yac_number_of_events

int yac_number_of_events
extern

Definition at line 16 of file event.c.