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

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

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers NyLPC_cModMiMicSetting.h Source File

NyLPC_cModMiMicSetting.h

00001 /*********************************************************************************
00002  * PROJECT: MiMic
00003  * --------------------------------------------------------------------------------
00004  *
00005  * This file is part of MiMic
00006  * Copyright (C)2011 Ryo Iizuka
00007  *
00008  * MiMic is free software: you can redistribute it and/or modify
00009  * it under the terms of the GNU Lesser General Public License as published
00010  * by the Free Software Foundation, either version 3 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU Lesser General Public License
00019  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00020  *
00021  * For further information please contact.
00022  *  http://nyatla.jp/
00023  *  <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>
00024  *
00025  *********************************************************************************/
00026 #ifndef NYLPC_CMODMIMICSETTING_H_
00027 #define NYLPC_CMODMIMICSETTING_H_
00028 #include "NyLPC_http.h"
00029 #include "../NyLPC_cHttpdConnection.h"
00030 #include "NyLPC_cModRomFiles.h"
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif /* __cplusplus */
00034 
00035 /**
00036  * MiMicの動作設定CGIです。MiMicの設定値をオンチップフラッシュへ保存/読み出しします。
00037  * uipServiceはNyLPC_TcNetConfig_tを継承したインスタンスで初期化してください。
00038  *
00039  * JSONAPIとして、以下のAPIを提供します。
00040  * ./setup.api?c=[update|get]&p=[:param:]
00041  * MiMicの動作設定と取得を行います。
00042  * c=get 現在の状態をjson形式で返却する。
00043  * {
00044  *      application: [:string:],
00045  *      mac00010203: [:HEX32:],
00046  *      mac0405xxxx: [:HEX32:],
00047  *      ip: [:HEX32:],
00048  *      mask: [:HEX32:],
00049  *      droute: [:HEX32:],
00050  *
00051  *      port: [:HEX16:],
00052  *      access\":%u}",
00053  * c=update pパラメタ/hostの内容でFlashをアップデートする。
00054  *      pパラメタは32bitの16進数文字列。
00055  *      [ 0] emac_0123      ビックエンディアン48bit値+パディング16bit
00056  *      [ 1] emac_45xx      :
00057  *          [emac4][emac5][x][x]
00058  *      [ 2] ipv4_flags     IPV4設定フラグ
00059  *      [ 3] ipv4_ip        IPアドレス。32bit値。ビックエンディアン
00060  *      [ 4] ipv4_mask      サブネットマスク。32bit値。ビックエンディアン
00061  *      [ 5] ipv4_deoute    defaultrootアドレス。32bit値。ビックエンディアン
00062  *      [ 6] service_flag
00063  *          See NyLPC_cNetConfig.h
00064  *      [ 7] http_param     HTTPサービスポート番号。2桁のHEX値である。ビックエンディアン。値16bit、パディング16bit
00065  *          [port_h][port_l][x][x]
00066  */
00067 typedef struct NyLPC_TcModMiMicSetting NyLPC_TcModMiMicSetting_t;
00068 
00069 
00070 struct NyLPC_TcModMiMicSetting
00071 {
00072     NyLPC_TcModRomFiles_t super;
00073 };
00074 
00075 /**
00076  * コンストラクタ。
00077  */
00078 void NyLPC_cModMiMicSetting_initialize(NyLPC_TcModMiMicSetting_t* i_inst,const NyLPC_TChar* i_ref_root_path);
00079 void NyLPC_cModMiMicSetting_finalize(NyLPC_TcModMiMicSetting_t* i_inst);
00080 
00081 /**
00082  * モジュールがコネクションをハンドリングできるかを返します。
00083  */
00084 NyLPC_TBool NyLPC_cModMiMicSetting_canHandle(NyLPC_TcModMiMicSetting_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection);
00085 /**
00086  * モジュールを実行します。
00087  * @return 処理に成功したか
00088  */
00089 NyLPC_TBool NyLPC_cModMiMicSetting_execute(NyLPC_TcModMiMicSetting_t* i_inst,NyLPC_TcHttpdConnection_t* i_connection);
00090 
00091 
00092 #ifdef __cplusplus
00093 }
00094 #endif /* __cplusplus */
00095 
00096 #endif /* NYLPC_CHTTPSHORTHTTPHEADERPARSER_H_ */