X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fmessaging%2Fmessage.hpp;h=df71d887c89b0ad9b19d1041dbd473bb4ff350e0;hb=368cf5e2adaaf24b82d4ac28638f06a1aa2ccfae;hp=ce654d59aaaa0c2c25a3062ef1f47680d2fca4fb;hpb=4e4fb5021cc9aa67390f6641a060b85c077a1880;p=ric-plt%2Fxapp-frame-cpp.git diff --git a/src/messaging/message.hpp b/src/messaging/message.hpp index ce654d5..df71d88 100644 --- a/src/messaging/message.hpp +++ b/src/messaging/message.hpp @@ -49,6 +49,8 @@ #endif +namespace xapp { + // ------------------------------------------------------------------------ class Message { @@ -59,6 +61,7 @@ class Message { public: static const int NO_CHANGE = -99; // indicates no change to a send/reply parameter + static const int NO_WHID = -1; // no wormhole id applies static const int INVALID_MTYPE = -1; static const int INVALID_STATUS = -1; static const int INVALID_SUBID = -2; @@ -66,9 +69,14 @@ class Message { static const int RESPONSE = 0; // send types static const int MESSAGE = 1; + static const int WORMHOLE_MSG = 2; Message( rmr_mbuf_t* mbuf, void* mrc ); // builders Message( void* mrc, int payload_len ); + Message( const Message& soi ); // copy cat + Message& operator=( const Message& soi ); // copy operator + Message( Message&& soi ); // mover + Message& operator=( Message&& soi ); // move operator ~Message(); // destroyer std::unique_ptr Copy_payload( ); // copy the payload; deletable smart pointer @@ -89,7 +97,7 @@ class Message { bool Reply( ); bool Send( ); - bool Send( int mtype, int subid, int payload_len, unsigned char* payload, int stype ); + bool Send( int mtype, int subid, int payload_len, unsigned char* payload, int stype, int whid ); bool Send_msg( int mtype, int subid, int payload_len, std::shared_ptr payload ); bool Send_msg( int mtype, int subid, int payload_len, unsigned char* payload ); @@ -100,7 +108,10 @@ class Message { bool Send_response( int mtype, int subid, int payload_len, unsigned char* response ); bool Send_response( int payload_len, std::shared_ptr response ); bool Send_response( int payload_len, unsigned char* response ); + + bool Wormhole_send( int whid, int mtype, int subid, int payload_len, std::shared_ptr payload ); }; +} // namespace #endif