Belle II Software  release-08-01-10
belle2nsm.h
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 /* ---------------------------------------------------------------------- *\
9  belle2nsm.h
10 
11  revision history can be found in belle2nsm.c
12 \* ---------------------------------------------------------------------- */
13 
14 #ifndef __belle2nsm_h__
15 #define __belle2nsm_h__
16 
17 #include "nsm2.h"
18 
19 #if defined(__cplusplus)
20 extern "C" {
21 #endif
22 #if defined(__dummy_close_bracket_to_cheat_emacs_auto_indent)
23 }
24 #endif
25 
26 void* b2nsm_getwrapptr();
27 int b2nsm_setwrapptr(void* ptr);
28 int b2nsm_addincpath(const char* path);
29 const char* b2nsm_nodename(int nodeid);
30 int b2nsm_nodeid(const char* nodename);
31 int b2nsm_nodepid(const char* nodename);
32 int b2nsm_nodeproc(const char* nodename);
33 const char* b2nsm_reqname(int reqid);
34 int b2nsm_reqid(const char* reqname);
35 int b2nsm_loghook(NSMmsg* msg, NSMcontext* nsmc);
36 void b2nsm_checkpoint(NSMcontext* nsmc, int val);
37 int b2nsm_debuglevel(int val);
38 FILE* b2nsm_logging(FILE* fp);
39 FILE* b2nsm_logging2(FILE* fp, const char* prefix);
40 NSMcontext* b2nsm_context(NSMcontext* context);
41 const char* b2nsm_strerror();
42 int b2nsm_callback(const char* name, NSMcallback_t callback);
43 int b2nsm_sendany(const char* node, const char* req, int npar, int32_t* pars,
44  int len, const char* datp, const char* caller);
45 int b2nsm_sendreq(const char* node, const char* req, int npar, int32_t* pars);
46 
47 int b2nsm_ok(NSMmsg* msg, const char* newstate, const char* fmt, ...);
48 int b2nsm_error(NSMmsg* msg, const char* fmt, ...);
49 int b2nsm_readmem(void* buf, const char* dat, const char* fmt, int rev);
50 int b2nsm_statmem(const char* dat, char* fmtbuf, int buflen);
51 void* b2nsm_openmem(const char* dat, const char* fmt, int rev);
52 void* b2nsm_allocmem(const char* dat, const char* fmt, int rev, float cycle);
53 int b2nsm_flushmem(const void* ptr, int siz);
54 int b2nsm_wait(float timeout);
55 NSMcontext* b2nsm_init2(const char* nodename, int usesig, const char* host,
56  int port, int shmkey);
57 NSMcontext* b2nsm_init(const char* nodename);
58 int b2nsm_term();
59 
60 void nsmlib_log(const char* fmt, ...);
61 #define b2nsm_printf nsmlib_log
62 
63 #if defined(__dummy_open_bracket_to_cheat_emacs_auto_indent)
64 __dummy_open_bracket_to_cheat_emacs_auto_indent {
65 #endif
66 #if defined(__cplusplus)
67 }
68 #endif
69 
70 #endif /* __belle2nsm_h__ */
Definition: nsm2.h:224