NyLPC_TUInt8 setup_access;\r
}cgi_setting;\r
static NyLPC_TUInt16 port;\r
-\r
static NyLPC_TcMutex_t _vm_mutex;\r
-\r
+/**\r
+ * プラットフォーム名\r
+ */\r
+static const char* _platform_name="Unknown platform";\r
\r
#define ACCESS_CTRL_SUBNET 0x00 //default\r
#define ACCESS_CTRL_ALL 0x01\r
\r
//MVMのVERSION情報\r
#define MVM_VERSION "MiMicVM/1.0;Json/1.0"\r
-#define APPLICATION_VERSION "MiMicRemoteMCU/1.1;LPCXpresso1769"\r
+#define APPLICATION_VERSION "MiMicRemoteMCU/1.2"\r
//スレッドのスタックサイズ\r
#define THREAD_STACK_SIZE 256+256\r
\r
\r
NyLPC_cTcpListener_initialize(&listener,port);\r
NyLPC_cUipService_start(&config);\r
+ //プラットフォーム名を推測(デバイス名の初めの1文字だけ見る。)\r
+ switch(*(NyLPC_cUipService_refDeviceName())){\r
+ case 'L':\r
+ _platform_name="LPCXPresso1769";\r
+ break;\r
+ case 'D':\r
+ _platform_name="mbed";\r
+ break;\r
+ default:\r
+ break;\r
+ }\r
for(;;){\r
//ターミネイト状態のタスクを検索\r
for(i=0;i<NUM_OF_TH;i++){\r
\r
//JSONを書く。\r
if(!NyLPC_cHttpBodyWriter_format(&(work.bw),\r
- "{application:\""APPLICATION_VERSION"\",result:0x%x}",\r
- ret?0x80000000:0x00000000))\r
+ "{application:\""APPLICATION_VERSION";%s\",result:0x%x}",\r
+ _platform_name,ret?0x80000000:0x00000000))\r
{\r
return NyLPC_TBool_FALSE;\r
}\r
\r
//JSONを書く。\r
if(!NyLPC_cHttpBodyWriter_format(&(work.bw),\r
- "{application:\""APPLICATION_VERSION"\",mac00010203:0x%x,mac0405xxxx:0x%x,ip:0x%x,mask:0x%x,droute:0x%x,port:0x%x,access:0x%x}",\r
+ "{application:\""APPLICATION_VERSION";%s\",mac00010203:0x%x,mac0405xxxx:0x%x,ip:0x%x,mask:0x%x,droute:0x%x,port:0x%x,access:0x%x}",\r
+ _platform_name,\r
config->mac_00_01_02_03,\r
config->mac_04_05_xx_xx,\r
config->ipv4_addr_net,\r
NyLPC_cHttpBodyWriter_setChunked(&(work.bw));\r
\r
//JSONを書く。\r
- if(!NyLPC_cHttpBodyWriter_format(&(work.bw),"{application:\""APPLICATION_VERSION"\"}")){\r
+ if(!NyLPC_cHttpBodyWriter_format(&(work.bw),"{application:\""APPLICATION_VERSION";%s\"}",_platform_name)){\r
return NyLPC_TBool_FALSE;\r
}\r
//エラーチェック\r