loggp.h 1.73 KB
Newer Older
1 2 3 4 5 6 7 8
/*
 * Copyright (C) 2014 University of Chicago.
 * See COPYRIGHT notice in top-level directory.
 *
 */

#ifndef LOGGP_H
#define LOGGP_H
9

Jonathan Jenkins's avatar
Jonathan Jenkins committed
10 11 12 13
#ifdef __cplusplus
extern "C" {
#endif

14 15
#include "../model-net-sched.h"

16 17 18 19 20 21 22 23 24 25 26 27 28 29
/* types of events that will constitute triton requests */
enum loggp_event_type 
{
    LG_MSG_READY = 1,  /* sender has transmitted msg to receiver */
    LG_MSG_START,      /* initiate a transmission */
};

typedef struct loggp_message loggp_message;

struct loggp_message
{
    int magic; /* magic number */
    enum loggp_event_type event_type;
    tw_lpid src_gid; /* who transmitted this msg? */
30
    tw_lpid src_mn_lp; // src modelnet id, provided by sender
31
    tw_lpid final_dest_gid; /* who is eventually targetted with this msg? */
32
    tw_lpid dest_mn_lp; // destination modelnet id, provided by sender
33 34 35 36
    uint64_t net_msg_size_bytes;     /* size of modeled network message */
    int event_size_bytes;     /* size of simulator event message that will be tunnelled to destination */
    int local_event_size_bytes;     /* size of simulator event message that delivered locally upon local completion */
    char category[CATEGORY_NAME_MAX]; /* category for communication */
37
    model_net_event_return event_rc;
38 39 40
    int is_pull;
    uint64_t pull_size;

41 42 43 44
    // scheduling parameters used in this message. Necessary for receiver-side
    // queueing
    mn_sched_params sched_params;

45 46 47 48 49 50 51
    /* for reverse computation */
    tw_stime net_send_next_idle_saved;
    tw_stime net_recv_next_idle_saved;
    tw_stime xmit_time_saved;
    tw_stime recv_time_saved;
};

Jonathan Jenkins's avatar
Jonathan Jenkins committed
52 53 54 55
#ifdef __cplusplus
}
#endif

56 57 58 59 60 61 62 63 64 65
#endif /* end of include guard: LOGGP_H */

/*
 * Local variables:
 *  c-indent-level: 4
 *  c-basic-offset: 4
 * End:
 *
 * vim: ft=c ts=8 sts=4 sw=4 expandtab
 */