Code Review
/
ric-plt
/
xapp-frame-cpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Add API allowing xAPPs to send alarm messages
[ric-plt/xapp-frame-cpp.git]
/
src
/
messaging
/
messenger.hpp
diff --git
a/src/messaging/messenger.hpp
b/src/messaging/messenger.hpp
index
b6e46b6
..
173426c
100644
(file)
--- a/
src/messaging/messenger.hpp
+++ b/
src/messaging/messenger.hpp
@@
-40,12
+40,16
@@
#include <rmr/rmr.h>
#include "message.hpp"
#include <rmr/rmr.h>
#include "message.hpp"
+#include "alarm.hpp"
#ifndef RMR_FALSE
#define RMR_FALSE 0
#define RMR_TRUE 1
#endif
#ifndef RMR_FALSE
#define RMR_FALSE 0
#define RMR_TRUE 1
#endif
+namespace xapp {
+
+
class Messenger {
private:
class Messenger {
private:
@@
-57,7
+61,7
@@
class Messenger {
char* listen_port; // port we ask msg router to listen on
// copy and assignment are PRIVATE so that they fail if xapp tries; messenger cannot be copied!
char* listen_port; // port we ask msg router to listen on
// copy and assignment are PRIVATE so that they fail if xapp tries; messenger cannot be copied!
- Messenger( const Messenger& soi );
+ Messenger( const Messenger& soi );
Messenger& operator=( const Messenger& soi );
public:
Messenger& operator=( const Messenger& soi );
public:
@@
-71,12
+75,21
@@
class Messenger {
~Messenger(); // destroyer
void Add_msg_cb( int mtype, user_callback fun_name, void* data );
~Messenger(); // destroyer
void Add_msg_cb( int mtype, user_callback fun_name, void* data );
+
std::unique_ptr<Message> Alloc_msg( int payload_size ); // message allocation
std::unique_ptr<Message> Alloc_msg( int payload_size ); // message allocation
+
+ std::unique_ptr<xapp::Alarm> Alloc_alarm( ); // alarm allocation
+ std::unique_ptr<xapp::Alarm> Alloc_alarm( std::string meid );
+ std::unique_ptr<xapp::Alarm> Alloc_alarm( int prob_id, std::string meid );
+
void Listen( ); // lisen driver
std::unique_ptr<Message> Receive( int timeout ); // receive 1 message
void Stop( ); // force to stop
void Listen( ); // lisen driver
std::unique_ptr<Message> Receive( int timeout ); // receive 1 message
void Stop( ); // force to stop
- //void Release_mbuf( void* vmbuf );
bool Wait_for_cts( int max_wait );
bool Wait_for_cts( int max_wait );
+
+ int Wormhole_open( std::string endpoint );
};
};
+
+} // namespace
#endif
#endif