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

Committer:
nyatla
Date:
Fri Jun 20 15:38:30 2014 +0000
Revision:
77:8651d3c19a55
Parent:
72:c118a7aa37a3
Child:
83:d46aa580722a
MiMicCore??363????; mbed/jsonrpc?????????

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nyatla 71:855020258513 1 #ifndef NYLPC_CJSONRPCPARSER_H_
nyatla 71:855020258513 2 #define NYLPC_CJSONRPCPARSER_H_
nyatla 71:855020258513 3 #ifdef __cplusplus
nyatla 71:855020258513 4 extern "C" {
nyatla 71:855020258513 5 #endif
nyatla 71:855020258513 6
nyatla 71:855020258513 7 #include "NyLPC_stdlib.h"
nyatla 71:855020258513 8
nyatla 72:c118a7aa37a3 9
nyatla 72:c118a7aa37a3 10 #define NyLPC_TJsonRpcErrorCode_PARSE_ERROR (-32700)
nyatla 72:c118a7aa37a3 11 #define NyLPC_TJsonRpcErrorCode_INVALID_REQUEST (-32600)
nyatla 72:c118a7aa37a3 12 #define NyLPC_TJsonRpcErrorCode_METHOD_NOT_FOUND (-32601)
nyatla 72:c118a7aa37a3 13 #define NyLPC_TJsonRpcErrorCode_INVALID_PARAMS (-32602)
nyatla 72:c118a7aa37a3 14 #define NyLPC_TJsonRpcErrorCode_INTERNAL_ERROR (-32603)
nyatla 72:c118a7aa37a3 15 #define NyLPC_TJsonRpcErrorCode_SERVER_ERROR_BASE (-32000)
nyatla 72:c118a7aa37a3 16
nyatla 72:c118a7aa37a3 17
nyatla 71:855020258513 18 /** 型定義*/
nyatla 71:855020258513 19 union NyLPC_TJsonRpcParserResult;
nyatla 71:855020258513 20
nyatla 71:855020258513 21 /**
nyatla 71:855020258513 22 * RPC関数ハンドラ型です。
nyatla 71:855020258513 23 * @param
nyatla 71:855020258513 24 */
nyatla 71:855020258513 25 typedef NyLPC_TBool (*NyLPC_TJsonRpcHandler)(const union NyLPC_TJsonRpcParserResult* i_rpc,void* i_param);
nyatla 71:855020258513 26
nyatla 71:855020258513 27 /**
nyatla 71:855020258513 28 * JSON RPC定義テーブルの一要素。
nyatla 71:855020258513 29 * メソッド名とパラメータパターンのセットを定義します。
nyatla 71:855020258513 30 * この構造体は配列としてNyLPC_TJsonRpcFunctionTableから参照されます。
nyatla 71:855020258513 31 */
nyatla 71:855020258513 32 struct NyLPC_TJsonRpcMethodDef
nyatla 71:855020258513 33 {
nyatla 71:855020258513 34 /**
nyatla 71:855020258513 35 * 関数名
nyatla 71:855020258513 36 */
nyatla 71:855020258513 37 const char* name;
nyatla 71:855020258513 38 /**
nyatla 71:855020258513 39 * パラメータパターン
nyatla 71:855020258513 40 * <ul>
nyatla 71:855020258513 41 * <li>s - 文字列</li>
nyatla 71:855020258513 42 * <li>i - signed int32</li>
nyatla 71:855020258513 43 * <li>s - unsigned int32</li>
nyatla 71:855020258513 44 * </ul>
nyatla 71:855020258513 45 */
nyatla 71:855020258513 46 const char* param_patt;
nyatla 71:855020258513 47 /**
nyatla 71:855020258513 48 * 外部のDispatch関数で使われるRPC関数ハンドラ。
nyatla 71:855020258513 49 */
nyatla 71:855020258513 50 NyLPC_TJsonRpcHandler handler;
nyatla 71:855020258513 51 };
nyatla 71:855020258513 52
nyatla 71:855020258513 53
nyatla 71:855020258513 54 /**
nyatla 71:855020258513 55 * JsonRPCクラスの定義テーブル。
nyatla 71:855020258513 56 * JsonRPCは、 [namespace]::[]
nyatla 71:855020258513 57 */
nyatla 71:855020258513 58 struct NyLPC_TJsonRpcClassDef
nyatla 71:855020258513 59 {
nyatla 71:855020258513 60 const char* names_pace;
nyatla 71:855020258513 61 const char* class_name;
nyatla 71:855020258513 62 const struct NyLPC_TJsonRpcMethodDef* functions;
nyatla 71:855020258513 63 };
nyatla 71:855020258513 64
nyatla 71:855020258513 65
nyatla 71:855020258513 66
nyatla 71:855020258513 67
nyatla 71:855020258513 68
nyatla 71:855020258513 69 #define NyLPC_TJsonRpcParserResult_TYPE_UNKNOWN 0
nyatla 71:855020258513 70 #define NyLPC_TJsonRpcParserResult_TYPE_RESULT 1
nyatla 71:855020258513 71 #define NyLPC_TJsonRpcParserResult_TYPE_METHOD 2
nyatla 71:855020258513 72
nyatla 71:855020258513 73 /** NyLPC_TJsonRpcParserResultが格納できる引数の最大数。パラメータの最大数に等しくなります。*/
nyatla 77:8651d3c19a55 74 #define NyLPC_TJsonRpcParserResult_NUMBER_OF_PARAM_INDEX 32
nyatla 71:855020258513 75 /**
nyatla 71:855020258513 76 * NyLPC_TJsonRpcParserResultが格納できるパラメータの総バイト数。
nyatla 71:855020258513 77 * (文字数+1)+(uint32|int32)*4+uint8の合計値です。
nyatla 71:855020258513 78 */
nyatla 77:8651d3c19a55 79 #define NyLPC_TJsonRpcParserResult_PARAM_BUF 256
nyatla 71:855020258513 80
nyatla 71:855020258513 81 /**
nyatla 71:855020258513 82 * JSONRPC構文のパース結果を格納します。
nyatla 71:855020258513 83 * 開発メモ
nyatla 71:855020258513 84 * 更新する場合は、param_indexまでの構造体のレイアウトを破壊しないようにしてください。
nyatla 71:855020258513 85 */
nyatla 71:855020258513 86 union NyLPC_TJsonRpcParserResult
nyatla 71:855020258513 87 {
nyatla 71:855020258513 88 NyLPC_TUInt8 type; //タイプ
nyatla 71:855020258513 89 /** この構造体は type==NyLPC_TJsonRpcParserResult_TYPE_METHODのときに有効です。*/
nyatla 71:855020258513 90 struct{
nyatla 71:855020258513 91 NyLPC_TUInt8 _type; //タイプ
nyatla 71:855020258513 92 NyLPC_TUInt8 func_number; //確定した関数番号。
nyatla 71:855020258513 93 NyLPC_TUInt8 _padding[2]; //パディング
nyatla 71:855020258513 94 NyLPC_TInt32 id; //idパラメータの値
nyatla 71:855020258513 95 NyLPC_TChar param_buf[NyLPC_TJsonRpcParserResult_PARAM_BUF];
nyatla 71:855020258513 96 NyLPC_TUInt8 param_index[NyLPC_TJsonRpcParserResult_NUMBER_OF_PARAM_INDEX];
nyatla 71:855020258513 97 /** 関数の含まれるクラスへのポインタ。*/
nyatla 71:855020258513 98 const struct NyLPC_TJsonRpcClassDef* class_def;
nyatla 71:855020258513 99 }method;
nyatla 71:855020258513 100 struct{
nyatla 71:855020258513 101 NyLPC_TUInt8 _type; //タイプ
nyatla 71:855020258513 102 NyLPC_TUInt8 _padding[3]; //パディング
nyatla 71:855020258513 103 NyLPC_TInt32 id; //idパラメータの値
nyatla 71:855020258513 104 NyLPC_TChar param_buf[NyLPC_TJsonRpcParserResult_PARAM_BUF];
nyatla 71:855020258513 105 NyLPC_TUInt8 param_index[NyLPC_TJsonRpcParserResult_NUMBER_OF_PARAM_INDEX];
nyatla 71:855020258513 106 }result;
nyatla 71:855020258513 107 struct{
nyatla 71:855020258513 108 NyLPC_TUInt8 _type; //タイプ
nyatla 71:855020258513 109 NyLPC_TInt8 _padding[3];//
nyatla 71:855020258513 110 NyLPC_TInt32 _id; //idパラメータの値
nyatla 71:855020258513 111 NyLPC_TChar param_buf[NyLPC_TJsonRpcParserResult_PARAM_BUF];
nyatla 71:855020258513 112 NyLPC_TUInt8 param_index[NyLPC_TJsonRpcParserResult_NUMBER_OF_PARAM_INDEX];
nyatla 71:855020258513 113 }raw;
nyatla 71:855020258513 114 };
nyatla 71:855020258513 115 /**
nyatla 71:855020258513 116 * Resultに格納される結果がハンドラを持っているかを返します。
nyatla 71:855020258513 117 */
nyatla 71:855020258513 118 #define NyLPC_TJsonRpcParserResult_hasMethodHandler(i_struct) ((i_struct)->method.class_def->functions[(i_struct)->method.func_number].handler!=NULL)
nyatla 71:855020258513 119 /**
nyatla 71:855020258513 120 * Resultに含まれるハンドラを呼び出します。
nyatla 71:855020258513 121 * @param i_struct
nyatla 71:855020258513 122 * Result構造体
nyatla 71:855020258513 123 * @param i_param
nyatla 71:855020258513 124 * ハンドラに引き渡すパラメータ
nyatla 71:855020258513 125 * @return
nyatla 71:855020258513 126 * FALSEの場合、ループを終了してください。
nyatla 71:855020258513 127 */
nyatla 71:855020258513 128 #define NyLPC_TJsonRpcParserResult_callMethodHandler(i_struct,i_param) (i_struct)->method.class_def->functions[(i_struct)->method.func_number].handler((i_struct),(i_param))
nyatla 71:855020258513 129
nyatla 71:855020258513 130 /**
nyatla 71:855020258513 131 * i_idx番目のパラメータをuint32としてo_valへ取り出します。
nyatla 71:855020258513 132 */
nyatla 71:855020258513 133 NyLPC_TBool NyLPC_TJsonRpcParserResult_getUInt32(const union NyLPC_TJsonRpcParserResult* i_struct, NyLPC_TInt16 i_idx, NyLPC_TUInt32* o_val);
nyatla 71:855020258513 134 /**
nyatla 71:855020258513 135 * i_idx番目のパラメータをint32としてo_valへ取り出します。
nyatla 71:855020258513 136 */
nyatla 71:855020258513 137 NyLPC_TBool NyLPC_TJsonRpcParserResult_getInt32(const union NyLPC_TJsonRpcParserResult* i_struct, NyLPC_TInt16 i_idx, NyLPC_TInt32* o_val);
nyatla 71:855020258513 138 /**
nyatla 71:855020258513 139 * i_idx番目のパラメータをchar[]としてo_valへ取り出します。
nyatla 71:855020258513 140 */
nyatla 71:855020258513 141 NyLPC_TBool NyLPC_TJsonRpcParserResult_getStr(const union NyLPC_TJsonRpcParserResult* i_struct, NyLPC_TInt16 i_idx, const NyLPC_TChar** o_val);
nyatla 71:855020258513 142 /**
nyatla 71:855020258513 143 * i_idx番目のパラメータをuint8としてo_valへ取り出します。
nyatla 71:855020258513 144 */
nyatla 71:855020258513 145 NyLPC_TBool NyLPC_TJsonRpcParserResult_getByte(const union NyLPC_TJsonRpcParserResult* i_struct, NyLPC_TInt16 i_idx, NyLPC_TUInt8* o_val);
nyatla 71:855020258513 146
nyatla 71:855020258513 147 /********************************************************************************
nyatla 71:855020258513 148 *
nyatla 71:855020258513 149 * NyLPC_TcJsonRpcParser
nyatla 71:855020258513 150 *
nyatla 71:855020258513 151 ********************************************************************************/
nyatla 71:855020258513 152 /**
nyatla 71:855020258513 153 * JSONRPCの型定義定数です。
nyatla 71:855020258513 154 */
nyatla 71:855020258513 155 #define NyLPC_cJsonRpcParser_TYPE_INT32 'd'
nyatla 71:855020258513 156 #define NyLPC_cJsonRpcParser_TYPE_UINT32 'u'
nyatla 71:855020258513 157 #define NyLPC_cJsonRpcParser_TYPE_STRING 's'
nyatla 71:855020258513 158 #define NyLPC_cJsonRpcParser_TYPE_BYTE 'b'
nyatla 71:855020258513 159
nyatla 71:855020258513 160 /**
nyatla 71:855020258513 161 * JsonRPCメッセージをパースします。パース出来るメッセージは以下の通りです。
nyatla 71:855020258513 162 * クラスは、RPC関数定義テーブルに従ってメッセージを分析し、テーブルに存在する関数のみを返却することができます。
nyatla 71:855020258513 163 * <p>
nyatla 71:855020258513 164 * メッセージ形式
nyatla 71:855020258513 165 * <pre>
nyatla 71:855020258513 166 * METHOD:
nyatla 71:855020258513 167 * {"method":METHOD,"version":VERSION,"params":PARAMS,"id":ID}
nyatla 71:855020258513 168 * METHOD VERSION as string
nyatla 71:855020258513 169 * ID as uint32
nyatla 71:855020258513 170 * PARAMS as Array of (string|uint32|int32)
nyatla 71:855020258513 171 * </pre>
nyatla 71:855020258513 172 * </p>
nyatla 71:855020258513 173 */
nyatla 71:855020258513 174 typedef struct NyLPC_TcJsonRpcParser NyLPC_TcJsonRpcParser_t;
nyatla 71:855020258513 175
nyatla 71:855020258513 176
nyatla 71:855020258513 177
nyatla 71:855020258513 178
nyatla 71:855020258513 179 /** パーサの状態値*/
nyatla 71:855020258513 180 typedef NyLPC_TUInt8 NyLPC_TcJsonRpcParser_TStatus;
nyatla 71:855020258513 181
nyatla 71:855020258513 182 #define NyLPC_TcJsonRpcParser_ST_START 0x01 //開始ブランケット受信待ち
nyatla 71:855020258513 183 #define NyLPC_TcJsonRpcParser_ST_END 0x02 //終了受信済
nyatla 71:855020258513 184 #define NyLPC_TcJsonRpcParser_ST_ERROR 0x03 //エラー発生
nyatla 71:855020258513 185 #define NyLPC_TcJsonRpcParser_ST_NAME_Q 0x04 //名前クオート受信待ち
nyatla 71:855020258513 186 #define NyLPC_TcJsonRpcParser_ST_NAME_STR 0x05 //名前受信中
nyatla 71:855020258513 187 #define NyLPC_TcJsonRpcParser_ST_NV_SEP 0x06 //名前と値のセパレータ待ち
nyatla 71:855020258513 188 #define NyLPC_TcJsonRpcParser_ST_VAL 0x07 //値開始待ち
nyatla 71:855020258513 189 #define NyLPC_TcJsonRpcParser_ST_VAL_STR 0x08 //文字列受信
nyatla 71:855020258513 190 #define NyLPC_TcJsonRpcParser_ST_VAL_UINT 0x09 //UINT受信中
nyatla 71:855020258513 191 #define NyLPC_TcJsonRpcParser_ST_VAL_INT 0x10 //INT受信中
nyatla 71:855020258513 192 #define NyLPC_TcJsonRpcParser_ST_NEXT 0x11 //次のNAMEもしくは終了ブランケット
nyatla 71:855020258513 193 #define NyLPC_TcJsonRpcParser_ST_PARAMS 0x12 //PARAM要素パース中
nyatla 71:855020258513 194
nyatla 71:855020258513 195
nyatla 71:855020258513 196
nyatla 71:855020258513 197 /** NyLPC_TcJsonRpcParserの定数値です。 字句解析ワークメモリの長さ。256未満8*n-1の数を指定してください。 */
nyatla 71:855020258513 198 #define NyLPC_TcJsonRpcParser_WORK_MAX 47
nyatla 71:855020258513 199
nyatla 71:855020258513 200 /**
nyatla 71:855020258513 201 * クラス構造体です。
nyatla 71:855020258513 202 */
nyatla 71:855020258513 203 struct NyLPC_TcJsonRpcParser
nyatla 71:855020258513 204 {
nyatla 71:855020258513 205 const struct NyLPC_TJsonRpcClassDef** _class_def;
nyatla 71:855020258513 206 union{
nyatla 71:855020258513 207 struct{
nyatla 71:855020258513 208 NyLPC_TChar buf[NyLPC_TcJsonRpcParser_WORK_MAX]; //文字解析メモリ
nyatla 71:855020258513 209 NyLPC_TUInt8 n; //字句解析の文字数
nyatla 71:855020258513 210 }str;
nyatla 71:855020258513 211 struct{
nyatla 71:855020258513 212 NyLPC_TInt32 v;
nyatla 71:855020258513 213 NyLPC_TInt8 s;
nyatla 71:855020258513 214 }int32;
nyatla 71:855020258513 215 NyLPC_TUInt32 uint32;
nyatla 71:855020258513 216 }_work;
nyatla 71:855020258513 217 NyLPC_TcJsonRpcParser_TStatus _st; //パーサステータス
nyatla 71:855020258513 218 NyLPC_TUInt8 _pst; //PARAMS解析ステータス
nyatla 71:855020258513 219 NyLPC_TUInt8 _name_id; //解析中のNAME_ID
nyatla 71:855020258513 220 NyLPC_TUInt8 _pcounter; //パラメタ解析に使うワークカウンタ
nyatla 71:855020258513 221 union NyLPC_TJsonRpcParserResult* _result;//出力格納先
nyatla 71:855020258513 222 };
nyatla 71:855020258513 223
nyatla 71:855020258513 224
nyatla 71:855020258513 225
nyatla 71:855020258513 226
nyatla 71:855020258513 227
nyatla 71:855020258513 228
nyatla 71:855020258513 229 /**
nyatla 71:855020258513 230 * インスタンスを初期化します。
nyatla 71:855020258513 231 * @param i_class_def
nyatla 71:855020258513 232 * クラステーブルの配列です。NULLで終端します。
nyatla 71:855020258513 233 */
nyatla 71:855020258513 234 void NyLPC_cJsonRpcParser_initialize(
nyatla 71:855020258513 235 NyLPC_TcJsonRpcParser_t* i_inst,
nyatla 71:855020258513 236 const struct NyLPC_TJsonRpcClassDef** i_class_def);
nyatla 71:855020258513 237
nyatla 71:855020258513 238 #define NyLPC_cJsonRpcParser_finalize(i)
nyatla 71:855020258513 239 /**
nyatla 71:855020258513 240 * パーサの状態を初期化します。
nyatla 71:855020258513 241 * @param i_result
nyatla 71:855020258513 242 * パース結果の出力先構造体のアドレスです。
nyatla 71:855020258513 243 */
nyatla 71:855020258513 244 void NyLPC_cJsonRpcParser_initParser(NyLPC_TcJsonRpcParser_t* i_inst, union NyLPC_TJsonRpcParserResult* i_result);
nyatla 71:855020258513 245 /**
nyatla 71:855020258513 246 * パーサに文字列を入力します。入力後は、NyLPC_cJsonRpcParser_getStatusでパーサの状態をチェックしてください。
nyatla 71:855020258513 247  */
nyatla 71:855020258513 248 void NyLPC_cJsonRpcParser_putChar(NyLPC_TcJsonRpcParser_t* i_inst, char i_c);
nyatla 71:855020258513 249
nyatla 71:855020258513 250 #define NyLPC_cJsonRpcParser_getStatus(i) ((i)->_st)
nyatla 71:855020258513 251 /** クラス定義テーブルを返します。*/
nyatla 71:855020258513 252 #define NyLPC_cJsonRpcParser_getClassDef(i) ((i)->_class_def)
nyatla 71:855020258513 253
nyatla 71:855020258513 254
nyatla 71:855020258513 255 #ifdef __cplusplus
nyatla 71:855020258513 256 }
nyatla 71:855020258513 257 #endif /* __cplusplus */
nyatla 71:855020258513 258
nyatla 71:855020258513 259 #endif /* NYLPC_CJSONRPCPARSER4_H_ */