Skip to content

Commit 154d664

Browse files
author
Seppo Takalo
committed
Get rid of MeshInterfaceFactory.
1 parent 53cc28f commit 154d664

File tree

5 files changed

+4
-107
lines changed

5 files changed

+4
-107
lines changed

features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/mbed-mesh-api/Mesh6LoWPAN_ND.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Mesh6LoWPAN_ND : public AbstractMesh
2727
{
2828

2929
public:
30-
30+
Mesh6LoWPAN_ND();
3131
virtual ~Mesh6LoWPAN_ND();
3232

3333
/**
@@ -51,11 +51,6 @@ class Mesh6LoWPAN_ND : public AbstractMesh
5151
friend class MeshInterfaceFactory;
5252

5353
private:
54-
/*
55-
* \brief private constructor for the 6LoWPAN_ND
56-
*/
57-
Mesh6LoWPAN_ND();
58-
5954
/*
6055
* avoid copy/assign object
6156
*/

features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/mbed-mesh-api/MeshInterfaceFactory.h

Lines changed: 0 additions & 50 deletions
This file was deleted.

features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/mbed-mesh-api/MeshThread.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class MeshThread : public AbstractMesh
2929
public:
3030

3131
virtual ~MeshThread();
32+
MeshThread();
3233

3334
/*
3435
* \brief Initialization of the interface.
@@ -64,11 +65,6 @@ class MeshThread : public AbstractMesh
6465
friend class MeshInterfaceFactory;
6566

6667
private:
67-
/*
68-
* \brief private constructor for the MeshThread
69-
*/
70-
MeshThread();
71-
7268
/*
7369
* avoid copy/assign object
7470
*/

features/nanostack/FEATURE_NANOSTACK/mbed-mesh-api/source/MeshInterfaceFactory.cpp

Lines changed: 0 additions & 42 deletions
This file was deleted.

features/nanostack/FEATURE_NANOSTACK/nanostack-interface/NanostackInterface.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
#include "eventOS_scheduler.h"
2424
#include "randLIB.h"
2525

26-
#include "mbed-mesh-api/MeshInterfaceFactory.h"
27-
2826
#include "mesh_system.h" // from inside mbed-mesh-api
2927
#include "socket_api.h"
3028
#include "net_interface.h"
@@ -559,7 +557,7 @@ nsapi_error_t ThreadInterface::connect()
559557
mesh_system_init();
560558
nanostack_lock();
561559

562-
mesh_api = MeshInterfaceFactory::createInterface(MESH_TYPE_THREAD);
560+
mesh_api = new MeshThread;
563561
if (!mesh_api) {
564562
nanostack_unlock();
565563
return NSAPI_ERROR_NO_MEMORY;
@@ -590,7 +588,7 @@ nsapi_error_t LoWPANNDInterface::connect()
590588
mesh_system_init();
591589
nanostack_lock();
592590

593-
mesh_api = MeshInterfaceFactory::createInterface(MESH_TYPE_6LOWPAN_ND);
591+
mesh_api = new Mesh6LoWPAN_ND;
594592
if (!mesh_api) {
595593
nanostack_unlock();
596594
return NSAPI_ERROR_NO_MEMORY;

0 commit comments

Comments
 (0)