My Project
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
msu_calls.h
Go to the documentation of this file.
1 /*
2 START OF LICENSE STUB
3  DeDOS: Declarative Dispersion-Oriented Software
4  Copyright (C) 2017 University of Pennsylvania, Georgetown University
5 
6  This program is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  This program is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 END OF LICENSE STUB
19 */
26 #ifndef MSU_CALLS_H_
27 #define MSU_CALLS_H_
28 
29 #include "local_msu.h"
30 #include "msu_message.h"
31 #include "routing.h"
32 #include "logging.h"
33 
47 int init_call_local_msu(struct local_msu *sender, struct local_msu *dest,
48  struct msu_msg_key *key, size_t data_size, void *data);
49 
60 int call_local_msu(struct local_msu *sender, struct local_msu *dest,
61  struct msu_msg_hdr *hdr, size_t data_size, void *data);
62 
75 int init_call_msu_type(struct local_msu *sender, struct msu_type *dst_type,
76  struct msu_msg_key *key, size_t data_size, void *data);
77 
89 int call_msu_type(struct local_msu *sender, struct msu_type *dst_type,
90  struct msu_msg_hdr *hdr, size_t data_size, void *data);
91 
92 
106 int init_call_msu_endpoint(struct local_msu *sender, struct msu_endpoint *endpoint,
107  struct msu_type *endpoint_type,
108  struct msu_msg_key *key, size_t data_size, void *data);
109 
121 int call_msu_endpoint(struct local_msu *sender, struct msu_endpoint *endpoint,
122  struct msu_type *endpoint_type,
123  struct msu_msg_hdr *hdr, size_t data_size, void *data);
124 
136 int schedule_local_msu_call(struct local_msu *sender, struct local_msu *dest, struct timespec *interval,
137  struct msu_msg_hdr *hdr, size_t data_size, void *data);
138 
139 
153 int schedule_local_msu_init_call(struct local_msu *sender, struct local_msu *dest, struct timespec *interval,
154  struct msu_msg_key *key, size_t data_size, void *data);
155 
156 
157 int call_msu_error(struct local_msu *sender, struct msu_endpoint *endpoint,
158  struct msu_type *endpoint_type,
159  struct msu_msg_hdr *hdr, size_t data_size, void *data);
160 #endif
int call_local_msu(struct local_msu *sender, struct local_msu *dest, struct msu_msg_hdr *hdr, size_t data_size, void *data)
Enqueues a message in the queue of a local MSU.
Definition: msu_calls.c:77
int init_call_msu_type(struct local_msu *sender, struct msu_type *dst_type, struct msu_msg_key *key, size_t data_size, void *data)
Sends an MSU message to a destination of the specified type.
Definition: msu_calls.c:205
int call_msu_error(struct local_msu *sender, struct msu_endpoint *endpoint, struct msu_type *endpoint_type, struct msu_msg_hdr *hdr, size_t data_size, void *data)
Definition: msu_calls.c:271
Header for messages passed to MSUs.
Definition: msu_message.h:85
Logging of status messages to the terminal.
int schedule_local_msu_init_call(struct local_msu *sender, struct local_msu *dest, struct timespec *interval, struct msu_msg_key *key, size_t data_size, void *data)
Schedules a call to a local MSU to occur at some point in the future.
Definition: msu_calls.c:121
Declares the structures and functions applicable to MSUs on the local machine.
The structure that represents an MSU located on the local machine.
Definition: local_msu.h:38
int schedule_local_msu_call(struct local_msu *sender, struct local_msu *dest, struct timespec *interval, struct msu_msg_hdr *hdr, size_t data_size, void *data)
Schedules a call to a local MSU to occur at some point in the future.
Definition: msu_calls.c:97
Functions for routing MSU messages between MSUs.
int init_call_local_msu(struct local_msu *sender, struct local_msu *dest, struct msu_msg_key *key, size_t data_size, void *data)
Enqueues a new message in the queue of a local MSU.
Definition: msu_calls.c:134
Defines a type of MSU.
Definition: msu_type.h:46
int init_call_msu_endpoint(struct local_msu *sender, struct msu_endpoint *endpoint, struct msu_type *endpoint_type, struct msu_msg_key *key, size_t data_size, void *data)
Sends an MSU message to a specific destination, either local or remote.
Definition: msu_calls.c:258
int call_msu_type(struct local_msu *sender, struct msu_type *dst_type, struct msu_msg_hdr *hdr, size_t data_size, void *data)
Sends an MSU message to a destination of the given type, utilizing the sending MSU's routing function...
Definition: msu_calls.c:146
Messages passed to MSUs.
int call_msu_endpoint(struct local_msu *sender, struct msu_endpoint *endpoint, struct msu_type *endpoint_type, struct msu_msg_hdr *hdr, size_t data_size, void *data)
Sends an MSU message to a speicific destination, either local or remote.
Definition: msu_calls.c:217
Used to uniquely identify the source of a message, used in state storage as well as routing...
Definition: msu_message.h:46
An endpoint to which an msu_msg can be delivered.
Definition: routing.h:32
struct msu_msg_key key
Routing/state key.
Definition: msu_message.h:87