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