3 /* amok_base - things needed in amok, but too small to constitute a module */
5 /* Authors: Martin Quinson */
6 /* Copyright (C) 2003, 2004 the OURAGAN project. */
8 /* This program is free software; you can redistribute it and/or modify it
9 under the terms of the license (GNU LGPL) which comes with this package. */
14 #include "gras/messages.h"
16 /* ****************************************************************************
17 * The common types used as payload in the messages and their definitions
18 * ****************************************************************************/
23 * how to indicate an eventual error
29 } s_amok_remoterr_t,*amok_remoterr_t;
31 amok_remoterr_t amok_remoterr_new(xbt_error_t errcode,
32 const char* format, ...);
33 amok_remoterr_t amok_remoterr_new_va(xbt_error_t param_errcode,
34 const char* format,va_list ap);
35 void amok_remoterr_free(amok_remoterr_t *err);
41 * how to report the result of an experiment
45 unsigned int timestamp;
52 * Repports an error to the process listening on socket sock.
54 * The information will be embeeded in a message of type id, which must take a msgError_t as first
55 * sequence (and SeqCount sequences in total). Other sequences beside the error one will be of
58 * The message will be builded as sprintf would, using the given format and extra args.
60 * If the message cannot be builded and sent to recipient, the string severeError will be printed
61 * on localhost's stderr.
64 amok_repport_error (gras_socket_t sock, gras_msgtype_t msgtype,
65 xbt_error_t errcode, const char* format,...);
68 void amok_base_init(void);
69 void amok_base_exit(void);
72 #endif /* AMOK_BASE_H */