14 #ifndef __belle2nsm_h__
15 #define __belle2nsm_h__
19 #if defined(__cplusplus)
22 #if defined(__dummy_close_bracket_to_cheat_emacs_auto_indent)
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);
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);
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);
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);
60 void nsmlib_log(
const char* fmt, ...);
61 #define b2nsm_printf nsmlib_log
63 #if defined(__dummy_open_bracket_to_cheat_emacs_auto_indent)
64 __dummy_open_bracket_to_cheat_emacs_auto_indent {
66 #if defined(__cplusplus)