ngc 1.5.0
 
Loading...
Searching...
No Matches
ngcbSERVICE.hpp
Go to the documentation of this file.
1
8#ifndef ngcbSERVICE_H
9#define ngcbSERVICE_H
10
11
12#ifndef __cplusplus
13#error This is a C++ include file and cannot be used from plain C
14#endif
15
16/*
17 * System Headers
18 */
19#include <stdlib.h>
20#include <stdio.h>
21
22/*
23 * Verbose and logging types
24 */
25#define ngcbVB_PRINT 1
26#define ngcbVB_LOG 2
27
28#ifndef USE
29#define USE(x) do {(void)(x);} while (0)
30#endif
31
36{
37public:
40
42 virtual ~ngcbSERVICE() {}
43
45 virtual void Logger(int flag, const char *msg) {
46 if (flag == ngcbVB_PRINT) {fprintf(stdout, "%s", msg); fflush(stdout);}
47 }
48
50 virtual void DeviceEvent(void *origin, void *event) {
51 USE(origin); USE(event);
52 }
53
55 virtual void DevError(const char *erms, int id, void *descriptor) {
56 USE(erms); USE(id); USE(descriptor);
57 }
58
60 virtual int ParamLookup(const char *name, char *value, int flag = 0) {
61 USE(name); USE(value); USE(flag);
62 return (0);
63 }
64
65protected:
66
67private:
68
69};
70
71#endif
virtual void Logger(int flag, const char *msg)
Logger.
Definition ngcbSERVICE.hpp:45
virtual void DevError(const char *erms, int id, void *descriptor)
Interface device error state handler.
Definition ngcbSERVICE.hpp:55
virtual int ParamLookup(const char *name, char *value, int flag=0)
Generic parameter lookup.
Definition ngcbSERVICE.hpp:60
virtual ~ngcbSERVICE()
Destructor.
Definition ngcbSERVICE.hpp:42
ngcbSERVICE()
Constructor.
Definition ngcbSERVICE.hpp:39
virtual void DeviceEvent(void *origin, void *event)
Device event handler.
Definition ngcbSERVICE.hpp:50
#define USE(x)
Definition ngcbSERVICE.hpp:29
#define ngcbVB_PRINT
Definition ngcbSERVICE.hpp:25