mirror of https://github.com/PentHertz/srsLTE.git
Added some boieler plate code for the MME (contruct, singleton, destruct).
This commit is contained in:
parent
b0aaa316c4
commit
136e3a2697
|
@ -38,7 +38,7 @@ MME Design
|
|||
|
||||
The srsMME must maintain three EPC interfaces, the S1-MME, the S11 and the S6a interfaces. The S1-MME will use an SCTP (many-to-one) socket and the S11 will use the GTP-Cv2 protocol over UDP. The S6a will be implmented as a Diameter application over UDP.
|
||||
|
||||
The main loop of the MME will
|
||||
The main loop of the MME will
|
||||
|
||||
HSS Design
|
||||
**********
|
||||
|
|
|
@ -33,10 +33,17 @@
|
|||
#ifndef MME_H
|
||||
#define MME_H
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace srsepc{
|
||||
|
||||
class mme
|
||||
{
|
||||
public:
|
||||
mme* get_instance(void);
|
||||
|
||||
void cleanup(void);
|
||||
|
||||
private:
|
||||
|
||||
static mme *instance;
|
||||
|
|
|
@ -24,13 +24,38 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
#include <boost/thread/mutex.hpp>
|
||||
#include "mme/mme.h"
|
||||
|
||||
namespace srsepc{
|
||||
|
||||
mme* mme::instance = NULL;
|
||||
boost::mutex mme_instance_mutex;
|
||||
|
||||
|
||||
mme*
|
||||
mme::get_instance(void)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(mme_instance_mutex);
|
||||
if(NULL == instance) {
|
||||
instance = new mme();
|
||||
}
|
||||
return(instance);
|
||||
}
|
||||
|
||||
mme::mme()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
mme::cleanup(void)
|
||||
{
|
||||
boost::mutex::scoped_lock lock(mme_instance_mutex);
|
||||
if(NULL != instance) {
|
||||
delete instance;
|
||||
instance = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} //namespace srsepc
|
||||
|
|
Loading…
Reference in New Issue