This is Unofficial EPICS BASE Doxygen Site
requester.cpp
Go to the documentation of this file.
1 /* requester.cpp */
2 /*
3  * Copyright information and license terms for this software can be
4  * found in the file LICENSE that is included with the distribution
5  */
9 #include <string>
10 #include <cstdio>
11 #include <iostream>
12 
13 #include <epicsMutex.h>
14 
15 #include <pv/lock.h>
16 
17 #define epicsExportSharedSymbols
18 #include <pv/requester.h>
19 
20 using std::string;
21 
22 namespace epics { namespace pvAccess {
23 
24 
25 string getMessageTypeName(MessageType messageType)
26 {
27  switch(messageType) {
28  case infoMessage: return "info";
29  case warningMessage: return "warning";
30  case errorMessage: return "error";
31  case fatalErrorMessage: return "fatalError";
32  default: return "unknown";
33  }
34 }
35 
36 void Requester::message(std::string const & message,MessageType messageType)
37 {
38  std::cerr << "[" << getRequesterName() << "] " << getMessageTypeName(messageType) << " : " << message << "\n";
39 }
40 
41 }}
epicsShareExtern std::string getMessageTypeName(MessageType messageType)
Definition: requester.cpp:25
TODO only here because of the Lockable.
Definition: ntaggregate.cpp:16
APIs for the epicsMutex mutual exclusion semaphore.
virtual void message(std::string const &message, MessageType messageType=errorMessage)
Definition: requester.cpp:36
virtual std::string getRequesterName()=0