Belle II Software development
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/nsm2.h"
18
19#if defined(__cplusplus)
20extern "C" {
21#endif
22
23void* b2nsm_getwrapptr();
24int b2nsm_setwrapptr(void* ptr);
25int b2nsm_addincpath(const char* path);
26const char* b2nsm_nodename(int nodeid);
27int b2nsm_nodeid(const char* nodename);
28int b2nsm_nodepid(const char* nodename);
29int b2nsm_nodeproc(const char* nodename);
30const char* b2nsm_reqname(int reqid);
31int b2nsm_reqid(const char* reqname);
32int b2nsm_loghook(NSMmsg* msg, NSMcontext* nsmc);
33void b2nsm_checkpoint(NSMcontext* nsmc, int val);
34int b2nsm_debuglevel(int val);
35FILE* b2nsm_logging(FILE* fp);
36FILE* b2nsm_logging2(FILE* fp, const char* prefix);
37NSMcontext* b2nsm_context(NSMcontext* context);
38const char* b2nsm_strerror();
39int b2nsm_callback(const char* name, NSMcallback_t callback);
40int b2nsm_sendany(const char* node, const char* req, int npar, int32_t* pars,
41 int len, const char* datp, const char* caller);
42int b2nsm_sendreq(const char* node, const char* req, int npar, int32_t* pars);
43
44int b2nsm_ok(NSMmsg* msg, const char* newstate, const char* fmt, ...);
45int b2nsm_error(NSMmsg* msg, const char* fmt, ...);
46int b2nsm_readmem(void* buf, const char* dat, const char* fmt, int rev);
47int b2nsm_statmem(const char* dat, char* fmtbuf, int buflen);
48void* b2nsm_openmem(const char* dat, const char* fmt, int rev);
49void* b2nsm_allocmem(const char* dat, const char* fmt, int rev, float cycle);
50int b2nsm_flushmem(const void* ptr, int siz);
51int b2nsm_wait(float timeout);
52NSMcontext* b2nsm_init2(const char* nodename, int usesig, const char* host,
53 int port, int shmkey);
54NSMcontext* b2nsm_init(const char* nodename);
55int b2nsm_term();
56
57void nsmlib_log(const char* fmt, ...);
58#define b2nsm_printf nsmlib_log
59
60#if defined(__cplusplus)
61}
62#endif
63
64#endif /* __belle2nsm_h__ */
Definition: nsm2.h:224