3 /* amok_base - things needed in amok, but too small to constitute a module */
5 /* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved. */
7 /* This program is free software; you can redistribute it and/or modify it
8 * under the terms of the license (GNU LGPL) which comes with this package. */
13 #include "gras/messages.h"
15 /* ****************************************************************************
16 * The common types used as payload in the messages and their definitions
17 * ****************************************************************************/
22 * how to indicate an eventual error
28 } s_amok_remoterr_t,*amok_remoterr_t;
30 amok_remoterr_t amok_remoterr_new(xbt_error_t errcode,
31 const char* format, ...);
32 amok_remoterr_t amok_remoterr_new_va(xbt_error_t param_errcode,
33 const char* format,va_list ap);
34 void amok_remoterr_free(amok_remoterr_t *err);
40 * how to report the result of an experiment
44 unsigned int timestamp;
51 * Repports an error to the process listening on socket sock.
53 * The information will be embeeded in a message of type id, which must take a msgError_t as first
54 * sequence (and SeqCount sequences in total). Other sequences beside the error one will be of
57 * The message will be builded as sprintf would, using the given format and extra args.
59 * If the message cannot be builded and sent to recipient, the string severeError will be printed
60 * on localhost's stderr.
63 amok_repport_error (gras_socket_t sock, gras_msgtype_t msgtype,
64 xbt_error_t errcode, const char* format,...);
67 void amok_base_init(void);
68 void amok_base_exit(void);
71 #endif /* AMOK_BASE_H */