MiMicSDK Websocket module sample program.
Dependencies: NyFileSystems libMiMic mbed-rtos mbed
Fork of UPnPBasicDevice by
This is Websocket server.
WebSocketのサンプルです。 MiMicSDKのWebsocketはhttpdの1モジュールとして動作するので、ファイルサーバ等と一緒に動かすことが出来ます。
ファームウェアを書き込んだ後にブラウザから "http://192.168.128.39/" にアクセスすると、AIN1のデータをリアルタイムに表示するページが開きます。
Diff: fsdata.h
- Revision:
- 23:6340bfc0bfe3
- Parent:
- 20:4b0b449ddb12
--- a/fsdata.h Sat Aug 10 02:53:46 2013 +0000 +++ b/fsdata.h Fri Sep 27 12:48:30 2013 +0000 @@ -22,9 +22,9 @@ }, { "index.html", - 1122, + 1298, "text/html", - "\x3C\x21\x44\x4F\x43\x54\x59\x50\x45\x20\x68\x74\x6D\x6C\x3E\x20\x20\x0D\x0A\x3C\x68\x74\x6D\x6C\x20\x6C\x61\x6E\x67\x3D\x22\x6A\x61\x22\x3E\x20\x20\x0D\x0A\x3C\x68\x65\x61\x64\x3E\x0D\x0A\x09\x3C\x6D\x65\x74\x61\x20\x68\x74\x74\x70\x2D\x65\x71\x75\x69\x76\x3D\x22\x43\x6F\x6E\x74\x65\x6E\x74\x2D\x54\x79\x70\x65\x22\x20\x63\x6F\x6E\x74\x65\x6E\x74\x3D\x22\x74\x65\x78\x74\x2F\x68\x74\x6D\x6C\x3B\x20\x63\x68\x61\x72\x73\x65\x74\x3D\x55\x54\x46\x2D\x38\x22\x3E\x0D\x0A\x09\x3C\x74\x69\x74\x6C\x65\x3E\x4D\x69\x4D\x69\x63\x20\x55\x50\x6E\x50\x20\x44\x65\x76\x69\x63\x65\x3C\x2F\x74\x69\x74\x6C\x65\x3E\x20\x20\x0D\x0A\x09\x3C\x73\x74\x79\x6C\x65\x3E\x0D\x0A\x09\x2E\x68\x65\x61\x64\x65\x72\x7B\x0D\x0A\x09\x09\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x3B\x0D\x0A\x09\x7D\x0D\x0A\x09\x2E\x68\x65\x61\x64\x65\x72\x20\x62\x7B\x0D\x0A\x09\x09\x66\x6F\x6E\x74\x2D\x73\x69\x7A\x65\x3A\x32\x34\x70\x74\x3B\x0D\x0A\x09\x7D\x0D\x0A\x2E\x66\x6F\x6F\x74\x65\x72\x7B\x0D\x0A\x09\x74\x65\x78\x74\x2D\x61\x6C\x69\x67\x6E\x3A\x63\x65\x6E\x74\x65\x72\x3B\x0D\x0A\x09\x6D\x61\x72\x67\x69\x6E\x3A\x31\x30\x70\x78\x20\x30\x70\x78\x20\x30\x70\x78\x20\x30\x70\x78\x3B\x0D\x0A\x09\x77\x69\x64\x74\x68\x3A\x31\x30\x30\x25\x3B\x0D\x0A\x09\x62\x6F\x72\x64\x65\x72\x2D\x73\x74\x79\x6C\x65\x3A\x73\x6F\x6C\x69\x64\x3B\x0D\x0A\x09\x62\x6F\x72\x64\x65\x72\x2D\x77\x69\x64\x74\x68\x3A\x31\x70\x78\x20\x30\x70\x78\x20\x31\x70\x78\x20\x30\x70\x78\x3B\x0D\x0A\x09\x62\x6F\x72\x64\x65\x72\x2D\x63\x6F\x6C\x6F\x72\x3A\x23\x37\x37\x37\x37\x37\x37\x3B\x0D\x0A\x7D\x09\x0D\x0A\x09\x3C\x2F\x73\x74\x79\x6C\x65\x3E\x0D\x0A\x3C\x2F\x68\x65\x61\x64\x3E\x0D\x0A\x3C\x62\x6F\x64\x79\x3E\x0D\x0A\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x68\x65\x61\x64\x65\x72\x22\x3E\x0D\x0A\x09\x3C\x69\x6D\x67\x20\x73\x72\x63\x3D\x22\x2E\x2F\x6C\x6F\x67\x6F\x2E\x70\x6E\x67\x22\x2F\x3E\x3C\x62\x72\x2F\x3E\x0D\x0A\x3C\x2F\x64\x69\x76\x3E\x0D\x0A\x3C\x68\x32\x3E\x41\x62\x6F\x75\x74\x20\x74\x68\x69\x73\x20\x70\x61\x67\x65\x3C\x2F\x68\x32\x3E\x0D\x0A\x54\x68\x69\x73\x20\x69\x73\x20\x75\x70\x6E\x70\x3A\x42\x61\x73\x69\x63\x44\x65\x76\x69\x63\x65\x3A\x31\x20\x70\x72\x65\x73\x65\x6E\x74\x61\x74\x69\x6F\x6E\x20\x77\x65\x62\x20\x70\x61\x67\x65\x2E\x3C\x62\x72\x2F\x3E\x0D\x0A\x49\x66\x20\x79\x6F\x75\x20\x63\x61\x6E\x20\x73\x65\x65\x20\x74\x68\x69\x73\x20\x70\x61\x67\x65\x2C\x20\x74\x68\x65\x20\x42\x61\x73\x69\x63\x44\x65\x76\x69\x63\x65\x20\x69\x73\x20\x72\x75\x6E\x6E\x69\x6E\x67\x2E\x0D\x0A\x0D\x0A\x3C\x68\x32\x3E\x52\x65\x73\x6F\x75\x72\x63\x65\x73\x3C\x2F\x68\x32\x3E\x0D\x0A\x3C\x75\x6C\x3E\x0D\x0A\x3C\x6C\x69\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x2F\x75\x70\x6E\x70\x2F\x64\x2E\x78\x6D\x6C\x22\x3E\x44\x65\x76\x69\x63\x65\x44\x65\x73\x63\x72\x69\x70\x74\x69\x6F\x6E\x3C\x2F\x61\x3E\x3C\x2F\x6C\x69\x3E\x0D\x0A\x3C\x2F\x75\x6C\x3E\x0D\x0A\x3C\x68\x32\x3E\x4C\x69\x6E\x6B\x73\x3C\x2F\x68\x32\x3E\x0D\x0A\x3C\x75\x6C\x3E\x0D\x0A\x3C\x6C\x69\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x6D\x62\x65\x64\x2E\x6F\x72\x67\x2F\x75\x73\x65\x72\x73\x2F\x6E\x79\x61\x74\x6C\x61\x2F\x63\x6F\x64\x65\x2F\x55\x50\x6E\x50\x42\x61\x73\x69\x63\x44\x65\x76\x69\x63\x65\x2F\x22\x3E\x53\x6F\x75\x72\x63\x65\x20\x63\x6F\x64\x65\x20\x72\x65\x70\x6F\x69\x74\x6F\x72\x79\x3C\x2F\x61\x3E\x3C\x2F\x6C\x69\x3E\x0D\x0A\x3C\x6C\x69\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x73\x6F\x75\x72\x63\x65\x66\x6F\x72\x67\x65\x2E\x6A\x70\x2F\x70\x72\x6F\x6A\x65\x63\x74\x73\x2F\x6D\x69\x6D\x69\x63\x2F\x22\x3E\x4D\x69\x4D\x49\x63\x20\x50\x72\x6F\x6A\x65\x63\x74\x3C\x2F\x61\x3E\x3C\x2F\x6C\x69\x3E\x0D\x0A\x3C\x6C\x69\x3E\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x77\x77\x77\x2E\x75\x70\x6E\x70\x2E\x6F\x72\x67\x2F\x22\x3E\x55\x50\x6E\x50\x20\x46\x4F\x52\x55\x4D\x3C\x2F\x61\x3E\x3C\x2F\x6C\x69\x3E\x0D\x0A\x3C\x2F\x75\x6C\x3E\x0D\x0A\x3C\x64\x69\x76\x20\x63\x6C\x61\x73\x73\x3D\x22\x66\x6F\x6F\x74\x65\x72\x22\x3E\x0D\x0A\x09\x4D\x69\x4D\x69\x63\x20\x70\x72\x6F\x6A\x65\x63\x74\x3C\x62\x72\x2F\x3E\x0D\x0A\x09\x43\x6F\x70\x79\x72\x69\x67\x68\x74\x20\x28\x43\x29\x20\x32\x30\x31\x31\x2D\x32\x30\x31\x33\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x6E\x79\x61\x74\x6C\x61\x2E\x6A\x70\x2F\x22\x3E\x6E\x79\x61\x74\x6C\x61\x2E\x6A\x70\x3C\x2F\x61\x3E\x20\x41\x6C\x6C\x20\x52\x69\x67\x68\x74\x73\x20\x52\x65\x73\x65\x72\x76\x65\x64\x2E\x0D\x0A\x3C\x2F\x64\x69\x76\x3E\x0D\x0A\x3C\x2F\x62\x6F\x64\x79\x3E\x0D\x0A\x3C\x2F\x68\x74\x6D\x6C\x3E\x0D\x0A" + "\x3C\x68\x74\x6D\x6C\x3E\x0D\x0A\x3C\x68\x65\x61\x64\x3E\x3C\x2F\x68\x65\x61\x64\x3E\x0D\x0A\x3C\x62\x6F\x64\x79\x20\x6F\x6E\x6C\x6F\x61\x64\x3D\x22\x69\x6E\x69\x74\x28\x29\x3B\x22\x3E\x0D\x0A\x3C\x68\x31\x3E\x57\x65\x62\x73\x6F\x63\x6B\x65\x74\x20\x74\x65\x73\x74\x20\x70\x61\x67\x65\x2E\x3C\x2F\x68\x31\x3E\x0D\x0A\x3C\x68\x72\x2F\x3E\x0D\x0A\x3C\x68\x32\x3E\x57\x68\x61\x74\x20\x69\x73\x20\x74\x68\x69\x73\x3F\x3C\x2F\x68\x32\x3E\x0D\x0A\x54\x68\x69\x73\x20\x69\x73\x20\x3C\x61\x20\x68\x72\x65\x66\x3D\x22\x68\x74\x74\x70\x3A\x2F\x2F\x6E\x79\x61\x74\x6C\x61\x2E\x6A\x70\x2F\x6D\x69\x6D\x69\x63\x2F\x77\x70\x2F\x22\x3E\x4D\x69\x4D\x69\x63\x3C\x2F\x61\x3E\x20\x6C\x69\x62\x72\x61\x72\x79\x20\x73\x61\x6D\x70\x6C\x65\x20\x70\x72\x6F\x67\x72\x61\x6D\x2E\x0D\x0A\x54\x68\x69\x73\x20\x70\x72\x6F\x67\x72\x61\x6D\x20\x72\x65\x63\x65\x69\x76\x65\x73\x20\x74\x68\x65\x20\x76\x61\x6C\x75\x65\x20\x6F\x66\x20\x41\x49\x4E\x31\x20\x69\x6E\x20\x57\x65\x62\x73\x6F\x63\x6B\x65\x74\x2C\x20\x61\x6E\x64\x20\x64\x72\x61\x77\x73\x20\x61\x20\x67\x72\x61\x70\x68\x2E\x0D\x0A\x3C\x68\x32\x3E\x41\x49\x4E\x31\x28\x50\x32\x30\x29\x20\x76\x61\x6C\x75\x65\x3C\x2F\x68\x32\x3E\x0D\x0A\x3C\x73\x63\x72\x69\x70\x74\x3E\x0D\x0A\x0D\x0A\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x69\x6E\x69\x74\x28\x29\x7B\x0D\x0A\x09\x76\x61\x72\x20\x72\x78\x3D\x22\x22\x3B\x0D\x0A\x0D\x0A\x09\x76\x61\x72\x20\x77\x73\x20\x3D\x20\x6E\x65\x77\x20\x57\x65\x62\x53\x6F\x63\x6B\x65\x74\x28\x22\x77\x73\x3A\x2F\x2F\x22\x2B\x6C\x6F\x63\x61\x74\x69\x6F\x6E\x2E\x68\x6F\x73\x74\x2B\x22\x2F\x77\x73\x2F\x22\x29\x3B\x0D\x0A\x09\x77\x69\x6E\x64\x6F\x77\x2E\x6F\x6E\x62\x65\x66\x6F\x72\x65\x75\x6E\x6C\x6F\x61\x64\x3D\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x65\x29\x7B\x0D\x0A\x09\x09\x77\x73\x2E\x63\x6C\x6F\x73\x65\x28\x34\x35\x30\x30\x2C\x22\x22\x29\x3B\x0D\x0A\x09\x7D\x0D\x0A\x0D\x0A\x09\x2F\x2F\x72\x65\x63\x65\x69\x76\x65\x20\x6D\x65\x73\x73\x61\x67\x65\x20\x69\x6E\x20\x43\x53\x56\x20\x66\x6F\x72\x6D\x61\x74\x2E\x0D\x0A\x09\x76\x61\x72\x20\x6B\x3D\x30\x3B\x0D\x0A\x09\x77\x73\x2E\x6F\x6E\x6D\x65\x73\x73\x61\x67\x65\x20\x3D\x20\x66\x75\x6E\x63\x74\x69\x6F\x6E\x28\x65\x29\x0D\x0A\x09\x7B\x0D\x0A\x09\x09\x72\x78\x2B\x3D\x65\x2E\x64\x61\x74\x61\x3B\x0D\x0A\x09\x09\x66\x6F\x72\x28\x3B\x3B\x29\x7B\x0D\x0A\x09\x09\x09\x76\x61\x72\x20\x70\x3D\x72\x78\x2E\x69\x6E\x64\x65\x78\x4F\x66\x28\x22\x2C\x22\x29\x3B\x0D\x0A\x09\x09\x09\x69\x66\x28\x70\x3C\x30\x29\x7B\x0D\x0A\x09\x09\x09\x09\x62\x72\x65\x61\x6B\x3B\x0D\x0A\x09\x09\x09\x7D\x0D\x0A\x09\x09\x09\x76\x3D\x70\x61\x72\x73\x65\x49\x6E\x74\x28\x72\x78\x2E\x73\x75\x62\x73\x74\x72\x28\x30\x2C\x70\x2B\x31\x29\x29\x3B\x0D\x0A\x09\x09\x09\x72\x78\x3D\x72\x78\x2E\x73\x75\x62\x73\x74\x72\x28\x70\x2B\x32\x29\x3B\x0D\x0A\x09\x09\x09\x61\x64\x64\x64\x61\x74\x61\x28\x76\x29\x3B\x0D\x0A\x09\x09\x09\x73\x63\x72\x6F\x6C\x6C\x28\x29\x3B\x0D\x0A\x09\x09\x7D\x0D\x0A\x09\x7D\x3B\x0D\x0A\x7D\x0D\x0A\x0D\x0A\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x61\x64\x64\x64\x61\x74\x61\x28\x76\x29\x0D\x0A\x7B\x0D\x0A\x20\x20\x20\x20\x76\x61\x72\x20\x63\x61\x6E\x76\x61\x73\x20\x3D\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x2E\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64\x28\x27\x63\x31\x27\x29\x3B\x0D\x0A\x20\x20\x20\x20\x76\x61\x72\x20\x63\x74\x78\x20\x3D\x20\x63\x61\x6E\x76\x61\x73\x2E\x67\x65\x74\x43\x6F\x6E\x74\x65\x78\x74\x28\x27\x32\x64\x27\x29\x3B\x0D\x0A\x20\x20\x20\x20\x63\x74\x78\x2E\x66\x69\x6C\x6C\x53\x74\x79\x6C\x65\x20\x3D\x20\x22\x72\x65\x64\x22\x3B\x0D\x0A\x20\x20\x20\x20\x63\x74\x78\x2E\x66\x69\x6C\x6C\x52\x65\x63\x74\x28\x63\x61\x6E\x76\x61\x73\x2E\x77\x69\x64\x74\x68\x2D\x31\x30\x2C\x63\x61\x6E\x76\x61\x73\x2E\x68\x65\x69\x67\x68\x74\x2D\x28\x76\x2A\x31\x34\x30\x2F\x34\x30\x39\x36\x29\x2C\x31\x2C\x31\x29\x3B\x0D\x0A\x7D\x0D\x0A\x66\x75\x6E\x63\x74\x69\x6F\x6E\x20\x73\x63\x72\x6F\x6C\x6C\x28\x29\x0D\x0A\x7B\x0D\x0A\x20\x20\x20\x20\x76\x61\x72\x20\x63\x61\x6E\x76\x61\x73\x20\x3D\x20\x64\x6F\x63\x75\x6D\x65\x6E\x74\x2E\x67\x65\x74\x45\x6C\x65\x6D\x65\x6E\x74\x42\x79\x49\x64\x28\x27\x63\x31\x27\x29\x3B\x0D\x0A\x20\x20\x20\x20\x76\x61\x72\x20\x63\x74\x78\x20\x3D\x20\x63\x61\x6E\x76\x61\x73\x2E\x67\x65\x74\x43\x6F\x6E\x74\x65\x78\x74\x28\x27\x32\x64\x27\x29\x3B\x0D\x0A\x20\x20\x20\x20\x76\x61\x72\x20\x69\x6D\x61\x67\x65\x64\x61\x74\x61\x20\x3D\x20\x63\x74\x78\x2E\x67\x65\x74\x49\x6D\x61\x67\x65\x44\x61\x74\x61\x28\x30\x2C\x30\x2C\x63\x61\x6E\x76\x61\x73\x2E\x77\x69\x64\x74\x68\x2C\x63\x61\x6E\x76\x61\x73\x2E\x68\x65\x69\x67\x68\x74\x29\x3B\x0D\x0A\x20\x20\x20\x20\x63\x74\x78\x2E\x70\x75\x74\x49\x6D\x61\x67\x65\x44\x61\x74\x61\x28\x69\x6D\x61\x67\x65\x64\x61\x74\x61\x2C\x2D\x31\x2C\x30\x29\x3B\x0D\x0A\x20\x0D\x0A\x7D\x0D\x0A\x3C\x2F\x73\x63\x72\x69\x70\x74\x3E\x0D\x0A\x3C\x63\x61\x6E\x76\x61\x73\x20\x73\x74\x79\x6C\x65\x3D\x22\x62\x6F\x72\x64\x65\x72\x2D\x73\x74\x79\x6C\x65\x3A\x73\x6F\x6C\x69\x64\x3B\x62\x6F\x72\x64\x65\x72\x2D\x77\x69\x64\x74\x68\x3A\x31\x70\x78\x3B\x22\x20\x69\x64\x3D\x22\x63\x31\x22\x20\x77\x69\x64\x74\x68\x3D\x22\x33\x32\x30\x22\x20\x68\x65\x69\x67\x68\x74\x3D\x22\x32\x34\x30\x22\x3E\x3C\x2F\x63\x61\x6E\x76\x61\x73\x3E\x3C\x62\x72\x2F\x3E\x0D\x0A\x3C\x62\x72\x2F\x3E\x0D\x0A\x0D\x0A\x3C\x2F\x62\x6F\x64\x79\x3E\x0D\x0A\x3C\x2F\x68\x74\x6D\x6C\x3E" } };