This is Webservice SDK for mbed. LPCXpresso1769/LPC1768/FRDM-K64F/LPC4088

Dependents:   MbedFileServer_1768MiniDK2 RedWireBridge IssueDebug_gcc MiMicRemoteMCU-for-Mbed ... more

libMiMic(MiMic library for mbed)は、WebService機能を提供するSDKです。 mbedでWebAPIに対応したネットワークデバイスを簡単に作ることが出来ます。

libMiMicはMiMic projectで開発しています。MiMic projectについてはこちらをご覧ください。 http://nyatla.jp/mimic/wp/

構成

libMiMicはmbedRTOS上で動作し、ユーザアプリケーションにAPIを提供します。コアAPIはC言語で記述されていますが、使用頻度の高いものについてはmbed向けのC++APIが準備されています。

/media/uploads/nyatla/libmimic-sdk.png

※libMiMicはmbedの標準イーサネットドライバをしようしていません。

標準イーサネットドライバと同時に使用することはできません。

  • MiMicIP - IPv4スタックです。レテンシとメモリ消費量を抑えたuipベースのライブラリです。
  • ARP/ICMP/UDP/TCP - 基礎的なソケットAPIを提供します。APIは独自です。
  • HTTP/1.1 Server - HTTP/1.1に対応したサーバです。マルチセッション・Chunked・持続性接続に対応しています。
  • HTTP Modules - HTTP/1.1の機能モジュールです。以下のモジュールがあります。
    • ROM file provider - ROMに格納したファイルイメージを公開します。
    • File system provider - mbedファイルシステムを公開します。
    • Onchip configuration - プログラムフラッシュを利用して設定を保存します。
    • MiMicVM processor - RPCリクエスト(MiMicVM)を処理します。
    • FileUpload - ファイルアップロードを受け取ります。
    • URL decoder - HTTPリクエストを解析します。
    • UPnP handler -UPnPメッセージを処理します。
    • WebSocket - Websocketサーバです。
  • mDNS - マルチキャストDNSサービスです。
  • UPnP - UPnP/1.0の機能を提供します。UPnP handlerと協調して動作します。(現在はデバイス探索(SSDP)・デスクリプション(Description)のみ実装してあります。)
  • DHCP/APIPA - ゼロコンフィギュレーション用のモジュールです。
  • HTTP/1.1 Client
  • mbed C++ class library - mbed向けのC++CPIです。C言語のものより簡単です。

対応機種

  • mbed(mbed LPC1768)
  • LPCXpresso1769

プログラム

Import programMiMicRemoteMCU-for-Mbed

MiMic RemoteMCU for mbed. This program provides MCU control API over REST API. It can control MCU from Javascript,PHP or any HTTP rest client directly. And, The application has self development environment.

Import programMbedFileServer

The program publishes files at local directory and SD filesystem. It is a full-fledged webServer somewhat.

サンプル

Import programMiMicSimpleHttpd

This is a simplest HTTP server made ​​of libMiMic. It will echo back a request path.

Import programUPnPBasicDevice

Simplest UPnP basic device example. This program to run UPnP basic device on the mbed.

Import programWebSocketSample

MiMicSDK Websocket module sample program.

Import programHttpClientSamlpe

A http client sample program.

Import programTcpSocketClientSamlpe

MiMicSDK Tcp client socket sample program.

Import programUdpSocketSamlpe

Udp socket sample program. This program will send back the received packet.

チュートリアル

English

libMiMic(MiMic library for mbed) is SDK which provides Webservice functions. It can be created networking device easily using mbed.

See more MiMic information, See MiMic project website. http://nyatla.jp/mimic/wp/

Structure

libMiMic run on mbed RTOS and provides networking API to user application. This library has C++ class API for the mbed, and low-level C language API.

/media/uploads/nyatla/libmimic-sdk.png

For WebService general, it can be written in a simple C + + API.

libMiMic does not have the standard Ethernet driver of mbed. It is not possible that will be used with the standard Ethernet driver.

  • MiMicIP - IPv4 protocol stack. This is based uip which is reduced memory and latency.
  • ARP / ICMP / UDP / TCP - Those are provide basic IP protocols.
  • HTTP/1.1 Server - The Http server compatible HTTP/1.1. It supports multi-session, chunked transport, persistent connection.
  • HTTP Modules - There are addon-module for HTTP server. The following modules.
    • ROM file module - Publish the file images in ROM.
    • File system module - Publish thefiles in mbed file system.
    • Onchip configuration module - To save the network settings to the program flash via REST.
    • MiMicVM module - To handle the (MiMicVM) RPC request.
    • FileUpload module - Accept a file via HTTP POST.
    • URL dedoce module - A versatility URL decoder.
    • UPnP handle module - To handle UPnP messages.
    • UPnP - This provides UPnP/1.0 device functions. It works together with UPnP handler.
    • Websocket - websocket (version13) server
  • mDNS Service - DNS-SD protocol server.
  • UPnP - This provides UPnP/1.0 device functions which works with UPnP handler. (You have been implemented (SSDP) ? description only (Description) device search now.) It is a module zero configuration for - DHCP / APIPA. mbed C + + class library - C of mbed for + + is the CPI. It is simple than that of the C language.
  • DHCP/APIPA - It support zero-cpnfigulation.
  • mbed C++ class library. Almost APIs for Web applications are available.
  • HTTP/1.1 Client

Supported target

  • mbed(mbed LPC1768)
  • LPCXpresso1769

Application

Import programMiMicRemoteMCU-for-Mbed

MiMic RemoteMCU for mbed. This program provides MCU control API over REST API. It can control MCU from Javascript,PHP or any HTTP rest client directly. And, The application has self development environment.

Import programMbedFileServer

The program publishes files at local directory and SD filesystem. It is a full-fledged webServer somewhat.

Sample

Import programMiMicSimpleHttpd

This is a simplest HTTP server made ​​of libMiMic. It will echo back a request path.

Import programUPnPBasicDevice

Simplest UPnP basic device example. This program to run UPnP basic device on the mbed.

Import programWebSocketSample

MiMicSDK Websocket module sample program.

Import programHttpClientSamlpe

A http client sample program.

Import programTcpSocketClientSamlpe

MiMicSDK Tcp client socket sample program.

Import programUdpSocketSamlpe

Udp socket sample program. This program will send back the received packet.

Tutorial

Files at this revision

API Documentation at this revision

Comitter:
nyatla
Date:
Thu Apr 04 08:22:57 2013 +0000
Parent:
2:b96c1e90d120
Child:
4:909dc70956e7
Commit message:
add modules;

Changed in this revision

core/net/NyLPC_cNet.h Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpd.h Show annotated file Show diff for this revision Revisions of this file
core/net/httpd/NyLPC_cHttpdThread.cpp Show annotated file Show diff for this revision Revisions of this file
core/os/NyLPC_cThread.h Show annotated file Show diff for this revision Revisions of this file
core/os/mbedrtos/NyLPC_cThread.cpp Show annotated file Show diff for this revision Revisions of this file
core/uip/NyLPC_cIPv4Payload.cpp Show annotated file Show diff for this revision Revisions of this file
cpp/Httpd.cpp Show annotated file Show diff for this revision Revisions of this file
cpp/Httpd.h Show annotated file Show diff for this revision Revisions of this file
cpp/HttpdConnection.h Show annotated file Show diff for this revision Revisions of this file
cpp/ModMiMicSetting.cpp Show annotated file Show diff for this revision Revisions of this file
cpp/ModMiMicSetting.h Show annotated file Show diff for this revision Revisions of this file
cpp/ModRemoteMcu.cpp Show annotated file Show diff for this revision Revisions of this file
cpp/ModRemoteMcu.h Show annotated file Show diff for this revision Revisions of this file
cpp/ModRomFiles.cpp Show annotated file Show diff for this revision Revisions of this file
cpp/ModRomFiles.h Show annotated file Show diff for this revision Revisions of this file
cpp/Net.cpp Show annotated file Show diff for this revision Revisions of this file
cpp/Net.h Show annotated file Show diff for this revision Revisions of this file
cpp/NetConfig.cpp Show annotated file Show diff for this revision Revisions of this file
cpp/NetConfig.h Show annotated file Show diff for this revision Revisions of this file
cpp/mimic.h Show annotated file Show diff for this revision Revisions of this file
--- a/core/net/NyLPC_cNet.h	Wed Mar 27 12:07:47 2013 +0000
+++ b/core/net/NyLPC_cNet.h	Thu Apr 04 08:22:57 2013 +0000
@@ -25,6 +25,9 @@
  * ネットワークを初期化する。
  */
 void NyLPC_cNet_initialize(NyLPC_TcNet_t* i_inst);
+
+#define NyLPC_cNet_finalize(inst) 
+
 /**
  * 関数は、ネットワークアダプタの値を元にNyLPC_cMiMicEnv_PlatformName変数の値を更新します。
  * @param i_ref_config
--- a/core/net/httpd/NyLPC_cHttpd.h	Wed Mar 27 12:07:47 2013 +0000
+++ b/core/net/httpd/NyLPC_cHttpd.h	Thu Apr 04 08:22:57 2013 +0000
@@ -26,7 +26,7 @@
 struct NyLPC_TcHttpd
 {
     struct{
-        NyLPC_TcHttpd_onRequest _handler;
+        NyLPC_TcHttpd_onRequest onRequest;
     }function;
     NyLPC_TcMutex_t _mutex;
     NyLPC_TcTcpListener_t _listener;
--- a/core/net/httpd/NyLPC_cHttpdThread.cpp	Wed Mar 27 12:07:47 2013 +0000
+++ b/core/net/httpd/NyLPC_cHttpdThread.cpp	Thu Apr 04 08:22:57 2013 +0000
@@ -59,7 +59,7 @@
         NyLPC_cHttpdConnection_setConnectionMode(inst,NyLPC_TcHttpdConnection_CONNECTION_MODE_CLOSE);
 
         {//handler
-            (inst->_parent_httpd->function._handler)(inst);
+            (inst->_parent_httpd->function.onRequest)(inst);
         }
         //コネクションが増えすぎたら持続性接続を停止するためにCLOSEDにする。
         if(NyLPC_cHttpd_getNumOfConnection(inst->_parent_httpd)>LIMIT_OF_PERSISTENT_CONNECTION){
--- a/core/os/NyLPC_cThread.h	Wed Mar 27 12:07:47 2013 +0000
+++ b/core/os/NyLPC_cThread.h	Thu Apr 04 08:22:57 2013 +0000
@@ -119,4 +119,4 @@
 }
 #endif /* __cplusplus */
 
-#endif /* NYLPC_CTHREAD_H_ */
\ No newline at end of file
+#endif /* NYLPC_CTHREAD_H_ */
--- a/core/os/mbedrtos/NyLPC_cThread.cpp	Wed Mar 27 12:07:47 2013 +0000
+++ b/core/os/mbedrtos/NyLPC_cThread.cpp	Thu Apr 04 08:22:57 2013 +0000
@@ -42,11 +42,18 @@
 }
 
 
+
 void NyLPC_cThread_initialize(NyLPC_TcThread_t* i_inst,NyLPC_TInt32 i_stack,NyLPC_TInt32 i_prio)
 {
     i_inst->_sbit=NyLPC_TcThread_BIT_IS_TERMINATED;
     i_inst->_thread=new Thread(proc,i_inst,prio_table[i_prio],i_stack);
 }
+void NyLPC_cThread_finalize(NyLPC_TcThread_t* i_inst)
+{
+    NyLPC_cThread_join(i_inst);
+    delete i_inst->_thread;
+}
+
 
 void NyLPC_cThread_start(NyLPC_TcThread_t* i_inst,NyLPC_TcThread_ThreadFunc i_func,void* i_param)
 {
--- a/core/uip/NyLPC_cIPv4Payload.cpp	Wed Mar 27 12:07:47 2013 +0000
+++ b/core/uip/NyLPC_cIPv4Payload.cpp	Thu Apr 04 08:22:57 2013 +0000
@@ -257,7 +257,7 @@
     i_inst->payload.tcp->tcpchksum=~(NyLPC_TIPv4Header_makeTcpChecksum(i_inst->header));
     i_inst->header->ipchksum = ~(NyLPC_TIPv4Header_makeIpChecksum(i_inst->header));
 }
-
+/* なんだっけっこれ?
 //1の補数v1にv2を加算する。
 static NyLPC_TUInt16 add16c(NyLPC_TUInt16 i_v1,NyLPC_TUInt16 i_v2)
 {
@@ -272,6 +272,7 @@
     t=i_v1-i_v2;
     return (t<i_v1)?t:t-1;
 }
+*/
 /**
  * o_instに、同一なバッファを参照するインスタンスを生成します。
  */
@@ -283,8 +284,7 @@
     o_inst->header=i_inst->header;
     o_inst->payload=i_inst->payload;
 }
-static void* logA;
-static void* logB;
+
 /**
  * ACK番号を更新する。
  * @param i_ackno
@@ -295,8 +295,7 @@
     NyLPC_TUInt32 i_ackno)
 {
     NyLPC_Assert(i_inst->header!=NULL);
-    logA=i_inst->header;
-    logB=i_inst->payload.tcp;
+
 
 /*  union{
         NyLPC_TUInt32 l;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/Httpd.cpp	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,24 @@
+#include "Httpd.h"
+#include "HttpdConnection.h"
+namespace MiMic
+{
+    void Httpd::onRequestHandler(NyLPC_TcHttpdConnection_t* i_connection)
+    {
+        HttpdConnection c(i_connection);
+        ((struct Httpd2*)(i_connection->_parent_httpd))->_parent->onRequest(c);
+    }
+    Httpd::Httpd(int i_port_number)
+    {
+        NyLPC_cHttpd_initialize((NyLPC_TcHttpd_t*)(&this->_inst),(NyLPC_TUInt16)i_port_number);
+        this->_inst._parent=this;
+        this->_inst.super.function.onRequest=onRequestHandler;
+    }
+    Httpd::~Httpd()
+    {
+        NyLPC_cHttpd_finalize((NyLPC_TcHttpd_t*)(&this->_inst));
+    }
+    void Httpd::loop()
+    {
+        NyLPC_cHttpd_loop((NyLPC_TcHttpd_t*)(&this->_inst));
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/Httpd.h	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,25 @@
+#pragma once
+////////////////////////////////////////////////////////////////////////////////
+// Httpd.h
+////////////////////////////////////////////////////////////////////////////////
+
+#include "NyLPC_net.h"
+
+namespace MiMic
+{
+    class HttpdConnection;
+    class Httpd
+    {
+    private:
+        struct Httpd2{
+            NyLPC_TcHttpd_t super;
+            Httpd* _parent;
+        }_inst;
+        static void onRequestHandler(NyLPC_TcHttpdConnection_t* i_connection);
+    public:
+        Httpd(int i_port_number);
+        virtual ~Httpd();
+        void loop();
+        virtual void onRequest(HttpdConnection& i_connection)=0;
+    };
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/HttpdConnection.h	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,18 @@
+#pragma once
+////////////////////////////////////////////////////////////////////////////////
+// Net.h
+////////////////////////////////////////////////////////////////////////////////
+
+#include "NyLPC_net.h"
+namespace MiMic
+{
+    class HttpdConnection
+    {
+    public:
+        NyLPC_TcHttpdConnection* _ref_inst;
+        HttpdConnection(NyLPC_TcHttpdConnection* i_ref_inst)
+        {
+            this->_ref_inst=i_ref_inst;
+        }
+    };
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/ModMiMicSetting.cpp	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,43 @@
+#include "ModMiMicSetting.h"
+#include "HttpdConnection.h"
+
+namespace MiMic
+{
+    ModMiMicSetting::ModMiMicSetting(const char* i_path)
+    {
+        this->setParam(i_path);
+    }
+    ModMiMicSetting::ModMiMicSetting()
+    {
+        this->_path=NULL;
+    }
+    ModMiMicSetting::~ModMiMicSetting()
+    {
+        if(this->_path!=NULL){
+            free(this->_path);
+        }
+    }
+    void ModMiMicSetting::setParam(const char* i_path)
+    {
+        this->_path=(char*)malloc(strlen(i_path)+1);
+        strcpy(this->_path,i_path);
+    }
+    bool ModMiMicSetting::execute(HttpdConnection& i_connection)
+    {
+        NyLPC_TcModMiMicSetting_t mod;
+
+        //check parametor
+        if(this->_path==NULL){
+            return false;
+        }
+        NyLPC_cModMiMicSetting_initialize(&mod,this->_path);
+        if(NyLPC_cModMiMicSetting_canHandle(&mod,i_connection._ref_inst)){
+            NyLPC_cModMiMicSetting_execute(&mod,i_connection._ref_inst);
+            NyLPC_cModMiMicSetting_finalize(&mod);
+            return true;
+        }
+        NyLPC_cModMiMicSetting_finalize(&mod);
+        return false;
+    }
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/ModMiMicSetting.h	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,42 @@
+#pragma once
+////////////////////////////////////////////////////////////////////////////////
+// ModMiMicSetting.h
+////////////////////////////////////////////////////////////////////////////////
+
+#include "NyLPC_net.h"
+
+
+namespace MiMic
+{
+    class HttpdConnection;
+    /**
+     * This class is a module for Httpd.
+     * The class provides an REST-API to set and get the on-chip configuration MiMicHttpd.
+     */
+    class ModMiMicSetting
+    {
+    private:
+        char* _path;
+    public:
+        /**
+         * Constructor with parameter initialization.
+         */
+        ModMiMicSetting(const char* i_path);
+        /**
+         * Default constructor.
+         * Must be call {@link setParam} function after constructed.
+         */
+        ModMiMicSetting();
+        virtual ~ModMiMicSetting();
+        void setParam(const char* i_path);
+        /**
+          * This function processes a request. 
+          * The function checks whether a connection has a target request.
+          * If necessary, it will transmit a response.
+          * @return
+          * TRUE if request was processed. otherwise FALSE.
+          */
+        bool execute(HttpdConnection& i_connection);
+    };
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/ModRemoteMcu.cpp	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,43 @@
+#include "ModRemoteMcu.h"
+#include "HttpdConnection.h"
+
+namespace MiMic
+{
+    ModRemoteMcu::ModRemoteMcu(const char* i_path)
+    {
+        this->setParam(i_path);
+    }
+    ModRemoteMcu::ModRemoteMcu()
+    {
+        this->_path=NULL;
+    }
+    ModRemoteMcu::~ModRemoteMcu()
+    {
+        if(this->_path!=NULL){
+            free(this->_path);
+        }
+    }
+    void ModRemoteMcu::setParam(const char* i_path)
+    {
+        this->_path=(char*)malloc(strlen(i_path)+1);
+        strcpy(this->_path,i_path);
+    }
+    bool ModRemoteMcu::execute(HttpdConnection& i_connection)
+    {
+        NyLPC_TcModRemoteMcu_t mod;
+
+        //check parametor
+        if(this->_path==NULL){
+            return false;
+        }
+        NyLPC_cModRemoteMcu_initialize(&mod,this->_path);
+        if(NyLPC_cModRemoteMcu_canHandle(&mod,i_connection._ref_inst)){
+            NyLPC_cModRemoteMcu_execute(&mod,i_connection._ref_inst);
+            NyLPC_cModRemoteMcu_finalize(&mod);
+            return true;
+        }
+        NyLPC_cModRemoteMcu_finalize(&mod);
+        return false;
+    }
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/ModRemoteMcu.h	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,42 @@
+#pragma once
+////////////////////////////////////////////////////////////////////////////////
+// ModRemoteMcu.h
+////////////////////////////////////////////////////////////////////////////////
+
+#include "NyLPC_net.h"
+
+
+namespace MiMic
+{
+    class HttpdConnection;
+    /**
+     * This class is a module for Httpd.
+     * The class provides an REST-API to execute MiMic ByteCode.
+     */
+    class ModRemoteMcu
+    {
+    private:
+        char* _path;
+    public:
+        /**
+         * Constructor with parameter initialization.
+         */
+        ModRemoteMcu(const char* i_path);
+        /**
+         * Default constructor.
+         * Must be call {@link setParam} function after constructed.
+         */
+        ModRemoteMcu();
+        virtual ~ModRemoteMcu();
+        void setParam(const char* i_path);
+        /**
+          * This function processes a request. 
+          * The function checks whether a connection has a target request.
+          * If necessary, it will transmit a response.
+          * @return
+          * TRUE if request was processed. otherwise FALSE.
+          */
+        bool execute(HttpdConnection& i_connection);
+    };
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/ModRomFiles.cpp	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,45 @@
+#include "ModRomFiles.h"
+#include "HttpdConnection.h"
+
+namespace MiMic
+{
+    ModRomFiles::ModRomFiles(const char* i_path,const NyLPC_TRomFileData* i_ref_fsdata,unsigned short i_num)
+    {
+        this->setParam(i_path,i_ref_fsdata,i_num);
+    }
+    ModRomFiles::ModRomFiles()
+    {
+        this->_path=NULL;
+    }
+    ModRomFiles::~ModRomFiles()
+    {
+        if(this->_path!=NULL){
+            free(this->_path);
+        }
+    }
+    void ModRomFiles::setParam(const char* i_path,const NyLPC_TRomFileData* i_ref_fsdata,unsigned short i_num)
+    {
+        this->_path=(char*)malloc(strlen(i_path)+1);
+        strcpy(this->_path,i_path);
+        this->_ref_fsdata=i_ref_fsdata;
+        this->_num=i_num;
+    }
+    bool ModRomFiles::execute(HttpdConnection& i_connection)
+    {
+        NyLPC_TcModRomFiles_t mod;
+
+        //check parametor
+        if(this->_path==NULL){
+            return false;
+        }
+        NyLPC_cModRomFiles_initialize(&mod,this->_path,this->_ref_fsdata,this->_num);
+        if(NyLPC_cModRomFiles_canHandle(&mod,i_connection._ref_inst)){
+            NyLPC_cModRomFiles_execute(&mod,i_connection._ref_inst);
+            NyLPC_cModRomFiles_finalize(&mod);
+            return true;
+        }
+        NyLPC_cModRomFiles_finalize(&mod);
+        return false;
+    }
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/ModRomFiles.h	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,44 @@
+#pragma once
+////////////////////////////////////////////////////////////////////////////////
+// ModRomFiles.h
+////////////////////////////////////////////////////////////////////////////////
+
+#include "NyLPC_net.h"
+
+
+namespace MiMic
+{
+    class HttpdConnection;
+    /**
+     * This class is a module for Httpd.
+     * The class sends file image which is stored on ROM.
+     */
+    class ModRomFiles
+    {
+    private:
+        char* _path;
+        const NyLPC_TRomFileData* _ref_fsdata;
+        unsigned short _num;
+    public:
+        /**
+         * Constructor with parameter initialization.
+         */
+        ModRomFiles(const char* i_path,const NyLPC_TRomFileData* i_ref_fsdata,unsigned short i_num);
+        /**
+         * Default constructor.
+         * Must be call {@link setParam} function after constructed.
+         */
+        ModRomFiles();
+        virtual ~ModRomFiles();
+        void setParam(const char* i_path,const NyLPC_TRomFileData* i_ref_fsdata,unsigned short i_num);
+        /**
+          * This function processes a request. 
+          * The function checks whether a connection has a target request.
+          * If necessary, it will transmit a response.
+          * @return
+          * TRUE if request was processed. otherwise FALSE.
+          */
+        bool execute(HttpdConnection& i_connection);
+    };
+
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/Net.cpp	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,19 @@
+#pragma once
+////////////////////////////////////////////////////////////////////////////////
+// Net.h
+////////////////////////////////////////////////////////////////////////////////
+#include "Net.h"
+#include "NetConfig.h"
+
+namespace MiMic
+{
+    Net::Net(NetConfig& i_cfg)
+    {
+        NyLPC_cNet_initialize(&(this->_inst));
+        NyLPC_cNet_start(&(this->_inst),&(i_cfg._inst));
+    }
+    Net::~Net()
+    {
+        NyLPC_cNet_finalize(&(this->_inst));
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/Net.h	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,23 @@
+#pragma once
+////////////////////////////////////////////////////////////////////////////////
+// Net.h
+////////////////////////////////////////////////////////////////////////////////
+
+#include "NyLPC_net.h"
+namespace MiMic
+{
+    class NetConfig;
+    class Net
+    {
+    public:
+        NyLPC_TcNet_t _inst;
+    public:
+        /**
+         * The constructor.
+         * @param i_cfg
+         * The instance references the object. Must hold until the instance deleted.
+         */
+        Net(NetConfig& i_cfg);
+        virtual ~Net();
+    };
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/NetConfig.cpp	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,15 @@
+#include "NetConfig.h"
+
+namespace MiMic
+{
+
+    NetConfig::NetConfig(bool i_is_factory_default)
+    {
+        NyLPC_cNetConfig_initialize(&(this->_inst));
+    }
+    NetConfig::~NetConfig()
+    {
+        NyLPC_cNetConfig_finalize(&(this->_inst));
+    }
+
+};
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/NetConfig.h	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,31 @@
+#pragma once
+////////////////////////////////////////////////////////////////////////////////
+// NetConfig.h
+////////////////////////////////////////////////////////////////////////////////
+
+#include "NyLPC_net.h"
+
+namespace MiMic
+{
+    /**
+     * Network configulation class.
+     */
+    class NetConfig
+    {
+    public:
+        NyLPC_TcNetConfig_t _inst;
+    public:
+        /**
+         * The constructor.
+         * This function initializes instance by onchip configulation data.
+         * @param i_is_factory_default
+          * Factory default flag.
+         * <ul>
+         * <li>true - The function sets factory default setting.
+         * <li>false -The function sets onchip memory configulation (default)
+         * </ul>
+         */
+        NetConfig(bool i_is_factory_default=false);
+        virtual ~NetConfig();
+    };
+   }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cpp/mimic.h	Thu Apr 04 08:22:57 2013 +0000
@@ -0,0 +1,13 @@
+#pragma once
+////////////////////////////////////////////////////////////////////////////////
+// mimic.h
+////////////////////////////////////////////////////////////////////////////////
+#include "Net.h"
+#include "NetConfig.h"
+#include "Httpd.h"
+#include "HttpdConnection.h"
+#include "ModRomFiles.h"
+#include "ModRemoteMcu.h"
+#include "ModMiMicSetting.h"
+
+using namespace MiMic;
\ No newline at end of file