From 1751f826b51087793e000417944a6840f985f7b4 Mon Sep 17 00:00:00 2001 From: Jason Reeder Date: Thu, 3 Nov 2016 15:37:40 -0500 Subject: [PATCH] Initial commit Signed-off-by: Jason Reeder --- .gitignore | 4 + ...rtoCloudIndustrialIoTGateway_manifest.html | 5316 ++++ build_all.sh | 128 + components/api/Makefile | 79 + components/api/inc/api_mac.h | 3313 +++ components/api/inc/api_mac_linux.h | 115 + components/api/inc/mt_msg.h | 757 + components/api/inc/mt_msg_dbg.h | 168 + components/api/src/api_mac.c | 3995 +++ components/api/src/mt_msg.c | 2978 ++ components/api/src/mt_msg_dbg_core.c | 266 + components/api/src/mt_msg_dbg_load.c | 465 + components/api/src/mt_msg_ini.c | 175 + components/common/Makefile | 96 + components/common/inc/bitsnbits.h | 195 + components/common/inc/compiler.h | 74 + components/common/inc/compiler_gcc.h | 103 + components/common/inc/debug_helpers.h | 279 + components/common/inc/fatal.h | 97 + components/common/inc/fifo.h | 308 + components/common/inc/hexline.h | 119 + components/common/inc/hlos_specific.h | 202 + components/common/inc/ini_file.h | 412 + components/common/inc/log.h | 299 + components/common/inc/mutex.h | 113 + components/common/inc/rand_data.h | 193 + components/common/inc/stream.h | 361 + components/common/inc/stream_private.h | 203 + components/common/inc/stream_socket.h | 399 + components/common/inc/stream_uart.h | 165 + components/common/inc/threads.h | 135 + components/common/inc/ti_semaphore.h | 132 + components/common/inc/timer.h | 247 + components/common/inc/unix_fdrw.h | 207 + components/common/inc/void_ptr.h | 93 + components/common/linux/linux_specific.c | 1501 + components/common/linux/linux_uart.c | 814 + components/common/src/debug_helpers.c | 535 + components/common/src/fatal.c | 116 + components/common/src/fifo.c | 841 + components/common/src/hexline.c | 204 + components/common/src/ini_file.c | 1143 + components/common/src/log.c | 492 + components/common/src/log_ini.c | 175 + components/common/src/mutex.c | 354 + components/common/src/rand_data.c | 193 + components/common/src/stream_common.c | 656 + components/common/src/stream_file.c | 435 + components/common/src/stream_mem.c | 397 + components/common/src/stream_socket_client.c | 432 + components/common/src/stream_socket_ini.c | 215 + components/common/src/stream_socket_private.c | 608 + components/common/src/stream_socket_private.h | 191 + components/common/src/stream_socket_server.c | 668 + components/common/src/stream_uart_ini.c | 172 + components/common/src/threads.c | 503 + components/common/src/ti_semaphore.c | 259 + components/common/src/timer.c | 202 + components/common/src/timer_cb.c | 507 + components/common/src/unix_fdrw.c | 471 + components/nv/Makefile | 72 + components/nv/inc/nv_linux.h | 167 + components/nv/inc/nvintf.h | 184 + components/nv/linux/nv_linux.c | 2215 ++ docs/Readme.txt | 3 + example/collector/Makefile | 189 + example/collector/api_mac.pb-c.c | 7952 +++++ example/collector/api_mac.pb-c.h | 4286 +++ example/collector/api_mac.proto | 1792 ++ example/collector/api_mac_proto.c | 201 + example/collector/api_mac_proto.h | 98 + example/collector/appsrv.c | 1381 + example/collector/appsrv.h | 194 + example/collector/appsrv.pb-c.c | 1495 + example/collector/appsrv.pb-c.h | 644 + example/collector/appsrv.proto | 228 + example/collector/appsrv_proto.c | 544 + example/collector/appsrv_proto.h | 207 + example/collector/cllc.c | 1590 + example/collector/cllc.h | 343 + example/collector/cllc.pb-c.c | 334 + example/collector/cllc.pb-c.h | 208 + example/collector/cllc.proto | 129 + example/collector/collector.c | 1519 + example/collector/collector.cfg | 199 + example/collector/collector.h | 225 + example/collector/config.h | 265 + example/collector/csf.h | 382 + example/collector/csf.pb-c.c | 103 + example/collector/csf.pb-c.h | 76 + example/collector/csf.proto | 68 + example/collector/csf_linux.c | 2434 ++ example/collector/csf_linux.h | 205 + example/collector/csf_linux.pb-c.c | 9 + example/collector/csf_linux.pb-c.h | 38 + example/collector/csf_linux.proto | 51 + example/collector/csf_proto.c | 110 + example/collector/csf_proto.h | 81 + example/collector/linux_main.c | 557 + example/collector/llc.h | 106 + example/collector/llc.pb-c.c | 223 + example/collector/llc.pb-c.h | 134 + example/collector/llc.proto | 83 + example/collector/llc_proto.c | 154 + example/collector/llc_proto.h | 93 + example/collector/protobuf-c.c | 3502 +++ example/collector/protobuf-c/protobuf-c.h | 1115 + example/collector/run_collector.sh | 121 + example/collector/smsgs.h | 524 + example/collector/smsgs.pb-c.c | 1545 + example/collector/smsgs.pb-c.h | 812 + example/collector/smsgs.proto | 343 + example/collector/smsgs_proto.c | 441 + example/collector/smsgs_proto.h | 168 + example/collector/util.c | 212 + example/collector/util.h | 251 + example/google/Makefile | 133 + example/iot-gateway/appClient/appclient.js | 676 + .../iot-gateway/appClient/devices/device.js | 257 + .../iot-gateway/appClient/nwkinfo/nwkinfo.js | 221 + .../appClient/protofiles/appsrv.proto | 2331 ++ .../cloudAdapter/awsCloudAdapter.js | 209 + .../iot-gateway/cloudAdapter/awsConfig.json | 11 + .../iot-gateway/cloudAdapter/awsDeltaTest.js | 54 + .../iot-gateway/cloudAdapter/certs/Readme.txt | 9 + example/iot-gateway/iot-gateway.js | 171 + example/iot-gateway/node_modules/.bin/acorn | 54 + example/iot-gateway/node_modules/.bin/brfs | 20 + .../iot-gateway/node_modules/.bin/escodegen | 45 + .../iot-gateway/node_modules/.bin/esgenerate | 45 + example/iot-gateway/node_modules/.bin/esparse | 127 + .../iot-gateway/node_modules/.bin/esvalidate | 199 + example/iot-gateway/node_modules/.bin/mime | 8 + .../node_modules/.bin/quote-stream | 13 + .../node_modules/accepts/HISTORY.md | 170 + .../iot-gateway/node_modules/accepts/LICENSE | 23 + .../node_modules/accepts/README.md | 135 + .../iot-gateway/node_modules/accepts/index.js | 231 + .../node_modules/accepts/package.json | 123 + .../node_modules/acorn/.editorconfig | 7 + .../node_modules/acorn/.gitattributes | 1 + .../iot-gateway/node_modules/acorn/.npmignore | 3 + .../node_modules/acorn/.tern-project | 1 + .../node_modules/acorn/.travis.yml | 2 + .../iot-gateway/node_modules/acorn/AUTHORS | 38 + .../iot-gateway/node_modules/acorn/LICENSE | 19 + .../iot-gateway/node_modules/acorn/README.md | 377 + .../iot-gateway/node_modules/acorn/bin/acorn | 54 + .../node_modules/acorn/bin/build-acorn.js | 51 + .../acorn/bin/generate-identifier-regex.js | 47 + .../node_modules/acorn/bin/prepublish.sh | 2 + .../node_modules/acorn/bin/update_authors.sh | 6 + .../node_modules/acorn/bin/without_eval | 48 + .../iot-gateway/node_modules/acorn/dist/.keep | 0 .../node_modules/acorn/dist/acorn.js | 4014 +++ .../node_modules/acorn/dist/acorn_csp.js | 3985 +++ .../node_modules/acorn/dist/acorn_loose.js | 1298 + .../node_modules/acorn/dist/walk.js | 342 + .../node_modules/acorn/package.json | 192 + .../node_modules/acorn/src/expression.js | 697 + .../node_modules/acorn/src/identifier.js | 129 + .../node_modules/acorn/src/index.js | 75 + .../node_modules/acorn/src/location.js | 68 + .../acorn/src/loose/acorn_loose.js | 0 .../acorn/src/loose/expression.js | 511 + .../node_modules/acorn/src/loose/index.js | 50 + .../node_modules/acorn/src/loose/parseutil.js | 126 + .../node_modules/acorn/src/loose/state.js | 17 + .../node_modules/acorn/src/loose/statement.js | 419 + .../node_modules/acorn/src/loose/tokenize.js | 108 + .../node_modules/acorn/src/lval.js | 213 + .../node_modules/acorn/src/node.js | 70 + .../node_modules/acorn/src/options.js | 119 + .../node_modules/acorn/src/parseutil.js | 89 + .../node_modules/acorn/src/state.js | 78 + .../node_modules/acorn/src/statement.js | 594 + .../node_modules/acorn/src/tokencontext.js | 107 + .../node_modules/acorn/src/tokenize.js | 672 + .../node_modules/acorn/src/tokentype.js | 142 + .../node_modules/acorn/src/util.js | 9 + .../node_modules/acorn/src/walk/index.js | 291 + .../node_modules/acorn/src/whitespace.js | 12 + .../iot-gateway/node_modules/after/.npmignore | 2 + .../node_modules/after/.travis.yml | 5 + .../iot-gateway/node_modules/after/LICENCE | 19 + .../iot-gateway/node_modules/after/README.md | 75 + .../iot-gateway/node_modules/after/index.js | 28 + .../node_modules/after/package.json | 88 + .../node_modules/after/test/after-test.js | 120 + .../iot-gateway/node_modules/amdefine/LICENSE | 58 + .../node_modules/amdefine/README.md | 171 + .../node_modules/amdefine/amdefine.js | 301 + .../node_modules/amdefine/intercept.js | 36 + .../node_modules/amdefine/package.json | 74 + .../node_modules/array-flatten/LICENSE | 21 + .../node_modules/array-flatten/README.md | 43 + .../array-flatten/array-flatten.js | 64 + .../node_modules/array-flatten/package.json | 88 + .../node_modules/arraybuffer.slice/.npmignore | 17 + .../node_modules/arraybuffer.slice/Makefile | 8 + .../node_modules/arraybuffer.slice/README.md | 17 + .../node_modules/arraybuffer.slice/index.js | 29 + .../arraybuffer.slice/package.json | 64 + .../arraybuffer.slice/test/slice-buffer.js | 227 + .../node_modules/aws-iot-device-sdk/.jscsrc | 129 + .../node_modules/aws-iot-device-sdk/.jshintrc | 91 + .../aws-iot-device-sdk/.npmignore | 29 + .../aws-iot-device-sdk/CHANGELOG.md | 52 + .../aws-iot-device-sdk/LICENSE.txt | 201 + .../aws-iot-device-sdk/NOTICE.txt | 2 + .../node_modules/aws-iot-device-sdk/README.md | 923 + .../aws-iot-device-sdk/browser/index.js | 19 + .../aws-iot-device-sdk/browser/package.json | 15 + .../common/lib/exceptions.js | 33 + .../common/lib/is-undefined.js | 32 + .../common/lib/tls-reader.js | 111 + .../aws-iot-device-sdk/device/index.js | 734 + .../device/lib/exceptions.js | 28 + .../aws-iot-device-sdk/device/lib/tls.js | 45 + .../aws-iot-device-sdk/device/lib/ws.js | 27 + .../browser/lifecycle/aws-configuration.js | 24 + .../examples/browser/lifecycle/example.css | 40 + .../examples/browser/lifecycle/index.html | 29 + .../examples/browser/lifecycle/index.js | 234 + .../mqtt-explorer/aws-configuration.js | 24 + .../browser/mqtt-explorer/example.css | 57 + .../examples/browser/mqtt-explorer/index.html | 42 + .../examples/browser/mqtt-explorer/index.js | 214 + .../temperature-monitor/aws-configuration.js | 24 + .../browser/temperature-monitor/example.css | 24 + .../browser/temperature-monitor/index.html | 30 + .../browser/temperature-monitor/index.js | 220 + .../examples/device-example.js | 111 + .../examples/echo-example.js | 87 + .../examples/lib/cmdline.js | 212 + .../examples/temperature-control/package.json | 16 + .../temperature-control.js | 575 + .../examples/thing-example.js | 238 + .../examples/thing-passthrough-example.js | 254 + .../aws-iot-device-sdk/gulpfile.js | 66 + .../node_modules/aws-iot-device-sdk/index.js | 20 + .../aws-iot-device-sdk/node_modules/.bin/mqtt | 1 + .../node_modules/.bin/mqtt_pub | 1 + .../node_modules/.bin/mqtt_sub | 1 + .../node_modules/crypto-js/CONTRIBUTING.md | 28 + .../node_modules/crypto-js/LICENSE | 24 + .../node_modules/crypto-js/README.md | 198 + .../node_modules/crypto-js/aes.js | 227 + .../node_modules/crypto-js/bower.json | 35 + .../node_modules/crypto-js/cipher-core.js | 875 + .../node_modules/crypto-js/core.js | 742 + .../node_modules/crypto-js/crypto-js.js | 5949 ++++ .../crypto-js/docs/QuickStartGuide.wiki | 470 + .../node_modules/crypto-js/enc-base64.js | 124 + .../node_modules/crypto-js/enc-hex.js | 18 + .../node_modules/crypto-js/enc-latin1.js | 18 + .../node_modules/crypto-js/enc-utf16.js | 149 + .../node_modules/crypto-js/enc-utf8.js | 18 + .../node_modules/crypto-js/evpkdf.js | 132 + .../node_modules/crypto-js/format-hex.js | 66 + .../node_modules/crypto-js/format-openssl.js | 18 + .../node_modules/crypto-js/hmac-md5.js | 18 + .../node_modules/crypto-js/hmac-ripemd160.js | 18 + .../node_modules/crypto-js/hmac-sha1.js | 18 + .../node_modules/crypto-js/hmac-sha224.js | 18 + .../node_modules/crypto-js/hmac-sha256.js | 18 + .../node_modules/crypto-js/hmac-sha3.js | 18 + .../node_modules/crypto-js/hmac-sha384.js | 18 + .../node_modules/crypto-js/hmac-sha512.js | 18 + .../node_modules/crypto-js/hmac.js | 143 + .../node_modules/crypto-js/index.js | 18 + .../node_modules/crypto-js/lib-typedarrays.js | 76 + .../node_modules/crypto-js/md5.js | 268 + .../node_modules/crypto-js/mode-cfb.js | 78 + .../crypto-js/mode-ctr-gladman.js | 116 + .../node_modules/crypto-js/mode-ctr.js | 58 + .../node_modules/crypto-js/mode-ecb.js | 40 + .../node_modules/crypto-js/mode-ofb.js | 54 + .../node_modules/crypto-js/package.json | 64 + .../node_modules/crypto-js/pad-ansix923.js | 49 + .../node_modules/crypto-js/pad-iso10126.js | 44 + .../node_modules/crypto-js/pad-iso97971.js | 40 + .../node_modules/crypto-js/pad-nopadding.js | 30 + .../node_modules/crypto-js/pad-pkcs7.js | 18 + .../node_modules/crypto-js/pad-zeropadding.js | 45 + .../node_modules/crypto-js/pbkdf2.js | 145 + .../node_modules/crypto-js/rabbit-legacy.js | 190 + .../node_modules/crypto-js/rabbit.js | 192 + .../node_modules/crypto-js/rc4.js | 139 + .../node_modules/crypto-js/ripemd160.js | 267 + .../node_modules/crypto-js/sha1.js | 150 + .../node_modules/crypto-js/sha224.js | 80 + .../node_modules/crypto-js/sha256.js | 199 + .../node_modules/crypto-js/sha3.js | 323 + .../node_modules/crypto-js/sha384.js | 83 + .../node_modules/crypto-js/sha512.js | 323 + .../node_modules/crypto-js/tripledes.js | 770 + .../node_modules/crypto-js/x64-core.js | 304 + .../node_modules/mqtt/.eslintrc | 75 + .../node_modules/mqtt/.jscsrc | 51 + .../node_modules/mqtt/.jshintrc | 22 + .../node_modules/mqtt/.npmignore | 9 + .../node_modules/mqtt/.travis.yml | 15 + .../node_modules/mqtt/.zuul.yml | 10 + .../node_modules/mqtt/CONTRIBUTING.md | 27 + .../node_modules/mqtt/LICENSE.md | 15 + .../node_modules/mqtt/MQTT.js.png | Bin 0 -> 102217 bytes .../node_modules/mqtt/README.md | 438 + .../node_modules/mqtt/benchmarks/bombing.js | 30 + .../mqtt/benchmarks/throughputCounter.js | 22 + .../node_modules/mqtt/bin/pub.js | 109 + .../node_modules/mqtt/bin/sub.js | 115 + .../node_modules/mqtt/doc/help.txt | 8 + .../node_modules/mqtt/doc/publish.txt | 25 + .../node_modules/mqtt/doc/subscribe.txt | 26 + .../node_modules/mqtt/example.js | 11 + .../mqtt/examples/client/secure-client.js | 21 + .../mqtt/examples/client/simple-both.js | 11 + .../mqtt/examples/client/simple-publish.js | 5 + .../mqtt/examples/client/simple-subscribe.js | 7 + .../mqtt/examples/server/broadcast.js | 56 + .../node_modules/mqtt/examples/server/orig.js | 67 + .../mqtt/examples/server/redis.js | 48 + .../node_modules/mqtt/examples/server/tls.js | 52 + .../mqtt/examples/server/websocket.js | 74 + .../mqtt/examples/tls client/crt.ca.cg.pem | 34 + .../mqtt/examples/tls client/mqttclient.js | 44 + .../mqtt/examples/tls client/tls-cert.pem | 13 + .../mqtt/examples/tls client/tls-key.pem | 15 + .../mqtt/examples/tls server/crt.server1.pem | 32 + .../examples/tls server/key.csr.server1.pem | 52 + .../mqtt/examples/tls server/mqttserver.js | 48 + .../node_modules/mqtt/examples/wss/client.js | 47 + .../node_modules/mqtt/lib/client.js | 885 + .../node_modules/mqtt/lib/connect/index.js | 136 + .../node_modules/mqtt/lib/connect/tcp.js | 19 + .../node_modules/mqtt/lib/connect/tls.js | 48 + .../node_modules/mqtt/lib/connect/ws.js | 82 + .../node_modules/mqtt/lib/server.js | 68 + .../node_modules/mqtt/lib/store.js | 108 + .../node_modules/mqtt/mqtt.js | 204 + .../mqtt/node_modules/commist/.npmignore | 25 + .../mqtt/node_modules/commist/LICENSE | 21 + .../mqtt/node_modules/commist/README.md | 56 + .../mqtt/node_modules/commist/example.js | 24 + .../mqtt/node_modules/commist/index.js | 123 + .../commist/node_modules/.bin/leven | 1 + .../commist/node_modules/leven/cli.js | 28 + .../commist/node_modules/leven/index.js | 46 + .../commist/node_modules/leven/license | 21 + .../commist/node_modules/leven/package.json | 88 + .../commist/node_modules/leven/readme.md | 58 + .../mqtt/node_modules/commist/package.json | 54 + .../mqtt/node_modules/commist/test.js | 191 + .../node_modules/end-of-stream/.npmignore | 1 + .../mqtt/node_modules/end-of-stream/LICENSE | 21 + .../mqtt/node_modules/end-of-stream/README.md | 47 + .../mqtt/node_modules/end-of-stream/index.js | 83 + .../end-of-stream/node_modules/once/LICENSE | 15 + .../end-of-stream/node_modules/once/README.md | 51 + .../once/node_modules/wrappy/LICENSE | 15 + .../once/node_modules/wrappy/README.md | 36 + .../once/node_modules/wrappy/package.json | 63 + .../once/node_modules/wrappy/wrappy.js | 33 + .../end-of-stream/node_modules/once/once.js | 21 + .../node_modules/once/package.json | 63 + .../node_modules/end-of-stream/package.json | 55 + .../mqtt/node_modules/end-of-stream/test.js | 77 + .../mqtt/node_modules/help-me/.npmignore | 28 + .../mqtt/node_modules/help-me/LICENSE | 22 + .../mqtt/node_modules/help-me/README.md | 49 + .../mqtt/node_modules/help-me/doc/hello.txt | 1 + .../mqtt/node_modules/help-me/doc/help.txt | 1 + .../mqtt/node_modules/help-me/example.js | 7 + .../node_modules/help-me/fixture/basic/hello | 1 + .../help-me/fixture/basic/hello.txt | 1 + .../help-me/fixture/basic/help.txt | 1 + .../mqtt/node_modules/help-me/help-me.js | 57 + .../help-me/node_modules/pump/.npmignore | 1 + .../help-me/node_modules/pump/.travis.yml | 5 + .../help-me/node_modules/pump/LICENSE | 21 + .../help-me/node_modules/pump/README.md | 56 + .../help-me/node_modules/pump/index.js | 79 + .../pump/node_modules/once/LICENSE | 15 + .../pump/node_modules/once/README.md | 51 + .../once/node_modules/wrappy/LICENSE | 15 + .../once/node_modules/wrappy/README.md | 36 + .../once/node_modules/wrappy/package.json | 63 + .../once/node_modules/wrappy/wrappy.js | 33 + .../pump/node_modules/once/once.js | 21 + .../pump/node_modules/once/package.json | 63 + .../help-me/node_modules/pump/package.json | 53 + .../help-me/node_modules/pump/test.js | 46 + .../mqtt/node_modules/help-me/package.json | 61 + .../mqtt/node_modules/help-me/test.js | 87 + .../node_modules/mqtt-connection/.npmignore | 28 + .../node_modules/mqtt-connection/.travis.yml | 10 + .../mqtt-connection/CONTRIBUTING.md | 27 + .../node_modules/mqtt-connection/LICENSE.md | 13 + .../node_modules/mqtt-connection/README.md | 320 + .../mqtt-connection/connection.js | 79 + .../mqtt-connection/lib/generateStream.js | 26 + .../mqtt-connection/lib/parseStream.js | 24 + .../node_modules/reduplexer/.npmignore | 7 + .../node_modules/reduplexer/.travis.yml | 3 + .../node_modules/reduplexer/LICENSE | 13 + .../node_modules/reduplexer/README.md | 91 + .../node_modules/reduplexer/index.js | 157 + .../node_modules/reduplexer/package.json | 67 + .../node_modules/reduplexer/test.js | 370 + .../node_modules/through2/.npmignore | 3 + .../node_modules/through2/LICENSE | 39 + .../node_modules/through2/README.md | 132 + .../node_modules/through2/package.json | 64 + .../node_modules/through2/through2.js | 96 + .../node_modules/mqtt-connection/package.json | 66 + .../mqtt-connection/test/connection.js | 23 + .../mqtt-connection/test/connection.parse.js | 686 + .../test/connection.transmit.js | 1105 + .../node_modules/mqtt-connection/test/util.js | 17 + .../mqtt/node_modules/mqtt-packet/.npmignore | 25 + .../mqtt/node_modules/mqtt-packet/.travis.yml | 15 + .../node_modules/mqtt-packet/CONTRIBUTING.md | 27 + .../mqtt/node_modules/mqtt-packet/LICENSE.md | 13 + .../mqtt/node_modules/mqtt-packet/README.md | 328 + .../mqtt-packet/benchmarks/generate.js | 20 + .../mqtt-packet/benchmarks/parse.js | 21 + .../node_modules/mqtt-packet/constants.js | 52 + .../mqtt/node_modules/mqtt-packet/generate.js | 614 + .../mqtt/node_modules/mqtt-packet/mqtt.js | 5 + .../mqtt-packet/node_modules/bl/.jshintrc | 59 + .../mqtt-packet/node_modules/bl/.npmignore | 1 + .../mqtt-packet/node_modules/bl/.travis.yml | 11 + .../mqtt-packet/node_modules/bl/LICENSE.md | 13 + .../mqtt-packet/node_modules/bl/README.md | 198 + .../mqtt-packet/node_modules/bl/bl.js | 221 + .../mqtt-packet/node_modules/bl/package.json | 60 + .../node_modules/bl/test/basic-test.js | 557 + .../mqtt-packet/node_modules/bl/test/sauce.js | 38 + .../mqtt-packet/node_modules/bl/test/test.js | 9 + .../node_modules/mqtt-packet/package.json | 74 + .../mqtt/node_modules/mqtt-packet/packet.js | 12 + .../mqtt/node_modules/mqtt-packet/parser.js | 388 + .../mqtt/node_modules/mqtt-packet/test.js | 918 + .../node_modules/mqtt-packet/testRandom.js | 27 + .../node_modules/readable-stream/.npmignore | 5 + .../mqtt/node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 15 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 982 + .../readable-stream/lib/_stream_transform.js | 210 + .../readable-stream/lib/_stream_writable.js | 386 + .../node_modules/readable-stream/package.json | 77 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 11 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../mqtt/node_modules/reinterval/.npmignore | 27 + .../mqtt/node_modules/reinterval/.travis.yml | 20 + .../mqtt/node_modules/reinterval/LICENSE | 22 + .../mqtt/node_modules/reinterval/README.md | 60 + .../mqtt/node_modules/reinterval/index.js | 57 + .../mqtt/node_modules/reinterval/package.json | 60 + .../node_modules/reinterval/tests/test.js | 52 + .../node_modules/mqtt/package.json | 118 + .../node_modules/mqtt/test/abstract_client.js | 1253 + .../node_modules/mqtt/test/abstract_store.js | 133 + .../node_modules/mqtt/test/browser/server.js | 131 + .../node_modules/mqtt/test/browser/test.js | 86 + .../node_modules/mqtt/test/client.js | 261 + .../mqtt/test/helpers/private-csr.pem | 16 + .../mqtt/test/helpers/private-key.pem | 27 + .../mqtt/test/helpers/public-cert.pem | 19 + .../mqtt/test/helpers/public-key.pem | 9 + .../node_modules/mqtt/test/helpers/server.js | 63 + .../mqtt/test/helpers/server_process.js | 10 + .../mqtt/test/helpers/tls-cert.pem | 14 + .../mqtt/test/helpers/tls-csr.pem | 11 + .../mqtt/test/helpers/tls-key.pem | 15 + .../mqtt/test/helpers/wrong-cert.pem | 13 + .../mqtt/test/helpers/wrong-csr.pem | 11 + .../mqtt/test/helpers/wrong-key.pem | 15 + .../node_modules/mqtt/test/mocha.opts | 3 + .../node_modules/mqtt/test/mqtt.js | 262 + .../node_modules/mqtt/test/secure_client.js | 141 + .../node_modules/mqtt/test/server.js | 48 + .../node_modules/mqtt/test/store.js | 9 + .../node_modules/mqtt/test/util.js | 16 + .../mqtt/test/websocket_client.js | 95 + .../node_modules/websocket-stream/.npmignore | 2 + .../node_modules/websocket-stream/LICENSE | 8 + .../websocket-stream/collaborators.md | 11 + .../websocket-stream/echo-server.js | 49 + .../node_modules/websocket-stream/index.js | 6 + .../node_modules/duplexify/.npmignore | 1 + .../node_modules/duplexify/.travis.yml | 6 + .../node_modules/duplexify/LICENSE | 21 + .../node_modules/duplexify/README.md | 97 + .../node_modules/duplexify/example.js | 21 + .../node_modules/duplexify/index.js | 227 + .../node_modules/end-of-stream/.npmignore | 1 + .../node_modules/end-of-stream/README.md | 47 + .../node_modules/end-of-stream/index.js | 72 + .../end-of-stream/node_modules/once/LICENSE | 15 + .../end-of-stream/node_modules/once/README.md | 51 + .../once/node_modules/wrappy/LICENSE | 15 + .../once/node_modules/wrappy/README.md | 36 + .../once/node_modules/wrappy/package.json | 62 + .../once/node_modules/wrappy/wrappy.js | 33 + .../end-of-stream/node_modules/once/once.js | 21 + .../node_modules/once/package.json | 62 + .../node_modules/end-of-stream/package.json | 54 + .../node_modules/end-of-stream/test.js | 62 + .../node_modules/stream-shift/.npmignore | 1 + .../node_modules/stream-shift/.travis.yml | 6 + .../node_modules/stream-shift/LICENSE | 21 + .../node_modules/stream-shift/README.md | 25 + .../node_modules/stream-shift/index.js | 20 + .../node_modules/stream-shift/package.json | 54 + .../node_modules/stream-shift/test.js | 48 + .../node_modules/duplexify/package.json | 67 + .../node_modules/duplexify/test.js | 292 + .../websocket-stream/package.json | 88 + .../node_modules/websocket-stream/readme.md | 70 + .../node_modules/websocket-stream/server.js | 31 + .../node_modules/websocket-stream/stream.js | 112 + .../websocket-stream/test-client.js | 27 + .../websocket-stream/test-server.js | 5 + .../node_modules/websocket-stream/test.js | 227 + .../websocket-stream/ws-fallback.js | 12 + .../aws-iot-device-sdk/package.json | 79 + .../aws-iot-device-sdk/scripts/browserize.sh | 101 + .../aws-iot-device-sdk/test/data/README.txt | 6 + .../test/data/certificate.pem.crt | 1 + .../test/data/private.pem.key | 1 + .../aws-iot-device-sdk/test/data/root-CA.crt | 1 + .../test/device-unit-tests.js | 1451 + .../test/mock/mockMQTTClient.js | 110 + .../aws-iot-device-sdk/test/mock/mockTls.js | 81 + .../test/thing-unit-tests.js | 1450 + .../aws-iot-device-sdk/thing/index.js | 676 + .../node_modules/backo2/.npmignore | 1 + .../node_modules/backo2/History.md | 12 + .../iot-gateway/node_modules/backo2/Makefile | 8 + .../iot-gateway/node_modules/backo2/Readme.md | 34 + .../node_modules/backo2/component.json | 11 + .../iot-gateway/node_modules/backo2/index.js | 85 + .../node_modules/backo2/package.json | 70 + .../node_modules/backo2/test/index.js | 18 + .../base64-arraybuffer/.npmignore | 1 + .../base64-arraybuffer/.travis.yml | 6 + .../base64-arraybuffer/LICENSE-MIT | 22 + .../node_modules/base64-arraybuffer/README.md | 23 + .../node_modules/base64-arraybuffer/grunt.js | 39 + .../lib/base64-arraybuffer.js | 59 + .../base64-arraybuffer/package.json | 82 + .../test/base64-arraybuffer_test.js | 72 + .../node_modules/base64id/.npmignore | 3 + .../node_modules/base64id/README.md | 18 + .../node_modules/base64id/lib/base64id.js | 103 + .../node_modules/base64id/package.json | 72 + .../node_modules/benchmark/LICENSE.txt | 22 + .../node_modules/benchmark/README.md | 131 + .../node_modules/benchmark/benchmark.js | 3918 +++ .../node_modules/benchmark/doc/README.md | 2629 ++ .../node_modules/benchmark/package.json | 89 + .../node_modules/benchmark/test/run-test.sh | 9 + .../node_modules/benchmark/test/test.js | 2074 ++ .../node_modules/better-assert/.npmignore | 4 + .../node_modules/better-assert/History.md | 15 + .../node_modules/better-assert/Makefile | 5 + .../node_modules/better-assert/Readme.md | 61 + .../node_modules/better-assert/example.js | 10 + .../node_modules/better-assert/index.js | 38 + .../node_modules/better-assert/package.json | 92 + .../iot-gateway/node_modules/blob/.npmignore | 2 + .../iot-gateway/node_modules/blob/.zuul.yml | 14 + .../iot-gateway/node_modules/blob/Makefile | 14 + .../iot-gateway/node_modules/blob/README.md | 14 + .../iot-gateway/node_modules/blob/index.js | 96 + .../node_modules/blob/package.json | 69 + .../node_modules/blob/test/index.js | 94 + .../iot-gateway/node_modules/brfs/.travis.yml | 6 + example/iot-gateway/node_modules/brfs/LICENSE | 18 + .../iot-gateway/node_modules/brfs/bin/cmd.js | 20 + .../node_modules/brfs/bin/usage.txt | 13 + .../node_modules/brfs/example/async.js | 4 + .../node_modules/brfs/example/main.js | 3 + .../node_modules/brfs/example/robot.html | 1 + .../iot-gateway/node_modules/brfs/index.js | 146 + .../node_modules/brfs/package.json | 101 + .../node_modules/brfs/readme.markdown | 186 + .../iot-gateway/node_modules/brfs/test/ag.js | 23 + .../node_modules/brfs/test/async.js | 48 + .../node_modules/brfs/test/buffer.js | 26 + .../node_modules/brfs/test/bundle.js | 25 + .../iot-gateway/node_modules/brfs/test/cmd.js | 26 + .../brfs/test/dynamic_read_concat.js | 17 + .../brfs/test/dynamic_read_no_concat.js | 17 + .../node_modules/brfs/test/encoding.js | 19 + .../node_modules/brfs/test/files/ag.js | 5 + .../node_modules/brfs/test/files/ag.json | 1 + .../node_modules/brfs/test/files/ag_post.html | 1 + .../node_modules/brfs/test/files/ag_pre.html | 1 + .../node_modules/brfs/test/files/async.js | 4 + .../node_modules/brfs/test/files/async.txt | 1 + .../brfs/test/files/async_encoding.js | 4 + .../brfs/test/files/async_str_encoding.js | 4 + .../node_modules/brfs/test/files/buffer.js | 3 + .../brfs/test/files/dynamic_read_concat.js | 4 + .../brfs/test/files/dynamic_read_no_concat.js | 4 + .../node_modules/brfs/test/files/encoding.js | 4 + .../node_modules/brfs/test/files/hoist.js | 3 + .../node_modules/brfs/test/files/inline.js | 2 + .../node_modules/brfs/test/files/main.js | 3 + .../node_modules/brfs/test/files/multi_var.js | 3 + .../node_modules/brfs/test/files/non_fs.js | 3 + .../node_modules/brfs/test/files/path_join.js | 4 + .../brfs/test/files/path_join_other_name.js | 4 + .../brfs/test/files/path_join_single_var.js | 4 + .../brfs/test/files/readdir-sync.js | 3 + .../node_modules/brfs/test/files/readdir.js | 6 + .../node_modules/brfs/test/files/robot.html | 1 + .../brfs/test/files/separators.js | 3 + .../brfs/test/files/separators.txt | 3 + .../node_modules/brfs/test/files/tr.beep | 3 + .../node_modules/brfs/test/files/tr.html | 1 + .../brfs/test/files/with_comments.js | 20 + .../node_modules/brfs/test/hoist.js | 25 + .../node_modules/brfs/test/inline.js | 25 + .../node_modules/brfs/test/multi_var.js | 25 + .../node_modules/brfs/test/non_fs.js | 25 + .../node_modules/brfs/test/path_join.js | 25 + .../brfs/test/path_join_other_name.js | 25 + .../brfs/test/path_join_single_var.js | 25 + .../node_modules/brfs/test/readdir.js | 43 + .../node_modules/brfs/test/require_resolve.js | 21 + .../brfs/test/require_resolve/main.js | 4 + .../require_resolve/node_modules/aaa/wow.txt | 1 + .../node_modules/brfs/test/separators.js | 45 + .../iot-gateway/node_modules/brfs/test/tr.js | 41 + .../node_modules/brfs/test/with_comments.js | 27 + .../node_modules/buffer-equal/.travis.yml | 4 + .../node_modules/buffer-equal/README.markdown | 62 + .../node_modules/buffer-equal/example/eq.js | 14 + .../node_modules/buffer-equal/index.js | 14 + .../node_modules/buffer-equal/package.json | 83 + .../node_modules/buffer-equal/test/eq.js | 35 + .../node_modules/bytebuffer/.npmignore | 3 + .../node_modules/bytebuffer/.travis.yml | 5 + .../node_modules/bytebuffer/LICENSE | 202 + .../node_modules/bytebuffer/README.md | 64 + .../node_modules/bytebuffer/bower.json | 12 + .../node_modules/bytebuffer/bytebuffer.png | Bin 0 -> 3699 bytes .../node_modules/bytebuffer/dist/README.md | 47 + .../bytebuffer/dist/bytebuffer-dataview.js | 3461 +++ .../dist/bytebuffer-dataview.min.js | 88 + .../dist/bytebuffer-dataview.min.js.gz | Bin 0 -> 7988 bytes .../dist/bytebuffer-dataview.min.map | 8 + .../bytebuffer/dist/bytebuffer-node.js | 3454 +++ .../bytebuffer/dist/bytebuffer.js | 3746 +++ .../bytebuffer/dist/bytebuffer.min.js | 93 + .../bytebuffer/dist/bytebuffer.min.js.gz | Bin 0 -> 8658 bytes .../bytebuffer/dist/bytebuffer.min.map | 8 + .../node_modules/bytebuffer/donate.png | Bin 0 -> 1478 bytes .../bytebuffer/externs/bytebuffer.js | 862 + .../bytebuffer/externs/minimal-env.js | 52 + .../node_modules/bytebuffer/index.js | 1 + .../node_modules/bytebuffer/jsdoc.json | 13 + .../node_modules/bytebuffer/package.json | 107 + .../node_modules/bytebuffer/scripts/build.js | 113 + .../node_modules/bytebuffer/src/bower.json | 12 + .../node_modules/bytebuffer/src/bytebuffer.js | 220 + .../bytebuffer/src/encodings/base64.js | 88 + .../bytebuffer/src/encodings/binary.js | 74 + .../bytebuffer/src/encodings/debug.js | 211 + .../bytebuffer/src/encodings/hex.js | 75 + .../bytebuffer/src/encodings/impl/base64.js | 3 + .../bytebuffer/src/encodings/impl/binary.js | 65 + .../bytebuffer/src/encodings/impl/debug.js | 3 + .../bytebuffer/src/encodings/impl/hex.js | 101 + .../bytebuffer/src/encodings/impl/utf8.js | 126 + .../bytebuffer/src/encodings/utf8.js | 71 + .../node_modules/bytebuffer/src/helpers.js | 143 + .../node_modules/bytebuffer/src/macros.js | 222 + .../bytebuffer/src/methods/append.js | 58 + .../bytebuffer/src/methods/assert.js | 12 + .../bytebuffer/src/methods/capacity.js | 8 + .../bytebuffer/src/methods/clear.js | 13 + .../bytebuffer/src/methods/clone.js | 34 + .../bytebuffer/src/methods/compact.js | 49 + .../bytebuffer/src/methods/copy.js | 73 + .../bytebuffer/src/methods/ensureCapacity.js | 15 + .../bytebuffer/src/methods/fill.js | 35 + .../bytebuffer/src/methods/flip.js | 11 + .../bytebuffer/src/methods/mark.js | 17 + .../bytebuffer/src/methods/order.js | 36 + .../bytebuffer/src/methods/prepend.js | 87 + .../bytebuffer/src/methods/printDebug.js | 16 + .../bytebuffer/src/methods/remaining.js | 9 + .../bytebuffer/src/methods/reset.js | 17 + .../bytebuffer/src/methods/resize.js | 39 + .../bytebuffer/src/methods/reverse.js | 25 + .../bytebuffer/src/methods/skip.js | 19 + .../bytebuffer/src/methods/slice.js | 18 + .../bytebuffer/src/methods/static/accessor.js | 13 + .../bytebuffer/src/methods/static/allocate.js | 14 + .../bytebuffer/src/methods/static/concat.js | 55 + .../src/methods/static/isByteBuffer.js | 9 + .../bytebuffer/src/methods/static/type.js | 11 + .../bytebuffer/src/methods/static/wrap.js | 125 + .../bytebuffer/src/methods/toBuffer.js | 77 + .../bytebuffer/src/methods/toString.js | 43 + .../bytebuffer/src/types/bytes/bitset.js | 89 + .../bytebuffer/src/types/bytes/bytes.js | 34 + .../bytebuffer/src/types/floats/float32.js | 81 + .../bytebuffer/src/types/floats/float64.js | 77 + .../bytebuffer/src/types/floats/ieee754.js | 130 + .../bytebuffer/src/types/ints/int16.js | 167 + .../bytebuffer/src/types/ints/int32.js | 125 + .../bytebuffer/src/types/ints/int64.js | 194 + .../bytebuffer/src/types/ints/int8.js | 137 + .../bytebuffer/src/types/strings/cstring.js | 110 + .../bytebuffer/src/types/strings/istring.js | 81 + .../src/types/strings/utf8string.js | 214 + .../bytebuffer/src/types/strings/vstring.js | 78 + .../bytebuffer/src/types/varints/varint32.js | 164 + .../bytebuffer/src/types/varints/varint64.js | 208 + .../node_modules/bytebuffer/src/wrap-node.js | 50 + .../node_modules/bytebuffer/src/wrap.js | 43 + .../node_modules/bytebuffer/tests/bench.js | 99 + .../node_modules/bytebuffer/tests/suite.js | 1005 + .../node_modules/callsite/.npmignore | 4 + .../node_modules/callsite/History.md | 10 + .../node_modules/callsite/Makefile | 6 + .../node_modules/callsite/Readme.md | 44 + .../node_modules/callsite/index.js | 10 + .../node_modules/callsite/package.json | 69 + .../node_modules/component-bind/.npmignore | 4 + .../node_modules/component-bind/History.md | 13 + .../node_modules/component-bind/Makefile | 7 + .../node_modules/component-bind/Readme.md | 64 + .../component-bind/component.json | 13 + .../node_modules/component-bind/index.js | 23 + .../node_modules/component-bind/package.json | 73 + .../node_modules/component-emitter/.npmignore | 2 + .../component-emitter/.travis.yml | 4 + .../node_modules/component-emitter/History.md | 52 + .../node_modules/component-emitter/Makefile | 7 + .../node_modules/component-emitter/Readme.md | 74 + .../node_modules/component-emitter/bower.json | 21 + .../component-emitter/component.json | 14 + .../node_modules/component-emitter/index.js | 164 + .../component-emitter/package.json | 75 + .../node_modules/component-inherit/.npmignore | 3 + .../node_modules/component-inherit/History.md | 5 + .../node_modules/component-inherit/Makefile | 16 + .../node_modules/component-inherit/Readme.md | 24 + .../component-inherit/component.json | 10 + .../node_modules/component-inherit/index.js | 7 + .../component-inherit/package.json | 70 + .../component-inherit/test/inherit.js | 21 + .../node_modules/concat-stream/LICENSE | 24 + .../node_modules/concat-stream/index.js | 136 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 15 + .../node_modules/readable-stream/duplex.js | 1 + .../node_modules/readable-stream/float.patch | 923 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 951 + .../readable-stream/lib/_stream_transform.js | 209 + .../readable-stream/lib/_stream_writable.js | 477 + .../node_modules/readable-stream/package.json | 95 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 7 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../node_modules/concat-stream/package.json | 111 + .../node_modules/concat-stream/readme.md | 94 + .../content-disposition/HISTORY.md | 45 + .../node_modules/content-disposition/LICENSE | 22 + .../content-disposition/README.md | 141 + .../node_modules/content-disposition/index.js | 445 + .../content-disposition/package.json | 92 + .../node_modules/content-type/HISTORY.md | 9 + .../node_modules/content-type/LICENSE | 22 + .../node_modules/content-type/README.md | 92 + .../node_modules/content-type/index.js | 214 + .../node_modules/content-type/package.json | 91 + .../node_modules/cookie-signature/.npmignore | 4 + .../node_modules/cookie-signature/History.md | 38 + .../node_modules/cookie-signature/Readme.md | 42 + .../node_modules/cookie-signature/index.js | 51 + .../cookie-signature/package.json | 84 + .../node_modules/cookie/HISTORY.md | 72 + .../iot-gateway/node_modules/cookie/LICENSE | 24 + .../iot-gateway/node_modules/cookie/README.md | 64 + .../iot-gateway/node_modules/cookie/index.js | 156 + .../node_modules/cookie/package.json | 102 + .../node_modules/core-util-is/LICENSE | 19 + .../node_modules/core-util-is/README.md | 3 + .../node_modules/core-util-is/float.patch | 604 + .../node_modules/core-util-is/lib/util.js | 107 + .../node_modules/core-util-is/package.json | 89 + .../node_modules/core-util-is/test.js | 68 + .../iot-gateway/node_modules/debug/.jshintrc | 3 + .../iot-gateway/node_modules/debug/.npmignore | 6 + .../iot-gateway/node_modules/debug/History.md | 195 + .../iot-gateway/node_modules/debug/Makefile | 36 + .../iot-gateway/node_modules/debug/Readme.md | 188 + .../iot-gateway/node_modules/debug/bower.json | 28 + .../iot-gateway/node_modules/debug/browser.js | 168 + .../node_modules/debug/component.json | 19 + .../iot-gateway/node_modules/debug/debug.js | 197 + .../iot-gateway/node_modules/debug/node.js | 209 + .../node_modules/debug/package.json | 106 + .../iot-gateway/node_modules/depd/History.md | 84 + example/iot-gateway/node_modules/depd/LICENSE | 22 + .../iot-gateway/node_modules/depd/Readme.md | 281 + .../iot-gateway/node_modules/depd/index.js | 521 + .../node_modules/depd/lib/browser/index.js | 79 + .../depd/lib/compat/buffer-concat.js | 35 + .../depd/lib/compat/callsite-tostring.js | 103 + .../depd/lib/compat/event-listener-count.js | 22 + .../node_modules/depd/lib/compat/index.js | 84 + .../node_modules/depd/package.json | 94 + .../iot-gateway/node_modules/destroy/LICENSE | 22 + .../node_modules/destroy/README.md | 60 + .../iot-gateway/node_modules/destroy/index.js | 75 + .../node_modules/destroy/package.json | 98 + .../node_modules/duplexer2/.npmignore | 1 + .../node_modules/duplexer2/.travis.yml | 3 + .../node_modules/duplexer2/LICENSE.md | 26 + .../node_modules/duplexer2/README.md | 129 + .../node_modules/duplexer2/example.js | 49 + .../node_modules/duplexer2/index.js | 62 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 15 + .../node_modules/readable-stream/duplex.js | 1 + .../node_modules/readable-stream/float.patch | 923 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 951 + .../readable-stream/lib/_stream_transform.js | 209 + .../readable-stream/lib/_stream_writable.js | 477 + .../node_modules/readable-stream/package.json | 95 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 7 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../node_modules/duplexer2/package.json | 87 + .../node_modules/duplexer2/test/tests.js | 161 + .../iot-gateway/node_modules/ee-first/LICENSE | 22 + .../node_modules/ee-first/README.md | 80 + .../node_modules/ee-first/index.js | 95 + .../node_modules/ee-first/package.json | 90 + .../node_modules/engine.io-client/.npmignore | 2 + .../node_modules/engine.io-client/.travis.yml | 46 + .../node_modules/engine.io-client/.zuul.yml | 6 + .../node_modules/engine.io-client/History.md | 553 + .../node_modules/engine.io-client/LICENSE | 22 + .../node_modules/engine.io-client/Makefile | 38 + .../node_modules/engine.io-client/README.md | 292 + .../engine.io-client/engine.io.js | 4244 +++ .../node_modules/engine.io-client/index.js | 2 + .../engine.io-client/lib/index.js | 10 + .../engine.io-client/lib/socket.js | 728 + .../engine.io-client/lib/transport.js | 155 + .../engine.io-client/lib/transports/index.js | 53 + .../lib/transports/polling-jsonp.js | 238 + .../lib/transports/polling-xhr.js | 412 + .../lib/transports/polling.js | 247 + .../lib/transports/websocket.js | 288 + .../engine.io-client/lib/xmlhttprequest.js | 36 + .../engine.io-client/package.json | 114 + .../node_modules/engine.io-parser/.npmignore | 17 + .../node_modules/engine.io-parser/.travis.yml | 43 + .../node_modules/engine.io-parser/.zuul.yml | 5 + .../node_modules/engine.io-parser/History.md | 115 + .../node_modules/engine.io-parser/LICENSE | 22 + .../node_modules/engine.io-parser/Makefile | 26 + .../node_modules/engine.io-parser/Readme.md | 202 + .../node_modules/engine.io-parser/index.js | 2 + .../engine.io-parser/lib/browser.js | 594 + .../engine.io-parser/lib/index.js | 460 + .../node_modules/engine.io-parser/lib/keys.js | 19 + .../node_modules/has-binary/.npmignore | 15 + .../node_modules/has-binary/History.md | 11 + .../node_modules/has-binary/LICENSE | 20 + .../node_modules/has-binary/Makefile | 3 + .../node_modules/has-binary/README.md | 4 + .../node_modules/has-binary/fixtures/big.json | 1 + .../node_modules/has-binary/index.js | 58 + .../node_modules/has-binary/package.json | 64 + .../node_modules/has-binary/test.js | 108 + .../engine.io-parser/package.json | 82 + .../node_modules/engine.io/.npmignore | 6 + .../node_modules/engine.io/.travis.yml | 10 + .../node_modules/engine.io/History.md | 485 + .../node_modules/engine.io/LICENSE | 19 + .../node_modules/engine.io/Makefile | 23 + .../node_modules/engine.io/README.md | 534 + .../node_modules/engine.io/index.js | 4 + .../node_modules/engine.io/lib/engine.io.js | 126 + .../node_modules/engine.io/lib/server.js | 456 + .../node_modules/engine.io/lib/socket.js | 471 + .../node_modules/engine.io/lib/transport.js | 127 + .../engine.io/lib/transports/index.js | 36 + .../engine.io/lib/transports/polling-jsonp.js | 74 + .../engine.io/lib/transports/polling-xhr.js | 70 + .../engine.io/lib/transports/polling.js | 407 + .../engine.io/lib/transports/websocket.js | 125 + .../engine.io/node_modules/accepts/HISTORY.md | 74 + .../engine.io/node_modules/accepts/LICENSE | 22 + .../engine.io/node_modules/accepts/README.md | 94 + .../engine.io/node_modules/accepts/index.js | 160 + .../node_modules/accepts/package.json | 117 + .../engine.io/node_modules/mime-db/HISTORY.md | 212 + .../engine.io/node_modules/mime-db/LICENSE | 22 + .../engine.io/node_modules/mime-db/README.md | 76 + .../engine.io/node_modules/mime-db/db.json | 6359 ++++ .../engine.io/node_modules/mime-db/index.js | 11 + .../node_modules/mime-db/package.json | 120 + .../node_modules/mime-types/HISTORY.md | 115 + .../engine.io/node_modules/mime-types/LICENSE | 22 + .../node_modules/mime-types/README.md | 102 + .../node_modules/mime-types/index.js | 63 + .../node_modules/mime-types/package.json | 109 + .../engine.io/node_modules/negotiator/LICENSE | 23 + .../node_modules/negotiator/README.md | 161 + .../node_modules/negotiator/lib/charset.js | 87 + .../node_modules/negotiator/lib/encoding.js | 117 + .../node_modules/negotiator/lib/language.js | 100 + .../node_modules/negotiator/lib/mediaType.js | 122 + .../node_modules/negotiator/lib/negotiator.js | 37 + .../node_modules/negotiator/package.json | 105 + .../node_modules/engine.io/package.json | 102 + .../node_modules/escape-html/LICENSE | 24 + .../node_modules/escape-html/Readme.md | 43 + .../node_modules/escape-html/index.js | 78 + .../node_modules/escape-html/package.json | 86 + .../node_modules/escodegen/.jshintrc | 20 + .../node_modules/escodegen/LICENSE.BSD | 19 + .../node_modules/escodegen/LICENSE.source-map | 27 + .../node_modules/escodegen/README.md | 111 + .../node_modules/escodegen/bin/escodegen.js | 45 + .../node_modules/escodegen/bin/esgenerate.js | 45 + .../node_modules/escodegen/component.json | 58 + .../escodegen/escodegen.browser.min.js | 1 + .../node_modules/escodegen/escodegen.js | 2283 ++ .../node_modules/escodegen/gulpfile.js | 67 + .../node_modules/escodegen/package.json | 102 + .../node_modules/esprima/README.md | 24 + .../node_modules/esprima/bin/esparse.js | 127 + .../node_modules/esprima/bin/esvalidate.js | 199 + .../node_modules/esprima/esprima.js | 3830 +++ .../node_modules/esprima/package.json | 122 + .../node_modules/esprima/test/compat.js | 241 + .../node_modules/esprima/test/reflect.js | 422 + .../node_modules/esprima/test/run.js | 67 + .../node_modules/esprima/test/runner.js | 467 + .../node_modules/esprima/test/test.js | 24416 ++++++++++++++++ .../node_modules/estraverse/.jshintrc | 16 + .../node_modules/estraverse/LICENSE.BSD | 19 + .../node_modules/estraverse/README.md | 70 + .../node_modules/estraverse/estraverse.js | 689 + .../node_modules/estraverse/package.json | 85 + .../node_modules/esutils/.jshintrc | 16 + .../node_modules/esutils/.travis.yml | 8 + .../node_modules/esutils/README.md | 80 + .../node_modules/esutils/lib/code.js | 90 + .../node_modules/esutils/lib/keyword.js | 117 + .../node_modules/esutils/lib/utils.js | 32 + .../node_modules/esutils/package.json | 83 + .../node_modules/esutils/test/code.coffee | 167 + .../node_modules/esutils/test/keyword.coffee | 204 + .../iot-gateway/node_modules/etag/HISTORY.md | 71 + example/iot-gateway/node_modules/etag/LICENSE | 22 + .../iot-gateway/node_modules/etag/README.md | 165 + .../iot-gateway/node_modules/etag/index.js | 132 + .../node_modules/etag/package.json | 100 + .../node_modules/events/.npmignore | 1 + .../node_modules/events/.travis.yml | 7 + .../iot-gateway/node_modules/events/.zuul.yml | 12 + .../node_modules/events/History.md | 38 + .../iot-gateway/node_modules/events/LICENSE | 22 + .../iot-gateway/node_modules/events/Readme.md | 19 + .../iot-gateway/node_modules/events/events.js | 298 + .../node_modules/events/package.json | 91 + .../events/tests/add-listeners.js | 63 + .../events/tests/check-listener-leaks.js | 86 + .../node_modules/events/tests/common.js | 42 + .../node_modules/events/tests/index.js | 25 + .../events/tests/legacy-compat.js | 18 + .../events/tests/listener-count.js | 36 + .../events/tests/listeners-side-effects.js | 55 + .../node_modules/events/tests/listeners.js | 51 + .../events/tests/max-listeners.js | 50 + .../events/tests/modify-in-emit.js | 76 + .../node_modules/events/tests/num-args.js | 44 + .../node_modules/events/tests/once.js | 59 + .../events/tests/remove-all-listeners.js | 80 + .../events/tests/remove-listeners.js | 84 + .../tests/set-max-listeners-side-effects.js | 29 + .../node_modules/events/tests/subclass.js | 51 + .../node_modules/express/History.md | 3062 ++ .../iot-gateway/node_modules/express/LICENSE | 24 + .../node_modules/express/Readme.md | 138 + .../iot-gateway/node_modules/express/index.js | 11 + .../node_modules/express/lib/application.js | 643 + .../node_modules/express/lib/express.js | 103 + .../express/lib/middleware/init.js | 36 + .../express/lib/middleware/query.js | 51 + .../node_modules/express/lib/request.js | 489 + .../node_modules/express/lib/response.js | 1053 + .../node_modules/express/lib/router/index.js | 645 + .../node_modules/express/lib/router/layer.js | 176 + .../node_modules/express/lib/router/route.js | 210 + .../node_modules/express/lib/utils.js | 300 + .../node_modules/express/lib/view.js | 173 + .../node_modules/express/package.json | 168 + .../node_modules/falafel/.travis.yml | 3 + .../node_modules/falafel/example/array.js | 14 + .../node_modules/falafel/example/keyword.js | 16 + .../node_modules/falafel/example/prompt.js | 49 + .../iot-gateway/node_modules/falafel/index.js | 79 + .../node_modules/falafel/package.json | 137 + .../node_modules/falafel/readme.markdown | 122 + .../node_modules/falafel/test/array.js | 35 + .../node_modules/falafel/test/async.js | 42 + .../node_modules/falafel/test/bin/run.js | 5 + .../falafel/test/custom-parser.js | 42 + .../node_modules/falafel/test/es6.js | 15 + .../node_modules/falafel/test/for.js | 30 + .../node_modules/falafel/test/inspect.js | 36 + .../node_modules/falafel/test/opts.js | 134 + .../node_modules/falafel/test/parent.js | 33 + .../node_modules/finalhandler/HISTORY.md | 98 + .../node_modules/finalhandler/LICENSE | 22 + .../node_modules/finalhandler/README.md | 133 + .../node_modules/finalhandler/index.js | 151 + .../node_modules/finalhandler/package.json | 106 + .../node_modules/foreach/.npmignore | 3 + .../iot-gateway/node_modules/foreach/LICENSE | 24 + .../iot-gateway/node_modules/foreach/Makefile | 11 + .../node_modules/foreach/Readme.md | 30 + .../node_modules/foreach/component.json | 11 + .../iot-gateway/node_modules/foreach/index.js | 22 + .../node_modules/foreach/package.json | 109 + .../iot-gateway/node_modules/foreach/test.js | 153 + .../node_modules/forwarded/HISTORY.md | 4 + .../node_modules/forwarded/LICENSE | 22 + .../node_modules/forwarded/README.md | 53 + .../node_modules/forwarded/index.js | 35 + .../node_modules/forwarded/package.json | 91 + .../iot-gateway/node_modules/fresh/HISTORY.md | 38 + .../iot-gateway/node_modules/fresh/LICENSE | 22 + .../iot-gateway/node_modules/fresh/README.md | 58 + .../iot-gateway/node_modules/fresh/index.js | 57 + .../node_modules/fresh/package.json | 114 + example/iot-gateway/node_modules/fs/index.js | 1 + .../iot-gateway/node_modules/fs/package.json | 59 + .../node_modules/function-bind/.eslintrc | 13 + .../node_modules/function-bind/.jscs.json | 159 + .../node_modules/function-bind/.npmignore | 16 + .../node_modules/function-bind/.travis.yml | 77 + .../node_modules/function-bind/LICENSE | 20 + .../node_modules/function-bind/README.md | 48 + .../function-bind/implementation.js | 48 + .../node_modules/function-bind/index.js | 3 + .../node_modules/function-bind/package.json | 129 + .../node_modules/function-bind/test/index.js | 250 + .../node_modules/generate-function/.npmignore | 1 + .../generate-function/.travis.yml | 3 + .../node_modules/generate-function/README.md | 72 + .../node_modules/generate-function/example.js | 27 + .../node_modules/generate-function/index.js | 61 + .../generate-function/package.json | 79 + .../node_modules/generate-function/test.js | 33 + .../generate-object-property/.npmignore | 1 + .../generate-object-property/.travis.yml | 3 + .../generate-object-property/LICENSE | 21 + .../generate-object-property/README.md | 19 + .../generate-object-property/index.js | 12 + .../generate-object-property/package.json | 76 + .../generate-object-property/test.js | 12 + .../node_modules/has-binary/.npmignore | 15 + .../node_modules/has-binary/History.md | 19 + .../node_modules/has-binary/LICENSE | 20 + .../node_modules/has-binary/Makefile | 3 + .../node_modules/has-binary/README.md | 4 + .../node_modules/has-binary/index.js | 59 + .../node_modules/has-binary/package.json | 66 + .../node_modules/has-binary/test.js | 73 + .../node_modules/has-cors/.npmignore | 3 + .../node_modules/has-cors/History.md | 21 + .../node_modules/has-cors/Makefile | 11 + .../node_modules/has-cors/Readme.md | 24 + .../node_modules/has-cors/component.json | 13 + .../node_modules/has-cors/index.js | 17 + .../node_modules/has-cors/package.json | 88 + .../iot-gateway/node_modules/has-cors/test.js | 24 + .../iot-gateway/node_modules/has/.jshintrc | 14 + .../iot-gateway/node_modules/has/.npmignore | 3 + .../iot-gateway/node_modules/has/LICENSE-MIT | 22 + .../iot-gateway/node_modules/has/README.mkd | 18 + .../iot-gateway/node_modules/has/package.json | 85 + .../iot-gateway/node_modules/has/src/index.js | 3 + .../node_modules/has/test/.jshintrc | 7 + .../node_modules/has/test/index.js | 10 + .../node_modules/http-errors/HISTORY.md | 76 + .../node_modules/http-errors/LICENSE | 22 + .../node_modules/http-errors/README.md | 63 + .../node_modules/http-errors/index.js | 120 + .../node_modules/http-errors/package.json | 110 + .../node_modules/http/package.json | 59 + .../node_modules/indexof/.npmignore | 2 + .../iot-gateway/node_modules/indexof/Makefile | 11 + .../node_modules/indexof/Readme.md | 15 + .../node_modules/indexof/component.json | 10 + .../iot-gateway/node_modules/indexof/index.js | 10 + .../node_modules/indexof/package.json | 59 + .../iot-gateway/node_modules/inherits/LICENSE | 16 + .../node_modules/inherits/README.md | 42 + .../node_modules/inherits/inherits.js | 1 + .../node_modules/inherits/inherits_browser.js | 23 + .../node_modules/inherits/package.json | 83 + .../iot-gateway/node_modules/inherits/test.js | 25 + .../node_modules/ipaddr.js/.npmignore | 2 + .../node_modules/ipaddr.js/.travis.yml | 10 + .../node_modules/ipaddr.js/Cakefile | 18 + .../node_modules/ipaddr.js/LICENSE | 19 + .../node_modules/ipaddr.js/README.md | 161 + .../node_modules/ipaddr.js/bower.json | 29 + .../node_modules/ipaddr.js/ipaddr.min.js | 1 + .../node_modules/ipaddr.js/lib/ipaddr.js | 467 + .../node_modules/ipaddr.js/package.json | 85 + .../node_modules/ipaddr.js/src/ipaddr.coffee | 396 + .../ipaddr.js/test/ipaddr.test.coffee | 282 + .../node_modules/is-property/.npmignore | 17 + .../node_modules/is-property/LICENSE | 22 + .../node_modules/is-property/README.md | 28 + .../node_modules/is-property/is-property.js | 5 + .../node_modules/is-property/package.json | 84 + .../node_modules/isarray/README.md | 54 + .../node_modules/isarray/build/build.js | 209 + .../node_modules/isarray/component.json | 19 + .../iot-gateway/node_modules/isarray/index.js | 3 + .../node_modules/isarray/package.json | 86 + .../node_modules/json3/.gitmodules | 6 + .../iot-gateway/node_modules/json3/.jamignore | 10 + .../iot-gateway/node_modules/json3/.npmignore | 11 + .../node_modules/json3/.travis.yml | 33 + .../iot-gateway/node_modules/json3/LICENSE | 20 + .../iot-gateway/node_modules/json3/README.md | 126 + .../node_modules/json3/coverage/coverage.json | 1 + .../coverage/lcov-report/lib/json3.js.html | 2903 ++ .../json3/coverage/lcov-report/prettify.css | 1 + .../json3/coverage/lcov-report/prettify.js | 1 + .../node_modules/json3/coverage/lcov.info | 2035 ++ .../node_modules/json3/lib/json3.js | 861 + .../node_modules/json3/lib/json3.min.js | 18 + .../node_modules/json3/package.json | 129 + .../iot-gateway/node_modules/long/.npmignore | 3 + .../iot-gateway/node_modules/long/.travis.yml | 5 + example/iot-gateway/node_modules/long/LICENSE | 202 + .../iot-gateway/node_modules/long/README.md | 513 + .../iot-gateway/node_modules/long/bower.json | 9 + .../node_modules/long/dist/README.md | 16 + .../node_modules/long/dist/long.js | 1211 + .../node_modules/long/dist/long.min.js | 19 + .../node_modules/long/dist/long.min.js.gz | Bin 0 -> 2621 bytes .../node_modules/long/dist/long.min.map | 8 + .../node_modules/long/doco/INDEX.md | 6 + .../node_modules/long/doco/Long.md | 473 + .../iot-gateway/node_modules/long/donate.png | Bin 0 -> 1466 bytes .../node_modules/long/externs/long.js | 416 + .../iot-gateway/node_modules/long/index.js | 1 + .../iot-gateway/node_modules/long/jsdoc.json | 13 + .../iot-gateway/node_modules/long/long.png | Bin 0 -> 1405 bytes .../node_modules/long/package.json | 86 + .../node_modules/long/scripts/build.js | 28 + .../node_modules/long/src/bower.json | 9 + .../iot-gateway/node_modules/long/src/long.js | 1174 + .../iot-gateway/node_modules/long/src/wrap.js | 38 + .../node_modules/long/tests/goog.math.long.js | 807 + .../node_modules/long/tests/suite.js | 181 + .../node_modules/media-typer/HISTORY.md | 22 + .../node_modules/media-typer/LICENSE | 22 + .../node_modules/media-typer/README.md | 81 + .../node_modules/media-typer/index.js | 270 + .../node_modules/media-typer/package.json | 84 + .../node_modules/merge-descriptors/HISTORY.md | 21 + .../node_modules/merge-descriptors/LICENSE | 23 + .../node_modules/merge-descriptors/README.md | 48 + .../node_modules/merge-descriptors/index.js | 60 + .../merge-descriptors/package.json | 164 + .../node_modules/methods/HISTORY.md | 29 + .../iot-gateway/node_modules/methods/LICENSE | 24 + .../node_modules/methods/README.md | 51 + .../iot-gateway/node_modules/methods/index.js | 69 + .../node_modules/methods/package.json | 114 + .../node_modules/mime-db/HISTORY.md | 320 + .../iot-gateway/node_modules/mime-db/LICENSE | 22 + .../node_modules/mime-db/README.md | 82 + .../iot-gateway/node_modules/mime-db/db.json | 6575 +++++ .../iot-gateway/node_modules/mime-db/index.js | 11 + .../node_modules/mime-db/package.json | 125 + .../node_modules/mime-types/HISTORY.md | 191 + .../node_modules/mime-types/LICENSE | 23 + .../node_modules/mime-types/README.md | 103 + .../node_modules/mime-types/index.js | 188 + .../node_modules/mime-types/package.json | 115 + .../iot-gateway/node_modules/mime/.npmignore | 0 example/iot-gateway/node_modules/mime/LICENSE | 19 + .../iot-gateway/node_modules/mime/README.md | 90 + .../node_modules/mime/build/build.js | 11 + .../node_modules/mime/build/test.js | 57 + example/iot-gateway/node_modules/mime/cli.js | 8 + example/iot-gateway/node_modules/mime/mime.js | 108 + .../node_modules/mime/package.json | 98 + .../iot-gateway/node_modules/mime/types.json | 1 + .../node_modules/minimist/.travis.yml | 8 + .../iot-gateway/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../node_modules/minimist/index.js | 236 + .../node_modules/minimist/package.json | 97 + .../node_modules/minimist/readme.markdown | 91 + .../node_modules/minimist/test/all_bool.js | 32 + .../node_modules/minimist/test/bool.js | 166 + .../node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + .../node_modules/minimist/test/dotted.js | 22 + .../node_modules/minimist/test/kv_short.js | 16 + .../node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/num.js | 36 + .../node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + .../iot-gateway/node_modules/ms/.npmignore | 5 + .../iot-gateway/node_modules/ms/History.md | 66 + example/iot-gateway/node_modules/ms/LICENSE | 20 + example/iot-gateway/node_modules/ms/README.md | 35 + example/iot-gateway/node_modules/ms/index.js | 125 + .../iot-gateway/node_modules/ms/package.json | 75 + .../node_modules/negotiator/HISTORY.md | 76 + .../node_modules/negotiator/LICENSE | 24 + .../node_modules/negotiator/README.md | 203 + .../node_modules/negotiator/index.js | 62 + .../node_modules/negotiator/lib/charset.js | 102 + .../node_modules/negotiator/lib/encoding.js | 118 + .../node_modules/negotiator/lib/language.js | 112 + .../node_modules/negotiator/lib/mediaType.js | 179 + .../node_modules/negotiator/package.json | 112 + example/iot-gateway/node_modules/net/LICENSE | 19 + .../iot-gateway/node_modules/net/README.md | 0 example/iot-gateway/node_modules/net/index.js | 28 + .../iot-gateway/node_modules/net/package.json | 76 + example/iot-gateway/node_modules/net/test.js | 6 + .../node_modules/object-component/.npmignore | 3 + .../node_modules/object-component/History.md | 10 + .../node_modules/object-component/Makefile | 16 + .../node_modules/object-component/Readme.md | 31 + .../object-component/component.json | 10 + .../node_modules/object-component/index.js | 84 + .../object-component/package.json | 61 + .../object-component/test/object.js | 48 + .../node_modules/object-inspect/.travis.yml | 4 + .../node_modules/object-inspect/LICENSE | 18 + .../object-inspect/example/all.js | 17 + .../object-inspect/example/circular.js | 4 + .../node_modules/object-inspect/example/fn.js | 3 + .../object-inspect/example/inspect.js | 7 + .../node_modules/object-inspect/index.js | 127 + .../node_modules/object-inspect/package.json | 96 + .../object-inspect/readme.markdown | 59 + .../object-inspect/test/browser/dom.js | 15 + .../object-inspect/test/circular.js | 9 + .../node_modules/object-inspect/test/fn.js | 8 + .../node_modules/object-inspect/test/holes.js | 15 + .../object-inspect/test/lowbyte.js | 12 + .../node_modules/object-inspect/test/undef.js | 12 + .../node_modules/object-keys/.editorconfig | 13 + .../node_modules/object-keys/.eslintrc | 16 + .../node_modules/object-keys/.jscs.json | 131 + .../node_modules/object-keys/.npmignore | 2 + .../node_modules/object-keys/.travis.yml | 60 + .../node_modules/object-keys/CHANGELOG.md | 203 + .../node_modules/object-keys/LICENSE | 21 + .../node_modules/object-keys/README.md | 76 + .../node_modules/object-keys/index.js | 128 + .../node_modules/object-keys/isArguments.js | 17 + .../node_modules/object-keys/package.json | 141 + .../node_modules/object-keys/test/index.js | 5 + .../node_modules/on-finished/HISTORY.md | 88 + .../node_modules/on-finished/LICENSE | 23 + .../node_modules/on-finished/README.md | 154 + .../node_modules/on-finished/index.js | 196 + .../node_modules/on-finished/package.json | 98 + .../node_modules/options/.npmignore | 7 + .../iot-gateway/node_modules/options/Makefile | 12 + .../node_modules/options/README.md | 69 + .../node_modules/options/lib/options.js | 86 + .../node_modules/options/package.json | 76 + .../node_modules/parsejson/Makefile | 3 + .../node_modules/parsejson/index.js | 32 + .../node_modules/parsejson/package.json | 62 + .../node_modules/parsejson/test.js | 21 + .../iot-gateway/node_modules/parseqs/Makefile | 3 + .../iot-gateway/node_modules/parseqs/index.js | 37 + .../node_modules/parseqs/package.json | 62 + .../iot-gateway/node_modules/parseqs/test.js | 27 + .../node_modules/parseuri/History.md | 5 + .../node_modules/parseuri/Makefile | 3 + .../node_modules/parseuri/index.js | 39 + .../node_modules/parseuri/package.json | 71 + .../iot-gateway/node_modules/parseuri/test.js | 51 + .../node_modules/parseurl/HISTORY.md | 47 + .../iot-gateway/node_modules/parseurl/LICENSE | 24 + .../node_modules/parseurl/README.md | 120 + .../node_modules/parseurl/index.js | 138 + .../node_modules/parseurl/package.json | 116 + .../node_modules/path-to-regexp/History.md | 36 + .../node_modules/path-to-regexp/LICENSE | 21 + .../node_modules/path-to-regexp/Readme.md | 35 + .../node_modules/path-to-regexp/index.js | 129 + .../node_modules/path-to-regexp/package.json | 211 + .../process-nextick-args/.travis.yml | 12 + .../process-nextick-args/index.js | 20 + .../process-nextick-args/license.md | 19 + .../process-nextick-args/package.json | 71 + .../process-nextick-args/readme.md | 18 + .../node_modules/process-nextick-args/test.js | 24 + .../protocol-buffers-schema/.npmignore | 1 + .../protocol-buffers-schema/.travis.yml | 5 + .../protocol-buffers-schema/LICENSE | 21 + .../protocol-buffers-schema/README.md | 120 + .../protocol-buffers-schema/example.js | 11 + .../protocol-buffers-schema/example.proto | 13 + .../protocol-buffers-schema/index.js | 6 + .../protocol-buffers-schema/package.json | 82 + .../protocol-buffers-schema/parse.js | 609 + .../protocol-buffers-schema/stringify.js | 183 + .../test/fixtures/basic.json | 86 + .../test/fixtures/basic.proto | 11 + .../test/fixtures/comments.json | 93 + .../test/fixtures/comments.proto | 19 + .../test/fixtures/complex.json | 121 + .../test/fixtures/complex.proto | 28 + .../test/fixtures/extend.json | 161 + .../test/fixtures/extend.proto | 19 + .../test/fixtures/map.json | 31 + .../test/fixtures/map.proto | 3 + .../test/fixtures/oneof.json | 39 + .../test/fixtures/oneof.proto | 6 + .../test/fixtures/options.json | 43 + .../test/fixtures/options.proto | 8 + .../test/fixtures/search.json | 28 + .../test/fixtures/search.proto | 5 + .../test/fixtures/service.json | 104 + .../test/fixtures/service.proto | 30 + .../test/fixtures/version.json | 86 + .../test/fixtures/version.proto | 13 + .../protocol-buffers-schema/test/index.js | 110 + .../protocol-buffers-schema/tokenize.js | 37 + .../node_modules/protocol-buffers/.npmignore | 1 + .../node_modules/protocol-buffers/.travis.yml | 10 + .../node_modules/protocol-buffers/LICENSE | 21 + .../node_modules/protocol-buffers/README.md | 128 + .../protocol-buffers/bench/bench.proto | 28 + .../protocol-buffers/bench/index.js | 61 + .../node_modules/protocol-buffers/compile.js | 510 + .../protocol-buffers/encodings.js | 290 + .../node_modules/protocol-buffers/example.js | 15 + .../protocol-buffers/example.proto | 4 + .../node_modules/protocol-buffers/index.js | 28 + .../protocol-buffers/package.json | 107 + .../protocol-buffers/test/basic.js | 63 + .../protocol-buffers/test/corrupted.js | 41 + .../protocol-buffers/test/defaults.js | 41 + .../protocol-buffers/test/enums.js | 18 + .../protocol-buffers/test/float.js | 25 + .../protocol-buffers/test/integers.js | 48 + .../node_modules/protocol-buffers/test/map.js | 29 + .../node_modules/protocol-buffers/test/nan.js | 29 + .../protocol-buffers/test/nested.js | 62 + .../protocol-buffers/test/notpacked.js | 33 + .../protocol-buffers/test/oneof.js | 60 + .../protocol-buffers/test/packed.js | 121 + .../protocol-buffers/test/repeated.js | 68 + .../protocol-buffers/test/test.proto | 109 + .../protocol-buffers/test/utf-8.js | 15 + .../node_modules/proxy-addr/HISTORY.md | 80 + .../node_modules/proxy-addr/LICENSE | 22 + .../node_modules/proxy-addr/README.md | 137 + .../node_modules/proxy-addr/index.js | 347 + .../node_modules/proxy-addr/package.json | 115 + .../iot-gateway/node_modules/qs/.eslintignore | 1 + .../iot-gateway/node_modules/qs/.npmignore | 19 + .../iot-gateway/node_modules/qs/.travis.yml | 6 + .../iot-gateway/node_modules/qs/CHANGELOG.md | 88 + .../node_modules/qs/CONTRIBUTING.md | 1 + example/iot-gateway/node_modules/qs/LICENSE | 28 + example/iot-gateway/node_modules/qs/README.md | 317 + .../iot-gateway/node_modules/qs/bower.json | 22 + .../iot-gateway/node_modules/qs/lib/index.js | 15 + .../iot-gateway/node_modules/qs/lib/parse.js | 186 + .../node_modules/qs/lib/stringify.js | 121 + .../iot-gateway/node_modules/qs/lib/utils.js | 190 + .../iot-gateway/node_modules/qs/package.json | 82 + .../iot-gateway/node_modules/qs/test/parse.js | 478 + .../node_modules/qs/test/stringify.js | 259 + .../iot-gateway/node_modules/qs/test/utils.js | 28 + .../node_modules/quote-stream/.travis.yml | 4 + .../node_modules/quote-stream/LICENSE | 18 + .../node_modules/quote-stream/bin/cmd.js | 13 + .../node_modules/quote-stream/bin/usage.txt | 4 + .../quote-stream/example/stream.js | 2 + .../node_modules/quote-stream/index.js | 92 + .../node_modules/quote-stream/package.json | 106 + .../node_modules/quote-stream/readme.markdown | 53 + .../node_modules/quote-stream/test/simple.js | 13 + .../quote-stream/test/unicode_separators.js | 23 + .../quote-stream/test/whitespace.js | 13 + .../node_modules/range-parser/HISTORY.md | 40 + .../node_modules/range-parser/LICENSE | 22 + .../node_modules/range-parser/README.md | 57 + .../node_modules/range-parser/index.js | 63 + .../node_modules/range-parser/package.json | 102 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/.travis.yml | 50 + .../node_modules/readable-stream/.zuul.yml | 1 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 36 + .../readable-stream/doc/stream.markdown | 1730 ++ .../doc/wg-meetings/2015-01-30.md | 60 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 82 + .../lib/_stream_passthrough.js | 27 + .../readable-stream/lib/_stream_readable.js | 975 + .../readable-stream/lib/_stream_transform.js | 197 + .../readable-stream/lib/_stream_writable.js | 529 + .../node_modules/readable-stream/package.json | 101 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 12 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../node_modules/resolve/.travis.yml | 4 + .../iot-gateway/node_modules/resolve/LICENSE | 18 + .../node_modules/resolve/example/async.js | 5 + .../node_modules/resolve/example/sync.js | 3 + .../iot-gateway/node_modules/resolve/index.js | 5 + .../node_modules/resolve/lib/async.js | 192 + .../node_modules/resolve/lib/caller.js | 8 + .../node_modules/resolve/lib/core.js | 4 + .../node_modules/resolve/lib/core.json | 38 + .../resolve/lib/node-modules-paths.js | 38 + .../node_modules/resolve/lib/sync.js | 81 + .../node_modules/resolve/package.json | 82 + .../node_modules/resolve/readme.markdown | 148 + .../node_modules/resolve/test/core.js | 12 + .../node_modules/resolve/test/dotdot.js | 29 + .../resolve/test/dotdot/abc/index.js | 2 + .../node_modules/resolve/test/dotdot/index.js | 1 + .../resolve/test/faulty_basedir.js | 17 + .../node_modules/resolve/test/filter.js | 18 + .../node_modules/resolve/test/filter_sync.js | 15 + .../node_modules/resolve/test/mock.js | 142 + .../node_modules/resolve/test/mock_sync.js | 68 + .../node_modules/resolve/test/module_dir.js | 56 + .../test/module_dir/xmodules/aaa/index.js | 1 + .../test/module_dir/ymodules/aaa/index.js | 1 + .../test/module_dir/zmodules/bbb/main.js | 1 + .../test/module_dir/zmodules/bbb/package.json | 3 + .../node_modules/resolve/test/node_path.js | 48 + .../resolve/test/node_path/x/aaa/index.js | 1 + .../resolve/test/node_path/x/ccc/index.js | 1 + .../resolve/test/node_path/y/bbb/index.js | 1 + .../resolve/test/node_path/y/ccc/index.js | 1 + .../node_modules/resolve/test/nonstring.js | 9 + .../node_modules/resolve/test/pathfilter.js | 35 + .../resolve/test/pathfilter/deep_ref/main.js | 0 .../deep_ref/node_modules/deep/alt.js | 0 .../deep_ref/node_modules/deep/deeper/ref.js | 0 .../deep_ref/node_modules/deep/package.json | 4 + .../deep_ref/node_modules/deep/ref.js | 0 .../node_modules/resolve/test/precedence.js | 23 + .../resolve/test/precedence/aaa.js | 1 + .../resolve/test/precedence/aaa/index.js | 1 + .../resolve/test/precedence/aaa/main.js | 1 + .../resolve/test/precedence/bbb.js | 1 + .../resolve/test/precedence/bbb/main.js | 1 + .../node_modules/resolve/test/resolver.js | 281 + .../resolver/bar/node_modules/foo/index.js | 1 + .../resolve/test/resolver/baz/doom.js | 0 .../resolve/test/resolver/baz/package.json | 3 + .../resolve/test/resolver/baz/quux.js | 1 + .../biz/node_modules/garply/lib/index.js | 1 + .../biz/node_modules/garply/package.json | 3 + .../resolver/biz/node_modules/grux/index.js | 1 + .../resolver/biz/node_modules/tiv/index.js | 1 + .../resolve/test/resolver/cup.coffee | 1 + .../node_modules/resolve/test/resolver/foo.js | 1 + .../test/resolver/incorrect_main/index.js | 2 + .../test/resolver/incorrect_main/package.json | 3 + .../resolve/test/resolver/mug.coffee | 0 .../node_modules/resolve/test/resolver/mug.js | 0 .../test/resolver/other_path/lib/other-lib.js | 0 .../resolve/test/resolver/other_path/root.js | 0 .../punycode/node_modules/punycode/index.js | 0 .../resolve/test/resolver/quux/foo/index.js | 1 + .../test/resolver/without_basedir/main.js | 6 + .../without_basedir/node_modules/mymodule.js | 1 + .../resolve/test/resolver_sync.js | 180 + .../node_modules/resolve/test/subdirs.js | 13 + .../test/subdirs/node_modules/a/b/c/x.json | 1 + .../test/subdirs/node_modules/a/package.json | 1 + .../iot-gateway/node_modules/send/HISTORY.md | 310 + example/iot-gateway/node_modules/send/LICENSE | 23 + .../iot-gateway/node_modules/send/README.md | 195 + .../iot-gateway/node_modules/send/index.js | 820 + .../node_modules/send/package.json | 115 + .../node_modules/serve-static/HISTORY.md | 303 + .../node_modules/serve-static/LICENSE | 25 + .../node_modules/serve-static/README.md | 236 + .../node_modules/serve-static/index.js | 187 + .../node_modules/serve-static/package.json | 108 + .../node_modules/shallow-copy/.travis.yml | 4 + .../node_modules/shallow-copy/LICENSE | 18 + .../shallow-copy/example/array.js | 9 + .../shallow-copy/example/object.js | 9 + .../node_modules/shallow-copy/index.js | 35 + .../node_modules/shallow-copy/package.json | 93 + .../node_modules/shallow-copy/readme.markdown | 64 + .../node_modules/shallow-copy/test/array.js | 14 + .../node_modules/shallow-copy/test/object.js | 14 + .../node_modules/signed-varint/LICENSE | 22 + .../node_modules/signed-varint/README.md | 28 + .../node_modules/signed-varint/index.js | 16 + .../node_modules/varint/README.md | 51 + .../node_modules/varint/bench.js | 57 + .../node_modules/varint/decode.js | 29 + .../node_modules/varint/encode.js | 26 + .../node_modules/varint/index.js | 5 + .../node_modules/varint/length.js | 21 + .../node_modules/varint/package.json | 79 + .../signed-varint/node_modules/varint/test.js | 136 + .../node_modules/signed-varint/package.json | 74 + .../node_modules/signed-varint/test.js | 49 + .../node_modules/smartobject/.npmignore | 37 + .../node_modules/smartobject/.travis.yml | 3 + .../node_modules/smartobject/Makefile | 4 + .../node_modules/smartobject/README.md | 767 + .../smartobject/docs/resource_plan.md | 166 + .../smartobject/docs/templates.md | 377 + .../node_modules/smartobject/index.js | 3 + .../smartobject/lib/object_instance.js | 298 + .../smartobject/lib/smartobject.js | 304 + .../node_modules/smartobject/lib/utils.js | 132 + .../node_modules/busyman/.npmignore | 33 + .../node_modules/busyman/.travis.yml | 3 + .../smartobject/node_modules/busyman/LICENSE | 21 + .../smartobject/node_modules/busyman/Makefile | 4 + .../node_modules/busyman/README.md | 1733 ++ .../smartobject/node_modules/busyman/index.js | 697 + .../node_modules/busyman/package.json | 73 + .../node_modules/busyman/test/array.test.js | 288 + .../busyman/test/collection.test.js | 196 + .../busyman/test/function.test.js | 97 + .../node_modules/busyman/test/object.test.js | 256 + .../node_modules/busyman/test/string.test.js | 200 + .../node_modules/busyman/test/type.test.js | 392 + .../node_modules/busyman/test/utils.test.js | 384 + .../node_modules/lwm2m-id/.npmignore | 27 + .../node_modules/lwm2m-id/.travis.yml | 3 + .../smartobject/node_modules/lwm2m-id/LICENSE | 22 + .../node_modules/lwm2m-id/Makefile | 4 + .../node_modules/lwm2m-id/README.md | 931 + .../node_modules/lwm2m-id/defs/conflict.txt | 8 + .../node_modules/lwm2m-id/defs/defs.json | 1350 + .../node_modules/lwm2m-id/index.js | 285 + .../lwm2m-id/node_modules/enum/README.md | 227 + .../lwm2m-id/node_modules/enum/dist/enum.js | 337 + .../node_modules/enum/dist/enumItem.js | 104 + .../node_modules/enum/dist/indexOf.js | 11 + .../lwm2m-id/node_modules/enum/dist/isType.js | 15 + .../lwm2m-id/node_modules/enum/enum-2.3.0.js | 1933 ++ .../node_modules/enum/enum-2.3.0.min.js | 1 + .../lwm2m-id/node_modules/enum/index.js | 1 + .../lwm2m-id/node_modules/enum/licence | 19 + .../lwm2m-id/node_modules/enum/package.json | 95 + .../node_modules/lwm2m-id/package.json | 58 + .../lwm2m-id/test/argumentType.test.js | 520 + .../node_modules/lwm2m-id/test/getter.test.js | 435 + .../node_modules/lwm2m-id/test/setter.test.js | 271 + .../node_modules/smartobject/package.json | 53 + .../test/objectInst.functional.test.js | 367 + .../test/objectInst.signature.test.js | 242 + .../test/smartObject.functional.test.js | 559 + .../test/smartObject.signature.test.js | 715 + .../node_modules/socket.io-adapter/.npmignore | 1 + .../node_modules/socket.io-adapter/History.md | 33 + .../node_modules/socket.io-adapter/LICENSE | 20 + .../node_modules/socket.io-adapter/Readme.md | 16 + .../node_modules/socket.io-adapter/index.js | 236 + .../node_modules/socket.io-parser/.npmignore | 5 + .../node_modules/socket.io-parser/.travis.yml | 11 + .../node_modules/socket.io-parser/.zuul.yml | 16 + .../node_modules/socket.io-parser/History.md | 87 + .../node_modules/socket.io-parser/Makefile | 11 + .../node_modules/socket.io-parser/Readme.md | 73 + .../socket.io-parser/bench/bench.js | 10 + .../socket.io-parser/bench/index.js | 81 + .../node_modules/socket.io-parser/binary.js | 141 + .../node_modules/socket.io-parser/index.js | 396 + .../socket.io-parser/is-buffer.js | 13 + .../node_modules/debug/Readme.md | 115 + .../node_modules/debug/debug.js | 137 + .../node_modules/debug/index.js | 5 + .../node_modules/debug/lib/debug.js | 147 + .../node_modules/debug/package.json | 88 + .../socket.io-parser/package.json | 76 + .../socket.io-adapter/package.json | 73 + .../node_modules/socket.io-client/History.md | 446 + .../node_modules/socket.io-client/LICENSE | 22 + .../node_modules/socket.io-client/README.md | 188 + .../socket.io-client/lib/index.js | 92 + .../socket.io-client/lib/manager.js | 557 + .../node_modules/socket.io-client/lib/on.js | 24 + .../socket.io-client/lib/socket.js | 412 + .../node_modules/socket.io-client/lib/url.js | 76 + .../node_modules/component-emitter/History.md | 63 + .../node_modules/component-emitter/LICENSE | 24 + .../node_modules/component-emitter/Readme.md | 74 + .../node_modules/component-emitter/index.js | 161 + .../component-emitter/package.json | 200 + .../socket.io-client/package.json | 123 + .../socket.io-client/socket.io.js | 7252 +++++ .../node_modules/socket.io-parser/.npmignore | 5 + .../node_modules/socket.io-parser/.travis.yml | 46 + .../node_modules/socket.io-parser/.zuul.yml | 20 + .../node_modules/socket.io-parser/History.md | 108 + .../node_modules/socket.io-parser/LICENSE | 20 + .../node_modules/socket.io-parser/Makefile | 27 + .../node_modules/socket.io-parser/Readme.md | 73 + .../socket.io-parser/bench/bench.js | 10 + .../socket.io-parser/bench/index.js | 81 + .../node_modules/socket.io-parser/binary.js | 141 + .../node_modules/socket.io-parser/index.js | 400 + .../socket.io-parser/is-buffer.js | 13 + .../node_modules/json3/LICENSE | 20 + .../node_modules/json3/README.md | 152 + .../node_modules/json3/lib/json3.js | 902 + .../node_modules/json3/lib/json3.min.js | 17 + .../node_modules/json3/package.json | 140 + .../socket.io-parser/package.json | 79 + .../node_modules/socket.io/.npmignore | 4 + .../node_modules/socket.io/.travis.yml | 20 + .../node_modules/socket.io/History.md | 556 + .../node_modules/socket.io/LICENSE | 22 + .../node_modules/socket.io/Makefile | 15 + .../node_modules/socket.io/Readme.md | 427 + .../node_modules/socket.io/lib/client.js | 251 + .../node_modules/socket.io/lib/index.js | 385 + .../node_modules/socket.io/lib/namespace.js | 272 + .../node_modules/socket.io/lib/socket.js | 470 + .../node_modules/socket.io/package.json | 109 + .../node_modules/source-map/.npmignore | 2 + .../node_modules/source-map/.travis.yml | 4 + .../node_modules/source-map/CHANGELOG.md | 194 + .../node_modules/source-map/LICENSE | 28 + .../source-map/Makefile.dryice.js | 166 + .../node_modules/source-map/README.md | 475 + .../source-map/build/assert-shim.js | 56 + .../source-map/build/mini-require.js | 152 + .../source-map/build/prefix-source-map.jsm | 20 + .../source-map/build/prefix-utils.jsm | 18 + .../source-map/build/suffix-browser.js | 8 + .../source-map/build/suffix-source-map.jsm | 6 + .../source-map/build/suffix-utils.jsm | 21 + .../source-map/build/test-prefix.js | 8 + .../source-map/build/test-suffix.js | 3 + .../node_modules/source-map/lib/source-map.js | 8 + .../source-map/lib/source-map/array-set.js | 97 + .../source-map/lib/source-map/base64-vlq.js | 142 + .../source-map/lib/source-map/base64.js | 42 + .../lib/source-map/binary-search.js | 80 + .../source-map/lib/source-map/mapping-list.js | 86 + .../lib/source-map/source-map-consumer.js | 575 + .../lib/source-map/source-map-generator.js | 400 + .../source-map/lib/source-map/source-node.js | 414 + .../source-map/lib/source-map/util.js | 319 + .../node_modules/source-map/package.json | 212 + .../node_modules/source-map/test/run-tests.js | 62 + .../source-map/test/source-map/test-api.js | 26 + .../test/source-map/test-array-set.js | 104 + .../test/source-map/test-base64-vlq.js | 23 + .../source-map/test/source-map/test-base64.js | 35 + .../test/source-map/test-binary-search.js | 54 + .../test/source-map/test-dog-fooding.js | 84 + .../source-map/test-source-map-consumer.js | 702 + .../source-map/test-source-map-generator.js | 679 + .../test/source-map/test-source-node.js | 612 + .../source-map/test/source-map/test-util.js | 216 + .../source-map/test/source-map/util.js | 192 + .../node_modules/static-eval/.travis.yml | 4 + .../node_modules/static-eval/LICENSE | 18 + .../node_modules/static-eval/example/eval.js | 7 + .../node_modules/static-eval/example/vars.js | 11 + .../node_modules/static-eval/index.js | 117 + .../static-eval/node_modules/.bin/escodegen | 45 + .../static-eval/node_modules/.bin/esgenerate | 45 + .../static-eval/node_modules/.bin/esparse | 117 + .../static-eval/node_modules/.bin/esvalidate | 177 + .../node_modules/escodegen/.jshintrc | 20 + .../node_modules/escodegen/Gruntfile.js | 60 + .../node_modules/escodegen/LICENSE.BSD | 19 + .../node_modules/escodegen/LICENSE.source-map | 27 + .../node_modules/escodegen/README.md | 97 + .../node_modules/escodegen/bin/escodegen.js | 45 + .../node_modules/escodegen/bin/esgenerate.js | 45 + .../node_modules/escodegen/escodegen.js | 2119 ++ .../node_modules/escodegen/package.json | 100 + .../node_modules/esprima/README.md | 73 + .../node_modules/esprima/bin/esparse.js | 117 + .../node_modules/esprima/bin/esvalidate.js | 177 + .../node_modules/esprima/esprima.js | 3908 +++ .../node_modules/esprima/package.json | 96 + .../node_modules/esprima/test/compat.js | 239 + .../node_modules/esprima/test/reflect.js | 422 + .../node_modules/esprima/test/run.js | 66 + .../node_modules/esprima/test/runner.js | 387 + .../node_modules/esprima/test/test.js | 20238 +++++++++++++ .../node_modules/estraverse/.jshintrc | 16 + .../node_modules/estraverse/LICENSE.BSD | 19 + .../node_modules/estraverse/README.md | 48 + .../node_modules/estraverse/estraverse.js | 684 + .../node_modules/estraverse/package.json | 81 + .../node_modules/static-eval/package.json | 101 + .../node_modules/static-eval/readme.markdown | 83 + .../node_modules/static-eval/test/eval.js | 53 + .../node_modules/static-eval/test/prop.js | 16 + .../node_modules/static-module/.travis.yml | 4 + .../node_modules/static-module/LICENSE | 18 + .../static-module/example/brfs.js | 12 + .../static-module/example/brfs/source.js | 3 + .../static-module/example/brfs/x.txt | 1 + .../node_modules/static-module/example/fs.js | 21 + .../static-module/example/fs/source.js | 4 + .../static-module/example/fs/x.txt | 1 + .../node_modules/static-module/index.js | 341 + .../node_modules/minimist/.travis.yml | 4 + .../node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../node_modules/minimist/index.js | 187 + .../node_modules/minimist/package.json | 93 + .../node_modules/minimist/readme.markdown | 73 + .../node_modules/minimist/test/dash.js | 24 + .../minimist/test/default_bool.js | 20 + .../node_modules/minimist/test/dotted.js | 16 + .../node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/parse.js | 318 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/whitespace.js | 8 + .../node_modules/object-keys/.npmignore | 1 + .../node_modules/object-keys/.travis.yml | 5 + .../node_modules/object-keys/README.md | 39 + .../node_modules/object-keys/foreach.js | 40 + .../node_modules/object-keys/index.js | 2 + .../node_modules/object-keys/isArguments.js | 16 + .../node_modules/object-keys/package.json | 99 + .../node_modules/object-keys/shim.js | 62 + .../node_modules/object-keys/test/foreach.js | 156 + .../node_modules/object-keys/test/index.js | 6 + .../object-keys/test/isArguments.js | 10 + .../node_modules/object-keys/test/shim.js | 134 + .../node_modules/quote-stream/.travis.yml | 4 + .../node_modules/quote-stream/LICENSE | 18 + .../node_modules/quote-stream/bin/cmd.js | 13 + .../node_modules/quote-stream/bin/usage.txt | 4 + .../quote-stream/example/stream.js | 2 + .../node_modules/quote-stream/index.js | 66 + .../node_modules/quote-stream/package.json | 100 + .../node_modules/quote-stream/readme.markdown | 53 + .../node_modules/quote-stream/test/simple.js | 13 + .../quote-stream/test/whitespace.js | 13 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 15 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 982 + .../readable-stream/lib/_stream_transform.js | 210 + .../readable-stream/lib/_stream_writable.js | 386 + .../node_modules/readable-stream/package.json | 96 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 8 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../node_modules/through2/.npmignore | 3 + .../node_modules/through2/LICENSE | 39 + .../node_modules/through2/README.md | 140 + .../node_modules/through2/package.json | 91 + .../node_modules/through2/through2.js | 78 + .../node_modules/xtend/.npmignore | 1 + .../static-module/node_modules/xtend/LICENCE | 19 + .../static-module/node_modules/xtend/Makefile | 4 + .../node_modules/xtend/README.md | 27 + .../node_modules/xtend/has-keys.js | 7 + .../static-module/node_modules/xtend/index.js | 25 + .../node_modules/xtend/mutable.js | 25 + .../node_modules/xtend/package.json | 114 + .../static-module/node_modules/xtend/test.js | 63 + .../node_modules/static-module/package.json | 105 + .../static-module/readme.markdown | 112 + .../node_modules/static-module/test/assign.js | 44 + .../static-module/test/assign/comma.js | 3 + .../static-module/test/assign/source.js | 3 + .../node_modules/static-module/test/brfs.js | 162 + .../static-module/test/brfs/attribute.js | 3 + .../test/brfs/attribute_brackets.js | 3 + .../static-module/test/brfs/attribute_vars.js | 3 + .../static-module/test/brfs/brackets.js | 3 + .../static-module/test/brfs/multi_require.js | 3 + .../static-module/test/brfs/source.js | 3 + .../static-module/test/brfs/x.txt | 1 + .../static-module/test/brfs/x5.js | 5 + .../node_modules/static-module/test/fn.js | 19 + .../static-module/test/fn/source.js | 2 + .../node_modules/static-module/test/fs.js | 55 + .../static-module/test/fs/html.js | 2 + .../static-module/test/fs/readfile.js | 4 + .../static-module/test/fs/robot.html | 1 + .../node_modules/static-module/test/fs/x.txt | 1 + .../static-module/test/fs_twice.js | 84 + .../static-module/test/fs_twice/4x.js | 9 + .../static-module/test/fs_twice/html.js | 4 + .../static-module/test/fs_twice/readfile.js | 4 + .../static-module/test/fs_twice/robot.html | 1 + .../static-module/test/fs_twice/vars.js | 5 + .../static-module/test/fs_twice/x.txt | 1 + .../node_modules/static-module/test/inline.js | 75 + .../static-module/test/inline/fn.js | 2 + .../static-module/test/inline/fn_call.js | 1 + .../static-module/test/inline/fn_expr.js | 1 + .../static-module/test/inline/obj.js | 2 + .../static-module/test/inline/obj_call.js | 1 + .../static-module/test/inline/obj_expr.js | 1 + .../node_modules/static-module/test/log.js | 45 + .../static-module/test/log/source.js | 1 + .../node_modules/static-module/test/many.js | 74 + .../static-module/test/many/a.txt | 1 + .../static-module/test/many/all_inline.js | 6 + .../static-module/test/many/b.txt | 1 + .../static-module/test/many/c.txt | 1 + .../static-module/test/many/inline.js | 6 + .../static-module/test/many/source.js | 5 + .../node_modules/static-module/test/mixed.js | 62 + .../static-module/test/mixed/source.js | 4 + .../static-module/test/mixed/unmixed.js | 4 + .../static-module/test/mixed/xyz.txt | 1 + .../node_modules/static-module/test/nested.js | 29 + .../static-module/test/nested/source.js | 3 + .../node_modules/static-module/test/obj.js | 22 + .../static-module/test/obj/source.js | 3 + .../node_modules/static-module/test/prop.js | 21 + .../static-module/test/prop/source.js | 3 + .../static-module/test/readfile_resolve.js | 34 + .../test/readfile_resolve/main.js | 3 + .../readfile_resolve/node_modules/aaa/wow.txt | 1 + .../static-module/test/shebang.js | 22 + .../static-module/test/shebang/source.js | 4 + .../node_modules/static-module/test/varmod.js | 37 + .../static-module/test/varmod/source.js | 5 + .../static-module/test/varmod/vars.html | 1 + .../node_modules/static-module/test/vars.js | 90 + .../static-module/test/vars/five.js | 6 + .../static-module/test/vars/multi-require.js | 14 + .../static-module/test/vars/one.js | 4 + .../static-module/test/vars/source.js | 5 + .../static-module/test/vars/vars.html | 1 + .../iot-gateway/node_modules/statuses/LICENSE | 22 + .../node_modules/statuses/README.md | 114 + .../node_modules/statuses/codes.json | 64 + .../node_modules/statuses/index.js | 60 + .../node_modules/statuses/package.json | 111 + .../node_modules/string_decoder/.npmignore | 2 + .../node_modules/string_decoder/LICENSE | 20 + .../node_modules/string_decoder/README.md | 7 + .../node_modules/string_decoder/index.js | 221 + .../node_modules/string_decoder/package.json | 82 + .../node_modules/through2/.npmignore | 3 + .../iot-gateway/node_modules/through2/LICENSE | 39 + .../node_modules/through2/README.md | 133 + .../node_modules/through2/package.json | 97 + .../node_modules/through2/through2.js | 96 + .../node_modules/to-array/.npmignore | 3 + .../iot-gateway/node_modules/to-array/LICENCE | 19 + .../node_modules/to-array/README.md | 22 + .../node_modules/to-array/index.js | 13 + .../node_modules/to-array/package.json | 90 + .../node_modules/type-is/HISTORY.md | 200 + .../iot-gateway/node_modules/type-is/LICENSE | 23 + .../node_modules/type-is/README.md | 136 + .../iot-gateway/node_modules/type-is/index.js | 262 + .../node_modules/type-is/package.json | 106 + .../node_modules/typedarray/.travis.yml | 4 + .../node_modules/typedarray/LICENSE | 35 + .../node_modules/typedarray/example/tarray.js | 4 + .../node_modules/typedarray/index.js | 630 + .../node_modules/typedarray/package.json | 105 + .../node_modules/typedarray/readme.markdown | 61 + .../typedarray/test/server/undef_globals.js | 19 + .../node_modules/typedarray/test/tarray.js | 10 + .../node_modules/ultron/.npmignore | 3 + .../node_modules/ultron/.travis.yml | 21 + .../iot-gateway/node_modules/ultron/LICENSE | 22 + .../iot-gateway/node_modules/ultron/README.md | 97 + .../iot-gateway/node_modules/ultron/index.js | 129 + .../node_modules/ultron/package.json | 100 + .../iot-gateway/node_modules/ultron/test.js | 327 + .../node_modules/unpipe/HISTORY.md | 4 + .../iot-gateway/node_modules/unpipe/LICENSE | 22 + .../iot-gateway/node_modules/unpipe/README.md | 43 + .../iot-gateway/node_modules/unpipe/index.js | 69 + .../node_modules/unpipe/package.json | 85 + .../node_modules/utf8/.gitattributes | 2 + .../iot-gateway/node_modules/utf8/.npmignore | 20 + .../iot-gateway/node_modules/utf8/.travis.yml | 21 + .../node_modules/utf8/Gruntfile.js | 75 + .../node_modules/utf8/LICENSE-MIT.txt | 20 + .../iot-gateway/node_modules/utf8/README.md | 119 + .../iot-gateway/node_modules/utf8/bower.json | 14 + .../node_modules/utf8/component.json | 16 + .../node_modules/utf8/package.json | 90 + .../utf8/tests/generate-test-data.py | 50 + .../node_modules/utf8/tests/index.html | 35 + .../node_modules/utf8/tests/tests.js | 276 + example/iot-gateway/node_modules/utf8/utf8.js | 244 + .../node_modules/util-deprecate/History.md | 16 + .../node_modules/util-deprecate/LICENSE | 24 + .../node_modules/util-deprecate/README.md | 53 + .../node_modules/util-deprecate/browser.js | 67 + .../node_modules/util-deprecate/node.js | 6 + .../node_modules/util-deprecate/package.json | 81 + .../iot-gateway/node_modules/util/.npmignore | 1 + .../iot-gateway/node_modules/util/.travis.yml | 8 + .../iot-gateway/node_modules/util/.zuul.yml | 10 + example/iot-gateway/node_modules/util/LICENSE | 18 + .../iot-gateway/node_modules/util/README.md | 15 + .../node_modules/util/package.json | 80 + .../node_modules/util/support/isBuffer.js | 3 + .../util/support/isBufferBrowser.js | 6 + .../node_modules/util/test/browser/inspect.js | 41 + .../node_modules/util/test/browser/is.js | 91 + .../node_modules/util/test/node/debug.js | 86 + .../node_modules/util/test/node/format.js | 77 + .../node_modules/util/test/node/inspect.js | 195 + .../node_modules/util/test/node/log.js | 58 + .../node_modules/util/test/node/util.js | 83 + example/iot-gateway/node_modules/util/util.js | 586 + .../node_modules/utils-merge/.travis.yml | 6 + .../node_modules/utils-merge/LICENSE | 20 + .../node_modules/utils-merge/README.md | 34 + .../node_modules/utils-merge/index.js | 23 + .../node_modules/utils-merge/package.json | 85 + .../iot-gateway/node_modules/varint/README.md | 51 + .../iot-gateway/node_modules/varint/bench.js | 57 + .../iot-gateway/node_modules/varint/decode.js | 29 + .../iot-gateway/node_modules/varint/encode.js | 26 + .../iot-gateway/node_modules/varint/index.js | 5 + .../iot-gateway/node_modules/varint/length.js | 25 + .../node_modules/varint/package.json | 80 + .../iot-gateway/node_modules/varint/test.js | 136 + .../iot-gateway/node_modules/vary/HISTORY.md | 23 + example/iot-gateway/node_modules/vary/LICENSE | 22 + .../iot-gateway/node_modules/vary/README.md | 91 + .../iot-gateway/node_modules/vary/index.js | 117 + .../node_modules/vary/package.json | 98 + .../iot-gateway/node_modules/ws/.npmignore | 11 + .../iot-gateway/node_modules/ws/.travis.yml | 15 + example/iot-gateway/node_modules/ws/Makefile | 40 + example/iot-gateway/node_modules/ws/README.md | 242 + example/iot-gateway/node_modules/ws/index.js | 49 + .../node_modules/ws/lib/BufferPool.js | 63 + .../ws/lib/BufferUtil.fallback.js | 47 + .../node_modules/ws/lib/BufferUtil.js | 13 + .../node_modules/ws/lib/ErrorCodes.js | 24 + .../node_modules/ws/lib/Extensions.js | 70 + .../node_modules/ws/lib/PerMessageDeflate.js | 325 + .../node_modules/ws/lib/Receiver.hixie.js | 184 + .../node_modules/ws/lib/Receiver.js | 702 + .../node_modules/ws/lib/Sender.hixie.js | 124 + .../iot-gateway/node_modules/ws/lib/Sender.js | 324 + .../ws/lib/Validation.fallback.js | 12 + .../node_modules/ws/lib/Validation.js | 13 + .../node_modules/ws/lib/WebSocket.js | 965 + .../node_modules/ws/lib/WebSocketServer.js | 513 + .../iot-gateway/node_modules/ws/package.json | 103 + .../node_modules/xmlhttprequest-ssl/LICENSE | 22 + .../node_modules/xmlhttprequest-ssl/README.md | 61 + .../xmlhttprequest-ssl/autotest.watchr | 8 + .../xmlhttprequest-ssl/example/demo.js | 16 + .../xmlhttprequest-ssl/lib/XMLHttpRequest.js | 646 + .../xmlhttprequest-ssl/package.json | 84 + .../tests/test-constants.js | 13 + .../xmlhttprequest-ssl/tests/test-events.js | 50 + .../tests/test-exceptions.js | 59 + .../xmlhttprequest-ssl/tests/test-headers.js | 76 + .../tests/test-redirect-302.js | 41 + .../tests/test-redirect-303.js | 41 + .../tests/test-redirect-307.js | 43 + .../tests/test-request-methods.js | 62 + .../tests/test-request-protocols.js | 32 + .../xmlhttprequest-ssl/tests/testdata.txt | 1 + .../iot-gateway/node_modules/xtend/.jshintrc | 30 + .../iot-gateway/node_modules/xtend/.npmignore | 1 + .../iot-gateway/node_modules/xtend/LICENCE | 19 + .../iot-gateway/node_modules/xtend/Makefile | 4 + .../iot-gateway/node_modules/xtend/README.md | 32 + .../node_modules/xtend/immutable.js | 19 + .../iot-gateway/node_modules/xtend/mutable.js | 17 + .../node_modules/xtend/package.json | 109 + .../iot-gateway/node_modules/xtend/test.js | 83 + .../iot-gateway/node_modules/yeast/LICENSE | 22 + .../iot-gateway/node_modules/yeast/README.md | 82 + .../iot-gateway/node_modules/yeast/index.js | 68 + .../node_modules/yeast/package.json | 92 + example/iot-gateway/package.json | 22 + example/iot-gateway/run_gateway.sh | 104 + example/npi_server2/Makefile | 78 + example/npi_server2/apimac-msgs.cfg | 368 + example/npi_server2/app_main.c | 871 + example/npi_server2/linux_main.c | 222 + example/npi_server2/npi_server2.cfg | 113 + example/npi_server2/npi_server2.h | 76 + .../CC1310_LaunchXL/coprocessor_cc1310_lp.hex | 7060 +++++ firmware/CC1310_LaunchXL/sensor_cc13x0lp.hex | 3360 +++ .../CC1350_LaunchXL/coprocessor_cc1310_lp.hex | 7060 +++++ firmware/CC1350_LaunchXL/sensor_cc13x0lp.hex | 3360 +++ .../CC1350_SensorTag/sensor_cc13x0stk.hex | 3464 +++ firmware/readme.txt | 7 + prebuilt/bin/apimac-msgs.cfg | 368 + prebuilt/bin/bbb_collector | Bin 0 -> 789832 bytes prebuilt/bin/bbb_npi_server2 | Bin 0 -> 214916 bytes prebuilt/bin/collector.cfg | 199 + prebuilt/bin/host_collector | Bin 0 -> 886604 bytes prebuilt/bin/host_npi_server2 | Bin 0 -> 235503 bytes prebuilt/bin/npi_server2.cfg | 113 + prebuilt/bin/run_collector.sh | 121 + prebuilt/iot-gateway/appClient/appclient.js | 676 + .../iot-gateway/appClient/devices/device.js | 257 + .../iot-gateway/appClient/nwkinfo/nwkinfo.js | 221 + .../appClient/protofiles/appsrv.proto | 2331 ++ .../cloudAdapter/awsCloudAdapter.js | 209 + .../iot-gateway/cloudAdapter/awsConfig.json | 11 + .../iot-gateway/cloudAdapter/awsDeltaTest.js | 54 + .../iot-gateway/cloudAdapter/certs/Readme.txt | 9 + prebuilt/iot-gateway/iot-gateway.js | 171 + prebuilt/iot-gateway/node_modules/.bin/acorn | 54 + prebuilt/iot-gateway/node_modules/.bin/brfs | 20 + .../iot-gateway/node_modules/.bin/escodegen | 45 + .../iot-gateway/node_modules/.bin/esgenerate | 45 + .../iot-gateway/node_modules/.bin/esparse | 127 + .../iot-gateway/node_modules/.bin/esvalidate | 199 + prebuilt/iot-gateway/node_modules/.bin/mime | 8 + .../node_modules/.bin/quote-stream | 13 + .../node_modules/accepts/HISTORY.md | 170 + .../iot-gateway/node_modules/accepts/LICENSE | 23 + .../node_modules/accepts/README.md | 135 + .../iot-gateway/node_modules/accepts/index.js | 231 + .../node_modules/accepts/package.json | 123 + .../node_modules/acorn/.editorconfig | 7 + .../node_modules/acorn/.gitattributes | 1 + .../iot-gateway/node_modules/acorn/.npmignore | 3 + .../node_modules/acorn/.tern-project | 1 + .../node_modules/acorn/.travis.yml | 2 + .../iot-gateway/node_modules/acorn/AUTHORS | 38 + .../iot-gateway/node_modules/acorn/LICENSE | 19 + .../iot-gateway/node_modules/acorn/README.md | 377 + .../iot-gateway/node_modules/acorn/bin/acorn | 54 + .../node_modules/acorn/bin/build-acorn.js | 51 + .../acorn/bin/generate-identifier-regex.js | 47 + .../node_modules/acorn/bin/prepublish.sh | 2 + .../node_modules/acorn/bin/update_authors.sh | 6 + .../node_modules/acorn/bin/without_eval | 48 + .../iot-gateway/node_modules/acorn/dist/.keep | 0 .../node_modules/acorn/dist/acorn.js | 4014 +++ .../node_modules/acorn/dist/acorn_csp.js | 3985 +++ .../node_modules/acorn/dist/acorn_loose.js | 1298 + .../node_modules/acorn/dist/walk.js | 342 + .../node_modules/acorn/package.json | 192 + .../node_modules/acorn/src/expression.js | 697 + .../node_modules/acorn/src/identifier.js | 129 + .../node_modules/acorn/src/index.js | 75 + .../node_modules/acorn/src/location.js | 68 + .../acorn/src/loose/acorn_loose.js | 0 .../acorn/src/loose/expression.js | 511 + .../node_modules/acorn/src/loose/index.js | 50 + .../node_modules/acorn/src/loose/parseutil.js | 126 + .../node_modules/acorn/src/loose/state.js | 17 + .../node_modules/acorn/src/loose/statement.js | 419 + .../node_modules/acorn/src/loose/tokenize.js | 108 + .../node_modules/acorn/src/lval.js | 213 + .../node_modules/acorn/src/node.js | 70 + .../node_modules/acorn/src/options.js | 119 + .../node_modules/acorn/src/parseutil.js | 89 + .../node_modules/acorn/src/state.js | 78 + .../node_modules/acorn/src/statement.js | 594 + .../node_modules/acorn/src/tokencontext.js | 107 + .../node_modules/acorn/src/tokenize.js | 672 + .../node_modules/acorn/src/tokentype.js | 142 + .../node_modules/acorn/src/util.js | 9 + .../node_modules/acorn/src/walk/index.js | 291 + .../node_modules/acorn/src/whitespace.js | 12 + .../iot-gateway/node_modules/after/.npmignore | 2 + .../node_modules/after/.travis.yml | 5 + .../iot-gateway/node_modules/after/LICENCE | 19 + .../iot-gateway/node_modules/after/README.md | 75 + .../iot-gateway/node_modules/after/index.js | 28 + .../node_modules/after/package.json | 88 + .../node_modules/after/test/after-test.js | 120 + .../iot-gateway/node_modules/amdefine/LICENSE | 58 + .../node_modules/amdefine/README.md | 171 + .../node_modules/amdefine/amdefine.js | 301 + .../node_modules/amdefine/intercept.js | 36 + .../node_modules/amdefine/package.json | 74 + .../node_modules/array-flatten/LICENSE | 21 + .../node_modules/array-flatten/README.md | 43 + .../array-flatten/array-flatten.js | 64 + .../node_modules/array-flatten/package.json | 88 + .../node_modules/arraybuffer.slice/.npmignore | 17 + .../node_modules/arraybuffer.slice/Makefile | 8 + .../node_modules/arraybuffer.slice/README.md | 17 + .../node_modules/arraybuffer.slice/index.js | 29 + .../arraybuffer.slice/package.json | 64 + .../arraybuffer.slice/test/slice-buffer.js | 227 + .../node_modules/aws-iot-device-sdk/.jscsrc | 129 + .../node_modules/aws-iot-device-sdk/.jshintrc | 91 + .../aws-iot-device-sdk/.npmignore | 29 + .../aws-iot-device-sdk/CHANGELOG.md | 52 + .../aws-iot-device-sdk/LICENSE.txt | 201 + .../aws-iot-device-sdk/NOTICE.txt | 2 + .../node_modules/aws-iot-device-sdk/README.md | 923 + .../aws-iot-device-sdk/browser/index.js | 19 + .../aws-iot-device-sdk/browser/package.json | 15 + .../common/lib/exceptions.js | 33 + .../common/lib/is-undefined.js | 32 + .../common/lib/tls-reader.js | 111 + .../aws-iot-device-sdk/device/index.js | 734 + .../device/lib/exceptions.js | 28 + .../aws-iot-device-sdk/device/lib/tls.js | 45 + .../aws-iot-device-sdk/device/lib/ws.js | 27 + .../browser/lifecycle/aws-configuration.js | 24 + .../examples/browser/lifecycle/example.css | 40 + .../examples/browser/lifecycle/index.html | 29 + .../examples/browser/lifecycle/index.js | 234 + .../mqtt-explorer/aws-configuration.js | 24 + .../browser/mqtt-explorer/example.css | 57 + .../examples/browser/mqtt-explorer/index.html | 42 + .../examples/browser/mqtt-explorer/index.js | 214 + .../temperature-monitor/aws-configuration.js | 24 + .../browser/temperature-monitor/example.css | 24 + .../browser/temperature-monitor/index.html | 30 + .../browser/temperature-monitor/index.js | 220 + .../examples/device-example.js | 111 + .../examples/echo-example.js | 87 + .../examples/lib/cmdline.js | 212 + .../examples/temperature-control/package.json | 16 + .../temperature-control.js | 575 + .../examples/thing-example.js | 238 + .../examples/thing-passthrough-example.js | 254 + .../aws-iot-device-sdk/gulpfile.js | 66 + .../node_modules/aws-iot-device-sdk/index.js | 20 + .../aws-iot-device-sdk/node_modules/.bin/mqtt | 1 + .../node_modules/.bin/mqtt_pub | 1 + .../node_modules/.bin/mqtt_sub | 1 + .../node_modules/crypto-js/CONTRIBUTING.md | 28 + .../node_modules/crypto-js/LICENSE | 24 + .../node_modules/crypto-js/README.md | 198 + .../node_modules/crypto-js/aes.js | 227 + .../node_modules/crypto-js/bower.json | 35 + .../node_modules/crypto-js/cipher-core.js | 875 + .../node_modules/crypto-js/core.js | 742 + .../node_modules/crypto-js/crypto-js.js | 5949 ++++ .../crypto-js/docs/QuickStartGuide.wiki | 470 + .../node_modules/crypto-js/enc-base64.js | 124 + .../node_modules/crypto-js/enc-hex.js | 18 + .../node_modules/crypto-js/enc-latin1.js | 18 + .../node_modules/crypto-js/enc-utf16.js | 149 + .../node_modules/crypto-js/enc-utf8.js | 18 + .../node_modules/crypto-js/evpkdf.js | 132 + .../node_modules/crypto-js/format-hex.js | 66 + .../node_modules/crypto-js/format-openssl.js | 18 + .../node_modules/crypto-js/hmac-md5.js | 18 + .../node_modules/crypto-js/hmac-ripemd160.js | 18 + .../node_modules/crypto-js/hmac-sha1.js | 18 + .../node_modules/crypto-js/hmac-sha224.js | 18 + .../node_modules/crypto-js/hmac-sha256.js | 18 + .../node_modules/crypto-js/hmac-sha3.js | 18 + .../node_modules/crypto-js/hmac-sha384.js | 18 + .../node_modules/crypto-js/hmac-sha512.js | 18 + .../node_modules/crypto-js/hmac.js | 143 + .../node_modules/crypto-js/index.js | 18 + .../node_modules/crypto-js/lib-typedarrays.js | 76 + .../node_modules/crypto-js/md5.js | 268 + .../node_modules/crypto-js/mode-cfb.js | 78 + .../crypto-js/mode-ctr-gladman.js | 116 + .../node_modules/crypto-js/mode-ctr.js | 58 + .../node_modules/crypto-js/mode-ecb.js | 40 + .../node_modules/crypto-js/mode-ofb.js | 54 + .../node_modules/crypto-js/package.json | 64 + .../node_modules/crypto-js/pad-ansix923.js | 49 + .../node_modules/crypto-js/pad-iso10126.js | 44 + .../node_modules/crypto-js/pad-iso97971.js | 40 + .../node_modules/crypto-js/pad-nopadding.js | 30 + .../node_modules/crypto-js/pad-pkcs7.js | 18 + .../node_modules/crypto-js/pad-zeropadding.js | 45 + .../node_modules/crypto-js/pbkdf2.js | 145 + .../node_modules/crypto-js/rabbit-legacy.js | 190 + .../node_modules/crypto-js/rabbit.js | 192 + .../node_modules/crypto-js/rc4.js | 139 + .../node_modules/crypto-js/ripemd160.js | 267 + .../node_modules/crypto-js/sha1.js | 150 + .../node_modules/crypto-js/sha224.js | 80 + .../node_modules/crypto-js/sha256.js | 199 + .../node_modules/crypto-js/sha3.js | 323 + .../node_modules/crypto-js/sha384.js | 83 + .../node_modules/crypto-js/sha512.js | 323 + .../node_modules/crypto-js/tripledes.js | 770 + .../node_modules/crypto-js/x64-core.js | 304 + .../node_modules/mqtt/.eslintrc | 75 + .../node_modules/mqtt/.jscsrc | 51 + .../node_modules/mqtt/.jshintrc | 22 + .../node_modules/mqtt/.npmignore | 9 + .../node_modules/mqtt/.travis.yml | 15 + .../node_modules/mqtt/.zuul.yml | 10 + .../node_modules/mqtt/CONTRIBUTING.md | 27 + .../node_modules/mqtt/LICENSE.md | 15 + .../node_modules/mqtt/MQTT.js.png | Bin 0 -> 102217 bytes .../node_modules/mqtt/README.md | 438 + .../node_modules/mqtt/benchmarks/bombing.js | 30 + .../mqtt/benchmarks/throughputCounter.js | 22 + .../node_modules/mqtt/bin/pub.js | 109 + .../node_modules/mqtt/bin/sub.js | 115 + .../node_modules/mqtt/doc/help.txt | 8 + .../node_modules/mqtt/doc/publish.txt | 25 + .../node_modules/mqtt/doc/subscribe.txt | 26 + .../node_modules/mqtt/example.js | 11 + .../mqtt/examples/client/secure-client.js | 21 + .../mqtt/examples/client/simple-both.js | 11 + .../mqtt/examples/client/simple-publish.js | 5 + .../mqtt/examples/client/simple-subscribe.js | 7 + .../mqtt/examples/server/broadcast.js | 56 + .../node_modules/mqtt/examples/server/orig.js | 67 + .../mqtt/examples/server/redis.js | 48 + .../node_modules/mqtt/examples/server/tls.js | 52 + .../mqtt/examples/server/websocket.js | 74 + .../mqtt/examples/tls client/crt.ca.cg.pem | 34 + .../mqtt/examples/tls client/mqttclient.js | 44 + .../mqtt/examples/tls client/tls-cert.pem | 13 + .../mqtt/examples/tls client/tls-key.pem | 15 + .../mqtt/examples/tls server/crt.server1.pem | 32 + .../examples/tls server/key.csr.server1.pem | 52 + .../mqtt/examples/tls server/mqttserver.js | 48 + .../node_modules/mqtt/examples/wss/client.js | 47 + .../node_modules/mqtt/lib/client.js | 885 + .../node_modules/mqtt/lib/connect/index.js | 136 + .../node_modules/mqtt/lib/connect/tcp.js | 19 + .../node_modules/mqtt/lib/connect/tls.js | 48 + .../node_modules/mqtt/lib/connect/ws.js | 82 + .../node_modules/mqtt/lib/server.js | 68 + .../node_modules/mqtt/lib/store.js | 108 + .../node_modules/mqtt/mqtt.js | 204 + .../mqtt/node_modules/commist/.npmignore | 25 + .../mqtt/node_modules/commist/LICENSE | 21 + .../mqtt/node_modules/commist/README.md | 56 + .../mqtt/node_modules/commist/example.js | 24 + .../mqtt/node_modules/commist/index.js | 123 + .../commist/node_modules/.bin/leven | 1 + .../commist/node_modules/leven/cli.js | 28 + .../commist/node_modules/leven/index.js | 46 + .../commist/node_modules/leven/license | 21 + .../commist/node_modules/leven/package.json | 88 + .../commist/node_modules/leven/readme.md | 58 + .../mqtt/node_modules/commist/package.json | 54 + .../mqtt/node_modules/commist/test.js | 191 + .../node_modules/end-of-stream/.npmignore | 1 + .../mqtt/node_modules/end-of-stream/LICENSE | 21 + .../mqtt/node_modules/end-of-stream/README.md | 47 + .../mqtt/node_modules/end-of-stream/index.js | 83 + .../end-of-stream/node_modules/once/LICENSE | 15 + .../end-of-stream/node_modules/once/README.md | 51 + .../once/node_modules/wrappy/LICENSE | 15 + .../once/node_modules/wrappy/README.md | 36 + .../once/node_modules/wrappy/package.json | 63 + .../once/node_modules/wrappy/wrappy.js | 33 + .../end-of-stream/node_modules/once/once.js | 21 + .../node_modules/once/package.json | 63 + .../node_modules/end-of-stream/package.json | 55 + .../mqtt/node_modules/end-of-stream/test.js | 77 + .../mqtt/node_modules/help-me/.npmignore | 28 + .../mqtt/node_modules/help-me/LICENSE | 22 + .../mqtt/node_modules/help-me/README.md | 49 + .../mqtt/node_modules/help-me/doc/hello.txt | 1 + .../mqtt/node_modules/help-me/doc/help.txt | 1 + .../mqtt/node_modules/help-me/example.js | 7 + .../node_modules/help-me/fixture/basic/hello | 1 + .../help-me/fixture/basic/hello.txt | 1 + .../help-me/fixture/basic/help.txt | 1 + .../mqtt/node_modules/help-me/help-me.js | 57 + .../help-me/node_modules/pump/.npmignore | 1 + .../help-me/node_modules/pump/.travis.yml | 5 + .../help-me/node_modules/pump/LICENSE | 21 + .../help-me/node_modules/pump/README.md | 56 + .../help-me/node_modules/pump/index.js | 79 + .../pump/node_modules/once/LICENSE | 15 + .../pump/node_modules/once/README.md | 51 + .../once/node_modules/wrappy/LICENSE | 15 + .../once/node_modules/wrappy/README.md | 36 + .../once/node_modules/wrappy/package.json | 63 + .../once/node_modules/wrappy/wrappy.js | 33 + .../pump/node_modules/once/once.js | 21 + .../pump/node_modules/once/package.json | 63 + .../help-me/node_modules/pump/package.json | 53 + .../help-me/node_modules/pump/test.js | 46 + .../mqtt/node_modules/help-me/package.json | 61 + .../mqtt/node_modules/help-me/test.js | 87 + .../node_modules/mqtt-connection/.npmignore | 28 + .../node_modules/mqtt-connection/.travis.yml | 10 + .../mqtt-connection/CONTRIBUTING.md | 27 + .../node_modules/mqtt-connection/LICENSE.md | 13 + .../node_modules/mqtt-connection/README.md | 320 + .../mqtt-connection/connection.js | 79 + .../mqtt-connection/lib/generateStream.js | 26 + .../mqtt-connection/lib/parseStream.js | 24 + .../node_modules/reduplexer/.npmignore | 7 + .../node_modules/reduplexer/.travis.yml | 3 + .../node_modules/reduplexer/LICENSE | 13 + .../node_modules/reduplexer/README.md | 91 + .../node_modules/reduplexer/index.js | 157 + .../node_modules/reduplexer/package.json | 67 + .../node_modules/reduplexer/test.js | 370 + .../node_modules/through2/.npmignore | 3 + .../node_modules/through2/LICENSE | 39 + .../node_modules/through2/README.md | 132 + .../node_modules/through2/package.json | 64 + .../node_modules/through2/through2.js | 96 + .../node_modules/mqtt-connection/package.json | 66 + .../mqtt-connection/test/connection.js | 23 + .../mqtt-connection/test/connection.parse.js | 686 + .../test/connection.transmit.js | 1105 + .../node_modules/mqtt-connection/test/util.js | 17 + .../mqtt/node_modules/mqtt-packet/.npmignore | 25 + .../mqtt/node_modules/mqtt-packet/.travis.yml | 15 + .../node_modules/mqtt-packet/CONTRIBUTING.md | 27 + .../mqtt/node_modules/mqtt-packet/LICENSE.md | 13 + .../mqtt/node_modules/mqtt-packet/README.md | 328 + .../mqtt-packet/benchmarks/generate.js | 20 + .../mqtt-packet/benchmarks/parse.js | 21 + .../node_modules/mqtt-packet/constants.js | 52 + .../mqtt/node_modules/mqtt-packet/generate.js | 614 + .../mqtt/node_modules/mqtt-packet/mqtt.js | 5 + .../mqtt-packet/node_modules/bl/.jshintrc | 59 + .../mqtt-packet/node_modules/bl/.npmignore | 1 + .../mqtt-packet/node_modules/bl/.travis.yml | 11 + .../mqtt-packet/node_modules/bl/LICENSE.md | 13 + .../mqtt-packet/node_modules/bl/README.md | 198 + .../mqtt-packet/node_modules/bl/bl.js | 221 + .../mqtt-packet/node_modules/bl/package.json | 60 + .../node_modules/bl/test/basic-test.js | 557 + .../mqtt-packet/node_modules/bl/test/sauce.js | 38 + .../mqtt-packet/node_modules/bl/test/test.js | 9 + .../node_modules/mqtt-packet/package.json | 74 + .../mqtt/node_modules/mqtt-packet/packet.js | 12 + .../mqtt/node_modules/mqtt-packet/parser.js | 388 + .../mqtt/node_modules/mqtt-packet/test.js | 918 + .../node_modules/mqtt-packet/testRandom.js | 27 + .../node_modules/readable-stream/.npmignore | 5 + .../mqtt/node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 15 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 982 + .../readable-stream/lib/_stream_transform.js | 210 + .../readable-stream/lib/_stream_writable.js | 386 + .../node_modules/readable-stream/package.json | 77 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 11 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../mqtt/node_modules/reinterval/.npmignore | 27 + .../mqtt/node_modules/reinterval/.travis.yml | 20 + .../mqtt/node_modules/reinterval/LICENSE | 22 + .../mqtt/node_modules/reinterval/README.md | 60 + .../mqtt/node_modules/reinterval/index.js | 57 + .../mqtt/node_modules/reinterval/package.json | 60 + .../node_modules/reinterval/tests/test.js | 52 + .../node_modules/mqtt/package.json | 118 + .../node_modules/mqtt/test/abstract_client.js | 1253 + .../node_modules/mqtt/test/abstract_store.js | 133 + .../node_modules/mqtt/test/browser/server.js | 131 + .../node_modules/mqtt/test/browser/test.js | 86 + .../node_modules/mqtt/test/client.js | 261 + .../mqtt/test/helpers/private-csr.pem | 16 + .../mqtt/test/helpers/private-key.pem | 27 + .../mqtt/test/helpers/public-cert.pem | 19 + .../mqtt/test/helpers/public-key.pem | 9 + .../node_modules/mqtt/test/helpers/server.js | 63 + .../mqtt/test/helpers/server_process.js | 10 + .../mqtt/test/helpers/tls-cert.pem | 14 + .../mqtt/test/helpers/tls-csr.pem | 11 + .../mqtt/test/helpers/tls-key.pem | 15 + .../mqtt/test/helpers/wrong-cert.pem | 13 + .../mqtt/test/helpers/wrong-csr.pem | 11 + .../mqtt/test/helpers/wrong-key.pem | 15 + .../node_modules/mqtt/test/mocha.opts | 3 + .../node_modules/mqtt/test/mqtt.js | 262 + .../node_modules/mqtt/test/secure_client.js | 141 + .../node_modules/mqtt/test/server.js | 48 + .../node_modules/mqtt/test/store.js | 9 + .../node_modules/mqtt/test/util.js | 16 + .../mqtt/test/websocket_client.js | 95 + .../node_modules/websocket-stream/.npmignore | 2 + .../node_modules/websocket-stream/LICENSE | 8 + .../websocket-stream/collaborators.md | 11 + .../websocket-stream/echo-server.js | 49 + .../node_modules/websocket-stream/index.js | 6 + .../node_modules/duplexify/.npmignore | 1 + .../node_modules/duplexify/.travis.yml | 6 + .../node_modules/duplexify/LICENSE | 21 + .../node_modules/duplexify/README.md | 97 + .../node_modules/duplexify/example.js | 21 + .../node_modules/duplexify/index.js | 227 + .../node_modules/end-of-stream/.npmignore | 1 + .../node_modules/end-of-stream/README.md | 47 + .../node_modules/end-of-stream/index.js | 72 + .../end-of-stream/node_modules/once/LICENSE | 15 + .../end-of-stream/node_modules/once/README.md | 51 + .../once/node_modules/wrappy/LICENSE | 15 + .../once/node_modules/wrappy/README.md | 36 + .../once/node_modules/wrappy/package.json | 62 + .../once/node_modules/wrappy/wrappy.js | 33 + .../end-of-stream/node_modules/once/once.js | 21 + .../node_modules/once/package.json | 62 + .../node_modules/end-of-stream/package.json | 54 + .../node_modules/end-of-stream/test.js | 62 + .../node_modules/stream-shift/.npmignore | 1 + .../node_modules/stream-shift/.travis.yml | 6 + .../node_modules/stream-shift/LICENSE | 21 + .../node_modules/stream-shift/README.md | 25 + .../node_modules/stream-shift/index.js | 20 + .../node_modules/stream-shift/package.json | 54 + .../node_modules/stream-shift/test.js | 48 + .../node_modules/duplexify/package.json | 67 + .../node_modules/duplexify/test.js | 292 + .../websocket-stream/package.json | 88 + .../node_modules/websocket-stream/readme.md | 70 + .../node_modules/websocket-stream/server.js | 31 + .../node_modules/websocket-stream/stream.js | 112 + .../websocket-stream/test-client.js | 27 + .../websocket-stream/test-server.js | 5 + .../node_modules/websocket-stream/test.js | 227 + .../websocket-stream/ws-fallback.js | 12 + .../aws-iot-device-sdk/package.json | 79 + .../aws-iot-device-sdk/scripts/browserize.sh | 101 + .../aws-iot-device-sdk/test/data/README.txt | 6 + .../test/data/certificate.pem.crt | 1 + .../test/data/private.pem.key | 1 + .../aws-iot-device-sdk/test/data/root-CA.crt | 1 + .../test/device-unit-tests.js | 1451 + .../test/mock/mockMQTTClient.js | 110 + .../aws-iot-device-sdk/test/mock/mockTls.js | 81 + .../test/thing-unit-tests.js | 1450 + .../aws-iot-device-sdk/thing/index.js | 676 + .../node_modules/backo2/.npmignore | 1 + .../node_modules/backo2/History.md | 12 + .../iot-gateway/node_modules/backo2/Makefile | 8 + .../iot-gateway/node_modules/backo2/Readme.md | 34 + .../node_modules/backo2/component.json | 11 + .../iot-gateway/node_modules/backo2/index.js | 85 + .../node_modules/backo2/package.json | 70 + .../node_modules/backo2/test/index.js | 18 + .../base64-arraybuffer/.npmignore | 1 + .../base64-arraybuffer/.travis.yml | 6 + .../base64-arraybuffer/LICENSE-MIT | 22 + .../node_modules/base64-arraybuffer/README.md | 23 + .../node_modules/base64-arraybuffer/grunt.js | 39 + .../lib/base64-arraybuffer.js | 59 + .../base64-arraybuffer/package.json | 82 + .../test/base64-arraybuffer_test.js | 72 + .../node_modules/base64id/.npmignore | 3 + .../node_modules/base64id/README.md | 18 + .../node_modules/base64id/lib/base64id.js | 103 + .../node_modules/base64id/package.json | 72 + .../node_modules/benchmark/LICENSE.txt | 22 + .../node_modules/benchmark/README.md | 131 + .../node_modules/benchmark/benchmark.js | 3918 +++ .../node_modules/benchmark/doc/README.md | 2629 ++ .../node_modules/benchmark/package.json | 89 + .../node_modules/benchmark/test/run-test.sh | 9 + .../node_modules/benchmark/test/test.js | 2074 ++ .../node_modules/better-assert/.npmignore | 4 + .../node_modules/better-assert/History.md | 15 + .../node_modules/better-assert/Makefile | 5 + .../node_modules/better-assert/Readme.md | 61 + .../node_modules/better-assert/example.js | 10 + .../node_modules/better-assert/index.js | 38 + .../node_modules/better-assert/package.json | 92 + .../iot-gateway/node_modules/blob/.npmignore | 2 + .../iot-gateway/node_modules/blob/.zuul.yml | 14 + .../iot-gateway/node_modules/blob/Makefile | 14 + .../iot-gateway/node_modules/blob/README.md | 14 + .../iot-gateway/node_modules/blob/index.js | 96 + .../node_modules/blob/package.json | 69 + .../node_modules/blob/test/index.js | 94 + .../iot-gateway/node_modules/brfs/.travis.yml | 6 + .../iot-gateway/node_modules/brfs/LICENSE | 18 + .../iot-gateway/node_modules/brfs/bin/cmd.js | 20 + .../node_modules/brfs/bin/usage.txt | 13 + .../node_modules/brfs/example/async.js | 4 + .../node_modules/brfs/example/main.js | 3 + .../node_modules/brfs/example/robot.html | 1 + .../iot-gateway/node_modules/brfs/index.js | 146 + .../node_modules/brfs/package.json | 101 + .../node_modules/brfs/readme.markdown | 186 + .../iot-gateway/node_modules/brfs/test/ag.js | 23 + .../node_modules/brfs/test/async.js | 48 + .../node_modules/brfs/test/buffer.js | 26 + .../node_modules/brfs/test/bundle.js | 25 + .../iot-gateway/node_modules/brfs/test/cmd.js | 26 + .../brfs/test/dynamic_read_concat.js | 17 + .../brfs/test/dynamic_read_no_concat.js | 17 + .../node_modules/brfs/test/encoding.js | 19 + .../node_modules/brfs/test/files/ag.js | 5 + .../node_modules/brfs/test/files/ag.json | 1 + .../node_modules/brfs/test/files/ag_post.html | 1 + .../node_modules/brfs/test/files/ag_pre.html | 1 + .../node_modules/brfs/test/files/async.js | 4 + .../node_modules/brfs/test/files/async.txt | 1 + .../brfs/test/files/async_encoding.js | 4 + .../brfs/test/files/async_str_encoding.js | 4 + .../node_modules/brfs/test/files/buffer.js | 3 + .../brfs/test/files/dynamic_read_concat.js | 4 + .../brfs/test/files/dynamic_read_no_concat.js | 4 + .../node_modules/brfs/test/files/encoding.js | 4 + .../node_modules/brfs/test/files/hoist.js | 3 + .../node_modules/brfs/test/files/inline.js | 2 + .../node_modules/brfs/test/files/main.js | 3 + .../node_modules/brfs/test/files/multi_var.js | 3 + .../node_modules/brfs/test/files/non_fs.js | 3 + .../node_modules/brfs/test/files/path_join.js | 4 + .../brfs/test/files/path_join_other_name.js | 4 + .../brfs/test/files/path_join_single_var.js | 4 + .../brfs/test/files/readdir-sync.js | 3 + .../node_modules/brfs/test/files/readdir.js | 6 + .../node_modules/brfs/test/files/robot.html | 1 + .../brfs/test/files/separators.js | 3 + .../brfs/test/files/separators.txt | 3 + .../node_modules/brfs/test/files/tr.beep | 3 + .../node_modules/brfs/test/files/tr.html | 1 + .../brfs/test/files/with_comments.js | 20 + .../node_modules/brfs/test/hoist.js | 25 + .../node_modules/brfs/test/inline.js | 25 + .../node_modules/brfs/test/multi_var.js | 25 + .../node_modules/brfs/test/non_fs.js | 25 + .../node_modules/brfs/test/path_join.js | 25 + .../brfs/test/path_join_other_name.js | 25 + .../brfs/test/path_join_single_var.js | 25 + .../node_modules/brfs/test/readdir.js | 43 + .../node_modules/brfs/test/require_resolve.js | 21 + .../brfs/test/require_resolve/main.js | 4 + .../require_resolve/node_modules/aaa/wow.txt | 1 + .../node_modules/brfs/test/separators.js | 45 + .../iot-gateway/node_modules/brfs/test/tr.js | 41 + .../node_modules/brfs/test/with_comments.js | 27 + .../node_modules/buffer-equal/.travis.yml | 4 + .../node_modules/buffer-equal/README.markdown | 62 + .../node_modules/buffer-equal/example/eq.js | 14 + .../node_modules/buffer-equal/index.js | 14 + .../node_modules/buffer-equal/package.json | 83 + .../node_modules/buffer-equal/test/eq.js | 35 + .../node_modules/bytebuffer/.npmignore | 3 + .../node_modules/bytebuffer/.travis.yml | 5 + .../node_modules/bytebuffer/LICENSE | 202 + .../node_modules/bytebuffer/README.md | 64 + .../node_modules/bytebuffer/bower.json | 12 + .../node_modules/bytebuffer/bytebuffer.png | Bin 0 -> 3699 bytes .../node_modules/bytebuffer/dist/README.md | 47 + .../bytebuffer/dist/bytebuffer-dataview.js | 3461 +++ .../dist/bytebuffer-dataview.min.js | 88 + .../dist/bytebuffer-dataview.min.js.gz | Bin 0 -> 7988 bytes .../dist/bytebuffer-dataview.min.map | 8 + .../bytebuffer/dist/bytebuffer-node.js | 3454 +++ .../bytebuffer/dist/bytebuffer.js | 3746 +++ .../bytebuffer/dist/bytebuffer.min.js | 93 + .../bytebuffer/dist/bytebuffer.min.js.gz | Bin 0 -> 8658 bytes .../bytebuffer/dist/bytebuffer.min.map | 8 + .../node_modules/bytebuffer/donate.png | Bin 0 -> 1478 bytes .../bytebuffer/externs/bytebuffer.js | 862 + .../bytebuffer/externs/minimal-env.js | 52 + .../node_modules/bytebuffer/index.js | 1 + .../node_modules/bytebuffer/jsdoc.json | 13 + .../node_modules/bytebuffer/package.json | 107 + .../node_modules/bytebuffer/scripts/build.js | 113 + .../node_modules/bytebuffer/src/bower.json | 12 + .../node_modules/bytebuffer/src/bytebuffer.js | 220 + .../bytebuffer/src/encodings/base64.js | 88 + .../bytebuffer/src/encodings/binary.js | 74 + .../bytebuffer/src/encodings/debug.js | 211 + .../bytebuffer/src/encodings/hex.js | 75 + .../bytebuffer/src/encodings/impl/base64.js | 3 + .../bytebuffer/src/encodings/impl/binary.js | 65 + .../bytebuffer/src/encodings/impl/debug.js | 3 + .../bytebuffer/src/encodings/impl/hex.js | 101 + .../bytebuffer/src/encodings/impl/utf8.js | 126 + .../bytebuffer/src/encodings/utf8.js | 71 + .../node_modules/bytebuffer/src/helpers.js | 143 + .../node_modules/bytebuffer/src/macros.js | 222 + .../bytebuffer/src/methods/append.js | 58 + .../bytebuffer/src/methods/assert.js | 12 + .../bytebuffer/src/methods/capacity.js | 8 + .../bytebuffer/src/methods/clear.js | 13 + .../bytebuffer/src/methods/clone.js | 34 + .../bytebuffer/src/methods/compact.js | 49 + .../bytebuffer/src/methods/copy.js | 73 + .../bytebuffer/src/methods/ensureCapacity.js | 15 + .../bytebuffer/src/methods/fill.js | 35 + .../bytebuffer/src/methods/flip.js | 11 + .../bytebuffer/src/methods/mark.js | 17 + .../bytebuffer/src/methods/order.js | 36 + .../bytebuffer/src/methods/prepend.js | 87 + .../bytebuffer/src/methods/printDebug.js | 16 + .../bytebuffer/src/methods/remaining.js | 9 + .../bytebuffer/src/methods/reset.js | 17 + .../bytebuffer/src/methods/resize.js | 39 + .../bytebuffer/src/methods/reverse.js | 25 + .../bytebuffer/src/methods/skip.js | 19 + .../bytebuffer/src/methods/slice.js | 18 + .../bytebuffer/src/methods/static/accessor.js | 13 + .../bytebuffer/src/methods/static/allocate.js | 14 + .../bytebuffer/src/methods/static/concat.js | 55 + .../src/methods/static/isByteBuffer.js | 9 + .../bytebuffer/src/methods/static/type.js | 11 + .../bytebuffer/src/methods/static/wrap.js | 125 + .../bytebuffer/src/methods/toBuffer.js | 77 + .../bytebuffer/src/methods/toString.js | 43 + .../bytebuffer/src/types/bytes/bitset.js | 89 + .../bytebuffer/src/types/bytes/bytes.js | 34 + .../bytebuffer/src/types/floats/float32.js | 81 + .../bytebuffer/src/types/floats/float64.js | 77 + .../bytebuffer/src/types/floats/ieee754.js | 130 + .../bytebuffer/src/types/ints/int16.js | 167 + .../bytebuffer/src/types/ints/int32.js | 125 + .../bytebuffer/src/types/ints/int64.js | 194 + .../bytebuffer/src/types/ints/int8.js | 137 + .../bytebuffer/src/types/strings/cstring.js | 110 + .../bytebuffer/src/types/strings/istring.js | 81 + .../src/types/strings/utf8string.js | 214 + .../bytebuffer/src/types/strings/vstring.js | 78 + .../bytebuffer/src/types/varints/varint32.js | 164 + .../bytebuffer/src/types/varints/varint64.js | 208 + .../node_modules/bytebuffer/src/wrap-node.js | 50 + .../node_modules/bytebuffer/src/wrap.js | 43 + .../node_modules/bytebuffer/tests/bench.js | 99 + .../node_modules/bytebuffer/tests/suite.js | 1005 + .../node_modules/callsite/.npmignore | 4 + .../node_modules/callsite/History.md | 10 + .../node_modules/callsite/Makefile | 6 + .../node_modules/callsite/Readme.md | 44 + .../node_modules/callsite/index.js | 10 + .../node_modules/callsite/package.json | 69 + .../node_modules/component-bind/.npmignore | 4 + .../node_modules/component-bind/History.md | 13 + .../node_modules/component-bind/Makefile | 7 + .../node_modules/component-bind/Readme.md | 64 + .../component-bind/component.json | 13 + .../node_modules/component-bind/index.js | 23 + .../node_modules/component-bind/package.json | 73 + .../node_modules/component-emitter/.npmignore | 2 + .../component-emitter/.travis.yml | 4 + .../node_modules/component-emitter/History.md | 52 + .../node_modules/component-emitter/Makefile | 7 + .../node_modules/component-emitter/Readme.md | 74 + .../node_modules/component-emitter/bower.json | 21 + .../component-emitter/component.json | 14 + .../node_modules/component-emitter/index.js | 164 + .../component-emitter/package.json | 75 + .../node_modules/component-inherit/.npmignore | 3 + .../node_modules/component-inherit/History.md | 5 + .../node_modules/component-inherit/Makefile | 16 + .../node_modules/component-inherit/Readme.md | 24 + .../component-inherit/component.json | 10 + .../node_modules/component-inherit/index.js | 7 + .../component-inherit/package.json | 70 + .../component-inherit/test/inherit.js | 21 + .../node_modules/concat-stream/LICENSE | 24 + .../node_modules/concat-stream/index.js | 136 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 15 + .../node_modules/readable-stream/duplex.js | 1 + .../node_modules/readable-stream/float.patch | 923 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 951 + .../readable-stream/lib/_stream_transform.js | 209 + .../readable-stream/lib/_stream_writable.js | 477 + .../node_modules/readable-stream/package.json | 95 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 7 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../node_modules/concat-stream/package.json | 111 + .../node_modules/concat-stream/readme.md | 94 + .../content-disposition/HISTORY.md | 45 + .../node_modules/content-disposition/LICENSE | 22 + .../content-disposition/README.md | 141 + .../node_modules/content-disposition/index.js | 445 + .../content-disposition/package.json | 92 + .../node_modules/content-type/HISTORY.md | 9 + .../node_modules/content-type/LICENSE | 22 + .../node_modules/content-type/README.md | 92 + .../node_modules/content-type/index.js | 214 + .../node_modules/content-type/package.json | 91 + .../node_modules/cookie-signature/.npmignore | 4 + .../node_modules/cookie-signature/History.md | 38 + .../node_modules/cookie-signature/Readme.md | 42 + .../node_modules/cookie-signature/index.js | 51 + .../cookie-signature/package.json | 84 + .../node_modules/cookie/HISTORY.md | 72 + .../iot-gateway/node_modules/cookie/LICENSE | 24 + .../iot-gateway/node_modules/cookie/README.md | 64 + .../iot-gateway/node_modules/cookie/index.js | 156 + .../node_modules/cookie/package.json | 102 + .../node_modules/core-util-is/LICENSE | 19 + .../node_modules/core-util-is/README.md | 3 + .../node_modules/core-util-is/float.patch | 604 + .../node_modules/core-util-is/lib/util.js | 107 + .../node_modules/core-util-is/package.json | 89 + .../node_modules/core-util-is/test.js | 68 + .../iot-gateway/node_modules/debug/.jshintrc | 3 + .../iot-gateway/node_modules/debug/.npmignore | 6 + .../iot-gateway/node_modules/debug/History.md | 195 + .../iot-gateway/node_modules/debug/Makefile | 36 + .../iot-gateway/node_modules/debug/Readme.md | 188 + .../iot-gateway/node_modules/debug/bower.json | 28 + .../iot-gateway/node_modules/debug/browser.js | 168 + .../node_modules/debug/component.json | 19 + .../iot-gateway/node_modules/debug/debug.js | 197 + .../iot-gateway/node_modules/debug/node.js | 209 + .../node_modules/debug/package.json | 106 + .../iot-gateway/node_modules/depd/History.md | 84 + .../iot-gateway/node_modules/depd/LICENSE | 22 + .../iot-gateway/node_modules/depd/Readme.md | 281 + .../iot-gateway/node_modules/depd/index.js | 521 + .../node_modules/depd/lib/browser/index.js | 79 + .../depd/lib/compat/buffer-concat.js | 35 + .../depd/lib/compat/callsite-tostring.js | 103 + .../depd/lib/compat/event-listener-count.js | 22 + .../node_modules/depd/lib/compat/index.js | 84 + .../node_modules/depd/package.json | 94 + .../iot-gateway/node_modules/destroy/LICENSE | 22 + .../node_modules/destroy/README.md | 60 + .../iot-gateway/node_modules/destroy/index.js | 75 + .../node_modules/destroy/package.json | 98 + .../node_modules/duplexer2/.npmignore | 1 + .../node_modules/duplexer2/.travis.yml | 3 + .../node_modules/duplexer2/LICENSE.md | 26 + .../node_modules/duplexer2/README.md | 129 + .../node_modules/duplexer2/example.js | 49 + .../node_modules/duplexer2/index.js | 62 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 15 + .../node_modules/readable-stream/duplex.js | 1 + .../node_modules/readable-stream/float.patch | 923 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 951 + .../readable-stream/lib/_stream_transform.js | 209 + .../readable-stream/lib/_stream_writable.js | 477 + .../node_modules/readable-stream/package.json | 95 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 7 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../node_modules/duplexer2/package.json | 87 + .../node_modules/duplexer2/test/tests.js | 161 + .../iot-gateway/node_modules/ee-first/LICENSE | 22 + .../node_modules/ee-first/README.md | 80 + .../node_modules/ee-first/index.js | 95 + .../node_modules/ee-first/package.json | 90 + .../node_modules/engine.io-client/.npmignore | 2 + .../node_modules/engine.io-client/.travis.yml | 46 + .../node_modules/engine.io-client/.zuul.yml | 6 + .../node_modules/engine.io-client/History.md | 553 + .../node_modules/engine.io-client/LICENSE | 22 + .../node_modules/engine.io-client/Makefile | 38 + .../node_modules/engine.io-client/README.md | 292 + .../engine.io-client/engine.io.js | 4244 +++ .../node_modules/engine.io-client/index.js | 2 + .../engine.io-client/lib/index.js | 10 + .../engine.io-client/lib/socket.js | 728 + .../engine.io-client/lib/transport.js | 155 + .../engine.io-client/lib/transports/index.js | 53 + .../lib/transports/polling-jsonp.js | 238 + .../lib/transports/polling-xhr.js | 412 + .../lib/transports/polling.js | 247 + .../lib/transports/websocket.js | 288 + .../engine.io-client/lib/xmlhttprequest.js | 36 + .../engine.io-client/package.json | 114 + .../node_modules/engine.io-parser/.npmignore | 17 + .../node_modules/engine.io-parser/.travis.yml | 43 + .../node_modules/engine.io-parser/.zuul.yml | 5 + .../node_modules/engine.io-parser/History.md | 115 + .../node_modules/engine.io-parser/LICENSE | 22 + .../node_modules/engine.io-parser/Makefile | 26 + .../node_modules/engine.io-parser/Readme.md | 202 + .../node_modules/engine.io-parser/index.js | 2 + .../engine.io-parser/lib/browser.js | 594 + .../engine.io-parser/lib/index.js | 460 + .../node_modules/engine.io-parser/lib/keys.js | 19 + .../node_modules/has-binary/.npmignore | 15 + .../node_modules/has-binary/History.md | 11 + .../node_modules/has-binary/LICENSE | 20 + .../node_modules/has-binary/Makefile | 3 + .../node_modules/has-binary/README.md | 4 + .../node_modules/has-binary/fixtures/big.json | 1 + .../node_modules/has-binary/index.js | 58 + .../node_modules/has-binary/package.json | 64 + .../node_modules/has-binary/test.js | 108 + .../engine.io-parser/package.json | 82 + .../node_modules/engine.io/.npmignore | 6 + .../node_modules/engine.io/.travis.yml | 10 + .../node_modules/engine.io/History.md | 485 + .../node_modules/engine.io/LICENSE | 19 + .../node_modules/engine.io/Makefile | 23 + .../node_modules/engine.io/README.md | 534 + .../node_modules/engine.io/index.js | 4 + .../node_modules/engine.io/lib/engine.io.js | 126 + .../node_modules/engine.io/lib/server.js | 456 + .../node_modules/engine.io/lib/socket.js | 471 + .../node_modules/engine.io/lib/transport.js | 127 + .../engine.io/lib/transports/index.js | 36 + .../engine.io/lib/transports/polling-jsonp.js | 74 + .../engine.io/lib/transports/polling-xhr.js | 70 + .../engine.io/lib/transports/polling.js | 407 + .../engine.io/lib/transports/websocket.js | 125 + .../engine.io/node_modules/accepts/HISTORY.md | 74 + .../engine.io/node_modules/accepts/LICENSE | 22 + .../engine.io/node_modules/accepts/README.md | 94 + .../engine.io/node_modules/accepts/index.js | 160 + .../node_modules/accepts/package.json | 117 + .../engine.io/node_modules/mime-db/HISTORY.md | 212 + .../engine.io/node_modules/mime-db/LICENSE | 22 + .../engine.io/node_modules/mime-db/README.md | 76 + .../engine.io/node_modules/mime-db/db.json | 6359 ++++ .../engine.io/node_modules/mime-db/index.js | 11 + .../node_modules/mime-db/package.json | 120 + .../node_modules/mime-types/HISTORY.md | 115 + .../engine.io/node_modules/mime-types/LICENSE | 22 + .../node_modules/mime-types/README.md | 102 + .../node_modules/mime-types/index.js | 63 + .../node_modules/mime-types/package.json | 109 + .../engine.io/node_modules/negotiator/LICENSE | 23 + .../node_modules/negotiator/README.md | 161 + .../node_modules/negotiator/lib/charset.js | 87 + .../node_modules/negotiator/lib/encoding.js | 117 + .../node_modules/negotiator/lib/language.js | 100 + .../node_modules/negotiator/lib/mediaType.js | 122 + .../node_modules/negotiator/lib/negotiator.js | 37 + .../node_modules/negotiator/package.json | 105 + .../node_modules/engine.io/package.json | 102 + .../node_modules/escape-html/LICENSE | 24 + .../node_modules/escape-html/Readme.md | 43 + .../node_modules/escape-html/index.js | 78 + .../node_modules/escape-html/package.json | 86 + .../node_modules/escodegen/.jshintrc | 20 + .../node_modules/escodegen/LICENSE.BSD | 19 + .../node_modules/escodegen/LICENSE.source-map | 27 + .../node_modules/escodegen/README.md | 111 + .../node_modules/escodegen/bin/escodegen.js | 45 + .../node_modules/escodegen/bin/esgenerate.js | 45 + .../node_modules/escodegen/component.json | 58 + .../escodegen/escodegen.browser.min.js | 1 + .../node_modules/escodegen/escodegen.js | 2283 ++ .../node_modules/escodegen/gulpfile.js | 67 + .../node_modules/escodegen/package.json | 102 + .../node_modules/esprima/README.md | 24 + .../node_modules/esprima/bin/esparse.js | 127 + .../node_modules/esprima/bin/esvalidate.js | 199 + .../node_modules/esprima/esprima.js | 3830 +++ .../node_modules/esprima/package.json | 122 + .../node_modules/esprima/test/compat.js | 241 + .../node_modules/esprima/test/reflect.js | 422 + .../node_modules/esprima/test/run.js | 67 + .../node_modules/esprima/test/runner.js | 467 + .../node_modules/esprima/test/test.js | 24416 ++++++++++++++++ .../node_modules/estraverse/.jshintrc | 16 + .../node_modules/estraverse/LICENSE.BSD | 19 + .../node_modules/estraverse/README.md | 70 + .../node_modules/estraverse/estraverse.js | 689 + .../node_modules/estraverse/package.json | 85 + .../node_modules/esutils/.jshintrc | 16 + .../node_modules/esutils/.travis.yml | 8 + .../node_modules/esutils/README.md | 80 + .../node_modules/esutils/lib/code.js | 90 + .../node_modules/esutils/lib/keyword.js | 117 + .../node_modules/esutils/lib/utils.js | 32 + .../node_modules/esutils/package.json | 83 + .../node_modules/esutils/test/code.coffee | 167 + .../node_modules/esutils/test/keyword.coffee | 204 + .../iot-gateway/node_modules/etag/HISTORY.md | 71 + .../iot-gateway/node_modules/etag/LICENSE | 22 + .../iot-gateway/node_modules/etag/README.md | 165 + .../iot-gateway/node_modules/etag/index.js | 132 + .../node_modules/etag/package.json | 100 + .../node_modules/events/.npmignore | 1 + .../node_modules/events/.travis.yml | 7 + .../iot-gateway/node_modules/events/.zuul.yml | 12 + .../node_modules/events/History.md | 38 + .../iot-gateway/node_modules/events/LICENSE | 22 + .../iot-gateway/node_modules/events/Readme.md | 19 + .../iot-gateway/node_modules/events/events.js | 298 + .../node_modules/events/package.json | 91 + .../events/tests/add-listeners.js | 63 + .../events/tests/check-listener-leaks.js | 86 + .../node_modules/events/tests/common.js | 42 + .../node_modules/events/tests/index.js | 25 + .../events/tests/legacy-compat.js | 18 + .../events/tests/listener-count.js | 36 + .../events/tests/listeners-side-effects.js | 55 + .../node_modules/events/tests/listeners.js | 51 + .../events/tests/max-listeners.js | 50 + .../events/tests/modify-in-emit.js | 76 + .../node_modules/events/tests/num-args.js | 44 + .../node_modules/events/tests/once.js | 59 + .../events/tests/remove-all-listeners.js | 80 + .../events/tests/remove-listeners.js | 84 + .../tests/set-max-listeners-side-effects.js | 29 + .../node_modules/events/tests/subclass.js | 51 + .../node_modules/express/History.md | 3062 ++ .../iot-gateway/node_modules/express/LICENSE | 24 + .../node_modules/express/Readme.md | 138 + .../iot-gateway/node_modules/express/index.js | 11 + .../node_modules/express/lib/application.js | 643 + .../node_modules/express/lib/express.js | 103 + .../express/lib/middleware/init.js | 36 + .../express/lib/middleware/query.js | 51 + .../node_modules/express/lib/request.js | 489 + .../node_modules/express/lib/response.js | 1053 + .../node_modules/express/lib/router/index.js | 645 + .../node_modules/express/lib/router/layer.js | 176 + .../node_modules/express/lib/router/route.js | 210 + .../node_modules/express/lib/utils.js | 300 + .../node_modules/express/lib/view.js | 173 + .../node_modules/express/package.json | 168 + .../node_modules/falafel/.travis.yml | 3 + .../node_modules/falafel/example/array.js | 14 + .../node_modules/falafel/example/keyword.js | 16 + .../node_modules/falafel/example/prompt.js | 49 + .../iot-gateway/node_modules/falafel/index.js | 79 + .../node_modules/falafel/package.json | 137 + .../node_modules/falafel/readme.markdown | 122 + .../node_modules/falafel/test/array.js | 35 + .../node_modules/falafel/test/async.js | 42 + .../node_modules/falafel/test/bin/run.js | 5 + .../falafel/test/custom-parser.js | 42 + .../node_modules/falafel/test/es6.js | 15 + .../node_modules/falafel/test/for.js | 30 + .../node_modules/falafel/test/inspect.js | 36 + .../node_modules/falafel/test/opts.js | 134 + .../node_modules/falafel/test/parent.js | 33 + .../node_modules/finalhandler/HISTORY.md | 98 + .../node_modules/finalhandler/LICENSE | 22 + .../node_modules/finalhandler/README.md | 133 + .../node_modules/finalhandler/index.js | 151 + .../node_modules/finalhandler/package.json | 106 + .../node_modules/foreach/.npmignore | 3 + .../iot-gateway/node_modules/foreach/LICENSE | 24 + .../iot-gateway/node_modules/foreach/Makefile | 11 + .../node_modules/foreach/Readme.md | 30 + .../node_modules/foreach/component.json | 11 + .../iot-gateway/node_modules/foreach/index.js | 22 + .../node_modules/foreach/package.json | 109 + .../iot-gateway/node_modules/foreach/test.js | 153 + .../node_modules/forwarded/HISTORY.md | 4 + .../node_modules/forwarded/LICENSE | 22 + .../node_modules/forwarded/README.md | 53 + .../node_modules/forwarded/index.js | 35 + .../node_modules/forwarded/package.json | 91 + .../iot-gateway/node_modules/fresh/HISTORY.md | 38 + .../iot-gateway/node_modules/fresh/LICENSE | 22 + .../iot-gateway/node_modules/fresh/README.md | 58 + .../iot-gateway/node_modules/fresh/index.js | 57 + .../node_modules/fresh/package.json | 114 + prebuilt/iot-gateway/node_modules/fs/index.js | 1 + .../iot-gateway/node_modules/fs/package.json | 59 + .../node_modules/function-bind/.eslintrc | 13 + .../node_modules/function-bind/.jscs.json | 159 + .../node_modules/function-bind/.npmignore | 16 + .../node_modules/function-bind/.travis.yml | 77 + .../node_modules/function-bind/LICENSE | 20 + .../node_modules/function-bind/README.md | 48 + .../function-bind/implementation.js | 48 + .../node_modules/function-bind/index.js | 3 + .../node_modules/function-bind/package.json | 129 + .../node_modules/function-bind/test/index.js | 250 + .../node_modules/generate-function/.npmignore | 1 + .../generate-function/.travis.yml | 3 + .../node_modules/generate-function/README.md | 72 + .../node_modules/generate-function/example.js | 27 + .../node_modules/generate-function/index.js | 61 + .../generate-function/package.json | 79 + .../node_modules/generate-function/test.js | 33 + .../generate-object-property/.npmignore | 1 + .../generate-object-property/.travis.yml | 3 + .../generate-object-property/LICENSE | 21 + .../generate-object-property/README.md | 19 + .../generate-object-property/index.js | 12 + .../generate-object-property/package.json | 76 + .../generate-object-property/test.js | 12 + .../node_modules/has-binary/.npmignore | 15 + .../node_modules/has-binary/History.md | 19 + .../node_modules/has-binary/LICENSE | 20 + .../node_modules/has-binary/Makefile | 3 + .../node_modules/has-binary/README.md | 4 + .../node_modules/has-binary/index.js | 59 + .../node_modules/has-binary/package.json | 66 + .../node_modules/has-binary/test.js | 73 + .../node_modules/has-cors/.npmignore | 3 + .../node_modules/has-cors/History.md | 21 + .../node_modules/has-cors/Makefile | 11 + .../node_modules/has-cors/Readme.md | 24 + .../node_modules/has-cors/component.json | 13 + .../node_modules/has-cors/index.js | 17 + .../node_modules/has-cors/package.json | 88 + .../iot-gateway/node_modules/has-cors/test.js | 24 + .../iot-gateway/node_modules/has/.jshintrc | 14 + .../iot-gateway/node_modules/has/.npmignore | 3 + .../iot-gateway/node_modules/has/LICENSE-MIT | 22 + .../iot-gateway/node_modules/has/README.mkd | 18 + .../iot-gateway/node_modules/has/package.json | 85 + .../iot-gateway/node_modules/has/src/index.js | 3 + .../node_modules/has/test/.jshintrc | 7 + .../node_modules/has/test/index.js | 10 + .../node_modules/http-errors/HISTORY.md | 76 + .../node_modules/http-errors/LICENSE | 22 + .../node_modules/http-errors/README.md | 63 + .../node_modules/http-errors/index.js | 120 + .../node_modules/http-errors/package.json | 110 + .../node_modules/http/package.json | 59 + .../node_modules/indexof/.npmignore | 2 + .../iot-gateway/node_modules/indexof/Makefile | 11 + .../node_modules/indexof/Readme.md | 15 + .../node_modules/indexof/component.json | 10 + .../iot-gateway/node_modules/indexof/index.js | 10 + .../node_modules/indexof/package.json | 59 + .../iot-gateway/node_modules/inherits/LICENSE | 16 + .../node_modules/inherits/README.md | 42 + .../node_modules/inherits/inherits.js | 1 + .../node_modules/inherits/inherits_browser.js | 23 + .../node_modules/inherits/package.json | 83 + .../iot-gateway/node_modules/inherits/test.js | 25 + .../node_modules/ipaddr.js/.npmignore | 2 + .../node_modules/ipaddr.js/.travis.yml | 10 + .../node_modules/ipaddr.js/Cakefile | 18 + .../node_modules/ipaddr.js/LICENSE | 19 + .../node_modules/ipaddr.js/README.md | 161 + .../node_modules/ipaddr.js/bower.json | 29 + .../node_modules/ipaddr.js/ipaddr.min.js | 1 + .../node_modules/ipaddr.js/lib/ipaddr.js | 467 + .../node_modules/ipaddr.js/package.json | 85 + .../node_modules/ipaddr.js/src/ipaddr.coffee | 396 + .../ipaddr.js/test/ipaddr.test.coffee | 282 + .../node_modules/is-property/.npmignore | 17 + .../node_modules/is-property/LICENSE | 22 + .../node_modules/is-property/README.md | 28 + .../node_modules/is-property/is-property.js | 5 + .../node_modules/is-property/package.json | 84 + .../node_modules/isarray/README.md | 54 + .../node_modules/isarray/build/build.js | 209 + .../node_modules/isarray/component.json | 19 + .../iot-gateway/node_modules/isarray/index.js | 3 + .../node_modules/isarray/package.json | 86 + .../node_modules/json3/.gitmodules | 6 + .../iot-gateway/node_modules/json3/.jamignore | 10 + .../iot-gateway/node_modules/json3/.npmignore | 11 + .../node_modules/json3/.travis.yml | 33 + .../iot-gateway/node_modules/json3/LICENSE | 20 + .../iot-gateway/node_modules/json3/README.md | 126 + .../node_modules/json3/coverage/coverage.json | 1 + .../coverage/lcov-report/lib/json3.js.html | 2903 ++ .../json3/coverage/lcov-report/prettify.css | 1 + .../json3/coverage/lcov-report/prettify.js | 1 + .../node_modules/json3/coverage/lcov.info | 2035 ++ .../node_modules/json3/lib/json3.js | 861 + .../node_modules/json3/lib/json3.min.js | 18 + .../node_modules/json3/package.json | 129 + .../iot-gateway/node_modules/long/.npmignore | 3 + .../iot-gateway/node_modules/long/.travis.yml | 5 + .../iot-gateway/node_modules/long/LICENSE | 202 + .../iot-gateway/node_modules/long/README.md | 513 + .../iot-gateway/node_modules/long/bower.json | 9 + .../node_modules/long/dist/README.md | 16 + .../node_modules/long/dist/long.js | 1211 + .../node_modules/long/dist/long.min.js | 19 + .../node_modules/long/dist/long.min.js.gz | Bin 0 -> 2621 bytes .../node_modules/long/dist/long.min.map | 8 + .../node_modules/long/doco/INDEX.md | 6 + .../node_modules/long/doco/Long.md | 473 + .../iot-gateway/node_modules/long/donate.png | Bin 0 -> 1466 bytes .../node_modules/long/externs/long.js | 416 + .../iot-gateway/node_modules/long/index.js | 1 + .../iot-gateway/node_modules/long/jsdoc.json | 13 + .../iot-gateway/node_modules/long/long.png | Bin 0 -> 1405 bytes .../node_modules/long/package.json | 86 + .../node_modules/long/scripts/build.js | 28 + .../node_modules/long/src/bower.json | 9 + .../iot-gateway/node_modules/long/src/long.js | 1174 + .../iot-gateway/node_modules/long/src/wrap.js | 38 + .../node_modules/long/tests/goog.math.long.js | 807 + .../node_modules/long/tests/suite.js | 181 + .../node_modules/media-typer/HISTORY.md | 22 + .../node_modules/media-typer/LICENSE | 22 + .../node_modules/media-typer/README.md | 81 + .../node_modules/media-typer/index.js | 270 + .../node_modules/media-typer/package.json | 84 + .../node_modules/merge-descriptors/HISTORY.md | 21 + .../node_modules/merge-descriptors/LICENSE | 23 + .../node_modules/merge-descriptors/README.md | 48 + .../node_modules/merge-descriptors/index.js | 60 + .../merge-descriptors/package.json | 164 + .../node_modules/methods/HISTORY.md | 29 + .../iot-gateway/node_modules/methods/LICENSE | 24 + .../node_modules/methods/README.md | 51 + .../iot-gateway/node_modules/methods/index.js | 69 + .../node_modules/methods/package.json | 114 + .../node_modules/mime-db/HISTORY.md | 320 + .../iot-gateway/node_modules/mime-db/LICENSE | 22 + .../node_modules/mime-db/README.md | 82 + .../iot-gateway/node_modules/mime-db/db.json | 6575 +++++ .../iot-gateway/node_modules/mime-db/index.js | 11 + .../node_modules/mime-db/package.json | 125 + .../node_modules/mime-types/HISTORY.md | 191 + .../node_modules/mime-types/LICENSE | 23 + .../node_modules/mime-types/README.md | 103 + .../node_modules/mime-types/index.js | 188 + .../node_modules/mime-types/package.json | 115 + .../iot-gateway/node_modules/mime/.npmignore | 0 .../iot-gateway/node_modules/mime/LICENSE | 19 + .../iot-gateway/node_modules/mime/README.md | 90 + .../node_modules/mime/build/build.js | 11 + .../node_modules/mime/build/test.js | 57 + prebuilt/iot-gateway/node_modules/mime/cli.js | 8 + .../iot-gateway/node_modules/mime/mime.js | 108 + .../node_modules/mime/package.json | 98 + .../iot-gateway/node_modules/mime/types.json | 1 + .../node_modules/minimist/.travis.yml | 8 + .../iot-gateway/node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../node_modules/minimist/index.js | 236 + .../node_modules/minimist/package.json | 97 + .../node_modules/minimist/readme.markdown | 91 + .../node_modules/minimist/test/all_bool.js | 32 + .../node_modules/minimist/test/bool.js | 166 + .../node_modules/minimist/test/dash.js | 31 + .../minimist/test/default_bool.js | 35 + .../node_modules/minimist/test/dotted.js | 22 + .../node_modules/minimist/test/kv_short.js | 16 + .../node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/num.js | 36 + .../node_modules/minimist/test/parse.js | 197 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/stop_early.js | 15 + .../node_modules/minimist/test/unknown.js | 102 + .../node_modules/minimist/test/whitespace.js | 8 + .../iot-gateway/node_modules/ms/.npmignore | 5 + .../iot-gateway/node_modules/ms/History.md | 66 + prebuilt/iot-gateway/node_modules/ms/LICENSE | 20 + .../iot-gateway/node_modules/ms/README.md | 35 + prebuilt/iot-gateway/node_modules/ms/index.js | 125 + .../iot-gateway/node_modules/ms/package.json | 75 + .../node_modules/negotiator/HISTORY.md | 76 + .../node_modules/negotiator/LICENSE | 24 + .../node_modules/negotiator/README.md | 203 + .../node_modules/negotiator/index.js | 62 + .../node_modules/negotiator/lib/charset.js | 102 + .../node_modules/negotiator/lib/encoding.js | 118 + .../node_modules/negotiator/lib/language.js | 112 + .../node_modules/negotiator/lib/mediaType.js | 179 + .../node_modules/negotiator/package.json | 112 + prebuilt/iot-gateway/node_modules/net/LICENSE | 19 + .../iot-gateway/node_modules/net/README.md | 0 .../iot-gateway/node_modules/net/index.js | 28 + .../iot-gateway/node_modules/net/package.json | 76 + prebuilt/iot-gateway/node_modules/net/test.js | 6 + .../node_modules/object-component/.npmignore | 3 + .../node_modules/object-component/History.md | 10 + .../node_modules/object-component/Makefile | 16 + .../node_modules/object-component/Readme.md | 31 + .../object-component/component.json | 10 + .../node_modules/object-component/index.js | 84 + .../object-component/package.json | 61 + .../object-component/test/object.js | 48 + .../node_modules/object-inspect/.travis.yml | 4 + .../node_modules/object-inspect/LICENSE | 18 + .../object-inspect/example/all.js | 17 + .../object-inspect/example/circular.js | 4 + .../node_modules/object-inspect/example/fn.js | 3 + .../object-inspect/example/inspect.js | 7 + .../node_modules/object-inspect/index.js | 127 + .../node_modules/object-inspect/package.json | 96 + .../object-inspect/readme.markdown | 59 + .../object-inspect/test/browser/dom.js | 15 + .../object-inspect/test/circular.js | 9 + .../node_modules/object-inspect/test/fn.js | 8 + .../node_modules/object-inspect/test/holes.js | 15 + .../object-inspect/test/lowbyte.js | 12 + .../node_modules/object-inspect/test/undef.js | 12 + .../node_modules/object-keys/.editorconfig | 13 + .../node_modules/object-keys/.eslintrc | 16 + .../node_modules/object-keys/.jscs.json | 131 + .../node_modules/object-keys/.npmignore | 2 + .../node_modules/object-keys/.travis.yml | 60 + .../node_modules/object-keys/CHANGELOG.md | 203 + .../node_modules/object-keys/LICENSE | 21 + .../node_modules/object-keys/README.md | 76 + .../node_modules/object-keys/index.js | 128 + .../node_modules/object-keys/isArguments.js | 17 + .../node_modules/object-keys/package.json | 141 + .../node_modules/object-keys/test/index.js | 5 + .../node_modules/on-finished/HISTORY.md | 88 + .../node_modules/on-finished/LICENSE | 23 + .../node_modules/on-finished/README.md | 154 + .../node_modules/on-finished/index.js | 196 + .../node_modules/on-finished/package.json | 98 + .../node_modules/options/.npmignore | 7 + .../iot-gateway/node_modules/options/Makefile | 12 + .../node_modules/options/README.md | 69 + .../node_modules/options/lib/options.js | 86 + .../node_modules/options/package.json | 76 + .../node_modules/parsejson/Makefile | 3 + .../node_modules/parsejson/index.js | 32 + .../node_modules/parsejson/package.json | 62 + .../node_modules/parsejson/test.js | 21 + .../iot-gateway/node_modules/parseqs/Makefile | 3 + .../iot-gateway/node_modules/parseqs/index.js | 37 + .../node_modules/parseqs/package.json | 62 + .../iot-gateway/node_modules/parseqs/test.js | 27 + .../node_modules/parseuri/History.md | 5 + .../node_modules/parseuri/Makefile | 3 + .../node_modules/parseuri/index.js | 39 + .../node_modules/parseuri/package.json | 71 + .../iot-gateway/node_modules/parseuri/test.js | 51 + .../node_modules/parseurl/HISTORY.md | 47 + .../iot-gateway/node_modules/parseurl/LICENSE | 24 + .../node_modules/parseurl/README.md | 120 + .../node_modules/parseurl/index.js | 138 + .../node_modules/parseurl/package.json | 116 + .../node_modules/path-to-regexp/History.md | 36 + .../node_modules/path-to-regexp/LICENSE | 21 + .../node_modules/path-to-regexp/Readme.md | 35 + .../node_modules/path-to-regexp/index.js | 129 + .../node_modules/path-to-regexp/package.json | 211 + .../process-nextick-args/.travis.yml | 12 + .../process-nextick-args/index.js | 20 + .../process-nextick-args/license.md | 19 + .../process-nextick-args/package.json | 71 + .../process-nextick-args/readme.md | 18 + .../node_modules/process-nextick-args/test.js | 24 + .../protocol-buffers-schema/.npmignore | 1 + .../protocol-buffers-schema/.travis.yml | 5 + .../protocol-buffers-schema/LICENSE | 21 + .../protocol-buffers-schema/README.md | 120 + .../protocol-buffers-schema/example.js | 11 + .../protocol-buffers-schema/example.proto | 13 + .../protocol-buffers-schema/index.js | 6 + .../protocol-buffers-schema/package.json | 82 + .../protocol-buffers-schema/parse.js | 609 + .../protocol-buffers-schema/stringify.js | 183 + .../test/fixtures/basic.json | 86 + .../test/fixtures/basic.proto | 11 + .../test/fixtures/comments.json | 93 + .../test/fixtures/comments.proto | 19 + .../test/fixtures/complex.json | 121 + .../test/fixtures/complex.proto | 28 + .../test/fixtures/extend.json | 161 + .../test/fixtures/extend.proto | 19 + .../test/fixtures/map.json | 31 + .../test/fixtures/map.proto | 3 + .../test/fixtures/oneof.json | 39 + .../test/fixtures/oneof.proto | 6 + .../test/fixtures/options.json | 43 + .../test/fixtures/options.proto | 8 + .../test/fixtures/search.json | 28 + .../test/fixtures/search.proto | 5 + .../test/fixtures/service.json | 104 + .../test/fixtures/service.proto | 30 + .../test/fixtures/version.json | 86 + .../test/fixtures/version.proto | 13 + .../protocol-buffers-schema/test/index.js | 110 + .../protocol-buffers-schema/tokenize.js | 37 + .../node_modules/protocol-buffers/.npmignore | 1 + .../node_modules/protocol-buffers/.travis.yml | 10 + .../node_modules/protocol-buffers/LICENSE | 21 + .../node_modules/protocol-buffers/README.md | 128 + .../protocol-buffers/bench/bench.proto | 28 + .../protocol-buffers/bench/index.js | 61 + .../node_modules/protocol-buffers/compile.js | 510 + .../protocol-buffers/encodings.js | 290 + .../node_modules/protocol-buffers/example.js | 15 + .../protocol-buffers/example.proto | 4 + .../node_modules/protocol-buffers/index.js | 28 + .../protocol-buffers/package.json | 107 + .../protocol-buffers/test/basic.js | 63 + .../protocol-buffers/test/corrupted.js | 41 + .../protocol-buffers/test/defaults.js | 41 + .../protocol-buffers/test/enums.js | 18 + .../protocol-buffers/test/float.js | 25 + .../protocol-buffers/test/integers.js | 48 + .../node_modules/protocol-buffers/test/map.js | 29 + .../node_modules/protocol-buffers/test/nan.js | 29 + .../protocol-buffers/test/nested.js | 62 + .../protocol-buffers/test/notpacked.js | 33 + .../protocol-buffers/test/oneof.js | 60 + .../protocol-buffers/test/packed.js | 121 + .../protocol-buffers/test/repeated.js | 68 + .../protocol-buffers/test/test.proto | 109 + .../protocol-buffers/test/utf-8.js | 15 + .../node_modules/proxy-addr/HISTORY.md | 80 + .../node_modules/proxy-addr/LICENSE | 22 + .../node_modules/proxy-addr/README.md | 137 + .../node_modules/proxy-addr/index.js | 347 + .../node_modules/proxy-addr/package.json | 115 + .../iot-gateway/node_modules/qs/.eslintignore | 1 + .../iot-gateway/node_modules/qs/.npmignore | 19 + .../iot-gateway/node_modules/qs/.travis.yml | 6 + .../iot-gateway/node_modules/qs/CHANGELOG.md | 88 + .../node_modules/qs/CONTRIBUTING.md | 1 + prebuilt/iot-gateway/node_modules/qs/LICENSE | 28 + .../iot-gateway/node_modules/qs/README.md | 317 + .../iot-gateway/node_modules/qs/bower.json | 22 + .../iot-gateway/node_modules/qs/lib/index.js | 15 + .../iot-gateway/node_modules/qs/lib/parse.js | 186 + .../node_modules/qs/lib/stringify.js | 121 + .../iot-gateway/node_modules/qs/lib/utils.js | 190 + .../iot-gateway/node_modules/qs/package.json | 82 + .../iot-gateway/node_modules/qs/test/parse.js | 478 + .../node_modules/qs/test/stringify.js | 259 + .../iot-gateway/node_modules/qs/test/utils.js | 28 + .../node_modules/quote-stream/.travis.yml | 4 + .../node_modules/quote-stream/LICENSE | 18 + .../node_modules/quote-stream/bin/cmd.js | 13 + .../node_modules/quote-stream/bin/usage.txt | 4 + .../quote-stream/example/stream.js | 2 + .../node_modules/quote-stream/index.js | 92 + .../node_modules/quote-stream/package.json | 106 + .../node_modules/quote-stream/readme.markdown | 53 + .../node_modules/quote-stream/test/simple.js | 13 + .../quote-stream/test/unicode_separators.js | 23 + .../quote-stream/test/whitespace.js | 13 + .../node_modules/range-parser/HISTORY.md | 40 + .../node_modules/range-parser/LICENSE | 22 + .../node_modules/range-parser/README.md | 57 + .../node_modules/range-parser/index.js | 63 + .../node_modules/range-parser/package.json | 102 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/.travis.yml | 50 + .../node_modules/readable-stream/.zuul.yml | 1 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 36 + .../readable-stream/doc/stream.markdown | 1730 ++ .../doc/wg-meetings/2015-01-30.md | 60 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 82 + .../lib/_stream_passthrough.js | 27 + .../readable-stream/lib/_stream_readable.js | 975 + .../readable-stream/lib/_stream_transform.js | 197 + .../readable-stream/lib/_stream_writable.js | 529 + .../node_modules/readable-stream/package.json | 101 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 12 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../node_modules/resolve/.travis.yml | 4 + .../iot-gateway/node_modules/resolve/LICENSE | 18 + .../node_modules/resolve/example/async.js | 5 + .../node_modules/resolve/example/sync.js | 3 + .../iot-gateway/node_modules/resolve/index.js | 5 + .../node_modules/resolve/lib/async.js | 192 + .../node_modules/resolve/lib/caller.js | 8 + .../node_modules/resolve/lib/core.js | 4 + .../node_modules/resolve/lib/core.json | 38 + .../resolve/lib/node-modules-paths.js | 38 + .../node_modules/resolve/lib/sync.js | 81 + .../node_modules/resolve/package.json | 82 + .../node_modules/resolve/readme.markdown | 148 + .../node_modules/resolve/test/core.js | 12 + .../node_modules/resolve/test/dotdot.js | 29 + .../resolve/test/dotdot/abc/index.js | 2 + .../node_modules/resolve/test/dotdot/index.js | 1 + .../resolve/test/faulty_basedir.js | 17 + .../node_modules/resolve/test/filter.js | 18 + .../node_modules/resolve/test/filter_sync.js | 15 + .../node_modules/resolve/test/mock.js | 142 + .../node_modules/resolve/test/mock_sync.js | 68 + .../node_modules/resolve/test/module_dir.js | 56 + .../test/module_dir/xmodules/aaa/index.js | 1 + .../test/module_dir/ymodules/aaa/index.js | 1 + .../test/module_dir/zmodules/bbb/main.js | 1 + .../test/module_dir/zmodules/bbb/package.json | 3 + .../node_modules/resolve/test/node_path.js | 48 + .../resolve/test/node_path/x/aaa/index.js | 1 + .../resolve/test/node_path/x/ccc/index.js | 1 + .../resolve/test/node_path/y/bbb/index.js | 1 + .../resolve/test/node_path/y/ccc/index.js | 1 + .../node_modules/resolve/test/nonstring.js | 9 + .../node_modules/resolve/test/pathfilter.js | 35 + .../resolve/test/pathfilter/deep_ref/main.js | 0 .../deep_ref/node_modules/deep/alt.js | 0 .../deep_ref/node_modules/deep/deeper/ref.js | 0 .../deep_ref/node_modules/deep/package.json | 4 + .../deep_ref/node_modules/deep/ref.js | 0 .../node_modules/resolve/test/precedence.js | 23 + .../resolve/test/precedence/aaa.js | 1 + .../resolve/test/precedence/aaa/index.js | 1 + .../resolve/test/precedence/aaa/main.js | 1 + .../resolve/test/precedence/bbb.js | 1 + .../resolve/test/precedence/bbb/main.js | 1 + .../node_modules/resolve/test/resolver.js | 281 + .../resolver/bar/node_modules/foo/index.js | 1 + .../resolve/test/resolver/baz/doom.js | 0 .../resolve/test/resolver/baz/package.json | 3 + .../resolve/test/resolver/baz/quux.js | 1 + .../biz/node_modules/garply/lib/index.js | 1 + .../biz/node_modules/garply/package.json | 3 + .../resolver/biz/node_modules/grux/index.js | 1 + .../resolver/biz/node_modules/tiv/index.js | 1 + .../resolve/test/resolver/cup.coffee | 1 + .../node_modules/resolve/test/resolver/foo.js | 1 + .../test/resolver/incorrect_main/index.js | 2 + .../test/resolver/incorrect_main/package.json | 3 + .../resolve/test/resolver/mug.coffee | 0 .../node_modules/resolve/test/resolver/mug.js | 0 .../test/resolver/other_path/lib/other-lib.js | 0 .../resolve/test/resolver/other_path/root.js | 0 .../punycode/node_modules/punycode/index.js | 0 .../resolve/test/resolver/quux/foo/index.js | 1 + .../test/resolver/without_basedir/main.js | 6 + .../without_basedir/node_modules/mymodule.js | 1 + .../resolve/test/resolver_sync.js | 180 + .../node_modules/resolve/test/subdirs.js | 13 + .../test/subdirs/node_modules/a/b/c/x.json | 1 + .../test/subdirs/node_modules/a/package.json | 1 + .../iot-gateway/node_modules/send/HISTORY.md | 310 + .../iot-gateway/node_modules/send/LICENSE | 23 + .../iot-gateway/node_modules/send/README.md | 195 + .../iot-gateway/node_modules/send/index.js | 820 + .../node_modules/send/package.json | 115 + .../node_modules/serve-static/HISTORY.md | 303 + .../node_modules/serve-static/LICENSE | 25 + .../node_modules/serve-static/README.md | 236 + .../node_modules/serve-static/index.js | 187 + .../node_modules/serve-static/package.json | 108 + .../node_modules/shallow-copy/.travis.yml | 4 + .../node_modules/shallow-copy/LICENSE | 18 + .../shallow-copy/example/array.js | 9 + .../shallow-copy/example/object.js | 9 + .../node_modules/shallow-copy/index.js | 35 + .../node_modules/shallow-copy/package.json | 93 + .../node_modules/shallow-copy/readme.markdown | 64 + .../node_modules/shallow-copy/test/array.js | 14 + .../node_modules/shallow-copy/test/object.js | 14 + .../node_modules/signed-varint/LICENSE | 22 + .../node_modules/signed-varint/README.md | 28 + .../node_modules/signed-varint/index.js | 16 + .../node_modules/varint/README.md | 51 + .../node_modules/varint/bench.js | 57 + .../node_modules/varint/decode.js | 29 + .../node_modules/varint/encode.js | 26 + .../node_modules/varint/index.js | 5 + .../node_modules/varint/length.js | 21 + .../node_modules/varint/package.json | 79 + .../signed-varint/node_modules/varint/test.js | 136 + .../node_modules/signed-varint/package.json | 74 + .../node_modules/signed-varint/test.js | 49 + .../node_modules/smartobject/.npmignore | 37 + .../node_modules/smartobject/.travis.yml | 3 + .../node_modules/smartobject/Makefile | 4 + .../node_modules/smartobject/README.md | 767 + .../smartobject/docs/resource_plan.md | 166 + .../smartobject/docs/templates.md | 377 + .../node_modules/smartobject/index.js | 3 + .../smartobject/lib/object_instance.js | 298 + .../smartobject/lib/smartobject.js | 304 + .../node_modules/smartobject/lib/utils.js | 132 + .../node_modules/busyman/.npmignore | 33 + .../node_modules/busyman/.travis.yml | 3 + .../smartobject/node_modules/busyman/LICENSE | 21 + .../smartobject/node_modules/busyman/Makefile | 4 + .../node_modules/busyman/README.md | 1733 ++ .../smartobject/node_modules/busyman/index.js | 697 + .../node_modules/busyman/package.json | 73 + .../node_modules/busyman/test/array.test.js | 288 + .../busyman/test/collection.test.js | 196 + .../busyman/test/function.test.js | 97 + .../node_modules/busyman/test/object.test.js | 256 + .../node_modules/busyman/test/string.test.js | 200 + .../node_modules/busyman/test/type.test.js | 392 + .../node_modules/busyman/test/utils.test.js | 384 + .../node_modules/lwm2m-id/.npmignore | 27 + .../node_modules/lwm2m-id/.travis.yml | 3 + .../smartobject/node_modules/lwm2m-id/LICENSE | 22 + .../node_modules/lwm2m-id/Makefile | 4 + .../node_modules/lwm2m-id/README.md | 931 + .../node_modules/lwm2m-id/defs/conflict.txt | 8 + .../node_modules/lwm2m-id/defs/defs.json | 1350 + .../node_modules/lwm2m-id/index.js | 285 + .../lwm2m-id/node_modules/enum/README.md | 227 + .../lwm2m-id/node_modules/enum/dist/enum.js | 337 + .../node_modules/enum/dist/enumItem.js | 104 + .../node_modules/enum/dist/indexOf.js | 11 + .../lwm2m-id/node_modules/enum/dist/isType.js | 15 + .../lwm2m-id/node_modules/enum/enum-2.3.0.js | 1933 ++ .../node_modules/enum/enum-2.3.0.min.js | 1 + .../lwm2m-id/node_modules/enum/index.js | 1 + .../lwm2m-id/node_modules/enum/licence | 19 + .../lwm2m-id/node_modules/enum/package.json | 95 + .../node_modules/lwm2m-id/package.json | 58 + .../lwm2m-id/test/argumentType.test.js | 520 + .../node_modules/lwm2m-id/test/getter.test.js | 435 + .../node_modules/lwm2m-id/test/setter.test.js | 271 + .../node_modules/smartobject/package.json | 53 + .../test/objectInst.functional.test.js | 367 + .../test/objectInst.signature.test.js | 242 + .../test/smartObject.functional.test.js | 559 + .../test/smartObject.signature.test.js | 715 + .../node_modules/socket.io-adapter/.npmignore | 1 + .../node_modules/socket.io-adapter/History.md | 33 + .../node_modules/socket.io-adapter/LICENSE | 20 + .../node_modules/socket.io-adapter/Readme.md | 16 + .../node_modules/socket.io-adapter/index.js | 236 + .../node_modules/socket.io-parser/.npmignore | 5 + .../node_modules/socket.io-parser/.travis.yml | 11 + .../node_modules/socket.io-parser/.zuul.yml | 16 + .../node_modules/socket.io-parser/History.md | 87 + .../node_modules/socket.io-parser/Makefile | 11 + .../node_modules/socket.io-parser/Readme.md | 73 + .../socket.io-parser/bench/bench.js | 10 + .../socket.io-parser/bench/index.js | 81 + .../node_modules/socket.io-parser/binary.js | 141 + .../node_modules/socket.io-parser/index.js | 396 + .../socket.io-parser/is-buffer.js | 13 + .../node_modules/debug/Readme.md | 115 + .../node_modules/debug/debug.js | 137 + .../node_modules/debug/index.js | 5 + .../node_modules/debug/lib/debug.js | 147 + .../node_modules/debug/package.json | 88 + .../socket.io-parser/package.json | 76 + .../socket.io-adapter/package.json | 73 + .../node_modules/socket.io-client/History.md | 446 + .../node_modules/socket.io-client/LICENSE | 22 + .../node_modules/socket.io-client/README.md | 188 + .../socket.io-client/lib/index.js | 92 + .../socket.io-client/lib/manager.js | 557 + .../node_modules/socket.io-client/lib/on.js | 24 + .../socket.io-client/lib/socket.js | 412 + .../node_modules/socket.io-client/lib/url.js | 76 + .../node_modules/component-emitter/History.md | 63 + .../node_modules/component-emitter/LICENSE | 24 + .../node_modules/component-emitter/Readme.md | 74 + .../node_modules/component-emitter/index.js | 161 + .../component-emitter/package.json | 200 + .../socket.io-client/package.json | 123 + .../socket.io-client/socket.io.js | 7252 +++++ .../node_modules/socket.io-parser/.npmignore | 5 + .../node_modules/socket.io-parser/.travis.yml | 46 + .../node_modules/socket.io-parser/.zuul.yml | 20 + .../node_modules/socket.io-parser/History.md | 108 + .../node_modules/socket.io-parser/LICENSE | 20 + .../node_modules/socket.io-parser/Makefile | 27 + .../node_modules/socket.io-parser/Readme.md | 73 + .../socket.io-parser/bench/bench.js | 10 + .../socket.io-parser/bench/index.js | 81 + .../node_modules/socket.io-parser/binary.js | 141 + .../node_modules/socket.io-parser/index.js | 400 + .../socket.io-parser/is-buffer.js | 13 + .../node_modules/json3/LICENSE | 20 + .../node_modules/json3/README.md | 152 + .../node_modules/json3/lib/json3.js | 902 + .../node_modules/json3/lib/json3.min.js | 17 + .../node_modules/json3/package.json | 140 + .../socket.io-parser/package.json | 79 + .../node_modules/socket.io/.npmignore | 4 + .../node_modules/socket.io/.travis.yml | 20 + .../node_modules/socket.io/History.md | 556 + .../node_modules/socket.io/LICENSE | 22 + .../node_modules/socket.io/Makefile | 15 + .../node_modules/socket.io/Readme.md | 427 + .../node_modules/socket.io/lib/client.js | 251 + .../node_modules/socket.io/lib/index.js | 385 + .../node_modules/socket.io/lib/namespace.js | 272 + .../node_modules/socket.io/lib/socket.js | 470 + .../node_modules/socket.io/package.json | 109 + .../node_modules/source-map/.npmignore | 2 + .../node_modules/source-map/.travis.yml | 4 + .../node_modules/source-map/CHANGELOG.md | 194 + .../node_modules/source-map/LICENSE | 28 + .../source-map/Makefile.dryice.js | 166 + .../node_modules/source-map/README.md | 475 + .../source-map/build/assert-shim.js | 56 + .../source-map/build/mini-require.js | 152 + .../source-map/build/prefix-source-map.jsm | 20 + .../source-map/build/prefix-utils.jsm | 18 + .../source-map/build/suffix-browser.js | 8 + .../source-map/build/suffix-source-map.jsm | 6 + .../source-map/build/suffix-utils.jsm | 21 + .../source-map/build/test-prefix.js | 8 + .../source-map/build/test-suffix.js | 3 + .../node_modules/source-map/lib/source-map.js | 8 + .../source-map/lib/source-map/array-set.js | 97 + .../source-map/lib/source-map/base64-vlq.js | 142 + .../source-map/lib/source-map/base64.js | 42 + .../lib/source-map/binary-search.js | 80 + .../source-map/lib/source-map/mapping-list.js | 86 + .../lib/source-map/source-map-consumer.js | 575 + .../lib/source-map/source-map-generator.js | 400 + .../source-map/lib/source-map/source-node.js | 414 + .../source-map/lib/source-map/util.js | 319 + .../node_modules/source-map/package.json | 212 + .../node_modules/source-map/test/run-tests.js | 62 + .../source-map/test/source-map/test-api.js | 26 + .../test/source-map/test-array-set.js | 104 + .../test/source-map/test-base64-vlq.js | 23 + .../source-map/test/source-map/test-base64.js | 35 + .../test/source-map/test-binary-search.js | 54 + .../test/source-map/test-dog-fooding.js | 84 + .../source-map/test-source-map-consumer.js | 702 + .../source-map/test-source-map-generator.js | 679 + .../test/source-map/test-source-node.js | 612 + .../source-map/test/source-map/test-util.js | 216 + .../source-map/test/source-map/util.js | 192 + .../node_modules/static-eval/.travis.yml | 4 + .../node_modules/static-eval/LICENSE | 18 + .../node_modules/static-eval/example/eval.js | 7 + .../node_modules/static-eval/example/vars.js | 11 + .../node_modules/static-eval/index.js | 117 + .../static-eval/node_modules/.bin/escodegen | 45 + .../static-eval/node_modules/.bin/esgenerate | 45 + .../static-eval/node_modules/.bin/esparse | 117 + .../static-eval/node_modules/.bin/esvalidate | 177 + .../node_modules/escodegen/.jshintrc | 20 + .../node_modules/escodegen/Gruntfile.js | 60 + .../node_modules/escodegen/LICENSE.BSD | 19 + .../node_modules/escodegen/LICENSE.source-map | 27 + .../node_modules/escodegen/README.md | 97 + .../node_modules/escodegen/bin/escodegen.js | 45 + .../node_modules/escodegen/bin/esgenerate.js | 45 + .../node_modules/escodegen/escodegen.js | 2119 ++ .../node_modules/escodegen/package.json | 100 + .../node_modules/esprima/README.md | 73 + .../node_modules/esprima/bin/esparse.js | 117 + .../node_modules/esprima/bin/esvalidate.js | 177 + .../node_modules/esprima/esprima.js | 3908 +++ .../node_modules/esprima/package.json | 96 + .../node_modules/esprima/test/compat.js | 239 + .../node_modules/esprima/test/reflect.js | 422 + .../node_modules/esprima/test/run.js | 66 + .../node_modules/esprima/test/runner.js | 387 + .../node_modules/esprima/test/test.js | 20238 +++++++++++++ .../node_modules/estraverse/.jshintrc | 16 + .../node_modules/estraverse/LICENSE.BSD | 19 + .../node_modules/estraverse/README.md | 48 + .../node_modules/estraverse/estraverse.js | 684 + .../node_modules/estraverse/package.json | 81 + .../node_modules/static-eval/package.json | 101 + .../node_modules/static-eval/readme.markdown | 83 + .../node_modules/static-eval/test/eval.js | 53 + .../node_modules/static-eval/test/prop.js | 16 + .../node_modules/static-module/.travis.yml | 4 + .../node_modules/static-module/LICENSE | 18 + .../static-module/example/brfs.js | 12 + .../static-module/example/brfs/source.js | 3 + .../static-module/example/brfs/x.txt | 1 + .../node_modules/static-module/example/fs.js | 21 + .../static-module/example/fs/source.js | 4 + .../static-module/example/fs/x.txt | 1 + .../node_modules/static-module/index.js | 341 + .../node_modules/minimist/.travis.yml | 4 + .../node_modules/minimist/LICENSE | 18 + .../node_modules/minimist/example/parse.js | 2 + .../node_modules/minimist/index.js | 187 + .../node_modules/minimist/package.json | 93 + .../node_modules/minimist/readme.markdown | 73 + .../node_modules/minimist/test/dash.js | 24 + .../minimist/test/default_bool.js | 20 + .../node_modules/minimist/test/dotted.js | 16 + .../node_modules/minimist/test/long.js | 31 + .../node_modules/minimist/test/parse.js | 318 + .../minimist/test/parse_modified.js | 9 + .../node_modules/minimist/test/short.js | 67 + .../node_modules/minimist/test/whitespace.js | 8 + .../node_modules/object-keys/.npmignore | 1 + .../node_modules/object-keys/.travis.yml | 5 + .../node_modules/object-keys/README.md | 39 + .../node_modules/object-keys/foreach.js | 40 + .../node_modules/object-keys/index.js | 2 + .../node_modules/object-keys/isArguments.js | 16 + .../node_modules/object-keys/package.json | 99 + .../node_modules/object-keys/shim.js | 62 + .../node_modules/object-keys/test/foreach.js | 156 + .../node_modules/object-keys/test/index.js | 6 + .../object-keys/test/isArguments.js | 10 + .../node_modules/object-keys/test/shim.js | 134 + .../node_modules/quote-stream/.travis.yml | 4 + .../node_modules/quote-stream/LICENSE | 18 + .../node_modules/quote-stream/bin/cmd.js | 13 + .../node_modules/quote-stream/bin/usage.txt | 4 + .../quote-stream/example/stream.js | 2 + .../node_modules/quote-stream/index.js | 66 + .../node_modules/quote-stream/package.json | 100 + .../node_modules/quote-stream/readme.markdown | 53 + .../node_modules/quote-stream/test/simple.js | 13 + .../quote-stream/test/whitespace.js | 13 + .../node_modules/readable-stream/.npmignore | 5 + .../node_modules/readable-stream/LICENSE | 18 + .../node_modules/readable-stream/README.md | 15 + .../node_modules/readable-stream/duplex.js | 1 + .../readable-stream/lib/_stream_duplex.js | 89 + .../lib/_stream_passthrough.js | 46 + .../readable-stream/lib/_stream_readable.js | 982 + .../readable-stream/lib/_stream_transform.js | 210 + .../readable-stream/lib/_stream_writable.js | 386 + .../node_modules/readable-stream/package.json | 96 + .../readable-stream/passthrough.js | 1 + .../node_modules/readable-stream/readable.js | 8 + .../node_modules/readable-stream/transform.js | 1 + .../node_modules/readable-stream/writable.js | 1 + .../node_modules/through2/.npmignore | 3 + .../node_modules/through2/LICENSE | 39 + .../node_modules/through2/README.md | 140 + .../node_modules/through2/package.json | 91 + .../node_modules/through2/through2.js | 78 + .../node_modules/xtend/.npmignore | 1 + .../static-module/node_modules/xtend/LICENCE | 19 + .../static-module/node_modules/xtend/Makefile | 4 + .../node_modules/xtend/README.md | 27 + .../node_modules/xtend/has-keys.js | 7 + .../static-module/node_modules/xtend/index.js | 25 + .../node_modules/xtend/mutable.js | 25 + .../node_modules/xtend/package.json | 114 + .../static-module/node_modules/xtend/test.js | 63 + .../node_modules/static-module/package.json | 105 + .../static-module/readme.markdown | 112 + .../node_modules/static-module/test/assign.js | 44 + .../static-module/test/assign/comma.js | 3 + .../static-module/test/assign/source.js | 3 + .../node_modules/static-module/test/brfs.js | 162 + .../static-module/test/brfs/attribute.js | 3 + .../test/brfs/attribute_brackets.js | 3 + .../static-module/test/brfs/attribute_vars.js | 3 + .../static-module/test/brfs/brackets.js | 3 + .../static-module/test/brfs/multi_require.js | 3 + .../static-module/test/brfs/source.js | 3 + .../static-module/test/brfs/x.txt | 1 + .../static-module/test/brfs/x5.js | 5 + .../node_modules/static-module/test/fn.js | 19 + .../static-module/test/fn/source.js | 2 + .../node_modules/static-module/test/fs.js | 55 + .../static-module/test/fs/html.js | 2 + .../static-module/test/fs/readfile.js | 4 + .../static-module/test/fs/robot.html | 1 + .../node_modules/static-module/test/fs/x.txt | 1 + .../static-module/test/fs_twice.js | 84 + .../static-module/test/fs_twice/4x.js | 9 + .../static-module/test/fs_twice/html.js | 4 + .../static-module/test/fs_twice/readfile.js | 4 + .../static-module/test/fs_twice/robot.html | 1 + .../static-module/test/fs_twice/vars.js | 5 + .../static-module/test/fs_twice/x.txt | 1 + .../node_modules/static-module/test/inline.js | 75 + .../static-module/test/inline/fn.js | 2 + .../static-module/test/inline/fn_call.js | 1 + .../static-module/test/inline/fn_expr.js | 1 + .../static-module/test/inline/obj.js | 2 + .../static-module/test/inline/obj_call.js | 1 + .../static-module/test/inline/obj_expr.js | 1 + .../node_modules/static-module/test/log.js | 45 + .../static-module/test/log/source.js | 1 + .../node_modules/static-module/test/many.js | 74 + .../static-module/test/many/a.txt | 1 + .../static-module/test/many/all_inline.js | 6 + .../static-module/test/many/b.txt | 1 + .../static-module/test/many/c.txt | 1 + .../static-module/test/many/inline.js | 6 + .../static-module/test/many/source.js | 5 + .../node_modules/static-module/test/mixed.js | 62 + .../static-module/test/mixed/source.js | 4 + .../static-module/test/mixed/unmixed.js | 4 + .../static-module/test/mixed/xyz.txt | 1 + .../node_modules/static-module/test/nested.js | 29 + .../static-module/test/nested/source.js | 3 + .../node_modules/static-module/test/obj.js | 22 + .../static-module/test/obj/source.js | 3 + .../node_modules/static-module/test/prop.js | 21 + .../static-module/test/prop/source.js | 3 + .../static-module/test/readfile_resolve.js | 34 + .../test/readfile_resolve/main.js | 3 + .../readfile_resolve/node_modules/aaa/wow.txt | 1 + .../static-module/test/shebang.js | 22 + .../static-module/test/shebang/source.js | 4 + .../node_modules/static-module/test/varmod.js | 37 + .../static-module/test/varmod/source.js | 5 + .../static-module/test/varmod/vars.html | 1 + .../node_modules/static-module/test/vars.js | 90 + .../static-module/test/vars/five.js | 6 + .../static-module/test/vars/multi-require.js | 14 + .../static-module/test/vars/one.js | 4 + .../static-module/test/vars/source.js | 5 + .../static-module/test/vars/vars.html | 1 + .../iot-gateway/node_modules/statuses/LICENSE | 22 + .../node_modules/statuses/README.md | 114 + .../node_modules/statuses/codes.json | 64 + .../node_modules/statuses/index.js | 60 + .../node_modules/statuses/package.json | 111 + .../node_modules/string_decoder/.npmignore | 2 + .../node_modules/string_decoder/LICENSE | 20 + .../node_modules/string_decoder/README.md | 7 + .../node_modules/string_decoder/index.js | 221 + .../node_modules/string_decoder/package.json | 82 + .../node_modules/through2/.npmignore | 3 + .../iot-gateway/node_modules/through2/LICENSE | 39 + .../node_modules/through2/README.md | 133 + .../node_modules/through2/package.json | 97 + .../node_modules/through2/through2.js | 96 + .../node_modules/to-array/.npmignore | 3 + .../iot-gateway/node_modules/to-array/LICENCE | 19 + .../node_modules/to-array/README.md | 22 + .../node_modules/to-array/index.js | 13 + .../node_modules/to-array/package.json | 90 + .../node_modules/type-is/HISTORY.md | 200 + .../iot-gateway/node_modules/type-is/LICENSE | 23 + .../node_modules/type-is/README.md | 136 + .../iot-gateway/node_modules/type-is/index.js | 262 + .../node_modules/type-is/package.json | 106 + .../node_modules/typedarray/.travis.yml | 4 + .../node_modules/typedarray/LICENSE | 35 + .../node_modules/typedarray/example/tarray.js | 4 + .../node_modules/typedarray/index.js | 630 + .../node_modules/typedarray/package.json | 105 + .../node_modules/typedarray/readme.markdown | 61 + .../typedarray/test/server/undef_globals.js | 19 + .../node_modules/typedarray/test/tarray.js | 10 + .../node_modules/ultron/.npmignore | 3 + .../node_modules/ultron/.travis.yml | 21 + .../iot-gateway/node_modules/ultron/LICENSE | 22 + .../iot-gateway/node_modules/ultron/README.md | 97 + .../iot-gateway/node_modules/ultron/index.js | 129 + .../node_modules/ultron/package.json | 100 + .../iot-gateway/node_modules/ultron/test.js | 327 + .../node_modules/unpipe/HISTORY.md | 4 + .../iot-gateway/node_modules/unpipe/LICENSE | 22 + .../iot-gateway/node_modules/unpipe/README.md | 43 + .../iot-gateway/node_modules/unpipe/index.js | 69 + .../node_modules/unpipe/package.json | 85 + .../node_modules/utf8/.gitattributes | 2 + .../iot-gateway/node_modules/utf8/.npmignore | 20 + .../iot-gateway/node_modules/utf8/.travis.yml | 21 + .../node_modules/utf8/Gruntfile.js | 75 + .../node_modules/utf8/LICENSE-MIT.txt | 20 + .../iot-gateway/node_modules/utf8/README.md | 119 + .../iot-gateway/node_modules/utf8/bower.json | 14 + .../node_modules/utf8/component.json | 16 + .../node_modules/utf8/package.json | 90 + .../utf8/tests/generate-test-data.py | 50 + .../node_modules/utf8/tests/index.html | 35 + .../node_modules/utf8/tests/tests.js | 276 + .../iot-gateway/node_modules/utf8/utf8.js | 244 + .../node_modules/util-deprecate/History.md | 16 + .../node_modules/util-deprecate/LICENSE | 24 + .../node_modules/util-deprecate/README.md | 53 + .../node_modules/util-deprecate/browser.js | 67 + .../node_modules/util-deprecate/node.js | 6 + .../node_modules/util-deprecate/package.json | 81 + .../iot-gateway/node_modules/util/.npmignore | 1 + .../iot-gateway/node_modules/util/.travis.yml | 8 + .../iot-gateway/node_modules/util/.zuul.yml | 10 + .../iot-gateway/node_modules/util/LICENSE | 18 + .../iot-gateway/node_modules/util/README.md | 15 + .../node_modules/util/package.json | 80 + .../node_modules/util/support/isBuffer.js | 3 + .../util/support/isBufferBrowser.js | 6 + .../node_modules/util/test/browser/inspect.js | 41 + .../node_modules/util/test/browser/is.js | 91 + .../node_modules/util/test/node/debug.js | 86 + .../node_modules/util/test/node/format.js | 77 + .../node_modules/util/test/node/inspect.js | 195 + .../node_modules/util/test/node/log.js | 58 + .../node_modules/util/test/node/util.js | 83 + .../iot-gateway/node_modules/util/util.js | 586 + .../node_modules/utils-merge/.travis.yml | 6 + .../node_modules/utils-merge/LICENSE | 20 + .../node_modules/utils-merge/README.md | 34 + .../node_modules/utils-merge/index.js | 23 + .../node_modules/utils-merge/package.json | 85 + .../iot-gateway/node_modules/varint/README.md | 51 + .../iot-gateway/node_modules/varint/bench.js | 57 + .../iot-gateway/node_modules/varint/decode.js | 29 + .../iot-gateway/node_modules/varint/encode.js | 26 + .../iot-gateway/node_modules/varint/index.js | 5 + .../iot-gateway/node_modules/varint/length.js | 25 + .../node_modules/varint/package.json | 80 + .../iot-gateway/node_modules/varint/test.js | 136 + .../iot-gateway/node_modules/vary/HISTORY.md | 23 + .../iot-gateway/node_modules/vary/LICENSE | 22 + .../iot-gateway/node_modules/vary/README.md | 91 + .../iot-gateway/node_modules/vary/index.js | 117 + .../node_modules/vary/package.json | 98 + .../iot-gateway/node_modules/ws/.npmignore | 11 + .../iot-gateway/node_modules/ws/.travis.yml | 15 + prebuilt/iot-gateway/node_modules/ws/Makefile | 40 + .../iot-gateway/node_modules/ws/README.md | 242 + prebuilt/iot-gateway/node_modules/ws/index.js | 49 + .../node_modules/ws/lib/BufferPool.js | 63 + .../ws/lib/BufferUtil.fallback.js | 47 + .../node_modules/ws/lib/BufferUtil.js | 13 + .../node_modules/ws/lib/ErrorCodes.js | 24 + .../node_modules/ws/lib/Extensions.js | 70 + .../node_modules/ws/lib/PerMessageDeflate.js | 325 + .../node_modules/ws/lib/Receiver.hixie.js | 184 + .../node_modules/ws/lib/Receiver.js | 702 + .../node_modules/ws/lib/Sender.hixie.js | 124 + .../iot-gateway/node_modules/ws/lib/Sender.js | 324 + .../ws/lib/Validation.fallback.js | 12 + .../node_modules/ws/lib/Validation.js | 13 + .../node_modules/ws/lib/WebSocket.js | 965 + .../node_modules/ws/lib/WebSocketServer.js | 513 + .../iot-gateway/node_modules/ws/package.json | 103 + .../node_modules/xmlhttprequest-ssl/LICENSE | 22 + .../node_modules/xmlhttprequest-ssl/README.md | 61 + .../xmlhttprequest-ssl/autotest.watchr | 8 + .../xmlhttprequest-ssl/example/demo.js | 16 + .../xmlhttprequest-ssl/lib/XMLHttpRequest.js | 646 + .../xmlhttprequest-ssl/package.json | 84 + .../tests/test-constants.js | 13 + .../xmlhttprequest-ssl/tests/test-events.js | 50 + .../tests/test-exceptions.js | 59 + .../xmlhttprequest-ssl/tests/test-headers.js | 76 + .../tests/test-redirect-302.js | 41 + .../tests/test-redirect-303.js | 41 + .../tests/test-redirect-307.js | 43 + .../tests/test-request-methods.js | 62 + .../tests/test-request-protocols.js | 32 + .../xmlhttprequest-ssl/tests/testdata.txt | 1 + .../iot-gateway/node_modules/xtend/.jshintrc | 30 + .../iot-gateway/node_modules/xtend/.npmignore | 1 + .../iot-gateway/node_modules/xtend/LICENCE | 19 + .../iot-gateway/node_modules/xtend/Makefile | 4 + .../iot-gateway/node_modules/xtend/README.md | 32 + .../node_modules/xtend/immutable.js | 19 + .../iot-gateway/node_modules/xtend/mutable.js | 17 + .../node_modules/xtend/package.json | 109 + .../iot-gateway/node_modules/xtend/test.js | 83 + .../iot-gateway/node_modules/yeast/LICENSE | 22 + .../iot-gateway/node_modules/yeast/README.md | 82 + .../iot-gateway/node_modules/yeast/index.js | 68 + .../node_modules/yeast/package.json | 92 + prebuilt/iot-gateway/package.json | 22 + prebuilt/iot-gateway/run_gateway.sh | 104 + prebuilt/run_demo.sh | 95 + scripts/app.mak | 171 + scripts/front_matter.mak | 380 + scripts/library.mak | 123 + 3987 files changed, 716716 insertions(+) create mode 100644 .gitignore create mode 100644 Sub-1GHzSensortoCloudIndustrialIoTGateway_manifest.html create mode 100755 build_all.sh create mode 100644 components/api/Makefile create mode 100644 components/api/inc/api_mac.h create mode 100644 components/api/inc/api_mac_linux.h create mode 100644 components/api/inc/mt_msg.h create mode 100644 components/api/inc/mt_msg_dbg.h create mode 100644 components/api/src/api_mac.c create mode 100644 components/api/src/mt_msg.c create mode 100644 components/api/src/mt_msg_dbg_core.c create mode 100644 components/api/src/mt_msg_dbg_load.c create mode 100644 components/api/src/mt_msg_ini.c create mode 100644 components/common/Makefile create mode 100644 components/common/inc/bitsnbits.h create mode 100644 components/common/inc/compiler.h create mode 100644 components/common/inc/compiler_gcc.h create mode 100644 components/common/inc/debug_helpers.h create mode 100644 components/common/inc/fatal.h create mode 100644 components/common/inc/fifo.h create mode 100644 components/common/inc/hexline.h create mode 100644 components/common/inc/hlos_specific.h create mode 100644 components/common/inc/ini_file.h create mode 100644 components/common/inc/log.h create mode 100644 components/common/inc/mutex.h create mode 100644 components/common/inc/rand_data.h create mode 100644 components/common/inc/stream.h create mode 100644 components/common/inc/stream_private.h create mode 100644 components/common/inc/stream_socket.h create mode 100644 components/common/inc/stream_uart.h create mode 100644 components/common/inc/threads.h create mode 100644 components/common/inc/ti_semaphore.h create mode 100644 components/common/inc/timer.h create mode 100644 components/common/inc/unix_fdrw.h create mode 100644 components/common/inc/void_ptr.h create mode 100644 components/common/linux/linux_specific.c create mode 100644 components/common/linux/linux_uart.c create mode 100644 components/common/src/debug_helpers.c create mode 100644 components/common/src/fatal.c create mode 100644 components/common/src/fifo.c create mode 100644 components/common/src/hexline.c create mode 100644 components/common/src/ini_file.c create mode 100644 components/common/src/log.c create mode 100644 components/common/src/log_ini.c create mode 100644 components/common/src/mutex.c create mode 100644 components/common/src/rand_data.c create mode 100644 components/common/src/stream_common.c create mode 100644 components/common/src/stream_file.c create mode 100644 components/common/src/stream_mem.c create mode 100644 components/common/src/stream_socket_client.c create mode 100644 components/common/src/stream_socket_ini.c create mode 100644 components/common/src/stream_socket_private.c create mode 100644 components/common/src/stream_socket_private.h create mode 100644 components/common/src/stream_socket_server.c create mode 100644 components/common/src/stream_uart_ini.c create mode 100644 components/common/src/threads.c create mode 100644 components/common/src/ti_semaphore.c create mode 100644 components/common/src/timer.c create mode 100644 components/common/src/timer_cb.c create mode 100644 components/common/src/unix_fdrw.c create mode 100755 components/nv/Makefile create mode 100755 components/nv/inc/nv_linux.h create mode 100755 components/nv/inc/nvintf.h create mode 100644 components/nv/linux/nv_linux.c create mode 100644 docs/Readme.txt create mode 100644 example/collector/Makefile create mode 100644 example/collector/api_mac.pb-c.c create mode 100644 example/collector/api_mac.pb-c.h create mode 100644 example/collector/api_mac.proto create mode 100644 example/collector/api_mac_proto.c create mode 100644 example/collector/api_mac_proto.h create mode 100644 example/collector/appsrv.c create mode 100644 example/collector/appsrv.h create mode 100644 example/collector/appsrv.pb-c.c create mode 100644 example/collector/appsrv.pb-c.h create mode 100644 example/collector/appsrv.proto create mode 100644 example/collector/appsrv_proto.c create mode 100644 example/collector/appsrv_proto.h create mode 100644 example/collector/cllc.c create mode 100644 example/collector/cllc.h create mode 100644 example/collector/cllc.pb-c.c create mode 100644 example/collector/cllc.pb-c.h create mode 100644 example/collector/cllc.proto create mode 100644 example/collector/collector.c create mode 100644 example/collector/collector.cfg create mode 100644 example/collector/collector.h create mode 100644 example/collector/config.h create mode 100644 example/collector/csf.h create mode 100644 example/collector/csf.pb-c.c create mode 100644 example/collector/csf.pb-c.h create mode 100644 example/collector/csf.proto create mode 100644 example/collector/csf_linux.c create mode 100644 example/collector/csf_linux.h create mode 100644 example/collector/csf_linux.pb-c.c create mode 100644 example/collector/csf_linux.pb-c.h create mode 100644 example/collector/csf_linux.proto create mode 100644 example/collector/csf_proto.c create mode 100644 example/collector/csf_proto.h create mode 100644 example/collector/linux_main.c create mode 100644 example/collector/llc.h create mode 100644 example/collector/llc.pb-c.c create mode 100644 example/collector/llc.pb-c.h create mode 100644 example/collector/llc.proto create mode 100644 example/collector/llc_proto.c create mode 100644 example/collector/llc_proto.h create mode 100644 example/collector/protobuf-c.c create mode 100644 example/collector/protobuf-c/protobuf-c.h create mode 100755 example/collector/run_collector.sh create mode 100644 example/collector/smsgs.h create mode 100644 example/collector/smsgs.pb-c.c create mode 100644 example/collector/smsgs.pb-c.h create mode 100644 example/collector/smsgs.proto create mode 100644 example/collector/smsgs_proto.c create mode 100644 example/collector/smsgs_proto.h create mode 100644 example/collector/util.c create mode 100644 example/collector/util.h create mode 100644 example/google/Makefile create mode 100755 example/iot-gateway/appClient/appclient.js create mode 100755 example/iot-gateway/appClient/devices/device.js create mode 100755 example/iot-gateway/appClient/nwkinfo/nwkinfo.js create mode 100644 example/iot-gateway/appClient/protofiles/appsrv.proto create mode 100644 example/iot-gateway/cloudAdapter/awsCloudAdapter.js create mode 100644 example/iot-gateway/cloudAdapter/awsConfig.json create mode 100644 example/iot-gateway/cloudAdapter/awsDeltaTest.js create mode 100644 example/iot-gateway/cloudAdapter/certs/Readme.txt create mode 100755 example/iot-gateway/iot-gateway.js create mode 100755 example/iot-gateway/node_modules/.bin/acorn create mode 100755 example/iot-gateway/node_modules/.bin/brfs create mode 100755 example/iot-gateway/node_modules/.bin/escodegen create mode 100755 example/iot-gateway/node_modules/.bin/esgenerate create mode 100755 example/iot-gateway/node_modules/.bin/esparse create mode 100755 example/iot-gateway/node_modules/.bin/esvalidate create mode 100755 example/iot-gateway/node_modules/.bin/mime create mode 100755 example/iot-gateway/node_modules/.bin/quote-stream create mode 100644 example/iot-gateway/node_modules/accepts/HISTORY.md create mode 100644 example/iot-gateway/node_modules/accepts/LICENSE create mode 100644 example/iot-gateway/node_modules/accepts/README.md create mode 100644 example/iot-gateway/node_modules/accepts/index.js create mode 100644 example/iot-gateway/node_modules/accepts/package.json create mode 100644 example/iot-gateway/node_modules/acorn/.editorconfig create mode 100644 example/iot-gateway/node_modules/acorn/.gitattributes create mode 100644 example/iot-gateway/node_modules/acorn/.npmignore create mode 100644 example/iot-gateway/node_modules/acorn/.tern-project create mode 100644 example/iot-gateway/node_modules/acorn/.travis.yml create mode 100644 example/iot-gateway/node_modules/acorn/AUTHORS create mode 100644 example/iot-gateway/node_modules/acorn/LICENSE create mode 100644 example/iot-gateway/node_modules/acorn/README.md create mode 100755 example/iot-gateway/node_modules/acorn/bin/acorn create mode 100644 example/iot-gateway/node_modules/acorn/bin/build-acorn.js create mode 100644 example/iot-gateway/node_modules/acorn/bin/generate-identifier-regex.js create mode 100755 example/iot-gateway/node_modules/acorn/bin/prepublish.sh create mode 100755 example/iot-gateway/node_modules/acorn/bin/update_authors.sh create mode 100755 example/iot-gateway/node_modules/acorn/bin/without_eval create mode 100644 example/iot-gateway/node_modules/acorn/dist/.keep create mode 100644 example/iot-gateway/node_modules/acorn/dist/acorn.js create mode 100644 example/iot-gateway/node_modules/acorn/dist/acorn_csp.js create mode 100644 example/iot-gateway/node_modules/acorn/dist/acorn_loose.js create mode 100644 example/iot-gateway/node_modules/acorn/dist/walk.js create mode 100644 example/iot-gateway/node_modules/acorn/package.json create mode 100755 example/iot-gateway/node_modules/acorn/src/expression.js create mode 100644 example/iot-gateway/node_modules/acorn/src/identifier.js create mode 100644 example/iot-gateway/node_modules/acorn/src/index.js create mode 100755 example/iot-gateway/node_modules/acorn/src/location.js create mode 100644 example/iot-gateway/node_modules/acorn/src/loose/acorn_loose.js create mode 100644 example/iot-gateway/node_modules/acorn/src/loose/expression.js create mode 100644 example/iot-gateway/node_modules/acorn/src/loose/index.js create mode 100644 example/iot-gateway/node_modules/acorn/src/loose/parseutil.js create mode 100644 example/iot-gateway/node_modules/acorn/src/loose/state.js create mode 100644 example/iot-gateway/node_modules/acorn/src/loose/statement.js create mode 100644 example/iot-gateway/node_modules/acorn/src/loose/tokenize.js create mode 100755 example/iot-gateway/node_modules/acorn/src/lval.js create mode 100755 example/iot-gateway/node_modules/acorn/src/node.js create mode 100644 example/iot-gateway/node_modules/acorn/src/options.js create mode 100644 example/iot-gateway/node_modules/acorn/src/parseutil.js create mode 100644 example/iot-gateway/node_modules/acorn/src/state.js create mode 100644 example/iot-gateway/node_modules/acorn/src/statement.js create mode 100644 example/iot-gateway/node_modules/acorn/src/tokencontext.js create mode 100644 example/iot-gateway/node_modules/acorn/src/tokenize.js create mode 100644 example/iot-gateway/node_modules/acorn/src/tokentype.js create mode 100644 example/iot-gateway/node_modules/acorn/src/util.js create mode 100644 example/iot-gateway/node_modules/acorn/src/walk/index.js create mode 100644 example/iot-gateway/node_modules/acorn/src/whitespace.js create mode 100644 example/iot-gateway/node_modules/after/.npmignore create mode 100644 example/iot-gateway/node_modules/after/.travis.yml create mode 100644 example/iot-gateway/node_modules/after/LICENCE create mode 100644 example/iot-gateway/node_modules/after/README.md create mode 100644 example/iot-gateway/node_modules/after/index.js create mode 100644 example/iot-gateway/node_modules/after/package.json create mode 100644 example/iot-gateway/node_modules/after/test/after-test.js create mode 100644 example/iot-gateway/node_modules/amdefine/LICENSE create mode 100644 example/iot-gateway/node_modules/amdefine/README.md create mode 100644 example/iot-gateway/node_modules/amdefine/amdefine.js create mode 100644 example/iot-gateway/node_modules/amdefine/intercept.js create mode 100644 example/iot-gateway/node_modules/amdefine/package.json create mode 100644 example/iot-gateway/node_modules/array-flatten/LICENSE create mode 100644 example/iot-gateway/node_modules/array-flatten/README.md create mode 100644 example/iot-gateway/node_modules/array-flatten/array-flatten.js create mode 100644 example/iot-gateway/node_modules/array-flatten/package.json create mode 100644 example/iot-gateway/node_modules/arraybuffer.slice/.npmignore create mode 100644 example/iot-gateway/node_modules/arraybuffer.slice/Makefile create mode 100644 example/iot-gateway/node_modules/arraybuffer.slice/README.md create mode 100644 example/iot-gateway/node_modules/arraybuffer.slice/index.js create mode 100644 example/iot-gateway/node_modules/arraybuffer.slice/package.json create mode 100644 example/iot-gateway/node_modules/arraybuffer.slice/test/slice-buffer.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/.jscsrc create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/.jshintrc create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/CHANGELOG.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/LICENSE.txt create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/NOTICE.txt create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/browser/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/browser/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/common/lib/exceptions.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/common/lib/is-undefined.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/common/lib/tls-reader.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/device/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/device/lib/exceptions.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/device/lib/tls.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/device/lib/ws.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/lifecycle/aws-configuration.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/lifecycle/example.css create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/lifecycle/index.html create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/lifecycle/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/mqtt-explorer/aws-configuration.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/mqtt-explorer/example.css create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/mqtt-explorer/index.html create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/mqtt-explorer/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/temperature-monitor/aws-configuration.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/temperature-monitor/example.css create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/temperature-monitor/index.html create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/temperature-monitor/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/device-example.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/echo-example.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/lib/cmdline.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/temperature-control/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/temperature-control/temperature-control.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/thing-example.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/examples/thing-passthrough-example.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/gulpfile.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/index.js create mode 120000 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/.bin/mqtt create mode 120000 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/.bin/mqtt_pub create mode 120000 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/.bin/mqtt_sub create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/CONTRIBUTING.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/aes.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/bower.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/crypto-js.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/docs/QuickStartGuide.wiki create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-hex.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-latin1.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-utf16.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-utf8.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/format-hex.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/format-openssl.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-md5.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-ripemd160.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-sha1.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-sha224.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-sha256.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-sha3.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-sha384.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-sha512.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/lib-typedarrays.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-cfb.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr-gladman.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ecb.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ofb.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-ansix923.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso10126.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso97971.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-nopadding.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-pkcs7.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-zeropadding.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pbkdf2.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit-legacy.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/rc4.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/ripemd160.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha224.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha256.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha3.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha384.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha512.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/tripledes.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/.eslintrc create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/.jscsrc create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/.jshintrc create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/.travis.yml create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/.zuul.yml create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/CONTRIBUTING.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/LICENSE.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/MQTT.js.png create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/README.md create mode 100755 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/benchmarks/bombing.js create mode 100755 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/benchmarks/throughputCounter.js create mode 100755 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/bin/pub.js create mode 100755 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/bin/sub.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/doc/help.txt create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/doc/publish.txt create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/doc/subscribe.txt create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/example.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/client/secure-client.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/client/simple-both.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/client/simple-publish.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/client/simple-subscribe.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/server/broadcast.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/server/orig.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/server/redis.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/server/tls.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/server/websocket.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls client/crt.ca.cg.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls client/mqttclient.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls client/tls-cert.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls client/tls-key.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls server/crt.server1.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls server/key.csr.server1.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls server/mqttserver.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/wss/client.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/client.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/tcp.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/tls.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/ws.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/server.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/store.js create mode 100755 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/mqtt.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/example.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/index.js create mode 120000 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/node_modules/.bin/leven create mode 100755 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/node_modules/leven/cli.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/node_modules/leven/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/node_modules/leven/license create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/node_modules/leven/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/node_modules/leven/readme.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/wrappy.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/once.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/doc/hello.txt create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/doc/help.txt create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/example.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/fixture/basic/hello create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/fixture/basic/hello.txt create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/fixture/basic/help.txt create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/help-me.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/.travis.yml create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/node_modules/wrappy/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/node_modules/wrappy/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/node_modules/wrappy/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/node_modules/wrappy/wrappy.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/once.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/.travis.yml create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/CONTRIBUTING.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/LICENSE.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/connection.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/lib/generateStream.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/lib/parseStream.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/.travis.yml create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/through2/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/through2/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/through2/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/through2/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/through2/through2.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/test/connection.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/test/connection.parse.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/test/connection.transmit.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/test/util.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/.travis.yml create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/CONTRIBUTING.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/LICENSE.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/benchmarks/generate.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/benchmarks/parse.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/constants.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/generate.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/mqtt.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/.jshintrc create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/.travis.yml create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/LICENSE.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/bl.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/test/basic-test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/test/sauce.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/test/test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/packet.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/parser.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/testRandom.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/duplex.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/passthrough.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/readable.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/transform.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/writable.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/.travis.yml create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/tests/test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/abstract_client.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/abstract_store.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/browser/server.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/browser/test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/client.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/private-csr.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/private-key.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/public-cert.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/public-key.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/server.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/server_process.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/tls-cert.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/tls-csr.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/tls-key.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/wrong-cert.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/wrong-csr.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/wrong-key.pem create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/mocha.opts create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/mqtt.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/secure_client.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/server.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/store.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/util.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/websocket_client.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/collaborators.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/echo-server.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/.travis.yml create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/example.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/wrappy.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/once.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/.npmignore create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/.travis.yml create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/LICENSE create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/README.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/index.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/package.json create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/readme.md create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/server.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/stream.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/test-client.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/test-server.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/test.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/ws-fallback.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/package.json create mode 100755 example/iot-gateway/node_modules/aws-iot-device-sdk/scripts/browserize.sh create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/test/data/README.txt create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/test/data/certificate.pem.crt create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/test/data/private.pem.key create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/test/data/root-CA.crt create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/test/device-unit-tests.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/test/mock/mockMQTTClient.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/test/mock/mockTls.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/test/thing-unit-tests.js create mode 100644 example/iot-gateway/node_modules/aws-iot-device-sdk/thing/index.js create mode 100644 example/iot-gateway/node_modules/backo2/.npmignore create mode 100644 example/iot-gateway/node_modules/backo2/History.md create mode 100644 example/iot-gateway/node_modules/backo2/Makefile create mode 100644 example/iot-gateway/node_modules/backo2/Readme.md create mode 100644 example/iot-gateway/node_modules/backo2/component.json create mode 100644 example/iot-gateway/node_modules/backo2/index.js create mode 100644 example/iot-gateway/node_modules/backo2/package.json create mode 100644 example/iot-gateway/node_modules/backo2/test/index.js create mode 100644 example/iot-gateway/node_modules/base64-arraybuffer/.npmignore create mode 100644 example/iot-gateway/node_modules/base64-arraybuffer/.travis.yml create mode 100644 example/iot-gateway/node_modules/base64-arraybuffer/LICENSE-MIT create mode 100644 example/iot-gateway/node_modules/base64-arraybuffer/README.md create mode 100644 example/iot-gateway/node_modules/base64-arraybuffer/grunt.js create mode 100644 example/iot-gateway/node_modules/base64-arraybuffer/lib/base64-arraybuffer.js create mode 100644 example/iot-gateway/node_modules/base64-arraybuffer/package.json create mode 100644 example/iot-gateway/node_modules/base64-arraybuffer/test/base64-arraybuffer_test.js create mode 100644 example/iot-gateway/node_modules/base64id/.npmignore create mode 100644 example/iot-gateway/node_modules/base64id/README.md create mode 100644 example/iot-gateway/node_modules/base64id/lib/base64id.js create mode 100644 example/iot-gateway/node_modules/base64id/package.json create mode 100644 example/iot-gateway/node_modules/benchmark/LICENSE.txt create mode 100644 example/iot-gateway/node_modules/benchmark/README.md create mode 100644 example/iot-gateway/node_modules/benchmark/benchmark.js create mode 100644 example/iot-gateway/node_modules/benchmark/doc/README.md create mode 100644 example/iot-gateway/node_modules/benchmark/package.json create mode 100755 example/iot-gateway/node_modules/benchmark/test/run-test.sh create mode 100644 example/iot-gateway/node_modules/benchmark/test/test.js create mode 100644 example/iot-gateway/node_modules/better-assert/.npmignore create mode 100644 example/iot-gateway/node_modules/better-assert/History.md create mode 100644 example/iot-gateway/node_modules/better-assert/Makefile create mode 100644 example/iot-gateway/node_modules/better-assert/Readme.md create mode 100644 example/iot-gateway/node_modules/better-assert/example.js create mode 100644 example/iot-gateway/node_modules/better-assert/index.js create mode 100644 example/iot-gateway/node_modules/better-assert/package.json create mode 100644 example/iot-gateway/node_modules/blob/.npmignore create mode 100644 example/iot-gateway/node_modules/blob/.zuul.yml create mode 100644 example/iot-gateway/node_modules/blob/Makefile create mode 100644 example/iot-gateway/node_modules/blob/README.md create mode 100644 example/iot-gateway/node_modules/blob/index.js create mode 100644 example/iot-gateway/node_modules/blob/package.json create mode 100644 example/iot-gateway/node_modules/blob/test/index.js create mode 100644 example/iot-gateway/node_modules/brfs/.travis.yml create mode 100644 example/iot-gateway/node_modules/brfs/LICENSE create mode 100755 example/iot-gateway/node_modules/brfs/bin/cmd.js create mode 100644 example/iot-gateway/node_modules/brfs/bin/usage.txt create mode 100644 example/iot-gateway/node_modules/brfs/example/async.js create mode 100644 example/iot-gateway/node_modules/brfs/example/main.js create mode 100644 example/iot-gateway/node_modules/brfs/example/robot.html create mode 100644 example/iot-gateway/node_modules/brfs/index.js create mode 100644 example/iot-gateway/node_modules/brfs/package.json create mode 100644 example/iot-gateway/node_modules/brfs/readme.markdown create mode 100644 example/iot-gateway/node_modules/brfs/test/ag.js create mode 100644 example/iot-gateway/node_modules/brfs/test/async.js create mode 100644 example/iot-gateway/node_modules/brfs/test/buffer.js create mode 100644 example/iot-gateway/node_modules/brfs/test/bundle.js create mode 100644 example/iot-gateway/node_modules/brfs/test/cmd.js create mode 100644 example/iot-gateway/node_modules/brfs/test/dynamic_read_concat.js create mode 100644 example/iot-gateway/node_modules/brfs/test/dynamic_read_no_concat.js create mode 100644 example/iot-gateway/node_modules/brfs/test/encoding.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/ag.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/ag.json create mode 100644 example/iot-gateway/node_modules/brfs/test/files/ag_post.html create mode 100644 example/iot-gateway/node_modules/brfs/test/files/ag_pre.html create mode 100644 example/iot-gateway/node_modules/brfs/test/files/async.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/async.txt create mode 100644 example/iot-gateway/node_modules/brfs/test/files/async_encoding.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/async_str_encoding.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/buffer.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/dynamic_read_concat.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/dynamic_read_no_concat.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/encoding.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/hoist.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/inline.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/main.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/multi_var.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/non_fs.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/path_join.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/path_join_other_name.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/path_join_single_var.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/readdir-sync.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/readdir.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/robot.html create mode 100644 example/iot-gateway/node_modules/brfs/test/files/separators.js create mode 100644 example/iot-gateway/node_modules/brfs/test/files/separators.txt create mode 100644 example/iot-gateway/node_modules/brfs/test/files/tr.beep create mode 100644 example/iot-gateway/node_modules/brfs/test/files/tr.html create mode 100644 example/iot-gateway/node_modules/brfs/test/files/with_comments.js create mode 100644 example/iot-gateway/node_modules/brfs/test/hoist.js create mode 100644 example/iot-gateway/node_modules/brfs/test/inline.js create mode 100644 example/iot-gateway/node_modules/brfs/test/multi_var.js create mode 100644 example/iot-gateway/node_modules/brfs/test/non_fs.js create mode 100644 example/iot-gateway/node_modules/brfs/test/path_join.js create mode 100644 example/iot-gateway/node_modules/brfs/test/path_join_other_name.js create mode 100644 example/iot-gateway/node_modules/brfs/test/path_join_single_var.js create mode 100644 example/iot-gateway/node_modules/brfs/test/readdir.js create mode 100644 example/iot-gateway/node_modules/brfs/test/require_resolve.js create mode 100644 example/iot-gateway/node_modules/brfs/test/require_resolve/main.js create mode 100644 example/iot-gateway/node_modules/brfs/test/require_resolve/node_modules/aaa/wow.txt create mode 100644 example/iot-gateway/node_modules/brfs/test/separators.js create mode 100644 example/iot-gateway/node_modules/brfs/test/tr.js create mode 100644 example/iot-gateway/node_modules/brfs/test/with_comments.js create mode 100644 example/iot-gateway/node_modules/buffer-equal/.travis.yml create mode 100644 example/iot-gateway/node_modules/buffer-equal/README.markdown create mode 100644 example/iot-gateway/node_modules/buffer-equal/example/eq.js create mode 100644 example/iot-gateway/node_modules/buffer-equal/index.js create mode 100644 example/iot-gateway/node_modules/buffer-equal/package.json create mode 100644 example/iot-gateway/node_modules/buffer-equal/test/eq.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/.npmignore create mode 100644 example/iot-gateway/node_modules/bytebuffer/.travis.yml create mode 100644 example/iot-gateway/node_modules/bytebuffer/LICENSE create mode 100644 example/iot-gateway/node_modules/bytebuffer/README.md create mode 100644 example/iot-gateway/node_modules/bytebuffer/bower.json create mode 100644 example/iot-gateway/node_modules/bytebuffer/bytebuffer.png create mode 100644 example/iot-gateway/node_modules/bytebuffer/dist/README.md create mode 100644 example/iot-gateway/node_modules/bytebuffer/dist/bytebuffer-dataview.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/dist/bytebuffer-dataview.min.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/dist/bytebuffer-dataview.min.js.gz create mode 100644 example/iot-gateway/node_modules/bytebuffer/dist/bytebuffer-dataview.min.map create mode 100644 example/iot-gateway/node_modules/bytebuffer/dist/bytebuffer-node.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/dist/bytebuffer.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/dist/bytebuffer.min.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/dist/bytebuffer.min.js.gz create mode 100644 example/iot-gateway/node_modules/bytebuffer/dist/bytebuffer.min.map create mode 100644 example/iot-gateway/node_modules/bytebuffer/donate.png create mode 100644 example/iot-gateway/node_modules/bytebuffer/externs/bytebuffer.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/externs/minimal-env.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/index.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/jsdoc.json create mode 100644 example/iot-gateway/node_modules/bytebuffer/package.json create mode 100644 example/iot-gateway/node_modules/bytebuffer/scripts/build.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/bower.json create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/bytebuffer.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/encodings/base64.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/encodings/binary.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/encodings/debug.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/encodings/hex.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/encodings/impl/base64.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/encodings/impl/binary.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/encodings/impl/debug.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/encodings/impl/hex.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/encodings/impl/utf8.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/encodings/utf8.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/helpers.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/macros.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/append.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/assert.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/capacity.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/clear.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/clone.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/compact.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/copy.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/ensureCapacity.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/fill.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/flip.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/mark.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/order.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/prepend.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/printDebug.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/remaining.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/reset.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/resize.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/reverse.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/skip.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/slice.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/static/accessor.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/static/allocate.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/static/concat.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/static/isByteBuffer.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/static/type.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/static/wrap.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/toBuffer.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/methods/toString.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/bytes/bitset.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/bytes/bytes.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/floats/float32.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/floats/float64.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/floats/ieee754.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/ints/int16.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/ints/int32.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/ints/int64.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/ints/int8.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/strings/cstring.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/strings/istring.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/strings/utf8string.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/strings/vstring.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/varints/varint32.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/types/varints/varint64.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/wrap-node.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/src/wrap.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/tests/bench.js create mode 100644 example/iot-gateway/node_modules/bytebuffer/tests/suite.js create mode 100644 example/iot-gateway/node_modules/callsite/.npmignore create mode 100644 example/iot-gateway/node_modules/callsite/History.md create mode 100644 example/iot-gateway/node_modules/callsite/Makefile create mode 100644 example/iot-gateway/node_modules/callsite/Readme.md create mode 100644 example/iot-gateway/node_modules/callsite/index.js create mode 100644 example/iot-gateway/node_modules/callsite/package.json create mode 100644 example/iot-gateway/node_modules/component-bind/.npmignore create mode 100644 example/iot-gateway/node_modules/component-bind/History.md create mode 100644 example/iot-gateway/node_modules/component-bind/Makefile create mode 100644 example/iot-gateway/node_modules/component-bind/Readme.md create mode 100644 example/iot-gateway/node_modules/component-bind/component.json create mode 100644 example/iot-gateway/node_modules/component-bind/index.js create mode 100644 example/iot-gateway/node_modules/component-bind/package.json create mode 100644 example/iot-gateway/node_modules/component-emitter/.npmignore create mode 100644 example/iot-gateway/node_modules/component-emitter/.travis.yml create mode 100644 example/iot-gateway/node_modules/component-emitter/History.md create mode 100644 example/iot-gateway/node_modules/component-emitter/Makefile create mode 100644 example/iot-gateway/node_modules/component-emitter/Readme.md create mode 100644 example/iot-gateway/node_modules/component-emitter/bower.json create mode 100644 example/iot-gateway/node_modules/component-emitter/component.json create mode 100644 example/iot-gateway/node_modules/component-emitter/index.js create mode 100644 example/iot-gateway/node_modules/component-emitter/package.json create mode 100644 example/iot-gateway/node_modules/component-inherit/.npmignore create mode 100644 example/iot-gateway/node_modules/component-inherit/History.md create mode 100644 example/iot-gateway/node_modules/component-inherit/Makefile create mode 100644 example/iot-gateway/node_modules/component-inherit/Readme.md create mode 100644 example/iot-gateway/node_modules/component-inherit/component.json create mode 100644 example/iot-gateway/node_modules/component-inherit/index.js create mode 100644 example/iot-gateway/node_modules/component-inherit/package.json create mode 100644 example/iot-gateway/node_modules/component-inherit/test/inherit.js create mode 100644 example/iot-gateway/node_modules/concat-stream/LICENSE create mode 100644 example/iot-gateway/node_modules/concat-stream/index.js create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/.npmignore create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/LICENSE create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/README.md create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/duplex.js create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/float.patch create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/package.json create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/passthrough.js create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/readable.js create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/transform.js create mode 100644 example/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/writable.js create mode 100644 example/iot-gateway/node_modules/concat-stream/package.json create mode 100644 example/iot-gateway/node_modules/concat-stream/readme.md create mode 100644 example/iot-gateway/node_modules/content-disposition/HISTORY.md create mode 100644 example/iot-gateway/node_modules/content-disposition/LICENSE create mode 100644 example/iot-gateway/node_modules/content-disposition/README.md create mode 100644 example/iot-gateway/node_modules/content-disposition/index.js create mode 100644 example/iot-gateway/node_modules/content-disposition/package.json create mode 100644 example/iot-gateway/node_modules/content-type/HISTORY.md create mode 100644 example/iot-gateway/node_modules/content-type/LICENSE create mode 100644 example/iot-gateway/node_modules/content-type/README.md create mode 100644 example/iot-gateway/node_modules/content-type/index.js create mode 100644 example/iot-gateway/node_modules/content-type/package.json create mode 100644 example/iot-gateway/node_modules/cookie-signature/.npmignore create mode 100644 example/iot-gateway/node_modules/cookie-signature/History.md create mode 100644 example/iot-gateway/node_modules/cookie-signature/Readme.md create mode 100644 example/iot-gateway/node_modules/cookie-signature/index.js create mode 100644 example/iot-gateway/node_modules/cookie-signature/package.json create mode 100644 example/iot-gateway/node_modules/cookie/HISTORY.md create mode 100644 example/iot-gateway/node_modules/cookie/LICENSE create mode 100644 example/iot-gateway/node_modules/cookie/README.md create mode 100644 example/iot-gateway/node_modules/cookie/index.js create mode 100644 example/iot-gateway/node_modules/cookie/package.json create mode 100644 example/iot-gateway/node_modules/core-util-is/LICENSE create mode 100644 example/iot-gateway/node_modules/core-util-is/README.md create mode 100644 example/iot-gateway/node_modules/core-util-is/float.patch create mode 100644 example/iot-gateway/node_modules/core-util-is/lib/util.js create mode 100644 example/iot-gateway/node_modules/core-util-is/package.json create mode 100644 example/iot-gateway/node_modules/core-util-is/test.js create mode 100644 example/iot-gateway/node_modules/debug/.jshintrc create mode 100644 example/iot-gateway/node_modules/debug/.npmignore create mode 100644 example/iot-gateway/node_modules/debug/History.md create mode 100644 example/iot-gateway/node_modules/debug/Makefile create mode 100644 example/iot-gateway/node_modules/debug/Readme.md create mode 100644 example/iot-gateway/node_modules/debug/bower.json create mode 100644 example/iot-gateway/node_modules/debug/browser.js create mode 100644 example/iot-gateway/node_modules/debug/component.json create mode 100644 example/iot-gateway/node_modules/debug/debug.js create mode 100644 example/iot-gateway/node_modules/debug/node.js create mode 100644 example/iot-gateway/node_modules/debug/package.json create mode 100644 example/iot-gateway/node_modules/depd/History.md create mode 100644 example/iot-gateway/node_modules/depd/LICENSE create mode 100644 example/iot-gateway/node_modules/depd/Readme.md create mode 100644 example/iot-gateway/node_modules/depd/index.js create mode 100644 example/iot-gateway/node_modules/depd/lib/browser/index.js create mode 100644 example/iot-gateway/node_modules/depd/lib/compat/buffer-concat.js create mode 100644 example/iot-gateway/node_modules/depd/lib/compat/callsite-tostring.js create mode 100644 example/iot-gateway/node_modules/depd/lib/compat/event-listener-count.js create mode 100644 example/iot-gateway/node_modules/depd/lib/compat/index.js create mode 100644 example/iot-gateway/node_modules/depd/package.json create mode 100644 example/iot-gateway/node_modules/destroy/LICENSE create mode 100644 example/iot-gateway/node_modules/destroy/README.md create mode 100644 example/iot-gateway/node_modules/destroy/index.js create mode 100644 example/iot-gateway/node_modules/destroy/package.json create mode 100644 example/iot-gateway/node_modules/duplexer2/.npmignore create mode 100644 example/iot-gateway/node_modules/duplexer2/.travis.yml create mode 100644 example/iot-gateway/node_modules/duplexer2/LICENSE.md create mode 100644 example/iot-gateway/node_modules/duplexer2/README.md create mode 100755 example/iot-gateway/node_modules/duplexer2/example.js create mode 100644 example/iot-gateway/node_modules/duplexer2/index.js create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/.npmignore create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/LICENSE create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/README.md create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/duplex.js create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/float.patch create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/package.json create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/passthrough.js create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/readable.js create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/transform.js create mode 100644 example/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/writable.js create mode 100644 example/iot-gateway/node_modules/duplexer2/package.json create mode 100644 example/iot-gateway/node_modules/duplexer2/test/tests.js create mode 100644 example/iot-gateway/node_modules/ee-first/LICENSE create mode 100644 example/iot-gateway/node_modules/ee-first/README.md create mode 100644 example/iot-gateway/node_modules/ee-first/index.js create mode 100644 example/iot-gateway/node_modules/ee-first/package.json create mode 100644 example/iot-gateway/node_modules/engine.io-client/.npmignore create mode 100644 example/iot-gateway/node_modules/engine.io-client/.travis.yml create mode 100644 example/iot-gateway/node_modules/engine.io-client/.zuul.yml create mode 100644 example/iot-gateway/node_modules/engine.io-client/History.md create mode 100644 example/iot-gateway/node_modules/engine.io-client/LICENSE create mode 100644 example/iot-gateway/node_modules/engine.io-client/Makefile create mode 100644 example/iot-gateway/node_modules/engine.io-client/README.md create mode 100644 example/iot-gateway/node_modules/engine.io-client/engine.io.js create mode 100644 example/iot-gateway/node_modules/engine.io-client/index.js create mode 100644 example/iot-gateway/node_modules/engine.io-client/lib/index.js create mode 100644 example/iot-gateway/node_modules/engine.io-client/lib/socket.js create mode 100644 example/iot-gateway/node_modules/engine.io-client/lib/transport.js create mode 100755 example/iot-gateway/node_modules/engine.io-client/lib/transports/index.js create mode 100644 example/iot-gateway/node_modules/engine.io-client/lib/transports/polling-jsonp.js create mode 100755 example/iot-gateway/node_modules/engine.io-client/lib/transports/polling-xhr.js create mode 100644 example/iot-gateway/node_modules/engine.io-client/lib/transports/polling.js create mode 100644 example/iot-gateway/node_modules/engine.io-client/lib/transports/websocket.js create mode 100644 example/iot-gateway/node_modules/engine.io-client/lib/xmlhttprequest.js create mode 100644 example/iot-gateway/node_modules/engine.io-client/package.json create mode 100644 example/iot-gateway/node_modules/engine.io-parser/.npmignore create mode 100644 example/iot-gateway/node_modules/engine.io-parser/.travis.yml create mode 100644 example/iot-gateway/node_modules/engine.io-parser/.zuul.yml create mode 100644 example/iot-gateway/node_modules/engine.io-parser/History.md create mode 100644 example/iot-gateway/node_modules/engine.io-parser/LICENSE create mode 100644 example/iot-gateway/node_modules/engine.io-parser/Makefile create mode 100644 example/iot-gateway/node_modules/engine.io-parser/Readme.md create mode 100644 example/iot-gateway/node_modules/engine.io-parser/index.js create mode 100644 example/iot-gateway/node_modules/engine.io-parser/lib/browser.js create mode 100644 example/iot-gateway/node_modules/engine.io-parser/lib/index.js create mode 100644 example/iot-gateway/node_modules/engine.io-parser/lib/keys.js create mode 100644 example/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/.npmignore create mode 100644 example/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/History.md create mode 100644 example/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/LICENSE create mode 100644 example/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/Makefile create mode 100644 example/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/README.md create mode 100644 example/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/fixtures/big.json create mode 100644 example/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/index.js create mode 100644 example/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/package.json create mode 100644 example/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/test.js create mode 100644 example/iot-gateway/node_modules/engine.io-parser/package.json create mode 100644 example/iot-gateway/node_modules/engine.io/.npmignore create mode 100644 example/iot-gateway/node_modules/engine.io/.travis.yml create mode 100644 example/iot-gateway/node_modules/engine.io/History.md create mode 100644 example/iot-gateway/node_modules/engine.io/LICENSE create mode 100644 example/iot-gateway/node_modules/engine.io/Makefile create mode 100644 example/iot-gateway/node_modules/engine.io/README.md create mode 100644 example/iot-gateway/node_modules/engine.io/index.js create mode 100644 example/iot-gateway/node_modules/engine.io/lib/engine.io.js create mode 100644 example/iot-gateway/node_modules/engine.io/lib/server.js create mode 100644 example/iot-gateway/node_modules/engine.io/lib/socket.js create mode 100644 example/iot-gateway/node_modules/engine.io/lib/transport.js create mode 100644 example/iot-gateway/node_modules/engine.io/lib/transports/index.js create mode 100644 example/iot-gateway/node_modules/engine.io/lib/transports/polling-jsonp.js create mode 100644 example/iot-gateway/node_modules/engine.io/lib/transports/polling-xhr.js create mode 100644 example/iot-gateway/node_modules/engine.io/lib/transports/polling.js create mode 100644 example/iot-gateway/node_modules/engine.io/lib/transports/websocket.js create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/accepts/HISTORY.md create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/accepts/LICENSE create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/accepts/README.md create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/accepts/index.js create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/accepts/package.json create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/mime-db/HISTORY.md create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/mime-db/LICENSE create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/mime-db/README.md create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/mime-db/db.json create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/mime-db/index.js create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/mime-db/package.json create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/mime-types/HISTORY.md create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/mime-types/LICENSE create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/mime-types/README.md create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/mime-types/index.js create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/mime-types/package.json create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/negotiator/LICENSE create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/negotiator/README.md create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/negotiator/lib/charset.js create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/negotiator/lib/encoding.js create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/negotiator/lib/language.js create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/negotiator/lib/mediaType.js create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/negotiator/lib/negotiator.js create mode 100644 example/iot-gateway/node_modules/engine.io/node_modules/negotiator/package.json create mode 100644 example/iot-gateway/node_modules/engine.io/package.json create mode 100644 example/iot-gateway/node_modules/escape-html/LICENSE create mode 100644 example/iot-gateway/node_modules/escape-html/Readme.md create mode 100644 example/iot-gateway/node_modules/escape-html/index.js create mode 100644 example/iot-gateway/node_modules/escape-html/package.json create mode 100644 example/iot-gateway/node_modules/escodegen/.jshintrc create mode 100644 example/iot-gateway/node_modules/escodegen/LICENSE.BSD create mode 100644 example/iot-gateway/node_modules/escodegen/LICENSE.source-map create mode 100644 example/iot-gateway/node_modules/escodegen/README.md create mode 100755 example/iot-gateway/node_modules/escodegen/bin/escodegen.js create mode 100755 example/iot-gateway/node_modules/escodegen/bin/esgenerate.js create mode 100644 example/iot-gateway/node_modules/escodegen/component.json create mode 100644 example/iot-gateway/node_modules/escodegen/escodegen.browser.min.js create mode 100644 example/iot-gateway/node_modules/escodegen/escodegen.js create mode 100644 example/iot-gateway/node_modules/escodegen/gulpfile.js create mode 100644 example/iot-gateway/node_modules/escodegen/package.json create mode 100644 example/iot-gateway/node_modules/esprima/README.md create mode 100755 example/iot-gateway/node_modules/esprima/bin/esparse.js create mode 100755 example/iot-gateway/node_modules/esprima/bin/esvalidate.js create mode 100644 example/iot-gateway/node_modules/esprima/esprima.js create mode 100644 example/iot-gateway/node_modules/esprima/package.json create mode 100644 example/iot-gateway/node_modules/esprima/test/compat.js create mode 100644 example/iot-gateway/node_modules/esprima/test/reflect.js create mode 100644 example/iot-gateway/node_modules/esprima/test/run.js create mode 100644 example/iot-gateway/node_modules/esprima/test/runner.js create mode 100644 example/iot-gateway/node_modules/esprima/test/test.js create mode 100644 example/iot-gateway/node_modules/estraverse/.jshintrc create mode 100644 example/iot-gateway/node_modules/estraverse/LICENSE.BSD create mode 100644 example/iot-gateway/node_modules/estraverse/README.md create mode 100644 example/iot-gateway/node_modules/estraverse/estraverse.js create mode 100644 example/iot-gateway/node_modules/estraverse/package.json create mode 100644 example/iot-gateway/node_modules/esutils/.jshintrc create mode 100644 example/iot-gateway/node_modules/esutils/.travis.yml create mode 100644 example/iot-gateway/node_modules/esutils/README.md create mode 100644 example/iot-gateway/node_modules/esutils/lib/code.js create mode 100644 example/iot-gateway/node_modules/esutils/lib/keyword.js create mode 100644 example/iot-gateway/node_modules/esutils/lib/utils.js create mode 100644 example/iot-gateway/node_modules/esutils/package.json create mode 100644 example/iot-gateway/node_modules/esutils/test/code.coffee create mode 100644 example/iot-gateway/node_modules/esutils/test/keyword.coffee create mode 100644 example/iot-gateway/node_modules/etag/HISTORY.md create mode 100644 example/iot-gateway/node_modules/etag/LICENSE create mode 100644 example/iot-gateway/node_modules/etag/README.md create mode 100644 example/iot-gateway/node_modules/etag/index.js create mode 100644 example/iot-gateway/node_modules/etag/package.json create mode 100644 example/iot-gateway/node_modules/events/.npmignore create mode 100644 example/iot-gateway/node_modules/events/.travis.yml create mode 100644 example/iot-gateway/node_modules/events/.zuul.yml create mode 100644 example/iot-gateway/node_modules/events/History.md create mode 100644 example/iot-gateway/node_modules/events/LICENSE create mode 100644 example/iot-gateway/node_modules/events/Readme.md create mode 100644 example/iot-gateway/node_modules/events/events.js create mode 100644 example/iot-gateway/node_modules/events/package.json create mode 100644 example/iot-gateway/node_modules/events/tests/add-listeners.js create mode 100644 example/iot-gateway/node_modules/events/tests/check-listener-leaks.js create mode 100644 example/iot-gateway/node_modules/events/tests/common.js create mode 100644 example/iot-gateway/node_modules/events/tests/index.js create mode 100644 example/iot-gateway/node_modules/events/tests/legacy-compat.js create mode 100644 example/iot-gateway/node_modules/events/tests/listener-count.js create mode 100644 example/iot-gateway/node_modules/events/tests/listeners-side-effects.js create mode 100644 example/iot-gateway/node_modules/events/tests/listeners.js create mode 100644 example/iot-gateway/node_modules/events/tests/max-listeners.js create mode 100644 example/iot-gateway/node_modules/events/tests/modify-in-emit.js create mode 100644 example/iot-gateway/node_modules/events/tests/num-args.js create mode 100644 example/iot-gateway/node_modules/events/tests/once.js create mode 100644 example/iot-gateway/node_modules/events/tests/remove-all-listeners.js create mode 100644 example/iot-gateway/node_modules/events/tests/remove-listeners.js create mode 100644 example/iot-gateway/node_modules/events/tests/set-max-listeners-side-effects.js create mode 100644 example/iot-gateway/node_modules/events/tests/subclass.js create mode 100644 example/iot-gateway/node_modules/express/History.md create mode 100644 example/iot-gateway/node_modules/express/LICENSE create mode 100644 example/iot-gateway/node_modules/express/Readme.md create mode 100644 example/iot-gateway/node_modules/express/index.js create mode 100644 example/iot-gateway/node_modules/express/lib/application.js create mode 100644 example/iot-gateway/node_modules/express/lib/express.js create mode 100644 example/iot-gateway/node_modules/express/lib/middleware/init.js create mode 100644 example/iot-gateway/node_modules/express/lib/middleware/query.js create mode 100644 example/iot-gateway/node_modules/express/lib/request.js create mode 100644 example/iot-gateway/node_modules/express/lib/response.js create mode 100644 example/iot-gateway/node_modules/express/lib/router/index.js create mode 100644 example/iot-gateway/node_modules/express/lib/router/layer.js create mode 100644 example/iot-gateway/node_modules/express/lib/router/route.js create mode 100644 example/iot-gateway/node_modules/express/lib/utils.js create mode 100644 example/iot-gateway/node_modules/express/lib/view.js create mode 100644 example/iot-gateway/node_modules/express/package.json create mode 100644 example/iot-gateway/node_modules/falafel/.travis.yml create mode 100644 example/iot-gateway/node_modules/falafel/example/array.js create mode 100644 example/iot-gateway/node_modules/falafel/example/keyword.js create mode 100644 example/iot-gateway/node_modules/falafel/example/prompt.js create mode 100644 example/iot-gateway/node_modules/falafel/index.js create mode 100644 example/iot-gateway/node_modules/falafel/package.json create mode 100644 example/iot-gateway/node_modules/falafel/readme.markdown create mode 100644 example/iot-gateway/node_modules/falafel/test/array.js create mode 100644 example/iot-gateway/node_modules/falafel/test/async.js create mode 100755 example/iot-gateway/node_modules/falafel/test/bin/run.js create mode 100644 example/iot-gateway/node_modules/falafel/test/custom-parser.js create mode 100644 example/iot-gateway/node_modules/falafel/test/es6.js create mode 100644 example/iot-gateway/node_modules/falafel/test/for.js create mode 100644 example/iot-gateway/node_modules/falafel/test/inspect.js create mode 100644 example/iot-gateway/node_modules/falafel/test/opts.js create mode 100644 example/iot-gateway/node_modules/falafel/test/parent.js create mode 100644 example/iot-gateway/node_modules/finalhandler/HISTORY.md create mode 100644 example/iot-gateway/node_modules/finalhandler/LICENSE create mode 100644 example/iot-gateway/node_modules/finalhandler/README.md create mode 100644 example/iot-gateway/node_modules/finalhandler/index.js create mode 100644 example/iot-gateway/node_modules/finalhandler/package.json create mode 100644 example/iot-gateway/node_modules/foreach/.npmignore create mode 100644 example/iot-gateway/node_modules/foreach/LICENSE create mode 100644 example/iot-gateway/node_modules/foreach/Makefile create mode 100644 example/iot-gateway/node_modules/foreach/Readme.md create mode 100644 example/iot-gateway/node_modules/foreach/component.json create mode 100644 example/iot-gateway/node_modules/foreach/index.js create mode 100644 example/iot-gateway/node_modules/foreach/package.json create mode 100644 example/iot-gateway/node_modules/foreach/test.js create mode 100644 example/iot-gateway/node_modules/forwarded/HISTORY.md create mode 100644 example/iot-gateway/node_modules/forwarded/LICENSE create mode 100644 example/iot-gateway/node_modules/forwarded/README.md create mode 100644 example/iot-gateway/node_modules/forwarded/index.js create mode 100644 example/iot-gateway/node_modules/forwarded/package.json create mode 100644 example/iot-gateway/node_modules/fresh/HISTORY.md create mode 100644 example/iot-gateway/node_modules/fresh/LICENSE create mode 100644 example/iot-gateway/node_modules/fresh/README.md create mode 100644 example/iot-gateway/node_modules/fresh/index.js create mode 100644 example/iot-gateway/node_modules/fresh/package.json create mode 100644 example/iot-gateway/node_modules/fs/index.js create mode 100644 example/iot-gateway/node_modules/fs/package.json create mode 100644 example/iot-gateway/node_modules/function-bind/.eslintrc create mode 100644 example/iot-gateway/node_modules/function-bind/.jscs.json create mode 100644 example/iot-gateway/node_modules/function-bind/.npmignore create mode 100644 example/iot-gateway/node_modules/function-bind/.travis.yml create mode 100644 example/iot-gateway/node_modules/function-bind/LICENSE create mode 100644 example/iot-gateway/node_modules/function-bind/README.md create mode 100644 example/iot-gateway/node_modules/function-bind/implementation.js create mode 100644 example/iot-gateway/node_modules/function-bind/index.js create mode 100644 example/iot-gateway/node_modules/function-bind/package.json create mode 100644 example/iot-gateway/node_modules/function-bind/test/index.js create mode 100644 example/iot-gateway/node_modules/generate-function/.npmignore create mode 100644 example/iot-gateway/node_modules/generate-function/.travis.yml create mode 100644 example/iot-gateway/node_modules/generate-function/README.md create mode 100644 example/iot-gateway/node_modules/generate-function/example.js create mode 100644 example/iot-gateway/node_modules/generate-function/index.js create mode 100644 example/iot-gateway/node_modules/generate-function/package.json create mode 100644 example/iot-gateway/node_modules/generate-function/test.js create mode 100644 example/iot-gateway/node_modules/generate-object-property/.npmignore create mode 100644 example/iot-gateway/node_modules/generate-object-property/.travis.yml create mode 100644 example/iot-gateway/node_modules/generate-object-property/LICENSE create mode 100644 example/iot-gateway/node_modules/generate-object-property/README.md create mode 100644 example/iot-gateway/node_modules/generate-object-property/index.js create mode 100644 example/iot-gateway/node_modules/generate-object-property/package.json create mode 100644 example/iot-gateway/node_modules/generate-object-property/test.js create mode 100644 example/iot-gateway/node_modules/has-binary/.npmignore create mode 100644 example/iot-gateway/node_modules/has-binary/History.md create mode 100644 example/iot-gateway/node_modules/has-binary/LICENSE create mode 100644 example/iot-gateway/node_modules/has-binary/Makefile create mode 100644 example/iot-gateway/node_modules/has-binary/README.md create mode 100644 example/iot-gateway/node_modules/has-binary/index.js create mode 100644 example/iot-gateway/node_modules/has-binary/package.json create mode 100644 example/iot-gateway/node_modules/has-binary/test.js create mode 100644 example/iot-gateway/node_modules/has-cors/.npmignore create mode 100644 example/iot-gateway/node_modules/has-cors/History.md create mode 100644 example/iot-gateway/node_modules/has-cors/Makefile create mode 100644 example/iot-gateway/node_modules/has-cors/Readme.md create mode 100644 example/iot-gateway/node_modules/has-cors/component.json create mode 100644 example/iot-gateway/node_modules/has-cors/index.js create mode 100644 example/iot-gateway/node_modules/has-cors/package.json create mode 100644 example/iot-gateway/node_modules/has-cors/test.js create mode 100644 example/iot-gateway/node_modules/has/.jshintrc create mode 100644 example/iot-gateway/node_modules/has/.npmignore create mode 100644 example/iot-gateway/node_modules/has/LICENSE-MIT create mode 100644 example/iot-gateway/node_modules/has/README.mkd create mode 100644 example/iot-gateway/node_modules/has/package.json create mode 100644 example/iot-gateway/node_modules/has/src/index.js create mode 100644 example/iot-gateway/node_modules/has/test/.jshintrc create mode 100644 example/iot-gateway/node_modules/has/test/index.js create mode 100644 example/iot-gateway/node_modules/http-errors/HISTORY.md create mode 100644 example/iot-gateway/node_modules/http-errors/LICENSE create mode 100644 example/iot-gateway/node_modules/http-errors/README.md create mode 100644 example/iot-gateway/node_modules/http-errors/index.js create mode 100644 example/iot-gateway/node_modules/http-errors/package.json create mode 100644 example/iot-gateway/node_modules/http/package.json create mode 100644 example/iot-gateway/node_modules/indexof/.npmignore create mode 100644 example/iot-gateway/node_modules/indexof/Makefile create mode 100644 example/iot-gateway/node_modules/indexof/Readme.md create mode 100644 example/iot-gateway/node_modules/indexof/component.json create mode 100644 example/iot-gateway/node_modules/indexof/index.js create mode 100644 example/iot-gateway/node_modules/indexof/package.json create mode 100644 example/iot-gateway/node_modules/inherits/LICENSE create mode 100644 example/iot-gateway/node_modules/inherits/README.md create mode 100644 example/iot-gateway/node_modules/inherits/inherits.js create mode 100644 example/iot-gateway/node_modules/inherits/inherits_browser.js create mode 100644 example/iot-gateway/node_modules/inherits/package.json create mode 100644 example/iot-gateway/node_modules/inherits/test.js create mode 100644 example/iot-gateway/node_modules/ipaddr.js/.npmignore create mode 100644 example/iot-gateway/node_modules/ipaddr.js/.travis.yml create mode 100644 example/iot-gateway/node_modules/ipaddr.js/Cakefile create mode 100644 example/iot-gateway/node_modules/ipaddr.js/LICENSE create mode 100644 example/iot-gateway/node_modules/ipaddr.js/README.md create mode 100644 example/iot-gateway/node_modules/ipaddr.js/bower.json create mode 100644 example/iot-gateway/node_modules/ipaddr.js/ipaddr.min.js create mode 100644 example/iot-gateway/node_modules/ipaddr.js/lib/ipaddr.js create mode 100644 example/iot-gateway/node_modules/ipaddr.js/package.json create mode 100644 example/iot-gateway/node_modules/ipaddr.js/src/ipaddr.coffee create mode 100644 example/iot-gateway/node_modules/ipaddr.js/test/ipaddr.test.coffee create mode 100644 example/iot-gateway/node_modules/is-property/.npmignore create mode 100644 example/iot-gateway/node_modules/is-property/LICENSE create mode 100644 example/iot-gateway/node_modules/is-property/README.md create mode 100644 example/iot-gateway/node_modules/is-property/is-property.js create mode 100644 example/iot-gateway/node_modules/is-property/package.json create mode 100644 example/iot-gateway/node_modules/isarray/README.md create mode 100644 example/iot-gateway/node_modules/isarray/build/build.js create mode 100644 example/iot-gateway/node_modules/isarray/component.json create mode 100644 example/iot-gateway/node_modules/isarray/index.js create mode 100644 example/iot-gateway/node_modules/isarray/package.json create mode 100644 example/iot-gateway/node_modules/json3/.gitmodules create mode 100644 example/iot-gateway/node_modules/json3/.jamignore create mode 100644 example/iot-gateway/node_modules/json3/.npmignore create mode 100644 example/iot-gateway/node_modules/json3/.travis.yml create mode 100644 example/iot-gateway/node_modules/json3/LICENSE create mode 100644 example/iot-gateway/node_modules/json3/README.md create mode 100644 example/iot-gateway/node_modules/json3/coverage/coverage.json create mode 100644 example/iot-gateway/node_modules/json3/coverage/lcov-report/lib/json3.js.html create mode 100644 example/iot-gateway/node_modules/json3/coverage/lcov-report/prettify.css create mode 100644 example/iot-gateway/node_modules/json3/coverage/lcov-report/prettify.js create mode 100644 example/iot-gateway/node_modules/json3/coverage/lcov.info create mode 100644 example/iot-gateway/node_modules/json3/lib/json3.js create mode 100644 example/iot-gateway/node_modules/json3/lib/json3.min.js create mode 100644 example/iot-gateway/node_modules/json3/package.json create mode 100644 example/iot-gateway/node_modules/long/.npmignore create mode 100644 example/iot-gateway/node_modules/long/.travis.yml create mode 100644 example/iot-gateway/node_modules/long/LICENSE create mode 100644 example/iot-gateway/node_modules/long/README.md create mode 100644 example/iot-gateway/node_modules/long/bower.json create mode 100644 example/iot-gateway/node_modules/long/dist/README.md create mode 100644 example/iot-gateway/node_modules/long/dist/long.js create mode 100644 example/iot-gateway/node_modules/long/dist/long.min.js create mode 100644 example/iot-gateway/node_modules/long/dist/long.min.js.gz create mode 100644 example/iot-gateway/node_modules/long/dist/long.min.map create mode 100644 example/iot-gateway/node_modules/long/doco/INDEX.md create mode 100644 example/iot-gateway/node_modules/long/doco/Long.md create mode 100644 example/iot-gateway/node_modules/long/donate.png create mode 100644 example/iot-gateway/node_modules/long/externs/long.js create mode 100644 example/iot-gateway/node_modules/long/index.js create mode 100644 example/iot-gateway/node_modules/long/jsdoc.json create mode 100644 example/iot-gateway/node_modules/long/long.png create mode 100644 example/iot-gateway/node_modules/long/package.json create mode 100644 example/iot-gateway/node_modules/long/scripts/build.js create mode 100644 example/iot-gateway/node_modules/long/src/bower.json create mode 100644 example/iot-gateway/node_modules/long/src/long.js create mode 100644 example/iot-gateway/node_modules/long/src/wrap.js create mode 100644 example/iot-gateway/node_modules/long/tests/goog.math.long.js create mode 100644 example/iot-gateway/node_modules/long/tests/suite.js create mode 100644 example/iot-gateway/node_modules/media-typer/HISTORY.md create mode 100644 example/iot-gateway/node_modules/media-typer/LICENSE create mode 100644 example/iot-gateway/node_modules/media-typer/README.md create mode 100644 example/iot-gateway/node_modules/media-typer/index.js create mode 100644 example/iot-gateway/node_modules/media-typer/package.json create mode 100644 example/iot-gateway/node_modules/merge-descriptors/HISTORY.md create mode 100644 example/iot-gateway/node_modules/merge-descriptors/LICENSE create mode 100644 example/iot-gateway/node_modules/merge-descriptors/README.md create mode 100644 example/iot-gateway/node_modules/merge-descriptors/index.js create mode 100644 example/iot-gateway/node_modules/merge-descriptors/package.json create mode 100644 example/iot-gateway/node_modules/methods/HISTORY.md create mode 100644 example/iot-gateway/node_modules/methods/LICENSE create mode 100644 example/iot-gateway/node_modules/methods/README.md create mode 100644 example/iot-gateway/node_modules/methods/index.js create mode 100644 example/iot-gateway/node_modules/methods/package.json create mode 100644 example/iot-gateway/node_modules/mime-db/HISTORY.md create mode 100644 example/iot-gateway/node_modules/mime-db/LICENSE create mode 100644 example/iot-gateway/node_modules/mime-db/README.md create mode 100644 example/iot-gateway/node_modules/mime-db/db.json create mode 100644 example/iot-gateway/node_modules/mime-db/index.js create mode 100644 example/iot-gateway/node_modules/mime-db/package.json create mode 100644 example/iot-gateway/node_modules/mime-types/HISTORY.md create mode 100644 example/iot-gateway/node_modules/mime-types/LICENSE create mode 100644 example/iot-gateway/node_modules/mime-types/README.md create mode 100644 example/iot-gateway/node_modules/mime-types/index.js create mode 100644 example/iot-gateway/node_modules/mime-types/package.json create mode 100644 example/iot-gateway/node_modules/mime/.npmignore create mode 100644 example/iot-gateway/node_modules/mime/LICENSE create mode 100644 example/iot-gateway/node_modules/mime/README.md create mode 100644 example/iot-gateway/node_modules/mime/build/build.js create mode 100644 example/iot-gateway/node_modules/mime/build/test.js create mode 100755 example/iot-gateway/node_modules/mime/cli.js create mode 100644 example/iot-gateway/node_modules/mime/mime.js create mode 100644 example/iot-gateway/node_modules/mime/package.json create mode 100644 example/iot-gateway/node_modules/mime/types.json create mode 100644 example/iot-gateway/node_modules/minimist/.travis.yml create mode 100644 example/iot-gateway/node_modules/minimist/LICENSE create mode 100644 example/iot-gateway/node_modules/minimist/example/parse.js create mode 100644 example/iot-gateway/node_modules/minimist/index.js create mode 100644 example/iot-gateway/node_modules/minimist/package.json create mode 100644 example/iot-gateway/node_modules/minimist/readme.markdown create mode 100644 example/iot-gateway/node_modules/minimist/test/all_bool.js create mode 100644 example/iot-gateway/node_modules/minimist/test/bool.js create mode 100644 example/iot-gateway/node_modules/minimist/test/dash.js create mode 100644 example/iot-gateway/node_modules/minimist/test/default_bool.js create mode 100644 example/iot-gateway/node_modules/minimist/test/dotted.js create mode 100644 example/iot-gateway/node_modules/minimist/test/kv_short.js create mode 100644 example/iot-gateway/node_modules/minimist/test/long.js create mode 100644 example/iot-gateway/node_modules/minimist/test/num.js create mode 100644 example/iot-gateway/node_modules/minimist/test/parse.js create mode 100644 example/iot-gateway/node_modules/minimist/test/parse_modified.js create mode 100644 example/iot-gateway/node_modules/minimist/test/short.js create mode 100644 example/iot-gateway/node_modules/minimist/test/stop_early.js create mode 100644 example/iot-gateway/node_modules/minimist/test/unknown.js create mode 100644 example/iot-gateway/node_modules/minimist/test/whitespace.js create mode 100644 example/iot-gateway/node_modules/ms/.npmignore create mode 100644 example/iot-gateway/node_modules/ms/History.md create mode 100644 example/iot-gateway/node_modules/ms/LICENSE create mode 100644 example/iot-gateway/node_modules/ms/README.md create mode 100644 example/iot-gateway/node_modules/ms/index.js create mode 100644 example/iot-gateway/node_modules/ms/package.json create mode 100644 example/iot-gateway/node_modules/negotiator/HISTORY.md create mode 100644 example/iot-gateway/node_modules/negotiator/LICENSE create mode 100644 example/iot-gateway/node_modules/negotiator/README.md create mode 100644 example/iot-gateway/node_modules/negotiator/index.js create mode 100644 example/iot-gateway/node_modules/negotiator/lib/charset.js create mode 100644 example/iot-gateway/node_modules/negotiator/lib/encoding.js create mode 100644 example/iot-gateway/node_modules/negotiator/lib/language.js create mode 100644 example/iot-gateway/node_modules/negotiator/lib/mediaType.js create mode 100644 example/iot-gateway/node_modules/negotiator/package.json create mode 100644 example/iot-gateway/node_modules/net/LICENSE create mode 100644 example/iot-gateway/node_modules/net/README.md create mode 100644 example/iot-gateway/node_modules/net/index.js create mode 100644 example/iot-gateway/node_modules/net/package.json create mode 100644 example/iot-gateway/node_modules/net/test.js create mode 100644 example/iot-gateway/node_modules/object-component/.npmignore create mode 100644 example/iot-gateway/node_modules/object-component/History.md create mode 100644 example/iot-gateway/node_modules/object-component/Makefile create mode 100644 example/iot-gateway/node_modules/object-component/Readme.md create mode 100644 example/iot-gateway/node_modules/object-component/component.json create mode 100644 example/iot-gateway/node_modules/object-component/index.js create mode 100644 example/iot-gateway/node_modules/object-component/package.json create mode 100644 example/iot-gateway/node_modules/object-component/test/object.js create mode 100644 example/iot-gateway/node_modules/object-inspect/.travis.yml create mode 100644 example/iot-gateway/node_modules/object-inspect/LICENSE create mode 100644 example/iot-gateway/node_modules/object-inspect/example/all.js create mode 100644 example/iot-gateway/node_modules/object-inspect/example/circular.js create mode 100644 example/iot-gateway/node_modules/object-inspect/example/fn.js create mode 100644 example/iot-gateway/node_modules/object-inspect/example/inspect.js create mode 100644 example/iot-gateway/node_modules/object-inspect/index.js create mode 100644 example/iot-gateway/node_modules/object-inspect/package.json create mode 100644 example/iot-gateway/node_modules/object-inspect/readme.markdown create mode 100644 example/iot-gateway/node_modules/object-inspect/test/browser/dom.js create mode 100644 example/iot-gateway/node_modules/object-inspect/test/circular.js create mode 100644 example/iot-gateway/node_modules/object-inspect/test/fn.js create mode 100644 example/iot-gateway/node_modules/object-inspect/test/holes.js create mode 100644 example/iot-gateway/node_modules/object-inspect/test/lowbyte.js create mode 100644 example/iot-gateway/node_modules/object-inspect/test/undef.js create mode 100644 example/iot-gateway/node_modules/object-keys/.editorconfig create mode 100644 example/iot-gateway/node_modules/object-keys/.eslintrc create mode 100644 example/iot-gateway/node_modules/object-keys/.jscs.json create mode 100644 example/iot-gateway/node_modules/object-keys/.npmignore create mode 100644 example/iot-gateway/node_modules/object-keys/.travis.yml create mode 100644 example/iot-gateway/node_modules/object-keys/CHANGELOG.md create mode 100644 example/iot-gateway/node_modules/object-keys/LICENSE create mode 100644 example/iot-gateway/node_modules/object-keys/README.md create mode 100644 example/iot-gateway/node_modules/object-keys/index.js create mode 100644 example/iot-gateway/node_modules/object-keys/isArguments.js create mode 100644 example/iot-gateway/node_modules/object-keys/package.json create mode 100644 example/iot-gateway/node_modules/object-keys/test/index.js create mode 100644 example/iot-gateway/node_modules/on-finished/HISTORY.md create mode 100644 example/iot-gateway/node_modules/on-finished/LICENSE create mode 100644 example/iot-gateway/node_modules/on-finished/README.md create mode 100644 example/iot-gateway/node_modules/on-finished/index.js create mode 100644 example/iot-gateway/node_modules/on-finished/package.json create mode 100644 example/iot-gateway/node_modules/options/.npmignore create mode 100644 example/iot-gateway/node_modules/options/Makefile create mode 100644 example/iot-gateway/node_modules/options/README.md create mode 100644 example/iot-gateway/node_modules/options/lib/options.js create mode 100644 example/iot-gateway/node_modules/options/package.json create mode 100644 example/iot-gateway/node_modules/parsejson/Makefile create mode 100644 example/iot-gateway/node_modules/parsejson/index.js create mode 100644 example/iot-gateway/node_modules/parsejson/package.json create mode 100644 example/iot-gateway/node_modules/parsejson/test.js create mode 100644 example/iot-gateway/node_modules/parseqs/Makefile create mode 100644 example/iot-gateway/node_modules/parseqs/index.js create mode 100644 example/iot-gateway/node_modules/parseqs/package.json create mode 100644 example/iot-gateway/node_modules/parseqs/test.js create mode 100644 example/iot-gateway/node_modules/parseuri/History.md create mode 100644 example/iot-gateway/node_modules/parseuri/Makefile create mode 100644 example/iot-gateway/node_modules/parseuri/index.js create mode 100644 example/iot-gateway/node_modules/parseuri/package.json create mode 100644 example/iot-gateway/node_modules/parseuri/test.js create mode 100644 example/iot-gateway/node_modules/parseurl/HISTORY.md create mode 100644 example/iot-gateway/node_modules/parseurl/LICENSE create mode 100644 example/iot-gateway/node_modules/parseurl/README.md create mode 100644 example/iot-gateway/node_modules/parseurl/index.js create mode 100644 example/iot-gateway/node_modules/parseurl/package.json create mode 100644 example/iot-gateway/node_modules/path-to-regexp/History.md create mode 100644 example/iot-gateway/node_modules/path-to-regexp/LICENSE create mode 100644 example/iot-gateway/node_modules/path-to-regexp/Readme.md create mode 100644 example/iot-gateway/node_modules/path-to-regexp/index.js create mode 100644 example/iot-gateway/node_modules/path-to-regexp/package.json create mode 100644 example/iot-gateway/node_modules/process-nextick-args/.travis.yml create mode 100644 example/iot-gateway/node_modules/process-nextick-args/index.js create mode 100644 example/iot-gateway/node_modules/process-nextick-args/license.md create mode 100644 example/iot-gateway/node_modules/process-nextick-args/package.json create mode 100644 example/iot-gateway/node_modules/process-nextick-args/readme.md create mode 100644 example/iot-gateway/node_modules/process-nextick-args/test.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/.npmignore create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/.travis.yml create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/LICENSE create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/README.md create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/example.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/example.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/index.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/package.json create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/parse.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/stringify.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/basic.json create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/basic.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/comments.json create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/comments.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/complex.json create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/complex.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/extend.json create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/extend.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/map.json create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/map.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/oneof.json create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/oneof.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/options.json create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/options.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/search.json create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/search.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/service.json create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/service.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/version.json create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/version.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/test/index.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers-schema/tokenize.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/.npmignore create mode 100644 example/iot-gateway/node_modules/protocol-buffers/.travis.yml create mode 100644 example/iot-gateway/node_modules/protocol-buffers/LICENSE create mode 100644 example/iot-gateway/node_modules/protocol-buffers/README.md create mode 100644 example/iot-gateway/node_modules/protocol-buffers/bench/bench.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers/bench/index.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/compile.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/encodings.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/example.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/example.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers/index.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/package.json create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/basic.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/corrupted.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/defaults.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/enums.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/float.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/integers.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/map.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/nan.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/nested.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/notpacked.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/oneof.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/packed.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/repeated.js create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/test.proto create mode 100644 example/iot-gateway/node_modules/protocol-buffers/test/utf-8.js create mode 100644 example/iot-gateway/node_modules/proxy-addr/HISTORY.md create mode 100644 example/iot-gateway/node_modules/proxy-addr/LICENSE create mode 100644 example/iot-gateway/node_modules/proxy-addr/README.md create mode 100644 example/iot-gateway/node_modules/proxy-addr/index.js create mode 100644 example/iot-gateway/node_modules/proxy-addr/package.json create mode 100644 example/iot-gateway/node_modules/qs/.eslintignore create mode 100644 example/iot-gateway/node_modules/qs/.npmignore create mode 100644 example/iot-gateway/node_modules/qs/.travis.yml create mode 100644 example/iot-gateway/node_modules/qs/CHANGELOG.md create mode 100644 example/iot-gateway/node_modules/qs/CONTRIBUTING.md create mode 100644 example/iot-gateway/node_modules/qs/LICENSE create mode 100644 example/iot-gateway/node_modules/qs/README.md create mode 100644 example/iot-gateway/node_modules/qs/bower.json create mode 100644 example/iot-gateway/node_modules/qs/lib/index.js create mode 100644 example/iot-gateway/node_modules/qs/lib/parse.js create mode 100644 example/iot-gateway/node_modules/qs/lib/stringify.js create mode 100644 example/iot-gateway/node_modules/qs/lib/utils.js create mode 100644 example/iot-gateway/node_modules/qs/package.json create mode 100644 example/iot-gateway/node_modules/qs/test/parse.js create mode 100644 example/iot-gateway/node_modules/qs/test/stringify.js create mode 100644 example/iot-gateway/node_modules/qs/test/utils.js create mode 100644 example/iot-gateway/node_modules/quote-stream/.travis.yml create mode 100644 example/iot-gateway/node_modules/quote-stream/LICENSE create mode 100755 example/iot-gateway/node_modules/quote-stream/bin/cmd.js create mode 100644 example/iot-gateway/node_modules/quote-stream/bin/usage.txt create mode 100644 example/iot-gateway/node_modules/quote-stream/example/stream.js create mode 100644 example/iot-gateway/node_modules/quote-stream/index.js create mode 100644 example/iot-gateway/node_modules/quote-stream/package.json create mode 100644 example/iot-gateway/node_modules/quote-stream/readme.markdown create mode 100644 example/iot-gateway/node_modules/quote-stream/test/simple.js create mode 100644 example/iot-gateway/node_modules/quote-stream/test/unicode_separators.js create mode 100644 example/iot-gateway/node_modules/quote-stream/test/whitespace.js create mode 100644 example/iot-gateway/node_modules/range-parser/HISTORY.md create mode 100644 example/iot-gateway/node_modules/range-parser/LICENSE create mode 100644 example/iot-gateway/node_modules/range-parser/README.md create mode 100644 example/iot-gateway/node_modules/range-parser/index.js create mode 100644 example/iot-gateway/node_modules/range-parser/package.json create mode 100644 example/iot-gateway/node_modules/readable-stream/.npmignore create mode 100644 example/iot-gateway/node_modules/readable-stream/.travis.yml create mode 100644 example/iot-gateway/node_modules/readable-stream/.zuul.yml create mode 100644 example/iot-gateway/node_modules/readable-stream/LICENSE create mode 100644 example/iot-gateway/node_modules/readable-stream/README.md create mode 100644 example/iot-gateway/node_modules/readable-stream/doc/stream.markdown create mode 100644 example/iot-gateway/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md create mode 100644 example/iot-gateway/node_modules/readable-stream/duplex.js create mode 100644 example/iot-gateway/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 example/iot-gateway/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 example/iot-gateway/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 example/iot-gateway/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 example/iot-gateway/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 example/iot-gateway/node_modules/readable-stream/package.json create mode 100644 example/iot-gateway/node_modules/readable-stream/passthrough.js create mode 100644 example/iot-gateway/node_modules/readable-stream/readable.js create mode 100644 example/iot-gateway/node_modules/readable-stream/transform.js create mode 100644 example/iot-gateway/node_modules/readable-stream/writable.js create mode 100644 example/iot-gateway/node_modules/resolve/.travis.yml create mode 100644 example/iot-gateway/node_modules/resolve/LICENSE create mode 100644 example/iot-gateway/node_modules/resolve/example/async.js create mode 100644 example/iot-gateway/node_modules/resolve/example/sync.js create mode 100644 example/iot-gateway/node_modules/resolve/index.js create mode 100644 example/iot-gateway/node_modules/resolve/lib/async.js create mode 100644 example/iot-gateway/node_modules/resolve/lib/caller.js create mode 100644 example/iot-gateway/node_modules/resolve/lib/core.js create mode 100644 example/iot-gateway/node_modules/resolve/lib/core.json create mode 100644 example/iot-gateway/node_modules/resolve/lib/node-modules-paths.js create mode 100644 example/iot-gateway/node_modules/resolve/lib/sync.js create mode 100644 example/iot-gateway/node_modules/resolve/package.json create mode 100644 example/iot-gateway/node_modules/resolve/readme.markdown create mode 100644 example/iot-gateway/node_modules/resolve/test/core.js create mode 100644 example/iot-gateway/node_modules/resolve/test/dotdot.js create mode 100644 example/iot-gateway/node_modules/resolve/test/dotdot/abc/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/dotdot/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/faulty_basedir.js create mode 100644 example/iot-gateway/node_modules/resolve/test/filter.js create mode 100644 example/iot-gateway/node_modules/resolve/test/filter_sync.js create mode 100644 example/iot-gateway/node_modules/resolve/test/mock.js create mode 100644 example/iot-gateway/node_modules/resolve/test/mock_sync.js create mode 100644 example/iot-gateway/node_modules/resolve/test/module_dir.js create mode 100644 example/iot-gateway/node_modules/resolve/test/module_dir/xmodules/aaa/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/module_dir/ymodules/aaa/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/module_dir/zmodules/bbb/main.js create mode 100644 example/iot-gateway/node_modules/resolve/test/module_dir/zmodules/bbb/package.json create mode 100644 example/iot-gateway/node_modules/resolve/test/node_path.js create mode 100644 example/iot-gateway/node_modules/resolve/test/node_path/x/aaa/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/node_path/x/ccc/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/node_path/y/bbb/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/node_path/y/ccc/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/nonstring.js create mode 100644 example/iot-gateway/node_modules/resolve/test/pathfilter.js create mode 100644 example/iot-gateway/node_modules/resolve/test/pathfilter/deep_ref/main.js create mode 100644 example/iot-gateway/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/alt.js create mode 100644 example/iot-gateway/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/deeper/ref.js create mode 100644 example/iot-gateway/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json create mode 100644 example/iot-gateway/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/ref.js create mode 100644 example/iot-gateway/node_modules/resolve/test/precedence.js create mode 100644 example/iot-gateway/node_modules/resolve/test/precedence/aaa.js create mode 100644 example/iot-gateway/node_modules/resolve/test/precedence/aaa/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/precedence/aaa/main.js create mode 100644 example/iot-gateway/node_modules/resolve/test/precedence/bbb.js create mode 100644 example/iot-gateway/node_modules/resolve/test/precedence/bbb/main.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/baz/doom.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/baz/package.json create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/baz/quux.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/cup.coffee create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/foo.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/incorrect_main/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/incorrect_main/package.json create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/mug.coffee create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/mug.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/other_path/lib/other-lib.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/other_path/root.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/punycode/node_modules/punycode/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/quux/foo/index.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/without_basedir/main.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js create mode 100644 example/iot-gateway/node_modules/resolve/test/resolver_sync.js create mode 100644 example/iot-gateway/node_modules/resolve/test/subdirs.js create mode 100644 example/iot-gateway/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json create mode 100644 example/iot-gateway/node_modules/resolve/test/subdirs/node_modules/a/package.json create mode 100644 example/iot-gateway/node_modules/send/HISTORY.md create mode 100644 example/iot-gateway/node_modules/send/LICENSE create mode 100644 example/iot-gateway/node_modules/send/README.md create mode 100644 example/iot-gateway/node_modules/send/index.js create mode 100644 example/iot-gateway/node_modules/send/package.json create mode 100644 example/iot-gateway/node_modules/serve-static/HISTORY.md create mode 100644 example/iot-gateway/node_modules/serve-static/LICENSE create mode 100644 example/iot-gateway/node_modules/serve-static/README.md create mode 100644 example/iot-gateway/node_modules/serve-static/index.js create mode 100644 example/iot-gateway/node_modules/serve-static/package.json create mode 100644 example/iot-gateway/node_modules/shallow-copy/.travis.yml create mode 100644 example/iot-gateway/node_modules/shallow-copy/LICENSE create mode 100644 example/iot-gateway/node_modules/shallow-copy/example/array.js create mode 100644 example/iot-gateway/node_modules/shallow-copy/example/object.js create mode 100644 example/iot-gateway/node_modules/shallow-copy/index.js create mode 100644 example/iot-gateway/node_modules/shallow-copy/package.json create mode 100644 example/iot-gateway/node_modules/shallow-copy/readme.markdown create mode 100644 example/iot-gateway/node_modules/shallow-copy/test/array.js create mode 100644 example/iot-gateway/node_modules/shallow-copy/test/object.js create mode 100644 example/iot-gateway/node_modules/signed-varint/LICENSE create mode 100644 example/iot-gateway/node_modules/signed-varint/README.md create mode 100644 example/iot-gateway/node_modules/signed-varint/index.js create mode 100644 example/iot-gateway/node_modules/signed-varint/node_modules/varint/README.md create mode 100644 example/iot-gateway/node_modules/signed-varint/node_modules/varint/bench.js create mode 100644 example/iot-gateway/node_modules/signed-varint/node_modules/varint/decode.js create mode 100644 example/iot-gateway/node_modules/signed-varint/node_modules/varint/encode.js create mode 100644 example/iot-gateway/node_modules/signed-varint/node_modules/varint/index.js create mode 100644 example/iot-gateway/node_modules/signed-varint/node_modules/varint/length.js create mode 100644 example/iot-gateway/node_modules/signed-varint/node_modules/varint/package.json create mode 100644 example/iot-gateway/node_modules/signed-varint/node_modules/varint/test.js create mode 100644 example/iot-gateway/node_modules/signed-varint/package.json create mode 100644 example/iot-gateway/node_modules/signed-varint/test.js create mode 100644 example/iot-gateway/node_modules/smartobject/.npmignore create mode 100644 example/iot-gateway/node_modules/smartobject/.travis.yml create mode 100644 example/iot-gateway/node_modules/smartobject/Makefile create mode 100644 example/iot-gateway/node_modules/smartobject/README.md create mode 100644 example/iot-gateway/node_modules/smartobject/docs/resource_plan.md create mode 100644 example/iot-gateway/node_modules/smartobject/docs/templates.md create mode 100644 example/iot-gateway/node_modules/smartobject/index.js create mode 100644 example/iot-gateway/node_modules/smartobject/lib/object_instance.js create mode 100644 example/iot-gateway/node_modules/smartobject/lib/smartobject.js create mode 100644 example/iot-gateway/node_modules/smartobject/lib/utils.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/.npmignore create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/.travis.yml create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/LICENSE create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/Makefile create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/README.md create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/index.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/package.json create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/test/array.test.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/test/collection.test.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/test/function.test.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/test/object.test.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/test/string.test.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/test/type.test.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/busyman/test/utils.test.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/.npmignore create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/.travis.yml create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/LICENSE create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/Makefile create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/README.md create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/defs/conflict.txt create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/defs/defs.json create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/index.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/README.md create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/dist/enum.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/dist/enumItem.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/dist/indexOf.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/dist/isType.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/enum-2.3.0.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/enum-2.3.0.min.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/index.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/licence create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/package.json create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/package.json create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/test/argumentType.test.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/test/getter.test.js create mode 100644 example/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/test/setter.test.js create mode 100644 example/iot-gateway/node_modules/smartobject/package.json create mode 100644 example/iot-gateway/node_modules/smartobject/test/objectInst.functional.test.js create mode 100644 example/iot-gateway/node_modules/smartobject/test/objectInst.signature.test.js create mode 100644 example/iot-gateway/node_modules/smartobject/test/smartObject.functional.test.js create mode 100644 example/iot-gateway/node_modules/smartobject/test/smartObject.signature.test.js create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/.npmignore create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/History.md create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/LICENSE create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/Readme.md create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/index.js create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/.npmignore create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/.travis.yml create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/.zuul.yml create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/History.md create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/Makefile create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/Readme.md create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/bench/bench.js create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/bench/index.js create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/binary.js create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/index.js create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/is-buffer.js create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/node_modules/debug/Readme.md create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/node_modules/debug/debug.js create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/node_modules/debug/index.js create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/node_modules/debug/lib/debug.js create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/node_modules/debug/package.json create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/package.json create mode 100644 example/iot-gateway/node_modules/socket.io-adapter/package.json create mode 100644 example/iot-gateway/node_modules/socket.io-client/History.md create mode 100644 example/iot-gateway/node_modules/socket.io-client/LICENSE create mode 100644 example/iot-gateway/node_modules/socket.io-client/README.md create mode 100644 example/iot-gateway/node_modules/socket.io-client/lib/index.js create mode 100644 example/iot-gateway/node_modules/socket.io-client/lib/manager.js create mode 100644 example/iot-gateway/node_modules/socket.io-client/lib/on.js create mode 100644 example/iot-gateway/node_modules/socket.io-client/lib/socket.js create mode 100644 example/iot-gateway/node_modules/socket.io-client/lib/url.js create mode 100644 example/iot-gateway/node_modules/socket.io-client/node_modules/component-emitter/History.md create mode 100644 example/iot-gateway/node_modules/socket.io-client/node_modules/component-emitter/LICENSE create mode 100644 example/iot-gateway/node_modules/socket.io-client/node_modules/component-emitter/Readme.md create mode 100644 example/iot-gateway/node_modules/socket.io-client/node_modules/component-emitter/index.js create mode 100644 example/iot-gateway/node_modules/socket.io-client/node_modules/component-emitter/package.json create mode 100644 example/iot-gateway/node_modules/socket.io-client/package.json create mode 100644 example/iot-gateway/node_modules/socket.io-client/socket.io.js create mode 100644 example/iot-gateway/node_modules/socket.io-parser/.npmignore create mode 100644 example/iot-gateway/node_modules/socket.io-parser/.travis.yml create mode 100644 example/iot-gateway/node_modules/socket.io-parser/.zuul.yml create mode 100644 example/iot-gateway/node_modules/socket.io-parser/History.md create mode 100644 example/iot-gateway/node_modules/socket.io-parser/LICENSE create mode 100644 example/iot-gateway/node_modules/socket.io-parser/Makefile create mode 100644 example/iot-gateway/node_modules/socket.io-parser/Readme.md create mode 100644 example/iot-gateway/node_modules/socket.io-parser/bench/bench.js create mode 100644 example/iot-gateway/node_modules/socket.io-parser/bench/index.js create mode 100644 example/iot-gateway/node_modules/socket.io-parser/binary.js create mode 100644 example/iot-gateway/node_modules/socket.io-parser/index.js create mode 100644 example/iot-gateway/node_modules/socket.io-parser/is-buffer.js create mode 100644 example/iot-gateway/node_modules/socket.io-parser/node_modules/json3/LICENSE create mode 100644 example/iot-gateway/node_modules/socket.io-parser/node_modules/json3/README.md create mode 100644 example/iot-gateway/node_modules/socket.io-parser/node_modules/json3/lib/json3.js create mode 100644 example/iot-gateway/node_modules/socket.io-parser/node_modules/json3/lib/json3.min.js create mode 100644 example/iot-gateway/node_modules/socket.io-parser/node_modules/json3/package.json create mode 100644 example/iot-gateway/node_modules/socket.io-parser/package.json create mode 100644 example/iot-gateway/node_modules/socket.io/.npmignore create mode 100644 example/iot-gateway/node_modules/socket.io/.travis.yml create mode 100644 example/iot-gateway/node_modules/socket.io/History.md create mode 100644 example/iot-gateway/node_modules/socket.io/LICENSE create mode 100644 example/iot-gateway/node_modules/socket.io/Makefile create mode 100644 example/iot-gateway/node_modules/socket.io/Readme.md create mode 100644 example/iot-gateway/node_modules/socket.io/lib/client.js create mode 100644 example/iot-gateway/node_modules/socket.io/lib/index.js create mode 100644 example/iot-gateway/node_modules/socket.io/lib/namespace.js create mode 100644 example/iot-gateway/node_modules/socket.io/lib/socket.js create mode 100644 example/iot-gateway/node_modules/socket.io/package.json create mode 100644 example/iot-gateway/node_modules/source-map/.npmignore create mode 100644 example/iot-gateway/node_modules/source-map/.travis.yml create mode 100644 example/iot-gateway/node_modules/source-map/CHANGELOG.md create mode 100644 example/iot-gateway/node_modules/source-map/LICENSE create mode 100644 example/iot-gateway/node_modules/source-map/Makefile.dryice.js create mode 100644 example/iot-gateway/node_modules/source-map/README.md create mode 100644 example/iot-gateway/node_modules/source-map/build/assert-shim.js create mode 100644 example/iot-gateway/node_modules/source-map/build/mini-require.js create mode 100644 example/iot-gateway/node_modules/source-map/build/prefix-source-map.jsm create mode 100644 example/iot-gateway/node_modules/source-map/build/prefix-utils.jsm create mode 100644 example/iot-gateway/node_modules/source-map/build/suffix-browser.js create mode 100644 example/iot-gateway/node_modules/source-map/build/suffix-source-map.jsm create mode 100644 example/iot-gateway/node_modules/source-map/build/suffix-utils.jsm create mode 100644 example/iot-gateway/node_modules/source-map/build/test-prefix.js create mode 100644 example/iot-gateway/node_modules/source-map/build/test-suffix.js create mode 100644 example/iot-gateway/node_modules/source-map/lib/source-map.js create mode 100644 example/iot-gateway/node_modules/source-map/lib/source-map/array-set.js create mode 100644 example/iot-gateway/node_modules/source-map/lib/source-map/base64-vlq.js create mode 100644 example/iot-gateway/node_modules/source-map/lib/source-map/base64.js create mode 100644 example/iot-gateway/node_modules/source-map/lib/source-map/binary-search.js create mode 100644 example/iot-gateway/node_modules/source-map/lib/source-map/mapping-list.js create mode 100644 example/iot-gateway/node_modules/source-map/lib/source-map/source-map-consumer.js create mode 100644 example/iot-gateway/node_modules/source-map/lib/source-map/source-map-generator.js create mode 100644 example/iot-gateway/node_modules/source-map/lib/source-map/source-node.js create mode 100644 example/iot-gateway/node_modules/source-map/lib/source-map/util.js create mode 100644 example/iot-gateway/node_modules/source-map/package.json create mode 100755 example/iot-gateway/node_modules/source-map/test/run-tests.js create mode 100644 example/iot-gateway/node_modules/source-map/test/source-map/test-api.js create mode 100644 example/iot-gateway/node_modules/source-map/test/source-map/test-array-set.js create mode 100644 example/iot-gateway/node_modules/source-map/test/source-map/test-base64-vlq.js create mode 100644 example/iot-gateway/node_modules/source-map/test/source-map/test-base64.js create mode 100644 example/iot-gateway/node_modules/source-map/test/source-map/test-binary-search.js create mode 100644 example/iot-gateway/node_modules/source-map/test/source-map/test-dog-fooding.js create mode 100644 example/iot-gateway/node_modules/source-map/test/source-map/test-source-map-consumer.js create mode 100644 example/iot-gateway/node_modules/source-map/test/source-map/test-source-map-generator.js create mode 100644 example/iot-gateway/node_modules/source-map/test/source-map/test-source-node.js create mode 100644 example/iot-gateway/node_modules/source-map/test/source-map/test-util.js create mode 100644 example/iot-gateway/node_modules/source-map/test/source-map/util.js create mode 100644 example/iot-gateway/node_modules/static-eval/.travis.yml create mode 100644 example/iot-gateway/node_modules/static-eval/LICENSE create mode 100644 example/iot-gateway/node_modules/static-eval/example/eval.js create mode 100644 example/iot-gateway/node_modules/static-eval/example/vars.js create mode 100644 example/iot-gateway/node_modules/static-eval/index.js create mode 100755 example/iot-gateway/node_modules/static-eval/node_modules/.bin/escodegen create mode 100755 example/iot-gateway/node_modules/static-eval/node_modules/.bin/esgenerate create mode 100755 example/iot-gateway/node_modules/static-eval/node_modules/.bin/esparse create mode 100755 example/iot-gateway/node_modules/static-eval/node_modules/.bin/esvalidate create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/escodegen/.jshintrc create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/escodegen/Gruntfile.js create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/escodegen/LICENSE.BSD create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/escodegen/LICENSE.source-map create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/escodegen/README.md create mode 100755 example/iot-gateway/node_modules/static-eval/node_modules/escodegen/bin/escodegen.js create mode 100755 example/iot-gateway/node_modules/static-eval/node_modules/escodegen/bin/esgenerate.js create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/escodegen/escodegen.js create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/escodegen/package.json create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/esprima/README.md create mode 100755 example/iot-gateway/node_modules/static-eval/node_modules/esprima/bin/esparse.js create mode 100755 example/iot-gateway/node_modules/static-eval/node_modules/esprima/bin/esvalidate.js create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/esprima/esprima.js create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/esprima/package.json create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/esprima/test/compat.js create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/esprima/test/reflect.js create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/esprima/test/run.js create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/esprima/test/runner.js create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/esprima/test/test.js create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/estraverse/.jshintrc create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/estraverse/LICENSE.BSD create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/estraverse/README.md create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/estraverse/estraverse.js create mode 100644 example/iot-gateway/node_modules/static-eval/node_modules/estraverse/package.json create mode 100644 example/iot-gateway/node_modules/static-eval/package.json create mode 100644 example/iot-gateway/node_modules/static-eval/readme.markdown create mode 100644 example/iot-gateway/node_modules/static-eval/test/eval.js create mode 100644 example/iot-gateway/node_modules/static-eval/test/prop.js create mode 100644 example/iot-gateway/node_modules/static-module/.travis.yml create mode 100644 example/iot-gateway/node_modules/static-module/LICENSE create mode 100644 example/iot-gateway/node_modules/static-module/example/brfs.js create mode 100644 example/iot-gateway/node_modules/static-module/example/brfs/source.js create mode 100644 example/iot-gateway/node_modules/static-module/example/brfs/x.txt create mode 100644 example/iot-gateway/node_modules/static-module/example/fs.js create mode 100644 example/iot-gateway/node_modules/static-module/example/fs/source.js create mode 100644 example/iot-gateway/node_modules/static-module/example/fs/x.txt create mode 100644 example/iot-gateway/node_modules/static-module/index.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/.travis.yml create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/LICENSE create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/example/parse.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/index.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/package.json create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/readme.markdown create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/test/dash.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/test/default_bool.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/test/dotted.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/test/long.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/test/parse.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/test/parse_modified.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/test/short.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/minimist/test/whitespace.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/object-keys/.npmignore create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/object-keys/.travis.yml create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/object-keys/README.md create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/object-keys/foreach.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/object-keys/index.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/object-keys/isArguments.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/object-keys/package.json create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/object-keys/shim.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/object-keys/test/foreach.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/object-keys/test/index.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/object-keys/test/isArguments.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/object-keys/test/shim.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/quote-stream/.travis.yml create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/quote-stream/LICENSE create mode 100755 example/iot-gateway/node_modules/static-module/node_modules/quote-stream/bin/cmd.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/quote-stream/bin/usage.txt create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/quote-stream/example/stream.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/quote-stream/index.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/quote-stream/package.json create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/quote-stream/readme.markdown create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/quote-stream/test/simple.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/quote-stream/test/whitespace.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/.npmignore create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/LICENSE create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/README.md create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/duplex.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/package.json create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/passthrough.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/readable.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/transform.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/readable-stream/writable.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/through2/.npmignore create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/through2/LICENSE create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/through2/README.md create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/through2/package.json create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/through2/through2.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/xtend/.npmignore create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/xtend/LICENCE create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/xtend/Makefile create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/xtend/README.md create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/xtend/has-keys.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/xtend/index.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/xtend/mutable.js create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/xtend/package.json create mode 100644 example/iot-gateway/node_modules/static-module/node_modules/xtend/test.js create mode 100644 example/iot-gateway/node_modules/static-module/package.json create mode 100644 example/iot-gateway/node_modules/static-module/readme.markdown create mode 100644 example/iot-gateway/node_modules/static-module/test/assign.js create mode 100644 example/iot-gateway/node_modules/static-module/test/assign/comma.js create mode 100644 example/iot-gateway/node_modules/static-module/test/assign/source.js create mode 100644 example/iot-gateway/node_modules/static-module/test/brfs.js create mode 100644 example/iot-gateway/node_modules/static-module/test/brfs/attribute.js create mode 100644 example/iot-gateway/node_modules/static-module/test/brfs/attribute_brackets.js create mode 100644 example/iot-gateway/node_modules/static-module/test/brfs/attribute_vars.js create mode 100644 example/iot-gateway/node_modules/static-module/test/brfs/brackets.js create mode 100644 example/iot-gateway/node_modules/static-module/test/brfs/multi_require.js create mode 100644 example/iot-gateway/node_modules/static-module/test/brfs/source.js create mode 100644 example/iot-gateway/node_modules/static-module/test/brfs/x.txt create mode 100644 example/iot-gateway/node_modules/static-module/test/brfs/x5.js create mode 100644 example/iot-gateway/node_modules/static-module/test/fn.js create mode 100644 example/iot-gateway/node_modules/static-module/test/fn/source.js create mode 100644 example/iot-gateway/node_modules/static-module/test/fs.js create mode 100644 example/iot-gateway/node_modules/static-module/test/fs/html.js create mode 100644 example/iot-gateway/node_modules/static-module/test/fs/readfile.js create mode 100644 example/iot-gateway/node_modules/static-module/test/fs/robot.html create mode 100644 example/iot-gateway/node_modules/static-module/test/fs/x.txt create mode 100644 example/iot-gateway/node_modules/static-module/test/fs_twice.js create mode 100644 example/iot-gateway/node_modules/static-module/test/fs_twice/4x.js create mode 100644 example/iot-gateway/node_modules/static-module/test/fs_twice/html.js create mode 100644 example/iot-gateway/node_modules/static-module/test/fs_twice/readfile.js create mode 100644 example/iot-gateway/node_modules/static-module/test/fs_twice/robot.html create mode 100644 example/iot-gateway/node_modules/static-module/test/fs_twice/vars.js create mode 100644 example/iot-gateway/node_modules/static-module/test/fs_twice/x.txt create mode 100644 example/iot-gateway/node_modules/static-module/test/inline.js create mode 100644 example/iot-gateway/node_modules/static-module/test/inline/fn.js create mode 100644 example/iot-gateway/node_modules/static-module/test/inline/fn_call.js create mode 100644 example/iot-gateway/node_modules/static-module/test/inline/fn_expr.js create mode 100644 example/iot-gateway/node_modules/static-module/test/inline/obj.js create mode 100644 example/iot-gateway/node_modules/static-module/test/inline/obj_call.js create mode 100644 example/iot-gateway/node_modules/static-module/test/inline/obj_expr.js create mode 100644 example/iot-gateway/node_modules/static-module/test/log.js create mode 100644 example/iot-gateway/node_modules/static-module/test/log/source.js create mode 100644 example/iot-gateway/node_modules/static-module/test/many.js create mode 100644 example/iot-gateway/node_modules/static-module/test/many/a.txt create mode 100644 example/iot-gateway/node_modules/static-module/test/many/all_inline.js create mode 100644 example/iot-gateway/node_modules/static-module/test/many/b.txt create mode 100644 example/iot-gateway/node_modules/static-module/test/many/c.txt create mode 100644 example/iot-gateway/node_modules/static-module/test/many/inline.js create mode 100644 example/iot-gateway/node_modules/static-module/test/many/source.js create mode 100644 example/iot-gateway/node_modules/static-module/test/mixed.js create mode 100644 example/iot-gateway/node_modules/static-module/test/mixed/source.js create mode 100644 example/iot-gateway/node_modules/static-module/test/mixed/unmixed.js create mode 100644 example/iot-gateway/node_modules/static-module/test/mixed/xyz.txt create mode 100644 example/iot-gateway/node_modules/static-module/test/nested.js create mode 100644 example/iot-gateway/node_modules/static-module/test/nested/source.js create mode 100644 example/iot-gateway/node_modules/static-module/test/obj.js create mode 100644 example/iot-gateway/node_modules/static-module/test/obj/source.js create mode 100644 example/iot-gateway/node_modules/static-module/test/prop.js create mode 100644 example/iot-gateway/node_modules/static-module/test/prop/source.js create mode 100644 example/iot-gateway/node_modules/static-module/test/readfile_resolve.js create mode 100644 example/iot-gateway/node_modules/static-module/test/readfile_resolve/main.js create mode 100644 example/iot-gateway/node_modules/static-module/test/readfile_resolve/node_modules/aaa/wow.txt create mode 100644 example/iot-gateway/node_modules/static-module/test/shebang.js create mode 100644 example/iot-gateway/node_modules/static-module/test/shebang/source.js create mode 100644 example/iot-gateway/node_modules/static-module/test/varmod.js create mode 100644 example/iot-gateway/node_modules/static-module/test/varmod/source.js create mode 100644 example/iot-gateway/node_modules/static-module/test/varmod/vars.html create mode 100644 example/iot-gateway/node_modules/static-module/test/vars.js create mode 100644 example/iot-gateway/node_modules/static-module/test/vars/five.js create mode 100644 example/iot-gateway/node_modules/static-module/test/vars/multi-require.js create mode 100644 example/iot-gateway/node_modules/static-module/test/vars/one.js create mode 100644 example/iot-gateway/node_modules/static-module/test/vars/source.js create mode 100644 example/iot-gateway/node_modules/static-module/test/vars/vars.html create mode 100644 example/iot-gateway/node_modules/statuses/LICENSE create mode 100644 example/iot-gateway/node_modules/statuses/README.md create mode 100644 example/iot-gateway/node_modules/statuses/codes.json create mode 100644 example/iot-gateway/node_modules/statuses/index.js create mode 100644 example/iot-gateway/node_modules/statuses/package.json create mode 100644 example/iot-gateway/node_modules/string_decoder/.npmignore create mode 100644 example/iot-gateway/node_modules/string_decoder/LICENSE create mode 100644 example/iot-gateway/node_modules/string_decoder/README.md create mode 100644 example/iot-gateway/node_modules/string_decoder/index.js create mode 100644 example/iot-gateway/node_modules/string_decoder/package.json create mode 100644 example/iot-gateway/node_modules/through2/.npmignore create mode 100644 example/iot-gateway/node_modules/through2/LICENSE create mode 100644 example/iot-gateway/node_modules/through2/README.md create mode 100644 example/iot-gateway/node_modules/through2/package.json create mode 100644 example/iot-gateway/node_modules/through2/through2.js create mode 100644 example/iot-gateway/node_modules/to-array/.npmignore create mode 100644 example/iot-gateway/node_modules/to-array/LICENCE create mode 100644 example/iot-gateway/node_modules/to-array/README.md create mode 100644 example/iot-gateway/node_modules/to-array/index.js create mode 100644 example/iot-gateway/node_modules/to-array/package.json create mode 100644 example/iot-gateway/node_modules/type-is/HISTORY.md create mode 100644 example/iot-gateway/node_modules/type-is/LICENSE create mode 100644 example/iot-gateway/node_modules/type-is/README.md create mode 100644 example/iot-gateway/node_modules/type-is/index.js create mode 100644 example/iot-gateway/node_modules/type-is/package.json create mode 100644 example/iot-gateway/node_modules/typedarray/.travis.yml create mode 100644 example/iot-gateway/node_modules/typedarray/LICENSE create mode 100644 example/iot-gateway/node_modules/typedarray/example/tarray.js create mode 100644 example/iot-gateway/node_modules/typedarray/index.js create mode 100644 example/iot-gateway/node_modules/typedarray/package.json create mode 100644 example/iot-gateway/node_modules/typedarray/readme.markdown create mode 100644 example/iot-gateway/node_modules/typedarray/test/server/undef_globals.js create mode 100644 example/iot-gateway/node_modules/typedarray/test/tarray.js create mode 100644 example/iot-gateway/node_modules/ultron/.npmignore create mode 100644 example/iot-gateway/node_modules/ultron/.travis.yml create mode 100644 example/iot-gateway/node_modules/ultron/LICENSE create mode 100644 example/iot-gateway/node_modules/ultron/README.md create mode 100644 example/iot-gateway/node_modules/ultron/index.js create mode 100644 example/iot-gateway/node_modules/ultron/package.json create mode 100644 example/iot-gateway/node_modules/ultron/test.js create mode 100644 example/iot-gateway/node_modules/unpipe/HISTORY.md create mode 100644 example/iot-gateway/node_modules/unpipe/LICENSE create mode 100644 example/iot-gateway/node_modules/unpipe/README.md create mode 100644 example/iot-gateway/node_modules/unpipe/index.js create mode 100644 example/iot-gateway/node_modules/unpipe/package.json create mode 100644 example/iot-gateway/node_modules/utf8/.gitattributes create mode 100644 example/iot-gateway/node_modules/utf8/.npmignore create mode 100644 example/iot-gateway/node_modules/utf8/.travis.yml create mode 100644 example/iot-gateway/node_modules/utf8/Gruntfile.js create mode 100644 example/iot-gateway/node_modules/utf8/LICENSE-MIT.txt create mode 100644 example/iot-gateway/node_modules/utf8/README.md create mode 100644 example/iot-gateway/node_modules/utf8/bower.json create mode 100644 example/iot-gateway/node_modules/utf8/component.json create mode 100644 example/iot-gateway/node_modules/utf8/package.json create mode 100755 example/iot-gateway/node_modules/utf8/tests/generate-test-data.py create mode 100644 example/iot-gateway/node_modules/utf8/tests/index.html create mode 100644 example/iot-gateway/node_modules/utf8/tests/tests.js create mode 100644 example/iot-gateway/node_modules/utf8/utf8.js create mode 100644 example/iot-gateway/node_modules/util-deprecate/History.md create mode 100644 example/iot-gateway/node_modules/util-deprecate/LICENSE create mode 100644 example/iot-gateway/node_modules/util-deprecate/README.md create mode 100644 example/iot-gateway/node_modules/util-deprecate/browser.js create mode 100644 example/iot-gateway/node_modules/util-deprecate/node.js create mode 100644 example/iot-gateway/node_modules/util-deprecate/package.json create mode 100644 example/iot-gateway/node_modules/util/.npmignore create mode 100644 example/iot-gateway/node_modules/util/.travis.yml create mode 100644 example/iot-gateway/node_modules/util/.zuul.yml create mode 100644 example/iot-gateway/node_modules/util/LICENSE create mode 100644 example/iot-gateway/node_modules/util/README.md create mode 100644 example/iot-gateway/node_modules/util/package.json create mode 100644 example/iot-gateway/node_modules/util/support/isBuffer.js create mode 100644 example/iot-gateway/node_modules/util/support/isBufferBrowser.js create mode 100644 example/iot-gateway/node_modules/util/test/browser/inspect.js create mode 100644 example/iot-gateway/node_modules/util/test/browser/is.js create mode 100644 example/iot-gateway/node_modules/util/test/node/debug.js create mode 100644 example/iot-gateway/node_modules/util/test/node/format.js create mode 100644 example/iot-gateway/node_modules/util/test/node/inspect.js create mode 100644 example/iot-gateway/node_modules/util/test/node/log.js create mode 100644 example/iot-gateway/node_modules/util/test/node/util.js create mode 100644 example/iot-gateway/node_modules/util/util.js create mode 100644 example/iot-gateway/node_modules/utils-merge/.travis.yml create mode 100644 example/iot-gateway/node_modules/utils-merge/LICENSE create mode 100644 example/iot-gateway/node_modules/utils-merge/README.md create mode 100644 example/iot-gateway/node_modules/utils-merge/index.js create mode 100644 example/iot-gateway/node_modules/utils-merge/package.json create mode 100644 example/iot-gateway/node_modules/varint/README.md create mode 100644 example/iot-gateway/node_modules/varint/bench.js create mode 100644 example/iot-gateway/node_modules/varint/decode.js create mode 100644 example/iot-gateway/node_modules/varint/encode.js create mode 100644 example/iot-gateway/node_modules/varint/index.js create mode 100644 example/iot-gateway/node_modules/varint/length.js create mode 100644 example/iot-gateway/node_modules/varint/package.json create mode 100644 example/iot-gateway/node_modules/varint/test.js create mode 100644 example/iot-gateway/node_modules/vary/HISTORY.md create mode 100644 example/iot-gateway/node_modules/vary/LICENSE create mode 100644 example/iot-gateway/node_modules/vary/README.md create mode 100644 example/iot-gateway/node_modules/vary/index.js create mode 100644 example/iot-gateway/node_modules/vary/package.json create mode 100644 example/iot-gateway/node_modules/ws/.npmignore create mode 100644 example/iot-gateway/node_modules/ws/.travis.yml create mode 100644 example/iot-gateway/node_modules/ws/Makefile create mode 100644 example/iot-gateway/node_modules/ws/README.md create mode 100644 example/iot-gateway/node_modules/ws/index.js create mode 100644 example/iot-gateway/node_modules/ws/lib/BufferPool.js create mode 100644 example/iot-gateway/node_modules/ws/lib/BufferUtil.fallback.js create mode 100644 example/iot-gateway/node_modules/ws/lib/BufferUtil.js create mode 100644 example/iot-gateway/node_modules/ws/lib/ErrorCodes.js create mode 100644 example/iot-gateway/node_modules/ws/lib/Extensions.js create mode 100644 example/iot-gateway/node_modules/ws/lib/PerMessageDeflate.js create mode 100644 example/iot-gateway/node_modules/ws/lib/Receiver.hixie.js create mode 100644 example/iot-gateway/node_modules/ws/lib/Receiver.js create mode 100644 example/iot-gateway/node_modules/ws/lib/Sender.hixie.js create mode 100644 example/iot-gateway/node_modules/ws/lib/Sender.js create mode 100644 example/iot-gateway/node_modules/ws/lib/Validation.fallback.js create mode 100644 example/iot-gateway/node_modules/ws/lib/Validation.js create mode 100644 example/iot-gateway/node_modules/ws/lib/WebSocket.js create mode 100644 example/iot-gateway/node_modules/ws/lib/WebSocketServer.js create mode 100644 example/iot-gateway/node_modules/ws/package.json create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/LICENSE create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/README.md create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/autotest.watchr create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/example/demo.js create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/package.json create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-constants.js create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-events.js create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-exceptions.js create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-headers.js create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-redirect-302.js create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-redirect-303.js create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-redirect-307.js create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-request-methods.js create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-request-protocols.js create mode 100644 example/iot-gateway/node_modules/xmlhttprequest-ssl/tests/testdata.txt create mode 100644 example/iot-gateway/node_modules/xtend/.jshintrc create mode 100644 example/iot-gateway/node_modules/xtend/.npmignore create mode 100644 example/iot-gateway/node_modules/xtend/LICENCE create mode 100644 example/iot-gateway/node_modules/xtend/Makefile create mode 100644 example/iot-gateway/node_modules/xtend/README.md create mode 100644 example/iot-gateway/node_modules/xtend/immutable.js create mode 100644 example/iot-gateway/node_modules/xtend/mutable.js create mode 100644 example/iot-gateway/node_modules/xtend/package.json create mode 100644 example/iot-gateway/node_modules/xtend/test.js create mode 100644 example/iot-gateway/node_modules/yeast/LICENSE create mode 100644 example/iot-gateway/node_modules/yeast/README.md create mode 100644 example/iot-gateway/node_modules/yeast/index.js create mode 100644 example/iot-gateway/node_modules/yeast/package.json create mode 100644 example/iot-gateway/package.json create mode 100755 example/iot-gateway/run_gateway.sh create mode 100644 example/npi_server2/Makefile create mode 100644 example/npi_server2/apimac-msgs.cfg create mode 100644 example/npi_server2/app_main.c create mode 100644 example/npi_server2/linux_main.c create mode 100644 example/npi_server2/npi_server2.cfg create mode 100644 example/npi_server2/npi_server2.h create mode 100644 firmware/CC1310_LaunchXL/coprocessor_cc1310_lp.hex create mode 100644 firmware/CC1310_LaunchXL/sensor_cc13x0lp.hex create mode 100644 firmware/CC1350_LaunchXL/coprocessor_cc1310_lp.hex create mode 100644 firmware/CC1350_LaunchXL/sensor_cc13x0lp.hex create mode 100644 firmware/CC1350_SensorTag/sensor_cc13x0stk.hex create mode 100644 firmware/readme.txt create mode 100644 prebuilt/bin/apimac-msgs.cfg create mode 100755 prebuilt/bin/bbb_collector create mode 100755 prebuilt/bin/bbb_npi_server2 create mode 100644 prebuilt/bin/collector.cfg create mode 100755 prebuilt/bin/host_collector create mode 100755 prebuilt/bin/host_npi_server2 create mode 100644 prebuilt/bin/npi_server2.cfg create mode 100755 prebuilt/bin/run_collector.sh create mode 100644 prebuilt/iot-gateway/appClient/appclient.js create mode 100644 prebuilt/iot-gateway/appClient/devices/device.js create mode 100644 prebuilt/iot-gateway/appClient/nwkinfo/nwkinfo.js create mode 100644 prebuilt/iot-gateway/appClient/protofiles/appsrv.proto create mode 100644 prebuilt/iot-gateway/cloudAdapter/awsCloudAdapter.js create mode 100644 prebuilt/iot-gateway/cloudAdapter/awsConfig.json create mode 100644 prebuilt/iot-gateway/cloudAdapter/awsDeltaTest.js create mode 100644 prebuilt/iot-gateway/cloudAdapter/certs/Readme.txt create mode 100644 prebuilt/iot-gateway/iot-gateway.js create mode 100644 prebuilt/iot-gateway/node_modules/.bin/acorn create mode 100644 prebuilt/iot-gateway/node_modules/.bin/brfs create mode 100644 prebuilt/iot-gateway/node_modules/.bin/escodegen create mode 100644 prebuilt/iot-gateway/node_modules/.bin/esgenerate create mode 100644 prebuilt/iot-gateway/node_modules/.bin/esparse create mode 100644 prebuilt/iot-gateway/node_modules/.bin/esvalidate create mode 100644 prebuilt/iot-gateway/node_modules/.bin/mime create mode 100644 prebuilt/iot-gateway/node_modules/.bin/quote-stream create mode 100644 prebuilt/iot-gateway/node_modules/accepts/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/accepts/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/accepts/README.md create mode 100644 prebuilt/iot-gateway/node_modules/accepts/index.js create mode 100644 prebuilt/iot-gateway/node_modules/accepts/package.json create mode 100644 prebuilt/iot-gateway/node_modules/acorn/.editorconfig create mode 100644 prebuilt/iot-gateway/node_modules/acorn/.gitattributes create mode 100644 prebuilt/iot-gateway/node_modules/acorn/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/acorn/.tern-project create mode 100644 prebuilt/iot-gateway/node_modules/acorn/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/acorn/AUTHORS create mode 100644 prebuilt/iot-gateway/node_modules/acorn/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/acorn/README.md create mode 100644 prebuilt/iot-gateway/node_modules/acorn/bin/acorn create mode 100644 prebuilt/iot-gateway/node_modules/acorn/bin/build-acorn.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/bin/generate-identifier-regex.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/bin/prepublish.sh create mode 100644 prebuilt/iot-gateway/node_modules/acorn/bin/update_authors.sh create mode 100644 prebuilt/iot-gateway/node_modules/acorn/bin/without_eval create mode 100644 prebuilt/iot-gateway/node_modules/acorn/dist/.keep create mode 100644 prebuilt/iot-gateway/node_modules/acorn/dist/acorn.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/dist/acorn_csp.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/dist/acorn_loose.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/dist/walk.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/package.json create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/expression.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/identifier.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/index.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/location.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/loose/acorn_loose.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/loose/expression.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/loose/index.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/loose/parseutil.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/loose/state.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/loose/statement.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/loose/tokenize.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/lval.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/node.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/options.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/parseutil.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/state.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/statement.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/tokencontext.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/tokenize.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/tokentype.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/util.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/walk/index.js create mode 100644 prebuilt/iot-gateway/node_modules/acorn/src/whitespace.js create mode 100644 prebuilt/iot-gateway/node_modules/after/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/after/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/after/LICENCE create mode 100644 prebuilt/iot-gateway/node_modules/after/README.md create mode 100644 prebuilt/iot-gateway/node_modules/after/index.js create mode 100644 prebuilt/iot-gateway/node_modules/after/package.json create mode 100644 prebuilt/iot-gateway/node_modules/after/test/after-test.js create mode 100644 prebuilt/iot-gateway/node_modules/amdefine/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/amdefine/README.md create mode 100644 prebuilt/iot-gateway/node_modules/amdefine/amdefine.js create mode 100644 prebuilt/iot-gateway/node_modules/amdefine/intercept.js create mode 100644 prebuilt/iot-gateway/node_modules/amdefine/package.json create mode 100644 prebuilt/iot-gateway/node_modules/array-flatten/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/array-flatten/README.md create mode 100644 prebuilt/iot-gateway/node_modules/array-flatten/array-flatten.js create mode 100644 prebuilt/iot-gateway/node_modules/array-flatten/package.json create mode 100644 prebuilt/iot-gateway/node_modules/arraybuffer.slice/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/arraybuffer.slice/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/arraybuffer.slice/README.md create mode 100644 prebuilt/iot-gateway/node_modules/arraybuffer.slice/index.js create mode 100644 prebuilt/iot-gateway/node_modules/arraybuffer.slice/package.json create mode 100644 prebuilt/iot-gateway/node_modules/arraybuffer.slice/test/slice-buffer.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/.jscsrc create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/.jshintrc create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/CHANGELOG.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/LICENSE.txt create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/NOTICE.txt create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/browser/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/browser/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/common/lib/exceptions.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/common/lib/is-undefined.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/common/lib/tls-reader.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/device/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/device/lib/exceptions.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/device/lib/tls.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/device/lib/ws.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/lifecycle/aws-configuration.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/lifecycle/example.css create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/lifecycle/index.html create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/lifecycle/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/mqtt-explorer/aws-configuration.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/mqtt-explorer/example.css create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/mqtt-explorer/index.html create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/mqtt-explorer/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/temperature-monitor/aws-configuration.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/temperature-monitor/example.css create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/temperature-monitor/index.html create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/browser/temperature-monitor/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/device-example.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/echo-example.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/lib/cmdline.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/temperature-control/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/temperature-control/temperature-control.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/thing-example.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/examples/thing-passthrough-example.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/gulpfile.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/.bin/mqtt create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/.bin/mqtt_pub create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/.bin/mqtt_sub create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/CONTRIBUTING.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/aes.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/bower.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/cipher-core.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/core.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/crypto-js.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/docs/QuickStartGuide.wiki create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-base64.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-hex.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-latin1.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-utf16.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/enc-utf8.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/evpkdf.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/format-hex.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/format-openssl.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-md5.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-ripemd160.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-sha1.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-sha224.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-sha256.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-sha3.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-sha384.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac-sha512.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/hmac.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/lib-typedarrays.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/md5.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-cfb.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr-gladman.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ctr.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ecb.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/mode-ofb.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-ansix923.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso10126.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-iso97971.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-nopadding.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-pkcs7.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pad-zeropadding.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/pbkdf2.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit-legacy.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/rabbit.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/rc4.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/ripemd160.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha1.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha224.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha256.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha3.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha384.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/sha512.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/tripledes.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/crypto-js/x64-core.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/.eslintrc create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/.jscsrc create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/.jshintrc create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/.zuul.yml create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/CONTRIBUTING.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/LICENSE.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/MQTT.js.png create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/benchmarks/bombing.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/benchmarks/throughputCounter.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/bin/pub.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/bin/sub.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/doc/help.txt create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/doc/publish.txt create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/doc/subscribe.txt create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/example.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/client/secure-client.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/client/simple-both.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/client/simple-publish.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/client/simple-subscribe.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/server/broadcast.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/server/orig.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/server/redis.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/server/tls.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/server/websocket.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls client/crt.ca.cg.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls client/mqttclient.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls client/tls-cert.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls client/tls-key.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls server/crt.server1.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls server/key.csr.server1.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/tls server/mqttserver.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/examples/wss/client.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/client.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/tcp.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/tls.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/connect/ws.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/server.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/lib/store.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/mqtt.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/example.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/node_modules/.bin/leven create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/node_modules/leven/cli.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/node_modules/leven/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/node_modules/leven/license create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/node_modules/leven/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/node_modules/leven/readme.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/commist/test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/wrappy.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/once.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/node_modules/once/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/end-of-stream/test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/doc/hello.txt create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/doc/help.txt create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/example.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/fixture/basic/hello create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/fixture/basic/hello.txt create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/fixture/basic/help.txt create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/help-me.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/node_modules/wrappy/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/node_modules/wrappy/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/node_modules/wrappy/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/node_modules/wrappy/wrappy.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/once.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/node_modules/once/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/node_modules/pump/test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/help-me/test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/CONTRIBUTING.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/LICENSE.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/connection.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/lib/generateStream.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/lib/parseStream.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/reduplexer/test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/through2/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/through2/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/through2/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/through2/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/node_modules/through2/through2.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/test/connection.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/test/connection.parse.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/test/connection.transmit.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-connection/test/util.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/CONTRIBUTING.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/LICENSE.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/benchmarks/generate.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/benchmarks/parse.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/constants.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/generate.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/mqtt.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/.jshintrc create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/LICENSE.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/bl.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/test/basic-test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/test/sauce.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/node_modules/bl/test/test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/packet.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/parser.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/mqtt-packet/testRandom.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/duplex.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/passthrough.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/readable.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/transform.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/readable-stream/writable.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/node_modules/reinterval/tests/test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/abstract_client.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/abstract_store.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/browser/server.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/browser/test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/client.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/private-csr.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/private-key.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/public-cert.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/public-key.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/server.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/server_process.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/tls-cert.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/tls-csr.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/tls-key.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/wrong-cert.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/wrong-csr.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/helpers/wrong-key.pem create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/mocha.opts create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/mqtt.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/secure_client.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/server.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/store.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/util.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/mqtt/test/websocket_client.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/collaborators.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/echo-server.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/example.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/node_modules/wrappy/wrappy.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/once.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/node_modules/once/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/end-of-stream/test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/README.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/index.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/node_modules/stream-shift/test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/node_modules/duplexify/test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/readme.md create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/server.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/stream.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/test-client.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/test-server.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/test.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/node_modules/websocket-stream/ws-fallback.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/package.json create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/scripts/browserize.sh create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/test/data/README.txt create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/test/data/certificate.pem.crt create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/test/data/private.pem.key create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/test/data/root-CA.crt create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/test/device-unit-tests.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/test/mock/mockMQTTClient.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/test/mock/mockTls.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/test/thing-unit-tests.js create mode 100644 prebuilt/iot-gateway/node_modules/aws-iot-device-sdk/thing/index.js create mode 100644 prebuilt/iot-gateway/node_modules/backo2/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/backo2/History.md create mode 100644 prebuilt/iot-gateway/node_modules/backo2/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/backo2/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/backo2/component.json create mode 100644 prebuilt/iot-gateway/node_modules/backo2/index.js create mode 100644 prebuilt/iot-gateway/node_modules/backo2/package.json create mode 100644 prebuilt/iot-gateway/node_modules/backo2/test/index.js create mode 100644 prebuilt/iot-gateway/node_modules/base64-arraybuffer/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/base64-arraybuffer/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/base64-arraybuffer/LICENSE-MIT create mode 100644 prebuilt/iot-gateway/node_modules/base64-arraybuffer/README.md create mode 100644 prebuilt/iot-gateway/node_modules/base64-arraybuffer/grunt.js create mode 100644 prebuilt/iot-gateway/node_modules/base64-arraybuffer/lib/base64-arraybuffer.js create mode 100644 prebuilt/iot-gateway/node_modules/base64-arraybuffer/package.json create mode 100644 prebuilt/iot-gateway/node_modules/base64-arraybuffer/test/base64-arraybuffer_test.js create mode 100644 prebuilt/iot-gateway/node_modules/base64id/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/base64id/README.md create mode 100644 prebuilt/iot-gateway/node_modules/base64id/lib/base64id.js create mode 100644 prebuilt/iot-gateway/node_modules/base64id/package.json create mode 100644 prebuilt/iot-gateway/node_modules/benchmark/LICENSE.txt create mode 100644 prebuilt/iot-gateway/node_modules/benchmark/README.md create mode 100644 prebuilt/iot-gateway/node_modules/benchmark/benchmark.js create mode 100644 prebuilt/iot-gateway/node_modules/benchmark/doc/README.md create mode 100644 prebuilt/iot-gateway/node_modules/benchmark/package.json create mode 100644 prebuilt/iot-gateway/node_modules/benchmark/test/run-test.sh create mode 100644 prebuilt/iot-gateway/node_modules/benchmark/test/test.js create mode 100644 prebuilt/iot-gateway/node_modules/better-assert/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/better-assert/History.md create mode 100644 prebuilt/iot-gateway/node_modules/better-assert/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/better-assert/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/better-assert/example.js create mode 100644 prebuilt/iot-gateway/node_modules/better-assert/index.js create mode 100644 prebuilt/iot-gateway/node_modules/better-assert/package.json create mode 100644 prebuilt/iot-gateway/node_modules/blob/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/blob/.zuul.yml create mode 100644 prebuilt/iot-gateway/node_modules/blob/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/blob/README.md create mode 100644 prebuilt/iot-gateway/node_modules/blob/index.js create mode 100644 prebuilt/iot-gateway/node_modules/blob/package.json create mode 100644 prebuilt/iot-gateway/node_modules/blob/test/index.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/brfs/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/brfs/bin/cmd.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/bin/usage.txt create mode 100644 prebuilt/iot-gateway/node_modules/brfs/example/async.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/example/main.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/example/robot.html create mode 100644 prebuilt/iot-gateway/node_modules/brfs/index.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/package.json create mode 100644 prebuilt/iot-gateway/node_modules/brfs/readme.markdown create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/ag.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/async.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/buffer.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/bundle.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/cmd.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/dynamic_read_concat.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/dynamic_read_no_concat.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/encoding.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/ag.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/ag.json create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/ag_post.html create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/ag_pre.html create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/async.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/async.txt create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/async_encoding.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/async_str_encoding.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/buffer.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/dynamic_read_concat.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/dynamic_read_no_concat.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/encoding.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/hoist.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/inline.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/main.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/multi_var.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/non_fs.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/path_join.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/path_join_other_name.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/path_join_single_var.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/readdir-sync.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/readdir.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/robot.html create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/separators.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/separators.txt create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/tr.beep create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/tr.html create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/files/with_comments.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/hoist.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/inline.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/multi_var.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/non_fs.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/path_join.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/path_join_other_name.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/path_join_single_var.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/readdir.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/require_resolve.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/require_resolve/main.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/require_resolve/node_modules/aaa/wow.txt create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/separators.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/tr.js create mode 100644 prebuilt/iot-gateway/node_modules/brfs/test/with_comments.js create mode 100644 prebuilt/iot-gateway/node_modules/buffer-equal/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/buffer-equal/README.markdown create mode 100644 prebuilt/iot-gateway/node_modules/buffer-equal/example/eq.js create mode 100644 prebuilt/iot-gateway/node_modules/buffer-equal/index.js create mode 100644 prebuilt/iot-gateway/node_modules/buffer-equal/package.json create mode 100644 prebuilt/iot-gateway/node_modules/buffer-equal/test/eq.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/README.md create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/bower.json create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/bytebuffer.png create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/dist/README.md create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/dist/bytebuffer-dataview.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/dist/bytebuffer-dataview.min.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/dist/bytebuffer-dataview.min.js.gz create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/dist/bytebuffer-dataview.min.map create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/dist/bytebuffer-node.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/dist/bytebuffer.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/dist/bytebuffer.min.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/dist/bytebuffer.min.js.gz create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/dist/bytebuffer.min.map create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/donate.png create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/externs/bytebuffer.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/externs/minimal-env.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/index.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/jsdoc.json create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/package.json create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/scripts/build.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/bower.json create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/bytebuffer.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/encodings/base64.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/encodings/binary.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/encodings/debug.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/encodings/hex.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/encodings/impl/base64.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/encodings/impl/binary.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/encodings/impl/debug.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/encodings/impl/hex.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/encodings/impl/utf8.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/encodings/utf8.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/helpers.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/macros.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/append.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/assert.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/capacity.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/clear.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/clone.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/compact.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/copy.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/ensureCapacity.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/fill.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/flip.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/mark.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/order.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/prepend.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/printDebug.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/remaining.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/reset.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/resize.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/reverse.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/skip.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/slice.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/static/accessor.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/static/allocate.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/static/concat.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/static/isByteBuffer.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/static/type.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/static/wrap.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/toBuffer.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/methods/toString.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/bytes/bitset.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/bytes/bytes.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/floats/float32.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/floats/float64.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/floats/ieee754.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/ints/int16.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/ints/int32.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/ints/int64.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/ints/int8.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/strings/cstring.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/strings/istring.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/strings/utf8string.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/strings/vstring.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/varints/varint32.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/types/varints/varint64.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/wrap-node.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/src/wrap.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/tests/bench.js create mode 100644 prebuilt/iot-gateway/node_modules/bytebuffer/tests/suite.js create mode 100644 prebuilt/iot-gateway/node_modules/callsite/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/callsite/History.md create mode 100644 prebuilt/iot-gateway/node_modules/callsite/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/callsite/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/callsite/index.js create mode 100644 prebuilt/iot-gateway/node_modules/callsite/package.json create mode 100644 prebuilt/iot-gateway/node_modules/component-bind/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/component-bind/History.md create mode 100644 prebuilt/iot-gateway/node_modules/component-bind/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/component-bind/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/component-bind/component.json create mode 100644 prebuilt/iot-gateway/node_modules/component-bind/index.js create mode 100644 prebuilt/iot-gateway/node_modules/component-bind/package.json create mode 100644 prebuilt/iot-gateway/node_modules/component-emitter/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/component-emitter/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/component-emitter/History.md create mode 100644 prebuilt/iot-gateway/node_modules/component-emitter/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/component-emitter/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/component-emitter/bower.json create mode 100644 prebuilt/iot-gateway/node_modules/component-emitter/component.json create mode 100644 prebuilt/iot-gateway/node_modules/component-emitter/index.js create mode 100644 prebuilt/iot-gateway/node_modules/component-emitter/package.json create mode 100644 prebuilt/iot-gateway/node_modules/component-inherit/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/component-inherit/History.md create mode 100644 prebuilt/iot-gateway/node_modules/component-inherit/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/component-inherit/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/component-inherit/component.json create mode 100644 prebuilt/iot-gateway/node_modules/component-inherit/index.js create mode 100644 prebuilt/iot-gateway/node_modules/component-inherit/package.json create mode 100644 prebuilt/iot-gateway/node_modules/component-inherit/test/inherit.js create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/index.js create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/README.md create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/duplex.js create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/float.patch create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/package.json create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/passthrough.js create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/readable.js create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/transform.js create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/node_modules/readable-stream/writable.js create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/package.json create mode 100644 prebuilt/iot-gateway/node_modules/concat-stream/readme.md create mode 100644 prebuilt/iot-gateway/node_modules/content-disposition/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/content-disposition/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/content-disposition/README.md create mode 100644 prebuilt/iot-gateway/node_modules/content-disposition/index.js create mode 100644 prebuilt/iot-gateway/node_modules/content-disposition/package.json create mode 100644 prebuilt/iot-gateway/node_modules/content-type/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/content-type/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/content-type/README.md create mode 100644 prebuilt/iot-gateway/node_modules/content-type/index.js create mode 100644 prebuilt/iot-gateway/node_modules/content-type/package.json create mode 100644 prebuilt/iot-gateway/node_modules/cookie-signature/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/cookie-signature/History.md create mode 100644 prebuilt/iot-gateway/node_modules/cookie-signature/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/cookie-signature/index.js create mode 100644 prebuilt/iot-gateway/node_modules/cookie-signature/package.json create mode 100644 prebuilt/iot-gateway/node_modules/cookie/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/cookie/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/cookie/README.md create mode 100644 prebuilt/iot-gateway/node_modules/cookie/index.js create mode 100644 prebuilt/iot-gateway/node_modules/cookie/package.json create mode 100644 prebuilt/iot-gateway/node_modules/core-util-is/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/core-util-is/README.md create mode 100644 prebuilt/iot-gateway/node_modules/core-util-is/float.patch create mode 100644 prebuilt/iot-gateway/node_modules/core-util-is/lib/util.js create mode 100644 prebuilt/iot-gateway/node_modules/core-util-is/package.json create mode 100644 prebuilt/iot-gateway/node_modules/core-util-is/test.js create mode 100644 prebuilt/iot-gateway/node_modules/debug/.jshintrc create mode 100644 prebuilt/iot-gateway/node_modules/debug/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/debug/History.md create mode 100644 prebuilt/iot-gateway/node_modules/debug/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/debug/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/debug/bower.json create mode 100644 prebuilt/iot-gateway/node_modules/debug/browser.js create mode 100644 prebuilt/iot-gateway/node_modules/debug/component.json create mode 100644 prebuilt/iot-gateway/node_modules/debug/debug.js create mode 100644 prebuilt/iot-gateway/node_modules/debug/node.js create mode 100644 prebuilt/iot-gateway/node_modules/debug/package.json create mode 100644 prebuilt/iot-gateway/node_modules/depd/History.md create mode 100644 prebuilt/iot-gateway/node_modules/depd/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/depd/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/depd/index.js create mode 100644 prebuilt/iot-gateway/node_modules/depd/lib/browser/index.js create mode 100644 prebuilt/iot-gateway/node_modules/depd/lib/compat/buffer-concat.js create mode 100644 prebuilt/iot-gateway/node_modules/depd/lib/compat/callsite-tostring.js create mode 100644 prebuilt/iot-gateway/node_modules/depd/lib/compat/event-listener-count.js create mode 100644 prebuilt/iot-gateway/node_modules/depd/lib/compat/index.js create mode 100644 prebuilt/iot-gateway/node_modules/depd/package.json create mode 100644 prebuilt/iot-gateway/node_modules/destroy/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/destroy/README.md create mode 100644 prebuilt/iot-gateway/node_modules/destroy/index.js create mode 100644 prebuilt/iot-gateway/node_modules/destroy/package.json create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/LICENSE.md create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/README.md create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/example.js create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/index.js create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/README.md create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/duplex.js create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/float.patch create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/package.json create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/passthrough.js create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/readable.js create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/transform.js create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/node_modules/readable-stream/writable.js create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/package.json create mode 100644 prebuilt/iot-gateway/node_modules/duplexer2/test/tests.js create mode 100644 prebuilt/iot-gateway/node_modules/ee-first/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/ee-first/README.md create mode 100644 prebuilt/iot-gateway/node_modules/ee-first/index.js create mode 100644 prebuilt/iot-gateway/node_modules/ee-first/package.json create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/.zuul.yml create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/History.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/README.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/engine.io.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/index.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/lib/index.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/lib/socket.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/lib/transport.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/lib/transports/index.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/lib/transports/polling-jsonp.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/lib/transports/polling-xhr.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/lib/transports/polling.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/lib/transports/websocket.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/lib/xmlhttprequest.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-client/package.json create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/.zuul.yml create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/History.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/index.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/lib/browser.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/lib/index.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/lib/keys.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/History.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/README.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/fixtures/big.json create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/index.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/package.json create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/node_modules/has-binary/test.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io-parser/package.json create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/History.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/README.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/index.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/lib/engine.io.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/lib/server.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/lib/socket.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/lib/transport.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/lib/transports/index.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/lib/transports/polling-jsonp.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/lib/transports/polling-xhr.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/lib/transports/polling.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/lib/transports/websocket.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/accepts/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/accepts/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/accepts/README.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/accepts/index.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/accepts/package.json create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/mime-db/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/mime-db/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/mime-db/README.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/mime-db/db.json create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/mime-db/index.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/mime-db/package.json create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/mime-types/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/mime-types/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/mime-types/README.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/mime-types/index.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/mime-types/package.json create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/negotiator/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/negotiator/README.md create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/negotiator/lib/charset.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/negotiator/lib/encoding.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/negotiator/lib/language.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/negotiator/lib/mediaType.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/negotiator/lib/negotiator.js create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/node_modules/negotiator/package.json create mode 100644 prebuilt/iot-gateway/node_modules/engine.io/package.json create mode 100644 prebuilt/iot-gateway/node_modules/escape-html/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/escape-html/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/escape-html/index.js create mode 100644 prebuilt/iot-gateway/node_modules/escape-html/package.json create mode 100644 prebuilt/iot-gateway/node_modules/escodegen/.jshintrc create mode 100644 prebuilt/iot-gateway/node_modules/escodegen/LICENSE.BSD create mode 100644 prebuilt/iot-gateway/node_modules/escodegen/LICENSE.source-map create mode 100644 prebuilt/iot-gateway/node_modules/escodegen/README.md create mode 100644 prebuilt/iot-gateway/node_modules/escodegen/bin/escodegen.js create mode 100644 prebuilt/iot-gateway/node_modules/escodegen/bin/esgenerate.js create mode 100644 prebuilt/iot-gateway/node_modules/escodegen/component.json create mode 100644 prebuilt/iot-gateway/node_modules/escodegen/escodegen.browser.min.js create mode 100644 prebuilt/iot-gateway/node_modules/escodegen/escodegen.js create mode 100644 prebuilt/iot-gateway/node_modules/escodegen/gulpfile.js create mode 100644 prebuilt/iot-gateway/node_modules/escodegen/package.json create mode 100644 prebuilt/iot-gateway/node_modules/esprima/README.md create mode 100644 prebuilt/iot-gateway/node_modules/esprima/bin/esparse.js create mode 100644 prebuilt/iot-gateway/node_modules/esprima/bin/esvalidate.js create mode 100644 prebuilt/iot-gateway/node_modules/esprima/esprima.js create mode 100644 prebuilt/iot-gateway/node_modules/esprima/package.json create mode 100644 prebuilt/iot-gateway/node_modules/esprima/test/compat.js create mode 100644 prebuilt/iot-gateway/node_modules/esprima/test/reflect.js create mode 100644 prebuilt/iot-gateway/node_modules/esprima/test/run.js create mode 100644 prebuilt/iot-gateway/node_modules/esprima/test/runner.js create mode 100644 prebuilt/iot-gateway/node_modules/esprima/test/test.js create mode 100644 prebuilt/iot-gateway/node_modules/estraverse/.jshintrc create mode 100644 prebuilt/iot-gateway/node_modules/estraverse/LICENSE.BSD create mode 100644 prebuilt/iot-gateway/node_modules/estraverse/README.md create mode 100644 prebuilt/iot-gateway/node_modules/estraverse/estraverse.js create mode 100644 prebuilt/iot-gateway/node_modules/estraverse/package.json create mode 100644 prebuilt/iot-gateway/node_modules/esutils/.jshintrc create mode 100644 prebuilt/iot-gateway/node_modules/esutils/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/esutils/README.md create mode 100644 prebuilt/iot-gateway/node_modules/esutils/lib/code.js create mode 100644 prebuilt/iot-gateway/node_modules/esutils/lib/keyword.js create mode 100644 prebuilt/iot-gateway/node_modules/esutils/lib/utils.js create mode 100644 prebuilt/iot-gateway/node_modules/esutils/package.json create mode 100644 prebuilt/iot-gateway/node_modules/esutils/test/code.coffee create mode 100644 prebuilt/iot-gateway/node_modules/esutils/test/keyword.coffee create mode 100644 prebuilt/iot-gateway/node_modules/etag/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/etag/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/etag/README.md create mode 100644 prebuilt/iot-gateway/node_modules/etag/index.js create mode 100644 prebuilt/iot-gateway/node_modules/etag/package.json create mode 100644 prebuilt/iot-gateway/node_modules/events/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/events/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/events/.zuul.yml create mode 100644 prebuilt/iot-gateway/node_modules/events/History.md create mode 100644 prebuilt/iot-gateway/node_modules/events/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/events/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/events/events.js create mode 100644 prebuilt/iot-gateway/node_modules/events/package.json create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/add-listeners.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/check-listener-leaks.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/common.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/index.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/legacy-compat.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/listener-count.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/listeners-side-effects.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/listeners.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/max-listeners.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/modify-in-emit.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/num-args.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/once.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/remove-all-listeners.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/remove-listeners.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/set-max-listeners-side-effects.js create mode 100644 prebuilt/iot-gateway/node_modules/events/tests/subclass.js create mode 100644 prebuilt/iot-gateway/node_modules/express/History.md create mode 100644 prebuilt/iot-gateway/node_modules/express/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/express/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/express/index.js create mode 100644 prebuilt/iot-gateway/node_modules/express/lib/application.js create mode 100644 prebuilt/iot-gateway/node_modules/express/lib/express.js create mode 100644 prebuilt/iot-gateway/node_modules/express/lib/middleware/init.js create mode 100644 prebuilt/iot-gateway/node_modules/express/lib/middleware/query.js create mode 100644 prebuilt/iot-gateway/node_modules/express/lib/request.js create mode 100644 prebuilt/iot-gateway/node_modules/express/lib/response.js create mode 100644 prebuilt/iot-gateway/node_modules/express/lib/router/index.js create mode 100644 prebuilt/iot-gateway/node_modules/express/lib/router/layer.js create mode 100644 prebuilt/iot-gateway/node_modules/express/lib/router/route.js create mode 100644 prebuilt/iot-gateway/node_modules/express/lib/utils.js create mode 100644 prebuilt/iot-gateway/node_modules/express/lib/view.js create mode 100644 prebuilt/iot-gateway/node_modules/express/package.json create mode 100644 prebuilt/iot-gateway/node_modules/falafel/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/falafel/example/array.js create mode 100644 prebuilt/iot-gateway/node_modules/falafel/example/keyword.js create mode 100644 prebuilt/iot-gateway/node_modules/falafel/example/prompt.js create mode 100644 prebuilt/iot-gateway/node_modules/falafel/index.js create mode 100644 prebuilt/iot-gateway/node_modules/falafel/package.json create mode 100644 prebuilt/iot-gateway/node_modules/falafel/readme.markdown create mode 100644 prebuilt/iot-gateway/node_modules/falafel/test/array.js create mode 100644 prebuilt/iot-gateway/node_modules/falafel/test/async.js create mode 100644 prebuilt/iot-gateway/node_modules/falafel/test/bin/run.js create mode 100644 prebuilt/iot-gateway/node_modules/falafel/test/custom-parser.js create mode 100644 prebuilt/iot-gateway/node_modules/falafel/test/es6.js create mode 100644 prebuilt/iot-gateway/node_modules/falafel/test/for.js create mode 100644 prebuilt/iot-gateway/node_modules/falafel/test/inspect.js create mode 100644 prebuilt/iot-gateway/node_modules/falafel/test/opts.js create mode 100644 prebuilt/iot-gateway/node_modules/falafel/test/parent.js create mode 100644 prebuilt/iot-gateway/node_modules/finalhandler/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/finalhandler/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/finalhandler/README.md create mode 100644 prebuilt/iot-gateway/node_modules/finalhandler/index.js create mode 100644 prebuilt/iot-gateway/node_modules/finalhandler/package.json create mode 100644 prebuilt/iot-gateway/node_modules/foreach/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/foreach/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/foreach/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/foreach/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/foreach/component.json create mode 100644 prebuilt/iot-gateway/node_modules/foreach/index.js create mode 100644 prebuilt/iot-gateway/node_modules/foreach/package.json create mode 100644 prebuilt/iot-gateway/node_modules/foreach/test.js create mode 100644 prebuilt/iot-gateway/node_modules/forwarded/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/forwarded/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/forwarded/README.md create mode 100644 prebuilt/iot-gateway/node_modules/forwarded/index.js create mode 100644 prebuilt/iot-gateway/node_modules/forwarded/package.json create mode 100644 prebuilt/iot-gateway/node_modules/fresh/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/fresh/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/fresh/README.md create mode 100644 prebuilt/iot-gateway/node_modules/fresh/index.js create mode 100644 prebuilt/iot-gateway/node_modules/fresh/package.json create mode 100644 prebuilt/iot-gateway/node_modules/fs/index.js create mode 100644 prebuilt/iot-gateway/node_modules/fs/package.json create mode 100644 prebuilt/iot-gateway/node_modules/function-bind/.eslintrc create mode 100644 prebuilt/iot-gateway/node_modules/function-bind/.jscs.json create mode 100644 prebuilt/iot-gateway/node_modules/function-bind/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/function-bind/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/function-bind/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/function-bind/README.md create mode 100644 prebuilt/iot-gateway/node_modules/function-bind/implementation.js create mode 100644 prebuilt/iot-gateway/node_modules/function-bind/index.js create mode 100644 prebuilt/iot-gateway/node_modules/function-bind/package.json create mode 100644 prebuilt/iot-gateway/node_modules/function-bind/test/index.js create mode 100644 prebuilt/iot-gateway/node_modules/generate-function/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/generate-function/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/generate-function/README.md create mode 100644 prebuilt/iot-gateway/node_modules/generate-function/example.js create mode 100644 prebuilt/iot-gateway/node_modules/generate-function/index.js create mode 100644 prebuilt/iot-gateway/node_modules/generate-function/package.json create mode 100644 prebuilt/iot-gateway/node_modules/generate-function/test.js create mode 100644 prebuilt/iot-gateway/node_modules/generate-object-property/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/generate-object-property/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/generate-object-property/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/generate-object-property/README.md create mode 100644 prebuilt/iot-gateway/node_modules/generate-object-property/index.js create mode 100644 prebuilt/iot-gateway/node_modules/generate-object-property/package.json create mode 100644 prebuilt/iot-gateway/node_modules/generate-object-property/test.js create mode 100644 prebuilt/iot-gateway/node_modules/has-binary/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/has-binary/History.md create mode 100644 prebuilt/iot-gateway/node_modules/has-binary/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/has-binary/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/has-binary/README.md create mode 100644 prebuilt/iot-gateway/node_modules/has-binary/index.js create mode 100644 prebuilt/iot-gateway/node_modules/has-binary/package.json create mode 100644 prebuilt/iot-gateway/node_modules/has-binary/test.js create mode 100644 prebuilt/iot-gateway/node_modules/has-cors/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/has-cors/History.md create mode 100644 prebuilt/iot-gateway/node_modules/has-cors/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/has-cors/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/has-cors/component.json create mode 100644 prebuilt/iot-gateway/node_modules/has-cors/index.js create mode 100644 prebuilt/iot-gateway/node_modules/has-cors/package.json create mode 100644 prebuilt/iot-gateway/node_modules/has-cors/test.js create mode 100644 prebuilt/iot-gateway/node_modules/has/.jshintrc create mode 100644 prebuilt/iot-gateway/node_modules/has/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/has/LICENSE-MIT create mode 100644 prebuilt/iot-gateway/node_modules/has/README.mkd create mode 100644 prebuilt/iot-gateway/node_modules/has/package.json create mode 100644 prebuilt/iot-gateway/node_modules/has/src/index.js create mode 100644 prebuilt/iot-gateway/node_modules/has/test/.jshintrc create mode 100644 prebuilt/iot-gateway/node_modules/has/test/index.js create mode 100644 prebuilt/iot-gateway/node_modules/http-errors/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/http-errors/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/http-errors/README.md create mode 100644 prebuilt/iot-gateway/node_modules/http-errors/index.js create mode 100644 prebuilt/iot-gateway/node_modules/http-errors/package.json create mode 100644 prebuilt/iot-gateway/node_modules/http/package.json create mode 100644 prebuilt/iot-gateway/node_modules/indexof/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/indexof/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/indexof/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/indexof/component.json create mode 100644 prebuilt/iot-gateway/node_modules/indexof/index.js create mode 100644 prebuilt/iot-gateway/node_modules/indexof/package.json create mode 100644 prebuilt/iot-gateway/node_modules/inherits/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/inherits/README.md create mode 100644 prebuilt/iot-gateway/node_modules/inherits/inherits.js create mode 100644 prebuilt/iot-gateway/node_modules/inherits/inherits_browser.js create mode 100644 prebuilt/iot-gateway/node_modules/inherits/package.json create mode 100644 prebuilt/iot-gateway/node_modules/inherits/test.js create mode 100644 prebuilt/iot-gateway/node_modules/ipaddr.js/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/ipaddr.js/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/ipaddr.js/Cakefile create mode 100644 prebuilt/iot-gateway/node_modules/ipaddr.js/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/ipaddr.js/README.md create mode 100644 prebuilt/iot-gateway/node_modules/ipaddr.js/bower.json create mode 100644 prebuilt/iot-gateway/node_modules/ipaddr.js/ipaddr.min.js create mode 100644 prebuilt/iot-gateway/node_modules/ipaddr.js/lib/ipaddr.js create mode 100644 prebuilt/iot-gateway/node_modules/ipaddr.js/package.json create mode 100644 prebuilt/iot-gateway/node_modules/ipaddr.js/src/ipaddr.coffee create mode 100644 prebuilt/iot-gateway/node_modules/ipaddr.js/test/ipaddr.test.coffee create mode 100644 prebuilt/iot-gateway/node_modules/is-property/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/is-property/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/is-property/README.md create mode 100644 prebuilt/iot-gateway/node_modules/is-property/is-property.js create mode 100644 prebuilt/iot-gateway/node_modules/is-property/package.json create mode 100644 prebuilt/iot-gateway/node_modules/isarray/README.md create mode 100644 prebuilt/iot-gateway/node_modules/isarray/build/build.js create mode 100644 prebuilt/iot-gateway/node_modules/isarray/component.json create mode 100644 prebuilt/iot-gateway/node_modules/isarray/index.js create mode 100644 prebuilt/iot-gateway/node_modules/isarray/package.json create mode 100644 prebuilt/iot-gateway/node_modules/json3/.gitmodules create mode 100644 prebuilt/iot-gateway/node_modules/json3/.jamignore create mode 100644 prebuilt/iot-gateway/node_modules/json3/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/json3/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/json3/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/json3/README.md create mode 100644 prebuilt/iot-gateway/node_modules/json3/coverage/coverage.json create mode 100644 prebuilt/iot-gateway/node_modules/json3/coverage/lcov-report/lib/json3.js.html create mode 100644 prebuilt/iot-gateway/node_modules/json3/coverage/lcov-report/prettify.css create mode 100644 prebuilt/iot-gateway/node_modules/json3/coverage/lcov-report/prettify.js create mode 100644 prebuilt/iot-gateway/node_modules/json3/coverage/lcov.info create mode 100644 prebuilt/iot-gateway/node_modules/json3/lib/json3.js create mode 100644 prebuilt/iot-gateway/node_modules/json3/lib/json3.min.js create mode 100644 prebuilt/iot-gateway/node_modules/json3/package.json create mode 100644 prebuilt/iot-gateway/node_modules/long/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/long/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/long/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/long/README.md create mode 100644 prebuilt/iot-gateway/node_modules/long/bower.json create mode 100644 prebuilt/iot-gateway/node_modules/long/dist/README.md create mode 100644 prebuilt/iot-gateway/node_modules/long/dist/long.js create mode 100644 prebuilt/iot-gateway/node_modules/long/dist/long.min.js create mode 100644 prebuilt/iot-gateway/node_modules/long/dist/long.min.js.gz create mode 100644 prebuilt/iot-gateway/node_modules/long/dist/long.min.map create mode 100644 prebuilt/iot-gateway/node_modules/long/doco/INDEX.md create mode 100644 prebuilt/iot-gateway/node_modules/long/doco/Long.md create mode 100644 prebuilt/iot-gateway/node_modules/long/donate.png create mode 100644 prebuilt/iot-gateway/node_modules/long/externs/long.js create mode 100644 prebuilt/iot-gateway/node_modules/long/index.js create mode 100644 prebuilt/iot-gateway/node_modules/long/jsdoc.json create mode 100644 prebuilt/iot-gateway/node_modules/long/long.png create mode 100644 prebuilt/iot-gateway/node_modules/long/package.json create mode 100644 prebuilt/iot-gateway/node_modules/long/scripts/build.js create mode 100644 prebuilt/iot-gateway/node_modules/long/src/bower.json create mode 100644 prebuilt/iot-gateway/node_modules/long/src/long.js create mode 100644 prebuilt/iot-gateway/node_modules/long/src/wrap.js create mode 100644 prebuilt/iot-gateway/node_modules/long/tests/goog.math.long.js create mode 100644 prebuilt/iot-gateway/node_modules/long/tests/suite.js create mode 100644 prebuilt/iot-gateway/node_modules/media-typer/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/media-typer/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/media-typer/README.md create mode 100644 prebuilt/iot-gateway/node_modules/media-typer/index.js create mode 100644 prebuilt/iot-gateway/node_modules/media-typer/package.json create mode 100644 prebuilt/iot-gateway/node_modules/merge-descriptors/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/merge-descriptors/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/merge-descriptors/README.md create mode 100644 prebuilt/iot-gateway/node_modules/merge-descriptors/index.js create mode 100644 prebuilt/iot-gateway/node_modules/merge-descriptors/package.json create mode 100644 prebuilt/iot-gateway/node_modules/methods/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/methods/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/methods/README.md create mode 100644 prebuilt/iot-gateway/node_modules/methods/index.js create mode 100644 prebuilt/iot-gateway/node_modules/methods/package.json create mode 100644 prebuilt/iot-gateway/node_modules/mime-db/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/mime-db/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/mime-db/README.md create mode 100644 prebuilt/iot-gateway/node_modules/mime-db/db.json create mode 100644 prebuilt/iot-gateway/node_modules/mime-db/index.js create mode 100644 prebuilt/iot-gateway/node_modules/mime-db/package.json create mode 100644 prebuilt/iot-gateway/node_modules/mime-types/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/mime-types/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/mime-types/README.md create mode 100644 prebuilt/iot-gateway/node_modules/mime-types/index.js create mode 100644 prebuilt/iot-gateway/node_modules/mime-types/package.json create mode 100644 prebuilt/iot-gateway/node_modules/mime/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/mime/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/mime/README.md create mode 100644 prebuilt/iot-gateway/node_modules/mime/build/build.js create mode 100644 prebuilt/iot-gateway/node_modules/mime/build/test.js create mode 100644 prebuilt/iot-gateway/node_modules/mime/cli.js create mode 100644 prebuilt/iot-gateway/node_modules/mime/mime.js create mode 100644 prebuilt/iot-gateway/node_modules/mime/package.json create mode 100644 prebuilt/iot-gateway/node_modules/mime/types.json create mode 100644 prebuilt/iot-gateway/node_modules/minimist/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/minimist/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/minimist/example/parse.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/index.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/package.json create mode 100644 prebuilt/iot-gateway/node_modules/minimist/readme.markdown create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/all_bool.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/bool.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/dash.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/default_bool.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/dotted.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/kv_short.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/long.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/num.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/parse.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/parse_modified.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/short.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/stop_early.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/unknown.js create mode 100644 prebuilt/iot-gateway/node_modules/minimist/test/whitespace.js create mode 100644 prebuilt/iot-gateway/node_modules/ms/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/ms/History.md create mode 100644 prebuilt/iot-gateway/node_modules/ms/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/ms/README.md create mode 100644 prebuilt/iot-gateway/node_modules/ms/index.js create mode 100644 prebuilt/iot-gateway/node_modules/ms/package.json create mode 100644 prebuilt/iot-gateway/node_modules/negotiator/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/negotiator/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/negotiator/README.md create mode 100644 prebuilt/iot-gateway/node_modules/negotiator/index.js create mode 100644 prebuilt/iot-gateway/node_modules/negotiator/lib/charset.js create mode 100644 prebuilt/iot-gateway/node_modules/negotiator/lib/encoding.js create mode 100644 prebuilt/iot-gateway/node_modules/negotiator/lib/language.js create mode 100644 prebuilt/iot-gateway/node_modules/negotiator/lib/mediaType.js create mode 100644 prebuilt/iot-gateway/node_modules/negotiator/package.json create mode 100644 prebuilt/iot-gateway/node_modules/net/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/net/README.md create mode 100644 prebuilt/iot-gateway/node_modules/net/index.js create mode 100644 prebuilt/iot-gateway/node_modules/net/package.json create mode 100644 prebuilt/iot-gateway/node_modules/net/test.js create mode 100644 prebuilt/iot-gateway/node_modules/object-component/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/object-component/History.md create mode 100644 prebuilt/iot-gateway/node_modules/object-component/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/object-component/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/object-component/component.json create mode 100644 prebuilt/iot-gateway/node_modules/object-component/index.js create mode 100644 prebuilt/iot-gateway/node_modules/object-component/package.json create mode 100644 prebuilt/iot-gateway/node_modules/object-component/test/object.js create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/example/all.js create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/example/circular.js create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/example/fn.js create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/example/inspect.js create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/index.js create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/package.json create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/readme.markdown create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/test/browser/dom.js create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/test/circular.js create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/test/fn.js create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/test/holes.js create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/test/lowbyte.js create mode 100644 prebuilt/iot-gateway/node_modules/object-inspect/test/undef.js create mode 100644 prebuilt/iot-gateway/node_modules/object-keys/.editorconfig create mode 100644 prebuilt/iot-gateway/node_modules/object-keys/.eslintrc create mode 100644 prebuilt/iot-gateway/node_modules/object-keys/.jscs.json create mode 100644 prebuilt/iot-gateway/node_modules/object-keys/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/object-keys/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/object-keys/CHANGELOG.md create mode 100644 prebuilt/iot-gateway/node_modules/object-keys/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/object-keys/README.md create mode 100644 prebuilt/iot-gateway/node_modules/object-keys/index.js create mode 100644 prebuilt/iot-gateway/node_modules/object-keys/isArguments.js create mode 100644 prebuilt/iot-gateway/node_modules/object-keys/package.json create mode 100644 prebuilt/iot-gateway/node_modules/object-keys/test/index.js create mode 100644 prebuilt/iot-gateway/node_modules/on-finished/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/on-finished/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/on-finished/README.md create mode 100644 prebuilt/iot-gateway/node_modules/on-finished/index.js create mode 100644 prebuilt/iot-gateway/node_modules/on-finished/package.json create mode 100644 prebuilt/iot-gateway/node_modules/options/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/options/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/options/README.md create mode 100644 prebuilt/iot-gateway/node_modules/options/lib/options.js create mode 100644 prebuilt/iot-gateway/node_modules/options/package.json create mode 100644 prebuilt/iot-gateway/node_modules/parsejson/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/parsejson/index.js create mode 100644 prebuilt/iot-gateway/node_modules/parsejson/package.json create mode 100644 prebuilt/iot-gateway/node_modules/parsejson/test.js create mode 100644 prebuilt/iot-gateway/node_modules/parseqs/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/parseqs/index.js create mode 100644 prebuilt/iot-gateway/node_modules/parseqs/package.json create mode 100644 prebuilt/iot-gateway/node_modules/parseqs/test.js create mode 100644 prebuilt/iot-gateway/node_modules/parseuri/History.md create mode 100644 prebuilt/iot-gateway/node_modules/parseuri/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/parseuri/index.js create mode 100644 prebuilt/iot-gateway/node_modules/parseuri/package.json create mode 100644 prebuilt/iot-gateway/node_modules/parseuri/test.js create mode 100644 prebuilt/iot-gateway/node_modules/parseurl/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/parseurl/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/parseurl/README.md create mode 100644 prebuilt/iot-gateway/node_modules/parseurl/index.js create mode 100644 prebuilt/iot-gateway/node_modules/parseurl/package.json create mode 100644 prebuilt/iot-gateway/node_modules/path-to-regexp/History.md create mode 100644 prebuilt/iot-gateway/node_modules/path-to-regexp/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/path-to-regexp/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/path-to-regexp/index.js create mode 100644 prebuilt/iot-gateway/node_modules/path-to-regexp/package.json create mode 100644 prebuilt/iot-gateway/node_modules/process-nextick-args/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/process-nextick-args/index.js create mode 100644 prebuilt/iot-gateway/node_modules/process-nextick-args/license.md create mode 100644 prebuilt/iot-gateway/node_modules/process-nextick-args/package.json create mode 100644 prebuilt/iot-gateway/node_modules/process-nextick-args/readme.md create mode 100644 prebuilt/iot-gateway/node_modules/process-nextick-args/test.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/README.md create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/example.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/example.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/index.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/package.json create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/parse.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/stringify.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/basic.json create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/basic.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/comments.json create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/comments.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/complex.json create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/complex.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/extend.json create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/extend.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/map.json create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/map.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/oneof.json create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/oneof.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/options.json create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/options.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/search.json create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/search.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/service.json create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/service.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/version.json create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/fixtures/version.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/test/index.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers-schema/tokenize.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/README.md create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/bench/bench.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/bench/index.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/compile.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/encodings.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/example.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/example.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/index.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/package.json create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/basic.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/corrupted.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/defaults.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/enums.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/float.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/integers.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/map.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/nan.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/nested.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/notpacked.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/oneof.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/packed.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/repeated.js create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/test.proto create mode 100644 prebuilt/iot-gateway/node_modules/protocol-buffers/test/utf-8.js create mode 100644 prebuilt/iot-gateway/node_modules/proxy-addr/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/proxy-addr/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/proxy-addr/README.md create mode 100644 prebuilt/iot-gateway/node_modules/proxy-addr/index.js create mode 100644 prebuilt/iot-gateway/node_modules/proxy-addr/package.json create mode 100644 prebuilt/iot-gateway/node_modules/qs/.eslintignore create mode 100644 prebuilt/iot-gateway/node_modules/qs/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/qs/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/qs/CHANGELOG.md create mode 100644 prebuilt/iot-gateway/node_modules/qs/CONTRIBUTING.md create mode 100644 prebuilt/iot-gateway/node_modules/qs/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/qs/README.md create mode 100644 prebuilt/iot-gateway/node_modules/qs/bower.json create mode 100644 prebuilt/iot-gateway/node_modules/qs/lib/index.js create mode 100644 prebuilt/iot-gateway/node_modules/qs/lib/parse.js create mode 100644 prebuilt/iot-gateway/node_modules/qs/lib/stringify.js create mode 100644 prebuilt/iot-gateway/node_modules/qs/lib/utils.js create mode 100644 prebuilt/iot-gateway/node_modules/qs/package.json create mode 100644 prebuilt/iot-gateway/node_modules/qs/test/parse.js create mode 100644 prebuilt/iot-gateway/node_modules/qs/test/stringify.js create mode 100644 prebuilt/iot-gateway/node_modules/qs/test/utils.js create mode 100644 prebuilt/iot-gateway/node_modules/quote-stream/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/quote-stream/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/quote-stream/bin/cmd.js create mode 100644 prebuilt/iot-gateway/node_modules/quote-stream/bin/usage.txt create mode 100644 prebuilt/iot-gateway/node_modules/quote-stream/example/stream.js create mode 100644 prebuilt/iot-gateway/node_modules/quote-stream/index.js create mode 100644 prebuilt/iot-gateway/node_modules/quote-stream/package.json create mode 100644 prebuilt/iot-gateway/node_modules/quote-stream/readme.markdown create mode 100644 prebuilt/iot-gateway/node_modules/quote-stream/test/simple.js create mode 100644 prebuilt/iot-gateway/node_modules/quote-stream/test/unicode_separators.js create mode 100644 prebuilt/iot-gateway/node_modules/quote-stream/test/whitespace.js create mode 100644 prebuilt/iot-gateway/node_modules/range-parser/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/range-parser/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/range-parser/README.md create mode 100644 prebuilt/iot-gateway/node_modules/range-parser/index.js create mode 100644 prebuilt/iot-gateway/node_modules/range-parser/package.json create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/.zuul.yml create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/README.md create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/doc/stream.markdown create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/duplex.js create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/package.json create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/passthrough.js create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/readable.js create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/transform.js create mode 100644 prebuilt/iot-gateway/node_modules/readable-stream/writable.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/resolve/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/resolve/example/async.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/example/sync.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/lib/async.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/lib/caller.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/lib/core.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/lib/core.json create mode 100644 prebuilt/iot-gateway/node_modules/resolve/lib/node-modules-paths.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/lib/sync.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/package.json create mode 100644 prebuilt/iot-gateway/node_modules/resolve/readme.markdown create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/core.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/dotdot.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/dotdot/abc/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/dotdot/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/faulty_basedir.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/filter.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/filter_sync.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/mock.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/mock_sync.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/module_dir.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/module_dir/xmodules/aaa/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/module_dir/ymodules/aaa/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/module_dir/zmodules/bbb/main.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/module_dir/zmodules/bbb/package.json create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/node_path.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/node_path/x/aaa/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/node_path/x/ccc/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/node_path/y/bbb/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/node_path/y/ccc/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/nonstring.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/pathfilter.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/pathfilter/deep_ref/main.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/alt.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/deeper/ref.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/package.json create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/pathfilter/deep_ref/node_modules/deep/ref.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/precedence.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/precedence/aaa.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/precedence/aaa/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/precedence/aaa/main.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/precedence/bbb.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/precedence/bbb/main.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/baz/doom.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/baz/package.json create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/baz/quux.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/cup.coffee create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/foo.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/incorrect_main/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/incorrect_main/package.json create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/mug.coffee create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/mug.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/other_path/lib/other-lib.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/other_path/root.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/punycode/node_modules/punycode/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/quux/foo/index.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/without_basedir/main.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/resolver_sync.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/subdirs.js create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/subdirs/node_modules/a/b/c/x.json create mode 100644 prebuilt/iot-gateway/node_modules/resolve/test/subdirs/node_modules/a/package.json create mode 100644 prebuilt/iot-gateway/node_modules/send/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/send/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/send/README.md create mode 100644 prebuilt/iot-gateway/node_modules/send/index.js create mode 100644 prebuilt/iot-gateway/node_modules/send/package.json create mode 100644 prebuilt/iot-gateway/node_modules/serve-static/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/serve-static/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/serve-static/README.md create mode 100644 prebuilt/iot-gateway/node_modules/serve-static/index.js create mode 100644 prebuilt/iot-gateway/node_modules/serve-static/package.json create mode 100644 prebuilt/iot-gateway/node_modules/shallow-copy/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/shallow-copy/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/shallow-copy/example/array.js create mode 100644 prebuilt/iot-gateway/node_modules/shallow-copy/example/object.js create mode 100644 prebuilt/iot-gateway/node_modules/shallow-copy/index.js create mode 100644 prebuilt/iot-gateway/node_modules/shallow-copy/package.json create mode 100644 prebuilt/iot-gateway/node_modules/shallow-copy/readme.markdown create mode 100644 prebuilt/iot-gateway/node_modules/shallow-copy/test/array.js create mode 100644 prebuilt/iot-gateway/node_modules/shallow-copy/test/object.js create mode 100644 prebuilt/iot-gateway/node_modules/signed-varint/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/signed-varint/README.md create mode 100644 prebuilt/iot-gateway/node_modules/signed-varint/index.js create mode 100644 prebuilt/iot-gateway/node_modules/signed-varint/node_modules/varint/README.md create mode 100644 prebuilt/iot-gateway/node_modules/signed-varint/node_modules/varint/bench.js create mode 100644 prebuilt/iot-gateway/node_modules/signed-varint/node_modules/varint/decode.js create mode 100644 prebuilt/iot-gateway/node_modules/signed-varint/node_modules/varint/encode.js create mode 100644 prebuilt/iot-gateway/node_modules/signed-varint/node_modules/varint/index.js create mode 100644 prebuilt/iot-gateway/node_modules/signed-varint/node_modules/varint/length.js create mode 100644 prebuilt/iot-gateway/node_modules/signed-varint/node_modules/varint/package.json create mode 100644 prebuilt/iot-gateway/node_modules/signed-varint/node_modules/varint/test.js create mode 100644 prebuilt/iot-gateway/node_modules/signed-varint/package.json create mode 100644 prebuilt/iot-gateway/node_modules/signed-varint/test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/README.md create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/docs/resource_plan.md create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/docs/templates.md create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/index.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/lib/object_instance.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/lib/smartobject.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/lib/utils.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/README.md create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/index.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/package.json create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/test/array.test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/test/collection.test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/test/function.test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/test/object.test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/test/string.test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/test/type.test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/busyman/test/utils.test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/README.md create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/defs/conflict.txt create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/defs/defs.json create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/index.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/README.md create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/dist/enum.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/dist/enumItem.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/dist/indexOf.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/dist/isType.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/enum-2.3.0.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/enum-2.3.0.min.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/index.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/licence create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/node_modules/enum/package.json create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/package.json create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/test/argumentType.test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/test/getter.test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/node_modules/lwm2m-id/test/setter.test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/package.json create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/test/objectInst.functional.test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/test/objectInst.signature.test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/test/smartObject.functional.test.js create mode 100644 prebuilt/iot-gateway/node_modules/smartobject/test/smartObject.signature.test.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/History.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/index.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/.zuul.yml create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/History.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/bench/bench.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/bench/index.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/binary.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/index.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/is-buffer.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/node_modules/debug/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/node_modules/debug/debug.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/node_modules/debug/index.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/node_modules/debug/lib/debug.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/node_modules/debug/package.json create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/node_modules/socket.io-parser/package.json create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-adapter/package.json create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/History.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/README.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/lib/index.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/lib/manager.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/lib/on.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/lib/socket.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/lib/url.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/node_modules/component-emitter/History.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/node_modules/component-emitter/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/node_modules/component-emitter/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/node_modules/component-emitter/index.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/node_modules/component-emitter/package.json create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/package.json create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-client/socket.io.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/.zuul.yml create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/History.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/bench/bench.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/bench/index.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/binary.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/index.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/is-buffer.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/node_modules/json3/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/node_modules/json3/README.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/node_modules/json3/lib/json3.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/node_modules/json3/lib/json3.min.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/node_modules/json3/package.json create mode 100644 prebuilt/iot-gateway/node_modules/socket.io-parser/package.json create mode 100644 prebuilt/iot-gateway/node_modules/socket.io/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/socket.io/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/socket.io/History.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/socket.io/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/socket.io/Readme.md create mode 100644 prebuilt/iot-gateway/node_modules/socket.io/lib/client.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io/lib/index.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io/lib/namespace.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io/lib/socket.js create mode 100644 prebuilt/iot-gateway/node_modules/socket.io/package.json create mode 100644 prebuilt/iot-gateway/node_modules/source-map/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/source-map/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/source-map/CHANGELOG.md create mode 100644 prebuilt/iot-gateway/node_modules/source-map/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/source-map/Makefile.dryice.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/README.md create mode 100644 prebuilt/iot-gateway/node_modules/source-map/build/assert-shim.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/build/mini-require.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/build/prefix-source-map.jsm create mode 100644 prebuilt/iot-gateway/node_modules/source-map/build/prefix-utils.jsm create mode 100644 prebuilt/iot-gateway/node_modules/source-map/build/suffix-browser.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/build/suffix-source-map.jsm create mode 100644 prebuilt/iot-gateway/node_modules/source-map/build/suffix-utils.jsm create mode 100644 prebuilt/iot-gateway/node_modules/source-map/build/test-prefix.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/build/test-suffix.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/lib/source-map.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/lib/source-map/array-set.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/lib/source-map/base64-vlq.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/lib/source-map/base64.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/lib/source-map/binary-search.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/lib/source-map/mapping-list.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/lib/source-map/source-map-consumer.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/lib/source-map/source-map-generator.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/lib/source-map/source-node.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/lib/source-map/util.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/package.json create mode 100644 prebuilt/iot-gateway/node_modules/source-map/test/run-tests.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/test/source-map/test-api.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/test/source-map/test-array-set.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/test/source-map/test-base64-vlq.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/test/source-map/test-base64.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/test/source-map/test-binary-search.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/test/source-map/test-dog-fooding.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/test/source-map/test-source-map-consumer.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/test/source-map/test-source-map-generator.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/test/source-map/test-source-node.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/test/source-map/test-util.js create mode 100644 prebuilt/iot-gateway/node_modules/source-map/test/source-map/util.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/example/eval.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/example/vars.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/index.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/.bin/escodegen create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/.bin/esgenerate create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/.bin/esparse create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/.bin/esvalidate create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/escodegen/.jshintrc create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/escodegen/Gruntfile.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/escodegen/LICENSE.BSD create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/escodegen/LICENSE.source-map create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/escodegen/README.md create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/escodegen/bin/escodegen.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/escodegen/bin/esgenerate.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/escodegen/escodegen.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/escodegen/package.json create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/esprima/README.md create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/esprima/bin/esparse.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/esprima/bin/esvalidate.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/esprima/esprima.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/esprima/package.json create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/esprima/test/compat.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/esprima/test/reflect.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/esprima/test/run.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/esprima/test/runner.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/esprima/test/test.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/estraverse/.jshintrc create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/estraverse/LICENSE.BSD create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/estraverse/README.md create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/estraverse/estraverse.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/node_modules/estraverse/package.json create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/package.json create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/readme.markdown create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/test/eval.js create mode 100644 prebuilt/iot-gateway/node_modules/static-eval/test/prop.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/static-module/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/static-module/example/brfs.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/example/brfs/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/example/brfs/x.txt create mode 100644 prebuilt/iot-gateway/node_modules/static-module/example/fs.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/example/fs/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/example/fs/x.txt create mode 100644 prebuilt/iot-gateway/node_modules/static-module/index.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/example/parse.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/index.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/package.json create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/readme.markdown create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/test/dash.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/test/default_bool.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/test/dotted.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/test/long.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/test/parse.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/test/parse_modified.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/test/short.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/minimist/test/whitespace.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/object-keys/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/object-keys/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/object-keys/README.md create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/object-keys/foreach.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/object-keys/index.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/object-keys/isArguments.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/object-keys/package.json create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/object-keys/shim.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/object-keys/test/foreach.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/object-keys/test/index.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/object-keys/test/isArguments.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/object-keys/test/shim.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/quote-stream/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/quote-stream/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/quote-stream/bin/cmd.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/quote-stream/bin/usage.txt create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/quote-stream/example/stream.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/quote-stream/index.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/quote-stream/package.json create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/quote-stream/readme.markdown create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/quote-stream/test/simple.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/quote-stream/test/whitespace.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/README.md create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/duplex.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/lib/_stream_duplex.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/lib/_stream_passthrough.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/lib/_stream_readable.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/lib/_stream_transform.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/lib/_stream_writable.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/package.json create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/passthrough.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/readable.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/transform.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/readable-stream/writable.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/through2/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/through2/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/through2/README.md create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/through2/package.json create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/through2/through2.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/xtend/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/xtend/LICENCE create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/xtend/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/xtend/README.md create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/xtend/has-keys.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/xtend/index.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/xtend/mutable.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/xtend/package.json create mode 100644 prebuilt/iot-gateway/node_modules/static-module/node_modules/xtend/test.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/package.json create mode 100644 prebuilt/iot-gateway/node_modules/static-module/readme.markdown create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/assign.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/assign/comma.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/assign/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/brfs.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/brfs/attribute.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/brfs/attribute_brackets.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/brfs/attribute_vars.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/brfs/brackets.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/brfs/multi_require.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/brfs/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/brfs/x.txt create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/brfs/x5.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fn.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fn/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fs.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fs/html.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fs/readfile.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fs/robot.html create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fs/x.txt create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fs_twice.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fs_twice/4x.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fs_twice/html.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fs_twice/readfile.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fs_twice/robot.html create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fs_twice/vars.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/fs_twice/x.txt create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/inline.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/inline/fn.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/inline/fn_call.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/inline/fn_expr.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/inline/obj.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/inline/obj_call.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/inline/obj_expr.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/log.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/log/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/many.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/many/a.txt create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/many/all_inline.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/many/b.txt create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/many/c.txt create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/many/inline.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/many/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/mixed.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/mixed/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/mixed/unmixed.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/mixed/xyz.txt create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/nested.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/nested/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/obj.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/obj/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/prop.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/prop/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/readfile_resolve.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/readfile_resolve/main.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/readfile_resolve/node_modules/aaa/wow.txt create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/shebang.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/shebang/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/varmod.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/varmod/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/varmod/vars.html create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/vars.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/vars/five.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/vars/multi-require.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/vars/one.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/vars/source.js create mode 100644 prebuilt/iot-gateway/node_modules/static-module/test/vars/vars.html create mode 100644 prebuilt/iot-gateway/node_modules/statuses/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/statuses/README.md create mode 100644 prebuilt/iot-gateway/node_modules/statuses/codes.json create mode 100644 prebuilt/iot-gateway/node_modules/statuses/index.js create mode 100644 prebuilt/iot-gateway/node_modules/statuses/package.json create mode 100644 prebuilt/iot-gateway/node_modules/string_decoder/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/string_decoder/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/string_decoder/README.md create mode 100644 prebuilt/iot-gateway/node_modules/string_decoder/index.js create mode 100644 prebuilt/iot-gateway/node_modules/string_decoder/package.json create mode 100644 prebuilt/iot-gateway/node_modules/through2/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/through2/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/through2/README.md create mode 100644 prebuilt/iot-gateway/node_modules/through2/package.json create mode 100644 prebuilt/iot-gateway/node_modules/through2/through2.js create mode 100644 prebuilt/iot-gateway/node_modules/to-array/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/to-array/LICENCE create mode 100644 prebuilt/iot-gateway/node_modules/to-array/README.md create mode 100644 prebuilt/iot-gateway/node_modules/to-array/index.js create mode 100644 prebuilt/iot-gateway/node_modules/to-array/package.json create mode 100644 prebuilt/iot-gateway/node_modules/type-is/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/type-is/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/type-is/README.md create mode 100644 prebuilt/iot-gateway/node_modules/type-is/index.js create mode 100644 prebuilt/iot-gateway/node_modules/type-is/package.json create mode 100644 prebuilt/iot-gateway/node_modules/typedarray/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/typedarray/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/typedarray/example/tarray.js create mode 100644 prebuilt/iot-gateway/node_modules/typedarray/index.js create mode 100644 prebuilt/iot-gateway/node_modules/typedarray/package.json create mode 100644 prebuilt/iot-gateway/node_modules/typedarray/readme.markdown create mode 100644 prebuilt/iot-gateway/node_modules/typedarray/test/server/undef_globals.js create mode 100644 prebuilt/iot-gateway/node_modules/typedarray/test/tarray.js create mode 100644 prebuilt/iot-gateway/node_modules/ultron/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/ultron/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/ultron/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/ultron/README.md create mode 100644 prebuilt/iot-gateway/node_modules/ultron/index.js create mode 100644 prebuilt/iot-gateway/node_modules/ultron/package.json create mode 100644 prebuilt/iot-gateway/node_modules/ultron/test.js create mode 100644 prebuilt/iot-gateway/node_modules/unpipe/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/unpipe/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/unpipe/README.md create mode 100644 prebuilt/iot-gateway/node_modules/unpipe/index.js create mode 100644 prebuilt/iot-gateway/node_modules/unpipe/package.json create mode 100644 prebuilt/iot-gateway/node_modules/utf8/.gitattributes create mode 100644 prebuilt/iot-gateway/node_modules/utf8/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/utf8/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/utf8/Gruntfile.js create mode 100644 prebuilt/iot-gateway/node_modules/utf8/LICENSE-MIT.txt create mode 100644 prebuilt/iot-gateway/node_modules/utf8/README.md create mode 100644 prebuilt/iot-gateway/node_modules/utf8/bower.json create mode 100644 prebuilt/iot-gateway/node_modules/utf8/component.json create mode 100644 prebuilt/iot-gateway/node_modules/utf8/package.json create mode 100644 prebuilt/iot-gateway/node_modules/utf8/tests/generate-test-data.py create mode 100644 prebuilt/iot-gateway/node_modules/utf8/tests/index.html create mode 100644 prebuilt/iot-gateway/node_modules/utf8/tests/tests.js create mode 100644 prebuilt/iot-gateway/node_modules/utf8/utf8.js create mode 100644 prebuilt/iot-gateway/node_modules/util-deprecate/History.md create mode 100644 prebuilt/iot-gateway/node_modules/util-deprecate/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/util-deprecate/README.md create mode 100644 prebuilt/iot-gateway/node_modules/util-deprecate/browser.js create mode 100644 prebuilt/iot-gateway/node_modules/util-deprecate/node.js create mode 100644 prebuilt/iot-gateway/node_modules/util-deprecate/package.json create mode 100644 prebuilt/iot-gateway/node_modules/util/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/util/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/util/.zuul.yml create mode 100644 prebuilt/iot-gateway/node_modules/util/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/util/README.md create mode 100644 prebuilt/iot-gateway/node_modules/util/package.json create mode 100644 prebuilt/iot-gateway/node_modules/util/support/isBuffer.js create mode 100644 prebuilt/iot-gateway/node_modules/util/support/isBufferBrowser.js create mode 100644 prebuilt/iot-gateway/node_modules/util/test/browser/inspect.js create mode 100644 prebuilt/iot-gateway/node_modules/util/test/browser/is.js create mode 100644 prebuilt/iot-gateway/node_modules/util/test/node/debug.js create mode 100644 prebuilt/iot-gateway/node_modules/util/test/node/format.js create mode 100644 prebuilt/iot-gateway/node_modules/util/test/node/inspect.js create mode 100644 prebuilt/iot-gateway/node_modules/util/test/node/log.js create mode 100644 prebuilt/iot-gateway/node_modules/util/test/node/util.js create mode 100644 prebuilt/iot-gateway/node_modules/util/util.js create mode 100644 prebuilt/iot-gateway/node_modules/utils-merge/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/utils-merge/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/utils-merge/README.md create mode 100644 prebuilt/iot-gateway/node_modules/utils-merge/index.js create mode 100644 prebuilt/iot-gateway/node_modules/utils-merge/package.json create mode 100644 prebuilt/iot-gateway/node_modules/varint/README.md create mode 100644 prebuilt/iot-gateway/node_modules/varint/bench.js create mode 100644 prebuilt/iot-gateway/node_modules/varint/decode.js create mode 100644 prebuilt/iot-gateway/node_modules/varint/encode.js create mode 100644 prebuilt/iot-gateway/node_modules/varint/index.js create mode 100644 prebuilt/iot-gateway/node_modules/varint/length.js create mode 100644 prebuilt/iot-gateway/node_modules/varint/package.json create mode 100644 prebuilt/iot-gateway/node_modules/varint/test.js create mode 100644 prebuilt/iot-gateway/node_modules/vary/HISTORY.md create mode 100644 prebuilt/iot-gateway/node_modules/vary/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/vary/README.md create mode 100644 prebuilt/iot-gateway/node_modules/vary/index.js create mode 100644 prebuilt/iot-gateway/node_modules/vary/package.json create mode 100644 prebuilt/iot-gateway/node_modules/ws/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/ws/.travis.yml create mode 100644 prebuilt/iot-gateway/node_modules/ws/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/ws/README.md create mode 100644 prebuilt/iot-gateway/node_modules/ws/index.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/BufferPool.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/BufferUtil.fallback.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/BufferUtil.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/ErrorCodes.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/Extensions.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/PerMessageDeflate.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/Receiver.hixie.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/Receiver.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/Sender.hixie.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/Sender.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/Validation.fallback.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/Validation.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/WebSocket.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/lib/WebSocketServer.js create mode 100644 prebuilt/iot-gateway/node_modules/ws/package.json create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/README.md create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/autotest.watchr create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/example/demo.js create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/lib/XMLHttpRequest.js create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/package.json create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-constants.js create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-events.js create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-exceptions.js create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-headers.js create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-redirect-302.js create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-redirect-303.js create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-redirect-307.js create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-request-methods.js create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/tests/test-request-protocols.js create mode 100644 prebuilt/iot-gateway/node_modules/xmlhttprequest-ssl/tests/testdata.txt create mode 100644 prebuilt/iot-gateway/node_modules/xtend/.jshintrc create mode 100644 prebuilt/iot-gateway/node_modules/xtend/.npmignore create mode 100644 prebuilt/iot-gateway/node_modules/xtend/LICENCE create mode 100644 prebuilt/iot-gateway/node_modules/xtend/Makefile create mode 100644 prebuilt/iot-gateway/node_modules/xtend/README.md create mode 100644 prebuilt/iot-gateway/node_modules/xtend/immutable.js create mode 100644 prebuilt/iot-gateway/node_modules/xtend/mutable.js create mode 100644 prebuilt/iot-gateway/node_modules/xtend/package.json create mode 100644 prebuilt/iot-gateway/node_modules/xtend/test.js create mode 100644 prebuilt/iot-gateway/node_modules/yeast/LICENSE create mode 100644 prebuilt/iot-gateway/node_modules/yeast/README.md create mode 100644 prebuilt/iot-gateway/node_modules/yeast/index.js create mode 100644 prebuilt/iot-gateway/node_modules/yeast/package.json create mode 100644 prebuilt/iot-gateway/package.json create mode 100644 prebuilt/iot-gateway/run_gateway.sh create mode 100755 prebuilt/run_demo.sh create mode 100644 scripts/app.mak create mode 100644 scripts/front_matter.mak create mode 100644 scripts/library.mak diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a863e2b --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.log +*.swp +*~ +*.swo diff --git a/Sub-1GHzSensortoCloudIndustrialIoTGateway_manifest.html b/Sub-1GHzSensortoCloudIndustrialIoTGateway_manifest.html new file mode 100644 index 0000000..c3996e8 --- /dev/null +++ b/Sub-1GHzSensortoCloudIndustrialIoTGateway_manifest.html @@ -0,0 +1,5316 @@ + + + + + + + + + + + + + +Texas Instruments Manifest + + + +
+ + + + + + + +
+ + + + + + + +
+
+

+ +Sub-1 GHz Sensor to Cloud Industrial IoT Gateway Reference Design Demo Manifest + +

+ +

+ +10-13-2016 + +

+ + +

+ +Manifest ID - SRAS00003343 + +

+
+

Legend

+

(explanation of the fields in the Manifest Table below)

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Software Name + +The name of the application or file +
+Version + +Version of the application or file +
+License Type + +Type of license(s) under which TI will be providing +software to the licensee (e.g. BSD-3-Clause, GPL-2.0, TI TSPA License, TI +Commercial License). The license could be under Commercial terms or Open Source. See Open Source Reference License Disclaimer in +the Disclaimers Section. Whenever possible, TI will use an SPDX Short Identifier for an Open Source +License. TI Commercial license terms are not usually included in the manifest and are conveyed through a variety +of means such as a clickwrap license upon install, +a signed license agreement and so forth. +
+Location + +The directory name and path on the media or a specific file where the Software is located. Typically fully qualified path names +are not used and instead the relevant top level directory of the application is given. +A notation often used in the manifests is [as installed]/directory/*. Note that the asterisk implies that all +files under that directory are licensed as the License Type field denotes. Any exceptions to this will +generally be denoted as [as installed]/directory/* except as noted below which means as shown in subsequent rows of +the manifest. +
+Delivered As + +This field will either be “Source”, “Binary” or “Source +and Binary” and is the primary form the content of the Software is delivered +in. If the Software is delivered in an archive format, this field +applies to the contents of the archive. If the word Limited is used +with Source, as in “Limited Source” or “Limited Source and Binary” then +only portions of the Source for the application are provided. +
+Modified by TI + +This field will either be “Yes” or “No”. A “Yes” means +TI has made changes to the Software. A “No” means TI has not made any +changes. Note: This field is not applicable for Software “Obtained +from” TI. +
+Obtained from + +This field specifies from where or from whom TI obtained +the Software. It may be a URL to an Open Source site, a 3rd +party licensor, or TI. See Links Disclaimer in the Disclaimers +Section. +
+
+

Disclaimers

+

Export Control Classification Number (ECCN)

+

Any use of ECCNs listed in the Manifest is at the user’s risk +and without recourse to TI. Your +company, as the exporter of record, is responsible for determining the +correct classification of any item at +the time of export. Any export classification by TI of Software is for +TI’s internal use only and shall not be construed as a representation +or warranty +regarding the proper export classification for such Software or whether +an export +license or other documentation is required for exporting such Software

+

Links in the Manifest

+

Any +links appearing on this Manifest +(for example in the “Obtained from” field) were verified at the time +the Manifest was created. TI makes no guarantee that any listed links +will +remain active in the future.

+

Open Source License References

+

Your company is responsible for confirming the +applicable license terms for any open source Software +listed in this Manifest that was not “Obtained from” TI. Any open +source license +specified in this Manifest for Software that was +not “Obtained from” TI is for TI’s internal use only and shall not be +construed as a representation or warranty regarding the proper open +source license terms +for such Software.

+
+

Export Information

+

ECCN for Software included in this release:

+Publicly Available - Open Source or TI TSPA License +
+ + + + + +

+ Sub-1 GHz Sensor to Cloud Industrial IoT Gateway Reference Design Demo Manifest Table +

+ + +

+ + See the Legend above for a description of these columns. + +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Software NameVersionLicense TypeDelivered AsModified by TI
+ Sub-1 GHz Sensor to Cloud Industrial IoT Gateway Demo Source + + 1.0.0 + + BSD-3 Clause + + Source + + N/A + Location + [as installed] +
Obtained from + Texas Instruments +
+ Sub-1 GHz Sensor to Cloud Industrial IoT Gateway Firmware Binaries + + 1.0.0 + + Texas Instruments Text File License + + Binaries + + N/A + Location + [as installed\firmware] +
Obtained from + Texas Instruments +
+ accepts + + 1.2.5 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/accepts +
+ acorn + + 1.2.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/marijnh/acorn +
+ after + + 0.8.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/Raynos/after +
+ amdefine + + 1.0.0 + + BSD-3-Clause AND MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jrburke/amdefine +
+ arraybuffer.slice + + 0.0.6 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + github.com/rase-/arraybuffer.slice +
+ aws-iot-device-sdk + + 1.0.12 + + Apache-2.0 + + Source + + Yes + Location + [ as installed\example\iot-gateway\node_modules] +
Obtained from + http://github.com/aws/aws-iot-device-sdk-js +
+ backo2 + + 1.0.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/mokesmokes/backo +
+ base64-arraybuffer + + 0.1.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/niklasvh/base64-arraybuffer +
+ base64id + + 0.1.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/faeldt/base64id +
+ benchmark + + 1.0.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/bestiejs/benchmark.js +
+ better-assert + + 1.0.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/visionmedia/better-assert +
+ bl + + 0.9.5 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\mqtt\node_modules\mqtt-packet\node_modules] +
Obtained from + https://github.com/rvagg/bl +
+ blob + + 0.0.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + github.com/rase-/blob +
+ brfs + + 1.4.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/substack/brfs +
+ buffer-equal + + 0.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/substack/node-buffer-equal +
+ busyman + + 0.1.2 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\smartobject\node_modules] +
Obtained from + https://github.com/simenkid/busyman +
+ bytebuffer + + 5.0.0 + + Apache-2.0 + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/dcodeIO/bytebuffer.js +
+ callsite + + 1.0.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://www.npmjs.com/package/callsite +
+ commist + + 1.0.0 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\mqtt\node_modules] +
Obtained from + https://github.com/mcollina/commist +
+ commander + + 0.6.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/visionmedia/commander.js +
+ component-bind + + 1.0.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/component/bind +
+ component-emitter + + 1.1.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/component/emitter +
+ component-inherit + + 0.0.3 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/component/inherit +
+ concat-stream + + 1.4.10 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + github.com/maxogden/concat-stream +
+ content-disposition + + 0.5.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/content-disposition +
+ content-type + + 1.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/content-type +
+ cookie + + 0.1.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/shtylman/node-cookie +
+ cookie-signature + + 1.0.6 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/visionmedia/node-cookie-signature +
+ core-util-is + + 1.0.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/isaacs/core-util-is +
+ crc + + 3.2.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/alexgorbatchev/node-crc +
+ crypto-js + + 3.1.6 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules] +
Obtained from + github.com/brix/crypto-js +
+ debug + + 1.0.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/visionmedia/debug +
+ debug + + 2.1.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/visionmedia/debug +
+ debug + + 2.1.3 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/visionmedia/debug +
+ debug + + 2.2.0 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules] +
Obtained from + http://github.com/visionmedia/debug +
+ debug + + 0.7.4 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/visionmedia/debug +
+ debug + + 1.0.3 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/visionmedia/debug +
+ debug + + 1.0.4 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/visionmedia/debug +
+ depd + + 1.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/dougwilson/nodejs-depd +
+ destroy + + 1.0.3 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/stream-utils/destroy +
+ duplexer2 + + 0.0.2 + + BSD-3 Clause + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/deoxxa/duplexer2 +
+ duplexify + + 3.4.5 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\websocket-stream\node_modules] +
Obtained from + http://github.com/mafintosh/duplexify +
+ ee-first + + 1.1.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jonathanong/ee-first +
+ end-of-stream + + 1.0.0 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\mqtt\node_modules] +
Obtained from + http://github.com/mafintosh/end-of-stream +
+ end-of-stream + + 1.1.0 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\mqtt\node_modules] +
Obtained from + http://github.com/mafintosh/end-of-stream +
+ engine.io + + 1.5.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + github.com/Automattic/engine.io +
+ engine.io-client + + 1.5.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/Automattic/engine.io-client +
+ engine.io-parser + + 1.2.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + github.com/LearnBoost/engine.io-parser +
+ enum + + 2.3.0 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\smartobject\node_modules\lwm2m-id\node_modules] +
Obtained from + github.com/adrai/enum +
+ escape-html + + 1.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/component/escape-html +
+ escodegen + + 0.0.28 + + BSD-2 Clause + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + github.com/Constellation/escodegen +
+ escodegen + + 1.3.3 + + BSD-2 Clause + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + github.com/Constellation/escodegen +
+ esprima + + 1.0.4 + + BSD-2 Clause + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + github.com/ariya/esprima +
+ esprima + + 1.1.1 + + BSD-2 Clause + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + github.com/ariya/esprima +
+ estraverse + + 1.3.2 + + BSD-2 Clause + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + github.com/Constellation/estraverse +
+ estraverse + + 1.5.1 + + BSD-2 Clause + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + github.com/Constellation/estraverse +
+ esutils + + 1.0.0 + + BSD-2 Clause + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + github.com/Constellation/esutils +
+ etag + + 1.5.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/etag +
+ express + + 4.12.3 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/strongloop/express +
+ falafel + + 1.2.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/substack/node-falafel +
+ finalhandler + + 0.3.4 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/pillarjs/finalhandler +
+ foreach + + 2.0.5 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/manuelstofer/foreach +
+ forwarded + + 0.1.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/forwarded +
+ fresh + + 0.2.4 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/fresh +
+ fs + + 0.0.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://registry.npmjs.org/fs/-/fs-0.0.2.tgz +
+ function-bind + + 1.0.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/Raynos/function-bind +
+ generate-function + + 2.0.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/mafintosh/generate-function +
+ generate-object-property + + 1.2.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules][as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/mafintosh/generate-object-property +
+ global + + 2.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/component/global +
+ has + + 1.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/tarruda/has +
+ has-binary + + 0.1.6 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz +
+ has-binary + + 0.1.5 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz +
+ has-binary-data + + 0.1.3 + + ISC;MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://registry.npmjs.org/has-binary/-/has-binary-0.1.7.tgz +
+ has-cors + + 1.0.3 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/component/has-cors +
+ help-me + + 0.1.0 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\mqtt\node_modules] +
Obtained from + https://github.com/mcollina/help-me +
+ indexof + + 0.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/component/indexof +
+ inherits + + 2.0.1 + + ISC + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/isaacs/inherits +
+ ipaddr.js + + 0.1.9 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/whitequark/ipaddr.js +
+ is-property + + 1.0.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/mikolalysenko/is-property +
+ isarray + + 0.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/juliangruber/isarray +
+ json3 + + 3.2.6 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/bestiejs/json3 +
+ leven + + 1.0.2 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\mqtt\node_modules\commist\node_modules] +
Obtained from + https://github.com/sindresorhus/leven +
+ long + + 3.0.1 + + Apache-2.0 + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/dcodeIO/long.js +
+ lwm2m-id + + 1.3.0 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\smartobject\node_modules] +
Obtained from + https://github.com/simenkid/lwm2m-id +
+ media-typer + + 0.3.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/media-typer +
+ merge-descriptors + + 1.0.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/component/merge-descriptors +
+ methods + + 1.1.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/methods +
+ mime + + 1.3.4 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/broofa/node-mime +
+ mime-db + + 1.8.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/mime-db +
+ mime-types + + 2.0.10 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/mime-types +
+ minimist + + 0.0.8 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/substack/minimist +
+ minimist + + 1.2.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/substack/minimist +
+ mqtt + + 1.8.0 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules] +
Obtained from + http://github.com/mqttjs/MQTT.js +
+ mqtt-connection + + 2.1.1 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\mqtt\node_modules] +
Obtained from + https://github.com/mqttjs/mqtt-connection +
+ mqtt-packet + + 3.4.7 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\mqtt\node_modules] +
Obtained from + https://github.com/mqttjs/mqtt-packet +
+ ms + + 0.6.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/guille/ms.js +
+ ms + + 0.7.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/guille/ms.js +
+ nan + + 1.4.3 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/rvagg/nan +
+ nan + + 0.3.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/rvagg/nan +
+ negotiator + + 0.5.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/negotiator +
+ object-component + + 0.0.3 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://www.npmjs.com/package/object-component +
+ object-inspect + + 0.4.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/substack/object-inspect +
+ object-keys + + 1.0.9 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/ljharb/object-keys +
+ object-keys + + 0.4.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/ljharb/object-keys +
+ object-keys + + 1.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/ljharb/object-keys +
+ on-finished + + 2.2.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/on-finished +
+ once + + 1.3.3 + + ISC + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\websocket-stream\node_modules\duplexify\node_modules\end-of-stream\node_modules] +
Obtained from + http://github.com/isaacs/once +
+ options + + 0.0.6 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/einaros/options.js +
+ parsejson + + 0.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://www.npmjs.com/package/parse-json +
+ parseqs + + 0.0.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://registry.npmjs.org/parseqs/-/parseqs-0.0.2.tgz +
+ parseuri + + 0.0.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/get/parseuri +
+ parseuri + + 0.0.4 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/get/parseuri +
+ parseurl + + 1.3.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/get/parseuri +
+ path-to-regexp + + 0.1.3 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/component/path-to-regexp +
+ process-nextick-args + + 1.0.6 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/calvinmetcalf/process-nextick-args +
+ protocol-buffers + + 3.1.4 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/mafintosh/protocol-buffers +
+ protocol-buffers-schema + + 2.2.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/mafintosh/protocol-buffers-schema +
+ proxy-addr + + 1.0.7 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/proxy-addr +
+ pump + + 1.0.1 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\mqtt\node_modules\help-me\node_modules] +
Obtained from + http://github.com/mafintosh/pump +
+ qs + + 2.4.1 + + BSD-3 Clause + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/hapijs/qs +
+ quote-stream + + 1.0.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/substack/quote-stream +
+ quote-stream + + 0.0.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/substack/quote-stream +
+ range-parser + + 1.0.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/range-parser +
+ readable-stream + + 1.0.33 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/isaacs/readable-stream +
+ readable-stream + + 1.0.34 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\mqtt\node_modules] +
Obtained from + http://github.com/isaacs/readable-stream +
+ readable-stream + + 1.1.13 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/isaacs/readable-stream +
+ readable-stream + + 2.0.5 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/nodejs/readable-stream +
+ reduplexer + + 1.1.0 + + ISC + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\mqtt\node_modules\mqtt-connection\node_modules] +
Obtained from + https://github.com/mcollina/reduplexer +
+ reinterval + + 1.1.0 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\mqtt\node_modules] +
Obtained from + https://github.com/4rzael/reInterval +
+ resolve + + 1.1.6 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/substack/node-resolve +
+ send + + 0.12.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/pillarjs/send +
+ serve-static + + 1.9.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/expressjs/serve-static +
+ shallow-copy + + 0.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/substack/shallow-copy +
+ signed-varint + + 2.0.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/dominictarr/signed-varint +
+ smartobject + + 0.1.2 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules] +
Obtained from + https://github.com/PeterEB/smartobject +
+ socket.io + + 1.3.5 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/Automattic/socket.io +
+ socket.io-adapter + + 0.3.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/Automattic/socket.io-adapter +
+ socket.io-client + + 1.3.5 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/Automattic/socket.io-client +
+ socket.io-parser + + 2.2.4 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/Automattic/socket.io-parser +
+ socket.io-parser + + 2.2.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/Automattic/socket.io-parser +
+ source-map + + 0.1.43 + + BSD-3 Clause + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + github.com/mozilla/source-map +
+ static-eval + + 0.2.4 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/substack/static-eval +
+ static-module + + 1.1.3 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/substack/static-module +
+ statuses + + 1.2.1 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules] +
Obtained from + https://github.com/jshttp/statuses +
+ stream-shift + + 1.0.0 + + MIT + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\websocket-stream\node_modules\duplexify\node_modules] +
Obtained from + https://github.com/mafintosh/stream-shift +
+ string_decoder + + 0.10.31 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/rvagg/string_decoder +
+ through2 + + 2.0.0 + + Through2 + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/rvagg/through2 +
+ through2 + + 0.6.5 + + Through2 + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\mqtt\node_modules\mqtt-connection\node_modules] +
Obtained from + https://github.com/rvagg/through2 +
+ through2 + + 0.4.2 + + Through2 + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/rvagg/through2 +
+ tinycolor + + 0.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/einaros/tinycolor +
+ to-array + + 0.1.3 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/Raynos/to-array +
+ type-is + + 1.6.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/type-is +
+ typedarray + + 0.0.6 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/substack/typedarray +
+ ultron + + 1.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/unshiftio/ultron +
+ utf8 + + 2.0.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/mathiasbynens/utf8.js +
+ util-deprecate + + 1.0.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/TooTallNate/util-deprecate +
+ utils-merge + + 1.0.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/jaredhanson/utils-merge +
+ varint + + 3.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/chrisdickinson/varint +
+ varint + + 4.0.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/chrisdickinson/varint +
+ vary + + 1.0.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://github.com/jshttp/vary +
+ websocket-stream + + 3.2.1 + + BSD-2 Clause + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules] +
Obtained from + github.com/maxogden/websocket-stream +
+ wrappy + + 1.0.2 + + ISC + + Source + + No + Location + [as installed\example\iot-gateway\node_modules\aws-iot-device-sdk\node_modules\websocket-stream\node_modules\duplexify\node_modules\end-of-stream\node_modules\once\node_modules] +
Obtained from + https://github.com/npm/wrappy +
+ ws + + 0.5.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/einaros/ws +
+ ws + + 0.4.31 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/einaros/ws +
+ xmlhttprequest + + 1.5.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/driverdan/node-XMLHttpRequest +
+ xtend + + 2.1.2 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/Raynos/xtend +
+ xtend + + 4.0.1 + + MIT + + Source + + No + Location + [as installed\example\gateway\node_modules] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://github.com/Raynos/xtend +
+ Jquery + + 1.12.0 + + MIT + + Source + + No + Location + [as installed\example\gateway\public\] [as installed\prebuilt\gateway\node_modules] +
Obtained from + https://jquery.com/download/ +
+ Bootstrap + + 3.3.6 + + MIT + + Source + + No + Location + [as installed\example\gateway\public\] [as installed\prebuilt\gateway\node_modules] +
Obtained from + http://getbootstrap.com/ +
+ Protobuf-c + + Version as on 3/30/2016 on git + + BSD 3-Clause + + Source + + No + Location + [as installed] +
Obtained from + https://github.com/google/protobuf.git +
+ TI Example Application icons + + 3.9.2 + + Creative Commons Attribution 3.0 + + Binary + + No + Location + [as installed\example\gateway\public\images] +
Obtained from + http://www.fatcow.com/ +
+ +

+

+

+ +

+

Credits

+



+
+

Licenses

+

Sub-1 GHz Sensor to Cloud Industrial IoT Gateway Reference Design Demo Licenses




TEXAS INSTRUMENTS TEXT FILE LICENSE
===================================
Copyright (c) 2016 Texas Instruments Incorporated

All rights reserved not granted herein.

Limited License.

Texas Instruments Incorporated grants a world-wide, royalty-free, non-exclusive license under copyrights and patents it now or hereafter owns or controls to make, have made, use, import, offer to sell and sell ("Utilize") this software subject to the terms herein. With respect to the foregoing patent license, such license is granted solely to the extent that any such patent is necessary to Utilize the software alone. The patent license shall not apply to any combinations which include this software, other than combinations with devices manufactured by or for TI (“TI Devices”). No hardware patent is licensed hereunder.

Redistributions must preserve existing copyright notices and reproduce this license (including the above copyright notice and the disclaimer and (if applicable) source code license limitations below) in the documentation and/or other materials provided with the distribution

Redistribution and use in binary form, without modification, are permitted provided that the following conditions are met:

* No reverse engineering, decompilation, or disassembly of this software is permitted with respect to any software provided in binary form.

* any redistribution and use are licensed by TI for use only with TI Devices.

* Nothing shall obligate TI to provide you with source code for the software licensed and provided to you in object code.

If software source code is provided to you, modification and redistribution of the source code are permitted provided that the following conditions are met:

* any redistribution and use of the source code, including any resulting derivative works, are licensed by TI for use only with TI Devices.

* any redistribution and use of any object code compiled from the source code and any resulting derivative works, are licensed by TI for use only with TI Devices.

Neither the name of Texas Instruments Incorporated nor the names of its suppliers may be used to endorse or promote products derived from this software without specific prior written permission.

DISCLAIMER.

THIS SOFTWARE IS PROVIDED BY TI AND TI’S LICENSORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL TI AND TI’S LICENSORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


ISC License
============================
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Apache License
============================
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.

"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:

(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.

You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS


TI-15.4-STACK Linux SDK
==================================
Copyright (c) 2015, Texas Instruments Incorporated
All rights reserved.

IMPORTANT: Your use of this Software is limited to those specific rights
granted under the terms of a software license agreement between the user
who downloaded the software, his/her employer (which must be your employer)
and Texas Instruments Incorporated (the "License"). You may not use this
Software unless you agree to abide by the terms of the License. The License
limits your use, and you acknowledge, that the Software may not be modified,
copied or distributed unless embedded on a Texas Instruments microcontroller
or used solely and exclusively in conjunction with a Texas Instruments radio
frequency transceiver, which is integrated into your product. Other than for
the foregoing purpose, you may not use, reproduce, copy, prepare derivative
works of, modify, distribute, perform, display or sell this Software and/or
its documentation for any purpose.

YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
(INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.

Should you have any questions regarding your right to use this Software,
contact Texas Instruments Incorporated at www.TI.com.


TI-15.4-STACK Linux Example Application
============================================
Copyright (c) 2015-2016, Texas Instruments Incorporated
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

* Neither the name of Texas Instruments Incorporated nor the names of
its contributors may be used to endorse or promote products derived
from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.






MIT Reference License text
---------------------------
(To avoid mass duplication of this license text in this manifest it is included here once,
and referenced.)


Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.


Accepts
-------
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>

See MIT Reference License text in this manifest.


Acorn
------
Copyright (C) 2012-2016 by various contributors (see AUTHORS)

See MIT Reference License text in this manifest.

List of Acorn contributors. Updated before every release.

Adrian Rakovsky
Alistair Braidwood
Andres Suarez
Angelo
Aparajita Fishman
Arian Stolwijk
Artem Govorov
Brandon Mills
Charles Hughes
Conrad Irwin
David Bonnet
Domenico Matteo
ForbesLindesay
Forbes Lindesay
Gilad Peleg
impinball
Ingvar Stepanyan
Jackson Ray Hamilton
Jesse McCarthy
Jiaxing Wang
Joel Kemp
Johannes Herr
Jordan Klassen
Jürg Lehni
keeyipchan
Keheliya Gallaba
Kevin Kwok
krator
Marijn Haverbeke
Martin Carlberg
Mathias Bynens
Mathieu 'p01' Henri
Matthew Bastien
Max Schaefer
Max Zerzouri
Mihai Bazon
Mike Rennie
Nicholas C. Zakas
Nick Fitzgerald
Olivier Thomann
Oskar Schöldström
Paul Harper
Peter Rust
PlNG
Prayag Verma
ReadmeCritic
r-e-d
Richard Gibson
Rich Harris
Sebastian McKenzie
Timothy Gu
Toru Nagashima
zsjforcn



After
-----
Copyright (c) 2011 Raynos.

See MIT Reference License text in this manifest.


Amdefine
--------
Note: Dual licensed, but MIT picked.

Copyright (c) 2011-2015, The Dojo Foundation

See MIT Reference License text in this manifest.


Array Buffer.slice
------------------
Copyright (C) 2013 Rase-

See MIT Reference License text in this manifest.
AWS IoT Device SDK
------------------
Copyright 2012-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.

See Apache Version 2.0 Reference License text in this manifest.

Backo2
------
Copyright (c) 2014 Mark Mokryn <mokesmokes@gmail.com>
Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>

See MIT Reference License text in this manifest.

Base64-array-buffer
-------------------
Copyright (c) 2012 Niklas von Hertzen

See MIT Reference License text in this manifest.

Base64id
--------
Copyright (c) 2012 Kristian Faeldt <faeldt_kristian@cyberagent.co.jp>

See MIT Reference License text in this manifest.


Benchmark
---------
Copyright 2010-2016 Mathias Bynens <https://mathiasbynens.be/>
Based on JSLitmus.js, copyright Robert Kieffer <http://broofa.com/>
Modified by John-David Dalton <http://allyoucanleet.com/>

See MIT Reference License text in this manifest.


Better-assert
-------------
Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>

See MIT Reference License text in this manifest.

bl (BufferList)
---------------
Copyright (c) 2014 bl contributors

See MIT Reference License text in this manifest.

Contributors:
Rod Vagg
Matteo Collina
Jarett Cruger

Blob
-----
Copyright (C) 2014 Rase-

See MIT Reference License text in this manifest.

Callsite
Buffer-equal
Brfs
Falafel
Fs
Global
Has-binary
Has-binary-data
Has-cors
Minimist
Object-Component
Object-inspect
parse-json
parseqs
Quote-stream
Node-resolve
Shallow-copy
Static-eval
Static-module
Varint
-----------------
These modules had no specific copyright statements that could be found, just a statement of licensing.

See MIT Reference License text in this manifest.

busyman
-------
Copyright (c) 2016 simen

See MIT Reference License text in this manifest.

Commander
---------
Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>

See MIT Reference License text in this manifest.

commist
-------
Copyright (c) 2014 Matteo Collina

See MIT Reference License text in this manifest.

Component-bind
--------------
Copyright (c) 2012 TJ Holowaychuk

See MIT Reference License text in this manifest.

Component-emitter
-----------------
Copyright (c) 2014 Component contributors <dev@component.io>

See MIT Reference License text in this manifest.

Component-inherit
-----------------
Copyright (c) 2013 TJ Holowaychuk

See MIT Reference License text in this manifest.

Concat-Stream
-------------
Copyright (c) 2013 Max Ogden

See MIT Reference License text in this manifest.

Content-disposition
-------------------

See MIT Reference License text in this manifest.

Content-type
------------
Copyright (c) 2015 Douglas Christopher Wilson

See MIT Reference License text in this manifest.

Cookie
--------
Copyright (c) 2012-2014 Roman Shtylman <shtylman@gmail.com>
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>

See MIT Reference License text in this manifest.

Cookie-signature
----------------
Copyright (c) 2012 LearnBoost <tj@learnboost.com>

See MIT Reference License text in this manifest.

Core-util-js
------------
Copyright Node.js contributors. All rights reserved.

See MIT Reference License text in this manifest.

crc
----
Copyright 2014 Alex Gorbatchev

See MIT Reference License text in this manifest.

Debug
------
Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>

See MIT Reference License text in this manifest.

Depd
-----
Copyright (c) 2014-2015 Douglas Christopher Wilson

See MIT Reference License text in this manifest.

Destroy
-------
Copyright (c) 2014 Jonathan Ong me@jongleberry.com

See MIT Reference License text in this manifest.

Duplexer2
---------
Copyright (c) 2013, Deoxxa Development
======================================
All rights reserved.
--------------------

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of Deoxxa Development nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY DEOXXA DEVELOPMENT ''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL DEOXXA DEVELOPMENT BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

duplexify
---------
Copyright (c) 2014 Mathias Buus

See MIT Reference License text in this manifest.

ee-first
---------
Copyright (c) 2014 Jonathan Ong me@jongleberry.com

See MIT Reference License text in this manifest.

end-of-stream
-------------
Copyright (c) 2014 Mathias Buus

See MIT Reference License text in this manifest.

Engine-io
----------
Copyright (c) 2014 Guillermo Rauch <guillermo@learnboost.com>

See MIT Reference License text in this manifest.

Engine-io-client
----------------
Copyright (c) 2014-2015 Automattic <dev@cloudup.com>

See MIT Reference License text in this manifest.

Engine-io-parser
-----------------
Copyright (c) 2014 Automattic <dev@cloudup.com>

See MIT Reference License text in this manifest.

enum
----
Copyright (c) 2015 Adriano Raiano, Christoph Hermann

See MIT Reference License text in this manifest.

Escape-html
-----------
Copyright (c) 2012-2013 TJ Holowaychuk
Copyright (c) 2015 Andreas Lubbe
Copyright (c) 2015 Tiancheng "Timothy" Gu

See MIT Reference License text in this manifest.

escodegen
----------
Copyright (c) 2009-2011, Mozilla Foundation and contributors
All rights reserved

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Esprima
--------
Copyright (c) jQuery Foundation, Inc. and Contributors, All Rights Reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Estraverse
----------
Copyright (C) 2012-2014 Yusuke Suzuki <utatane.tea@gmail.com>
Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


esutils
--------
Copyright (C) 2013-2014 Yusuke Suzuki <utatane.tea@gmail.com>
Copyright (C) 2014 Ivan Nikulin <ifaaan@gmail.com>

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Etag
-----
Copyright (c) 2014-2015 Douglas Christopher Wilson

See MIT Reference License text in this manifest.

Express
-------
Copyright (c) 2009-2014 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2013-2014 Roman Shtylman <shtylman+expressjs@gmail.com>
Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>

See MIT Reference License text in this manifest.

Finalhandler
------------
Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>

See MIT Reference License text in this manifest.

Foreach
--------
Copyright (c) 2013 Manuel Stofer

See MIT Reference License text in this manifest.

Forwarded
----------
Copyright (c) 2014 Douglas Christopher Wilson

See MIT Reference License text in this manifest.

Fresh
------
Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>

See MIT Reference License text in this manifest.

function-bind
--------------
Copyright (c) 2013 Raynos.

See MIT Reference License text in this manifest.

Generate-function
------------------
Copyright (c) 2014 Mathias Buus

See MIT Reference License text in this manifest.

Generate-object-property
--------------------------
Copyright (c) 2014 Mathias Buus

See MIT Reference License text in this manifest.

Has
-----
Copyright (c) 2013 Thiago de Arruda

See MIT Reference License text in this manifest.

help-me
-------
Copyright (c) 2014 Matteo Collina

See MIT Reference License text in this manifest.

IndexOf
-------
Copyright (c) 2012 TJ Holowaychuk

See MIT Reference License text in this manifest.


Inherits
----------
Copyright (c) Isaac Z. Schlueter

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.

Ipaddr.js
---------
Copyright (C) 2011 Peter Zotov <whitequark@whitequark.org>

See MIT Reference License text in this manifest.


Is-property
------------
Copyright (c) 2013 Mikola Lysenko

See MIT Reference License text in this manifest.

IsArray
-------
Copyright (c) 2013 Julian Gruber <julian@juliangruber.com>

See MIT Reference License text in this manifest.

Json3
------
Copyright (c) 2012-2015 Kit Cambridge.
http://kitcambridge.be/
Copyright (c) 2013-2015 Benjamin Tan.
https://d10.github.io/

See MIT Reference License text in this manifest.

leven
-----
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)

See MIT Reference License text in this manifest.

lwm2m-id
--------
Copyright (c) 2015 simen

See MIT Reference License text in this manifest.

Media-typer
------------
Copyright (c) 2014-2015 Douglas Christopher Wilson

See MIT Reference License text in this manifest.

Merge-descriptors
------------------
Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>

See MIT Reference License text in this manifest.

Methods
--------
Copyright (c) 2013-2014 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2015-2016 Douglas Christopher Wilson <doug@somethingdoug.com>

See MIT Reference License text in this manifest.

Mime
-----
Copyright (c) 2010 Benjamin Thomas, Robert Kieffer

See MIT Reference License text in this manifest.

Mime-db
--------
Copyright (c) 2014 Jonathan Ong me@jongleberry.com

See MIT Reference License text in this manifest.

Mime-types
----------
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>

See MIT Reference License text in this manifest.

MQTT.js
-------
Copyright (c) 2015-2016 MQTT.js contributors

See MIT Reference License text in this manifest.

Contributors:
Adam Rudd
Matteo Collina
Maxime Agor

mqtt-connection
---------------
Copyright (c) 2014-2015 mqtt-connection contributors

See MIT Reference License text in this manifest.

Contributors:
Matteo Collina
Adam Rudd

mqtt-packet
---------------
Copyright (c) 2014-2016 mqtt-packet contributors

See MIT Reference License text in this manifest.

Contributors:
Matteo Collina
Adam Rudd
Peter Sorowka


ms
--------
Copyright (c) 2014 Guillermo Rauch <rauchg@gmail.com>

See MIT Reference License text in this manifest.


Nan
----
Copyright (c) 2016 NAN contributors
-----------------------------------
*NAN contributors listed at <https://github.com/nodejs/nan#contributors>*

See MIT Reference License text in this manifest.

Negotiator
-----------
Copyright (c) 2012-2014 Federico Romero
Copyright (c) 2012-2014 Isaac Z. Schlueter
Copyright (c) 2014-2015 Douglas Christopher Wilson

See MIT Reference License text in this manifest.

Object-keys
-----------
Copyright (C) 2013 Jordan Harband

See MIT Reference License text in this manifest.

once
----
Copyright (c) Isaac Z. Schlueter and Contributors

See ISC Reference License text in this manifest.

On-finished
------------
Copyright (c) 2013 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2014 Douglas Christopher Wilson <doug@somethingdoug.com>

See MIT Reference License text in this manifest.

Options
-------
Copyright (c) 2012 Einar Otto Stangvik <einaros@gmail.com>

See MIT Reference License text in this manifest.

parseuri
---------
Copyright (c) 2014 Gal Koren

See MIT Reference License text in this manifest.

path-to-regexp
---------------
Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com)

See MIT Reference License text in this manifest.

process-nextick-args
----------------------
Copyright (c) 2015 Calvin Metcalf

See MIT Reference License text in this manifest.

protocol-buffers
-----------------
Copyright (c) 2014 Mathias Buus

See MIT Reference License text in this manifest.

protocol-buffers-schema
------------------------
Copyright (c) 2014 Mathias Buus

See MIT Reference License text in this manifest.

Proxy-addr
----------
Copyright (c) 2014-2016 Douglas Christopher Wilson


See MIT Reference License text in this manifest.

Pump
----
Copyright (c) 2014 Mathias Buus

See MIT Reference License text in this manifest.

Qs
--------
Copyright (c) 2014 Nathan LaFreniere and other contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* The names of any contributors may not be used to endorse or promote
products derived from this software without specific prior written
permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

* * *
The complete list of contributors can be found at: https://github.com/hapijs/qs/graphs/contributors


Range-parser
--------------
Copyright (c) 2012-2014 TJ Holowaychuk <tj@vision-media.ca>
Copyright (c) 2015-2016 Douglas Christopher Wilson <doug@somethingdoug.com

See MIT Reference License text in this manifest.

Readable-stream
----------------
Copyright Joyent, Inc. and other Node contributors. All rights reserved.

See MIT Reference License text in this manifest.

Reduplexer
----------
Copyright (c) 2014, Matteo Collina <hello@matteocollina.com>

See ISC Reference License text in this manifest.

Reinterval
----------
Copyright (c) 2015 Agor Maxime

See MIT Reference License text in this manifest.

Send
-----
Copyright (c) 2012 TJ Holowaychuk
Copyright (c) 2014-2016 Douglas Christopher Wilson

See MIT Reference License text in this manifest.

Serve-static
-------------
Copyright (c) 2010 Sencha Inc.
Copyright (c) 2011 LearnBoost
Copyright (c) 2011 TJ Holowaychuk
Copyright (c) 2014-2016 Douglas Christopher Wilson

See MIT Reference License text in this manifest.

Signed-varint
--------------
Copyright (c) 2014 Dominic Tarr

See MIT Reference License text in this manifest.

Socket.io
----------
Copyright (c) 2014-2015 Automattic <dev@cloudup.com>

See MIT Reference License text in this manifest.

Socket.io-adapter
-----------------
Copyright (c) 2014 Guillermo Rauch <guillermo@learnboost.com>

See MIT Reference License text in this manifest.

socket.io-client
-----------------
Copyright (c) 2014 Guillermo Rauch

See MIT Reference License text in this manifest.

Socket.io-parser
-----------------
Copyright (c) 2014 Guillermo Rauch <guillermo@learnboost.com>

See MIT Reference License text in this manifest.

Source-map
------------
Copyright (c) 2009-2011, Mozilla Foundation and contributors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the names of the Mozilla Foundation nor the names of project
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

stream-shift
------------
Copyright (c) 2016 Mathias Buus

See MIT Reference License text in this manifest.

String_decoder
---------------
Copyright Joyent, Inc. and other Node contributors.

See MIT Reference License text in this manifest.

Through2
---------
Copyright 2013, Rod Vagg (the "Original Author")
All rights reserved.

MIT +no-false-attribs License

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

Distributions of all or part of the Software intended to be used
by the recipients as they would use the unmodified Software,
containing modifications that substantially alter, remove, or
disable functionality of the Software, outside of the documented
configuration mechanisms provided by the Software, shall be
modified such that the Original Author's bug reporting email
addresses and urls are either replaced with the contact information
of the parties responsible for the changes, or removed entirely.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.

Except where noted, this license applies to any and all software
programs and associated documentation files created by the
Original Author, when distributed with the Software.

Tinycolor
----------
Copyright (c) 2012 Einar Otto Stangvik All Rights Reserved.

See MIT Reference License text in this manifest.

To-array
---------
Copyright (c) 2012 Raynos.

See MIT Reference License text in this manifest.

Type-is
--------
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
Copyright (c) 2014-2015 Douglas Christopher Wilson <doug@somethingdoug.com>

See MIT Reference License text in this manifest.

Typedarray
-----------
Copyright (c) 2010, Linden Research, Inc.
Copyright (c) 2012, Joshua Bell

See MIT Reference License text in this manifest.

Original can be found at:
https://bitbucket.org/lindenlab/llsd
Modifications by Joshua Bell inexorabletash@gmail.com
https://github.com/inexorabletash/polyfill

ES3/ES5 implementation of the Krhonos Typed Array Specification
Ref: http://www.khronos.org/registry/typedarray/specs/latest/
Date: 2011-02-01

Ultron
---------
Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors.

See MIT Reference License text in this manifest.


Utf8
-----
Copyright Mathias Bynens <https://mathiasbynens.be/>

See MIT Reference License text in this manifest.

Util-deprecate
--------------
Copyright (c) 2014 Nathan Rajlich <nathan@tootallnate.net>

See MIT Reference License text in this manifest.

Utils-merge
------------
Copyright (c) 2013 Jared Hanson

See MIT Reference License text in this manifest.

Vary
----------
Copyright (c) 2014-2015 Douglas Christopher Wilson

See MIT Reference License text in this manifest.

websocket-stream
----------------
Copyright (c) 2013, Max Ogden

See BSD-2 Clause Reference License text in this manifest.

wrappy
------
Copyright (c) Isaac Z. Schlueter and Contributors

See ISC Reference License text in this manifest.

Ws
----------
Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>

See MIT Reference License text in this manifest.

XMLHttpRequest
---------------
Copyright (c) 2010 passive.ly LLC

See MIT Reference License text in this manifest.

Xtend
--------
Copyright (c) 2012-2014 Raynos.

See MIT Reference License text in this manifest.

Jquery
--------
Copyright jQuery Foundation and other contributors, https://jquery.org/

This software consists of voluntary contributions made by many
individuals. For exact contribution history, see the revision history
available at https://github.com/jquery/jquery


See MIT Reference License text in this manifest.


Bootstrap
------------
Copyright (c) 2011-2015 Twitter, Inc

See MIT Reference License text in this manifest.


Protobuf
---------
This license applies to all parts of Protocol Buffers except the following:

- Atomicops support for generic gcc, located in
src/google/protobuf/stubs/atomicops_internals_generic_gcc.h.
This file is copyrighted by Red Hat Inc.

- Atomicops support for AIX/POWER, located in
src/google/protobuf/stubs/atomicops_internals_power.h.
This file is copyrighted by Bloomberg Finance LP.

Copyright 2014, Google Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following disclaimer
in the documentation and/or other materials provided with the
distribution.
* Neither the name of Google Inc. nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Code generated by the Protocol Buffer compiler is owned by the owner
of the input file used when generating it. This code is not
standalone and requires a support library to be linked with it. This
support library is itself covered by the above license.



Creative Commons Attribution 3.0 United States

License

THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.

1. Definitions

"Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with one or more other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.
"Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.
"Licensor" means the individual, individuals, entity or entities that offers the Work under the terms of this License.
"Original Author" means the individual, individuals, entity or entities who created the Work.
"Work" means the copyrightable work of authorship offered under the terms of this License.
"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.

2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.

3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:

to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;
to create and reproduce Derivative Works provided that any such Derivative Work, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked "The original work was translated from English to Spanish," or a modification could indicate "The original work has been modified.";;
to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;
to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.

For the avoidance of doubt, where the Work is a musical composition:
Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or, in the event that Licensor is a member of a performance rights society (e.g. ASCAP, BMI, SESAC), via that society, royalties for the public performance or public digital performance (e.g. webcast) of the Work.
Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).
Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).

The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.

4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:

You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of a recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. When You distribute, publicly display, publicly perform, or publicly digitally perform the Work, You may not impose any technological measures on the Work that restrict the ability of a recipient of the Work from You to exercise the rights granted to that recipient under the terms of the License. This Section 4(a) applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by Section 4(b), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by Section 4(b), as requested.
If You distribute, publicly display, publicly perform, or publicly digitally perform the Work (as defined in Section 1 above) or any Derivative Works (as defined in Section 1 above) or Collective Works (as defined in Section 1 above), You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution ("Attribution Parties") in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and, consistent with Section 3(b) in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). The credit required by this Section 4(b) may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear, if a credit for all contributing authors of the Derivative Work or Collective Work appears, then as part of these credits and in a manner at least as prominent as the credits for the other contributing authors. For the avoidance of doubt, You may only use the credit required by this Section for the purpose of attribution in the manner set out above and, by exercising Your rights under this License, You may not implicitly or explicitly assert or imply any connection with, sponsorship or endorsement by the Original Author, Licensor and/or Attribution Parties, as appropriate, of You or Your use of the Work, without the separate, express prior written permission of the Original Author, Licensor and/or Attribution Parties.

5. Representations, Warranties and Disclaimer

UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND ONLY TO THE EXTENT OF ANY RIGHTS HELD IN THE LICENSED WORK BY THE LICENSOR. THE LICENSOR MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MARKETABILITY, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. Termination

This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works (as defined in Section 1 above) or Collective Works (as defined in Section 1 above) from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneous

Each time You distribute or publicly digitally perform the Work (as defined in Section 1 above) or a Collective Work (as defined in Section 1 above), the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.

Creative Commons Notice

Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.

Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, Creative Commons does not authorize the use by either party of the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time. For the avoidance of doubt, this trademark restriction does not form part of the License.

Creative Commons may be contacted at https://creativecommons.org/.




Through2
================
Copyright 2013, Rod Vagg (the "Original Author")
All rights reserved.

MIT +no-false-attribs License

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

Distributions of all or part of the Software intended to be used
by the recipients as they would use the unmodified Software,
containing modifications that substantially alter, remove, or
disable functionality of the Software, outside of the documented
configuration mechanisms provided by the Software, shall be
modified such that the Original Author's bug reporting email
addresses and urls are either replaced with the contact information
of the parties responsible for the changes, or removed entirely.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.


Except where noted, this license applies to any and all software
programs and associated documentation files created by the
Original Author, when distributed with the Software.

+
+ + \ No newline at end of file diff --git a/build_all.sh b/build_all.sh new file mode 100755 index 0000000..a9cbd9b --- /dev/null +++ b/build_all.sh @@ -0,0 +1,128 @@ +#!/bin/bash +############################################################# +# @file build_all.sh +# +# @brief TIMAC 2.0 Build All script +# +# This shell script will "build the world" everything in order. +# It accepts a few parameters, examples: +# +# bash$ sh ./build_all.sh <- defaults to host build +# bash$ sh ./build_all.sh host <- host only +# bash$ sh ./build_all.sh bbb <- bbb target +# bash$ sh ./build_all.sh clean <- erases everything +# bash$ sh ./build_all.sh remake <- 'clean' and then 'all' +# +# Group: WCS LPC +# $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ +# +############################################################# +# $License: BSD3 2016 $ +# +# Copyright (c) 2015, Texas Instruments Incorporated +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of Texas Instruments Incorporated nor the names of +# its contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +############################################################# +# $Release Name: TI-15.4Stack Linux x64 SDK$ +# $Release Date: July 14, 2016 (2.00.00.30)$ +############################################################# + + +function usage() +{ + echo "usage $0 TARGET" + echo "" + echo "Where TARGET is one of: host, bbb" + echo "" + echo "The BBB options require appropriate tools" + echo "be made in `pwd`/scripts/front_matter.mak" + echo "And in `pwd`/example/cc13xx-sbl/app/linux/Makefile" + echo "" +} + +case $# in +0) + target=host + ;; +1) + target=$1 + ;; +*) + echo "Wrong number of parameters, $#" + usage + exit 1 + ;; +esac + +case $target in +clean) + # ok + ;; +host) + # ok + ;; +bbb) + # ok + ;; +klockwork) + # ok + ;; +remake) + # ok + ;; +*) + echo "Unknown target: $target" + usage + exit 1 +esac + +# this is a simple script... +# We die/exit if there was a problem +set -e + +script -e -f -c "cd components/common && make $target" $target.common.log + +script -e -f -c "cd components/nv && make $target" $target.nv.log + +script -e -f -c "cd components/api && make $target" $target.api.log + +script -e -f -c "cd example/npi_server2 && make $target" $target.npi_server2.log + +script -e -f -c "cd example/collector && make $target" $target.collector.log + +script -e -f -c "cd example/cc13xx-sbl/app/linux && make $target" $target.bootloader.log + +# ======================================== +# Texas Instruments Micro Controller Style +# ======================================== +# Local Variables: +# mode: sh +# End: +# vim:set filetype=sh + diff --git a/components/api/Makefile b/components/api/Makefile new file mode 100644 index 0000000..95a65cf --- /dev/null +++ b/components/api/Makefile @@ -0,0 +1,79 @@ +############################################################# +# @file Makefile +# +# @brief TIMAC 2.0 makefile for the Linux API MAC and MT Layer +# +# Group: WCS LPC +# $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ +# +############################################################# +# $License: BSD3 2016 $ +# +# Copyright (c) 2015, Texas Instruments Incorporated +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of Texas Instruments Incorporated nor the names of +# its contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +############################################################# +# $Release Name: TI-15.4Stack Linux x64 SDK$ +# $Release Date: July 14, 2016 (2.00.00.30)$ +############################################################# + +# By default, we make the library file +_default: _libfile + +CFLAGS += -I../common/inc + +# basic boiler plate makefile stuff +include ../../scripts/front_matter.mak + +# What is the name of our library? +LIB_NAME=apimac + + +C_SOURCES_linux += src/mt_msg_ini.c +C_SOURCES_linux += src/mt_msg.c +C_SOURCES_linux += src/api_mac.c +C_SOURCES_linux += src/mt_msg_dbg_core.c +C_SOURCES_linux += src/mt_msg_dbg_load.c +C_SOURCES_generic = + +C_SOURCES += ${C_SOURCES_linux} +C_SOURCES += ${C_SOURCES_generic} + + +# And include the final library portion +include ../../scripts/library.mak + +# ======================================== +# Texas Instruments Micro Controller Style +# ======================================== +# Local Variables: +# mode: makefile-gmake +# End: +# vim:set filetype=make + diff --git a/components/api/inc/api_mac.h b/components/api/inc/api_mac.h new file mode 100644 index 0000000..8d3759f --- /dev/null +++ b/components/api/inc/api_mac.h @@ -0,0 +1,3313 @@ +/****************************************************************************** + + @file api_mac.h + + @brief TIMAC 2.0 API + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ +#ifndef API_MAC_H +#define API_MAC_H + +/****************************************************************************** + Includes + *****************************************************************************/ + +#include +#include + +/*! + @mainpage TIMAC 2.0 API + + The following is the application programming interface (API) for the Texas + Instruments 802.15.4 MAC software. This API provides an interface to the + management and data services of the 802.15.4 stack. + + Callback Functions + ============================ + These functions must be implemented by the application and are used to pass + events and data from the MAC to the application. Data accessed through + callback function parameters (such as a pointer to data) are only valid for + the execution of the function and should not be considered valid when the + function returns. These functions execute in the context of the MAC. + The callback function implementation should avoid using critical sections + and CPU intensive operations. The [callback table structure] + (@ref ApiMac_callbacks_t) should be setup application then call + ApiMac_registerCallbacks() to register the table. + + Common Constants and Structures + ============================ + - Address Type - the common address type used by the MAC is the + [ApiMac_sAddr_t](@ref ApiMac_sAddr_t). + - Status Values - the common MAC status type is [ApiMac_status_t] + (@ref ApiMac_status_t). + - MAC Security Level - The security level ([ApiMac_secLevel_t] + (@ref ApiMac_secLevel_t)) defines the encryption and/or authentication + methods used on the message frame. + - Key Identifier Modes - The key identifier mode + ([ApiMac_keyIdMode_t](@ref ApiMac_keyIdMode_t)) + defines how the key is determined from the key index + - Security Type- MAC security structure ([ApiMac_sec_t] + (@ref ApiMac_sec_t)). + + + Initialization and Task Interfaces + =============================== + - ApiMac_init() + - ApiMac_registerCallbacks() + - ApiMac_processIncoming() + + Data Interfaces + =============================== + - ApiMac_mcpsDataReq() + - ApiMac_mcpsPurgeReq() + + Management Interfaces + =============================== + - ApiMac_mlmeAssociateReq() + - ApiMac_mlmeAssociateRsp() + - ApiMac_mlmeDisassociateReq() + - ApiMac_mlmeOrphanRsp() + - ApiMac_mlmePollReq() + - ApiMac_mlmeResetReq() + - ApiMac_mlmeScanReq() + - ApiMac_mlmeStartReq() + - ApiMac_mlmeSyncReq() + - ApiMac_mlmeWSAsyncReq() + + Management Attribute Interfaces + =============================== + The MAC attributes can be read and written to by use of the following Get and + Set functions, which are organized by the attributes data type: + - ApiMac_mlmeGetReqBool() + - ApiMac_mlmeGetReqUint8() + - ApiMac_mlmeGetReqUint16() + - ApiMac_mlmeGetReqUint32() + - ApiMac_mlmeGetReqArray() + - ApiMac_mlmeGetFhReqUint8() + - ApiMac_mlmeGetFhReqUint16() + - ApiMac_mlmeGetFhReqUint32() + - ApiMac_mlmeGetFhReqArray() + - ApiMac_mlmeGetSecurityReqUint8() + - ApiMac_mlmeGetSecurityReqUint16() + - ApiMac_mlmeGetSecurityReqArray() + - ApiMac_mlmeGetSecurityReqStruct() + - ApiMac_mlmeSetReqBool() + - ApiMac_mlmeSetReqUint8() + - ApiMac_mlmeSetReqUint16() + - ApiMac_mlmeSetReqUint32() + - ApiMac_mlmeSetReqArray() + - ApiMac_mlmeSetFhReqUint8() + - ApiMac_mlmeSetFhReqUint16() + - ApiMac_mlmeSetFhReqUint32() + - ApiMac_mlmeSetFhReqArray() + - ApiMac_mlmeSetSecurityReqUint8() + - ApiMac_mlmeSetSecurityReqUint16() + - ApiMac_mlmeSetSecurityReqArray() + - ApiMac_mlmeSetSecurityReqStruct() + + Simplified Security Interfaces + =============================== + - ApiMac_secAddDevice() + - ApiMac_secDeleteDevice() + - ApiMac_secDeleteKeyAndAssocDevices() + - ApiMac_secDeleteAllDevices() + - ApiMac_secGetDefaultSourceKey() + - ApiMac_secAddKeyInitFrameCounter() + + Extension Interfaces + =============================== + - ApiMac_randomByte() + - ApiMac_updatePanId() + - ApiMac_startFH() + - ApiMac_enableFH() + - ApiMac_parsePayloadGroupIEs() + - ApiMac_parsePayloadSubIEs() + - ApiMac_freeIEList() + - ApiMac_convertCapabilityInfo() + - ApiMac_buildMsgCapInfo() + + */ + +#ifdef __cplusplus +extern "C" +{ +#endif + +/****************************************************************************** + Constants and definitions + *****************************************************************************/ + +/*! Key Length */ +#define APIMAC_KEY_MAX_LEN 16 + +/*! IEEE Address Length */ +#define APIMAC_SADDR_EXT_LEN 8 + +/*! Maximum number of key table entries */ +#define APIMAC_MAX_KEY_TABLE_ENTRIES 2 + +/*! Key identifier field length - Implicit mode */ +#define APIMAC_KEYID_IMPLICIT_LEN 0 +/*! Key identifier field length - mode 1 */ +#define APIMAC_KEYID_MODE1_LEN 1 +/*! Key Identifier field length - mode 4 */ +#define APIMAC_KEYID_MODE4_LEN 5 +/*! Key Identifier field length - mode 8 */ +#define APIMAC_KEYID_MODE8_LEN 9 + +/*! Key source maximum length in bytes */ +#define APIMAC_KEY_SOURCE_MAX_LEN 8 + +/*! Key index length in bytes */ +#define APIMAC_KEY_INDEX_LEN 1 + +/*! Frame counter length in bytes */ +#define APIMAC_FRAME_COUNTER_LEN 4 + +/*! Key lookup data length in bytes - short length */ +#define APIMAC_KEY_LOOKUP_SHORT_LEN 5 +/*! Key lookup data length in bytes - long length */ +#define APIMAC_KEY_LOOKUP_LONG_LEN 9 +/*! Key lookup data length in bytes - lookup length */ +#define APIMAC_MAX_KEY_LOOKUP_LEN APIMAC_KEY_LOOKUP_LONG_LEN + +/*! Bytes required for MAC header in data frame */ +#define APIMAC_DATA_OFFSET 24 + +/*! Maximum length allowed for the beacon payload */ +#define APIMAC_MAX_BEACON_PAYLOAD 16 + +/*! Length required for MIC-32 authentication */ +#define APIMAC_MIC_32_LEN 4 +/*! Length required for MIC-64 authentication */ +#define APIMAC_MIC_64_LEN 8 +/*! Length required for MIC-128 authentication */ +#define APIMAC_MIC_128_LEN 16 + +/*! + MHR length for received frame + - FCF (2) + Seq (1) + Addr Fields (20) + Security HDR (14) + */ +#define APIMAC_MHR_LEN 37 + +/*! Channel Page - standard-defined SUN PHY operating modes */ +#define APIMAC_CHANNEL_PAGE_9 9 +/*! Channel Page - MR-FSK Generic-PHY-defined PHY modes */ +#define APIMAC_CHANNEL_PAGE_10 10 + +/*! Maximum number of Standard PHY descriptor entries */ +#define APIMAC_STANDARD_PHY_DESCRIPTOR_ENTRIES 3 +/*! Maximum number of Generic PHY descriptor entries */ +#define APIMAC_GENERIC_PHY_DESCRIPTOR_ENTRIES 3 + +/*! PHY IDs - 915MHz US Frequency band operating mode # 1 */ +#define APIMAC_STD_US_915_PHY_1 1 +/*! 863MHz ETSI Frequency band operating mode #1 */ +#define APIMAC_STD_ETSI_863_PHY_3 3 + +/*! PHY IDs - MRFSK Generic Phy ID start */ +#define APIMAC_MRFSK_GENERIC_PHY_ID_BEGIN 128 +/*! PHY IDs - MRFSK Generic Phy ID end */ +#define APIMAC_MRFSK_GENERIC_PHY_ID_END 143 + +/*! PHY IDs - MRFSK Standard Phy ID start */ +#define APIMAC_MRFSK_STD_PHY_ID_BEGIN APIMAC_STD_US_915_PHY_1 +/*! PHY IDs - MRFSK Standard Phy ID end */ +#define APIMAC_MRFSK_STD_PHY_ID_END APIMAC_STD_ETSI_863_PHY_3 + +/*! PHY descriptor table entry */ +#define APIMAC_PHY_DESCRIPTOR 0x01 + +/*! + Special address value - Short address value indicating extended address + is used + */ +#define APIMAC_ADDR_USE_EXT 0xFFFE +/*! Special address value - Broadcast short address */ +#define APIMAC_SHORT_ADDR_BROADCAST 0xFFFF +/*! Special address value - Short address when there is no short address */ +#define APIMAC_SHORT_ADDR_NONE 0xFFFF + +/*! The length of the random seed is set for maximum requirement which is 32 */ +#define APIMAC_RANDOM_SEED_LEN 32 + +/*! Frequency Hopping UTT IE Selection Bit */ +#define APIMAC_FH_UTT_IE 0x00000002 +/*! Frequency Hopping BT IE Selection Bit */ +#define APIMAC_FH_BT_IE 0x00000008 +/*! Frequency Hopping US IE Selection Bit */ +#define APIMAC_FH_US_IE 0x00010000 +/*! Frequency Hopping BS IE Selection Bit */ +#define APIMAC_FH_BS_IE 0x00020000 + +/*! Frequency hopping header IE's mask */ +#define APIMAC_FH_HEADER_IE_MASK 0x000000FF + +/*! + Frequency hopping Protocol dispatch values - Protocol dispatch none + */ +#define APIMAC_FH_PROTO_DISPATCH_NONE 0x00 +/*! + Frequency hopping Protocol dispatch values - Protocol dispatch MHD-PDU + */ +#define APIMAC_FH_PROTO_DISPATCH_MHD_PDU 0x01 +/*! + Frequency hopping Protocol dispatch values - Protocol dispatch 6LOWPAN + */ +#define APIMAC_FH_PROTO_DISPATCH_6LOWPAN 0x02 + +/*! Maximum number of channels */ +#define APIMAC_154G_MAX_NUM_CHANNEL 129 + +/*! Bitmap size to hold the channel list */ +#define APIMAC_154G_CHANNEL_BITMAP_SIZ \ + ((APIMAC_154G_MAX_NUM_CHANNEL + 7) / 8) + +/*! Maximum number of header IEs */ +#define APIMAC_HEADER_IE_MAX 2 +/*! Maximum number of payload-IEs */ +#define APIMAC_PAYLOAD_IE_MAX 2 +/*! Maximum number of sub-IEs */ +#define APIMAC_PAYLOAD_SUB_IE_MAX 4 + +/*! + MACRO that returns the beacon order from the superframe specification + */ +#define APIMAC_SFS_BEACON_ORDER(s) ((s) & 0x0F) + +/*! + MACRO that returns the superframe order from the superframe specification + */ +#define APIMAC_SFS_SUPERFRAME_ORDER(s) (((s) >> 4) & 0x0F) + +/*! + MACRO that returns the final CAP slot from the superframe specification + */ +#define APIMAC_SFS_FINAL_CAP_SLOT(s) (((s) >> 8) & 0x0F) + +/*! + MACRO that returns the battery life extension bit from the superframe + specification + */ +#define APIMAC_SFS_BLE(s) (((s) >> 12) & 0x01) + +/*! + MACRO that returns the PAN coordinator bit from the superframe specification + */ +#define APIMAC_SFS_PAN_COORDINATOR(s) (((s) >> 14) & 0x01) + +/*! + MACRO that returns the Associate Permit bit from the superframe + specification + */ +#define APIMAC_SFS_ASSOCIATION_PERMIT(s) (((s) >> 15) & 0x01) + +/*! Max size of the Frequency Hopping Channel Map Size */ +#define APIMAC_FH_MAX_BIT_MAP_SIZE 32 + +/*! Max size of the Frequency Hopping Network Name */ +#define APIMAC_FH_NET_NAME_SIZE_MAX 32 + +/*! Size of the Frequency Hopping GTK Hash Size */ +#define APIMAC_FH_GTK_HASH_SIZE 8 + +/*! Associate Response status types */ +typedef enum +{ + /*! Success, join allowed */ + ApiMac_assocStatus_success = 0, + /*! PAN at capacity */ + ApiMac_assocStatus_panAtCapacity = 1, + /*! PAN access denied */ + ApiMac_assocStatus_panAccessDenied = 2 +} ApiMac_assocStatus_t; + +/*! + Address types - used to set addrMode field of the ApiMac_sAddr_t structure. + */ +typedef enum +{ + /*! Address not present */ + ApiMac_addrType_none = 0, + /*! Short Address (16 bits) */ + ApiMac_addrType_short = 2, + /*! Extended Address (64 bits) */ + ApiMac_addrType_extended = 3 +} ApiMac_addrType_t; + +/*! Beacon types in the ApiMac_mlmeBeaconNotifyInd_t structure. */ +typedef enum +{ + /*! normal beacon type */ + ApiMac_beaconType_normal = 0, + /*! enhanced beacon type */ + ApiMac_beaconType_enhanced = 1, +} ApiMac_beaconType_t; + +/*! Disassociate Reasons */ +typedef enum +{ + /*! The coordinator wishes the device to disassociate */ + ApiMac_disassocateReason_coord = 1, + /*! The device itself wishes to disassociate */ + ApiMac_disassocateReason_device = 2 +} ApiMac_disassocateReason_t; + +/*! Comm Status Indication Reasons */ +typedef enum +{ + /*! + Reason for comm status indication was in response to an Associate Response + */ + ApiMac_commStatusReason_assocRsp = 0, + /*! + Reason for comm status indication was in response to an Orphan Response + */ + ApiMac_commStatusReason_orphanRsp = 1, + /*! + Reason for comm status indication was result of recieving a secure frame + */ + ApiMac_commStatusReason_rxSecure = 2 +} ApiMac_commStatusReason_t; + +/*! General MAC Status values */ +typedef enum +{ + /*! Operation successful */ + ApiMac_status_success = 0, + /*! MAC Co-Processor only - Subsystem Error */ + ApiMac_status_subSystemError = 0x25, + /*! MAC Co-Processor only - Command ID error */ + ApiMac_status_commandIDError = 0x26, + /*! MAC Co-Processor only - Length error */ + ApiMac_status_lengthError = 0x27, + /*! MAC Co-Processor only - Unsupported Extended Type */ + ApiMac_status_unsupportedType = 0x28, + /*! The AUTOPEND pending all is turned on */ + ApiMac_status_autoAckPendingAllOn = 0xFE, + /*! The AUTOPEND pending all is turned off */ + ApiMac_status_autoAckPendingAllOff = 0xFF, + /*! The beacon was lost following a synchronization request */ + ApiMac_status_beaconLoss = 0xE0, + /*! + The operation or data request failed because of activity on the channel + */ + ApiMac_status_channelAccessFailure = 0xE1, + /*! + The frame counter puportedly applied by the originator of the received + frame is invalid + */ + ApiMac_status_counterError = 0xDB, + /*! The MAC was not able to enter low power mode */ + ApiMac_status_denied = 0xE2, + /*! Unused */ + ApiMac_status_disabledTrxFailure = 0xE3, + /*! + The received frame or frame resulting from an operation + or data request is too long to be processed by the MAC + */ + ApiMac_status_frameTooLong = 0xE5, + /*! + The key purportedly applied by the originator of the + received frame is not allowed + */ + ApiMac_status_improperKeyType = 0xDC, + /*! + The security level purportedly applied by the originator of + the received frame does not meet the minimum security level + */ + ApiMac_status_improperSecurityLevel = 0xDD, + /*! + The data request failed because neither the source address nor + destination address parameters were present + */ + ApiMac_status_invalidAddress = 0xF5, + /*! Unused */ + ApiMac_status_invalidGts = 0xE6, + /*! The purge request contained an invalid handle */ + ApiMac_status_invalidHandle = 0xE7, + /*! Unused */ + ApiMac_status_invalidIndex = 0xF9, + /*! The API function parameter is out of range */ + ApiMac_status_invalidParameter = 0xE8, + /*! + The scan terminated because the PAN descriptor storage limit + was reached + */ + ApiMac_status_limitReached = 0xFA, + /*! + The operation or data request failed because no + acknowledgement was received + */ + ApiMac_status_noAck = 0xE9, + /*! + The scan request failed because no beacons were received or the + orphan scan failed because no coordinator realignment was received + */ + ApiMac_status_noBeacon = 0xEA, + /*! + The associate request failed because no associate response was received + or the poll request did not return any data + */ + ApiMac_status_noData = 0xEB, + /*! The short address parameter of the start request was invalid */ + ApiMac_status_noShortAddress = 0xEC, + /*! Unused */ + ApiMac_status_onTimeTooLong = 0xF6, + /*! Unused */ + ApiMac_status_outOfCap = 0xED, + /*! + A PAN identifier conflict has been detected and + communicated to the PAN coordinator + */ + ApiMac_status_panIdConflict = 0xEE, + /*! Unused */ + ApiMac_status_pastTime = 0xF7, + /*! A set request was issued with a read-only identifier */ + ApiMac_status_readOnly = 0xFB, + /*! A coordinator realignment command has been received */ + ApiMac_status_realignment = 0xEF, + /*! The scan request failed because a scan is already in progress */ + ApiMac_status_scanInProgress = 0xFC, + /*! Cryptographic processing of the received secure frame failed */ + ApiMac_status_securityError = 0xE4, + /*! The beacon start time overlapped the coordinator transmission time */ + ApiMac_status_superframeOverlap = 0xFD, + /*! + The start request failed because the device is not tracking + the beacon of its coordinator + */ + ApiMac_status_trackingOff = 0xF8, + /*! + The associate response, disassociate request, or indirect + data transmission failed because the peer device did not respond + before the transaction expired or was purged + */ + ApiMac_status_transactionExpired = 0xF0, + /*! The request failed because MAC data buffers are full */ + ApiMac_status_transactionOverflow = 0xF1, + /*! Unused */ + ApiMac_status_txActive = 0xF2, + /*! + The operation or data request failed because the + security key is not available + */ + ApiMac_status_unavailableKey = 0xF3, + /*! The set or get request failed because the attribute is not supported */ + ApiMac_status_unsupportedAttribute = 0xF4, + /*! + The received frame was secured with legacy security which is + not supported + */ + ApiMac_status_unsupportedLegacy = 0xDE, + /*! The security of the received frame is not supported */ + ApiMac_status_unsupportedSecurity = 0xDF, + /*! The operation is not supported in the current configuration */ + ApiMac_status_unsupported = 0x18, + /*! The operation could not be performed in the current state */ + ApiMac_status_badState = 0x19, + /*! + The operation could not be completed because no + memory resources were available + */ + ApiMac_status_noResources = 0x1A, + /*! For internal use only */ + ApiMac_status_ackPending = 0x1B, + /*! For internal use only */ + ApiMac_status_noTime = 0x1C, + /*! For internal use only */ + ApiMac_status_txAborted = 0x1D, + /*! + For internal use only - A duplicated entry is added to the source + matching table + */ + ApiMac_status_duplicateEntry = 0x1E, + /*! Frequency Hopping - General error */ + ApiMac_status_fhError = 0x61, + /*! Frequency Hopping - IE is not supported */ + ApiMac_status_fhIeNotSupported = 0x62, + /*! Frequency Hopping - There is no ASYNC message in the MAC TX queue */ + ApiMac_status_fhNotInAsync = 0x63, + /*! Frequency Hopping - Destination address is not in neighbor table */ + ApiMac_status_fhNotInNeighborTable = 0x64, + /*! Frequency Hopping - Not in UC or BC dwell time slot */ + ApiMac_status_fhOutSlot = 0x65, + /*! Frequency Hopping - Invalid address */ + ApiMac_status_fhInvalidAddress = 0x66, + /*! Frequency Hopping - IE format is wrong */ + ApiMac_status_fhIeFormatInvalid = 0x67, + /*! Frequency Hopping - PIB is not supported */ + ApiMac_status_fhPibNotSupported = 0x68, + /*! Frequency Hopping - PIB is read only */ + ApiMac_status_fhPibReadOnly = 0x69, + /*! Frequency Hopping - PIB API invalid parameter */ + ApiMac_status_fhPibInvalidParameter = 0x6A, + /*! Frequency Hopping - Invalid frame type */ + ApiMac_status_fhInvalidFrameType = 0x6B, + /*! Frequency Hopping - Expired node */ + ApiMac_status_fhExpiredNode = 0x6C +} ApiMac_status_t; + +/*! MAC Security Levels */ +typedef enum +{ + /*! No security is used */ + ApiMac_secLevel_none = 0, + /*! MIC-32 authentication is used */ + ApiMac_secLevel_mic32 = 1, + /*! MIC-64 authentication is used */ + ApiMac_secLevel_mic64 = 2, + /*! MIC-128 authentication is used */ + ApiMac_secLevel_mic128 = 3, + /*! AES encryption is used */ + ApiMac_secLevel_enc = 4, + /*! AES encryption and MIC-32 authentication are used */ + ApiMac_secLevel_encMic32 = 5, + /*! AES encryption and MIC-64 authentication are used */ + ApiMac_secLevel_encMic64 = 6, + /*! AES encryption and MIC-128 authentication are used */ + ApiMac_secLevel_encMic128 = 7 +} ApiMac_secLevel_t; + +/*! Key Identifier Mode */ +typedef enum +{ + /*! Key is determined implicitly */ + ApiMac_keyIdMode_implicit = 0, + /*! Key is determined from the 1-byte key index */ + ApiMac_keyIdMode_1 = 1, + /*! Key is determined from the 4-byte key index */ + ApiMac_keyIdMode_4 = 2, + /*! Key is determined from the 8-byte key index */ + ApiMac_keyIdMode_8 = 3, +} ApiMac_keyIdMode_t; + +/*! Standard PIB Get and Set Attributes - size bool */ +typedef enum +{ + /*! TRUE if a coordinator is currently allowing association */ + ApiMac_attribute_associatePermit = 0x41, + /*! + TRUE if a device automatically sends a data request if its address + is listed in the beacon frame + */ + ApiMac_attribute_autoRequest = 0x42, + /*! TRUE if battery life extension is enabled */ + ApiMac_attribute_battLifeExt = 0x43, + /*! TRUE if the PAN coordinator accepts GTS requests */ + ApiMac_attribute_gtsPermit = 0x4D, + /*! TRUE if the MAC is in promiscuous mode */ + ApiMac_attribute_promiscuousMode = 0x51, + /*! TRUE if the MAC enables its receiver during idle periods */ + ApiMac_attribute_RxOnWhenIdle = 0x52, + /*! TRUE if the device is associated to the PAN coordinator */ + ApiMac_attribute_associatedPanCoord = 0x56, + /*! TRUE if the MAC supports RX and TX timestamps */ + ApiMac_attribute_timestampSupported = 0x5C, + /*! TRUE if security is enabled */ + ApiMac_attribute_securityEnabled = 0x5D, + /*! TRUE if MPM IE needs to be included */ + ApiMac_attribute_includeMPMIE = 0x62, + /*! FCS type */ + ApiMac_attribute_fcsType = 0xE9, +} ApiMac_attribute_bool_t; + +/*! Standard PIB Get and Set Attributes - size uint8_t */ +typedef enum +{ + /*! The maximum number of symbols to wait for an acknowledgment frame */ + ApiMac_attribute_ackWaitDuration = 0x40, + /*! + The number of backoff periods during which the receiver is + enabled following a beacon in battery life extension mode + */ + ApiMac_attribute_battLifeExtPeriods = 0x44, + /*! + The length in bytes of the beacon payload, the maximum value for this + parameters is APIMAC_MAX_BEACON_PAYLOAD. + */ + ApiMac_attribute_beaconPayloadLength = 0x46, + /*! How often the coordinator transmits a beacon */ + ApiMac_attribute_beaconOrder = 0x47, + /*! The beacon sequence number */ + ApiMac_attribute_bsn = 0x49, + /*! The data or MAC command frame sequence number */ + ApiMac_attribute_dsn = 0x4C, + /*! + The maximum number of backoffs the CSMA-CA algorithm will attempt + before declaring a channel failure + */ + ApiMac_attribute_maxCsmaBackoffs = 0x4E, + /*! + The minimum value of the backoff exponent in the CSMA-CA algorithm. + If this value is set to 0, collision avoidance is disabled during + the first iteration of the algorithm. Also for the slotted version + of the CSMA-CA algorithm with the battery life extension enabled, + the minimum value of the backoff exponent will be at least 2 + */ + ApiMac_attribute_backoffExponent = 0x4F, + /*! This specifies the length of the active portion of the superframe */ + ApiMac_attribute_superframeOrder = 0x54, + /*! The maximum value of the backoff exponent in the CSMA-CA algorithm */ + ApiMac_attribute_maxBackoffExponent = 0x57, + /*! The maximum number of retries allowed after a transmission failure */ + ApiMac_attribute_maxFrameRetries = 0x59, + /*! + The maximum number of symbols a device shall wait for a response + command to be available following a request command in multiples + of aBaseSuperframeDuration + */ + ApiMac_attribute_responseWaitTime = 0x5A, + /*! The timestamp offset from SFD in symbols */ + ApiMac_attribute_syncSymbolOffset = 0x5B, + /*! Enhanced beacon sequence number */ + ApiMac_attribute_eBeaconSequenceNumber = 0x5E, + /*! Enhanced beacon order in a beacon enabled network */ + ApiMac_attribute_eBeaconOrder = 0x5F, + /*! Offset time slot from the beacon */ + ApiMac_attribute_offsetTimeslot = 0x61, + /*! + Duplicate transmit power attribute in signed + (2's complement) dBm unit + */ + ApiMac_attribute_phyTransmitPowerSigned = 0xE0, + /*! The logical channel */ + ApiMac_attribute_logicalChannel = 0xE1, + /*! alternate minimum backoff exponent */ + ApiMac_attribute_altBackoffExponent = 0xE3, + /*! Device beacon order */ + ApiMac_attribute_deviceBeaconOrder = 0xE4, + /*! valid values are true and false */ + ApiMac_attribute_rf4cePowerSavings = 0xE5, + /*! + Currently supports 0 and 1. + If 0, frame Version is always 0 and set to 1 only for secure frames. + If 1, frame version will be set to 1 only if packet len > 102 or + for secure frames + */ + ApiMac_attribute_frameVersionSupport = 0xE6, + /*! Channel Page */ + ApiMac_attribute_channelPage = 0xE7, + /*! + PHY Descriptor ID, used to support channel page number and index into + descriptor table + */ + ApiMac_attribute_phyCurrentDescriptorId = 0xE8, +} ApiMac_attribute_uint8_t; + +/*! Standard PIB Get and Set Attributes - size uint16_t */ +typedef enum +{ + /*! + The short address assigned to the coordinator with which the + device is associated. A value of MAC_ADDR_USE_EXT indicates + that the coordinator is using its extended address + */ + ApiMac_attribute_coordShortAddress = 0x4B, + /*! + The PAN identifier. If this value is 0xffff, the device is + not associated + */ + ApiMac_attribute_panId = 0x50, + /*! + The short address that the device uses to communicate in the PAN. + If the device is a PAN coordinator, this value shall be set before + calling MAC_StartReq(). Otherwise the value is allocated during + association. Value MAC_ADDR_USE_EXT indicates that the device is + associated but not using a short address + */ + ApiMac_attribute_shortAddress = 0x53, + /*! + The maximum time in beacon intervals that a transaction is stored by + a coordinator and indicated in the beacon + */ + ApiMac_attribute_transactionPersistenceTime = 0x55, + /*! + The maximum number of CAP symbols in a beacon-enabled PAN, or + symbols in a non beacon-enabled PAN, to wait for a frame intended + as a response to a data request frame + */ + ApiMac_attribute_maxFrameTotalWaitTime = 0x58, + /*! Enhanced beacon order in a non-beacon enabled network */ + ApiMac_attribute_eBeaconOrderNBPAN = 0x60, +} ApiMac_attribute_uint16_t; + + +/*! Standard PIB Get and Set Attributes - size uint32_t */ +typedef enum +{ + /*! + The time the device transmitted its last beacon frame, + in backoff period units + */ + ApiMac_attribute_beaconTxTime = 0x48, + /*! Diagnostics PIB - Received CRC pass counter */ + ApiMac_attribute_diagRxCrcPass = 0xEA, + /*! Diagnostics PIB - Received CRC fail counter */ + ApiMac_attribute_diagRxCrcFail = 0xEB, + /*! Diagnostics PIB - Received broadcast counter */ + ApiMac_attribute_diagRxBroadcast = 0xEC, + /*! Diagnostics PIB - Transmitted broadcast counter */ + ApiMac_attribute_diagTxBroadcast = 0xED, + /*! Diagnostics PIB - Received unicast counter */ + ApiMac_attribute_diagRxUnicast = 0xEE, + /*! Diagnostics PIB - Transmitted unicast counter */ + ApiMac_attribute_diagTxUnicast = 0xEF, + /*! Diagnostics PIB - Transmitted unicast retry counter */ + ApiMac_attribute_diagTxUnicastRetry = 0xF0, + /*! Diagnostics PIB - Transmitted unicast fail counter */ + ApiMac_attribute_diagTxUnicastFail = 0xF1, + /*! Diagnostics PIB - Received Security fail counter */ + ApiMac_attribute_diagRxSecureFail = 0xF2, + /*! Diagnostics PIB - Transmit Security fail counter */ + ApiMac_attribute_diagTxSecureFail = 0xF3 +} ApiMac_attribute_uint32_t; + +/*! Standard PIB Get and Set Attributes - these attributes are array of bytes */ +typedef enum +{ + /*! The contents of the beacon payload */ + ApiMac_attribute_beaconPayload = 0x45, + /*! + The extended address of the coordinator with which the device + is associated + */ + ApiMac_attribute_coordExtendedAddress = 0x4A, + /*! The extended address of the device */ + ApiMac_attribute_extendedAddress = 0xE2, +} ApiMac_attribute_array_t; + +/*! Security PIB Get and Set Attributes - size uint8_t */ +typedef enum +{ + /*! The number of entries in macKeyTable */ + ApiMac_securityAttribute_keyTableEntries = 0x81, + /*! The number of entries in macDeviceTable */ + ApiMac_securityAttribute_deviceTableEntries = 0x82, + /*! The number of entries in macSecurityLevelTable */ + ApiMac_securityAttribute_securityLevelTableEntries = 0x83, + /*! The security level used for automatic data requests */ + ApiMac_securityAttribute_autoRequestSecurityLevel = 0x85, + /*!The key identifier mode used for automatic data requests */ + ApiMac_securityAttribute_autoRequestKeyIdMode = 0x86, + /*! The index of the key used for automatic data requests */ + ApiMac_securityAttribute_autoRequestKeyIndex = 0x88, +} ApiMac_securityAttribute_uint8_t; + +/*! Security PIB Get and Set Attributes - size uint16_t */ +typedef enum +{ + /*!The 16-bit short address assigned to the PAN coordinator */ + ApiMac_securityAttribute_panCoordShortAddress = 0x8B, +} ApiMac_securityAttribute_uint16_t; + +/*! Security PIB Get and Set Attributes - array of bytes */ +typedef enum +{ + /*! The originator of the key used for automatic data requests */ + ApiMac_securityAttribute_autoRequestKeySource = 0x87, + /*! The originator of the default key used for key ID mode 0x01 */ + ApiMac_securityAttribute_defaultKeySource = 0x89, + /*! The 64-bit address of the PAN coordinator */ + ApiMac_securityAttribute_panCoordExtendedAddress = 0x8A, +} ApiMac_securityAttribute_array_t; + +/*! Security PIB Get and Set Attributes - these attributes are structures */ +typedef enum +{ + /*! + A table of KeyDescriptor, entries, each containing keys and related + information required for secured communications. This is a SET only + attribute. Call ApiMac_mlmeSetSecurityReqStruct() with pValue set + to NULL, the MAC will build the table. + */ + ApiMac_securityAttribute_keyTable = 0x71, + /*! + The key lookup table entry, part of an entry of the key table. + To GET or SET to this attribute, setup the keyIndex and keyIdLookupIndex + fields of ApiMac_securityPibKeyIdLookupEntry_t, call + ApiMac_mlmeGetSecurityReqStruct() or ApiMac_mlmeSetSecurityReqStruct() + with a pointer to the ApiMac_securityPibKeyIdLookupEntry_t structure. + For the GET, the lookupEntry field will contain the required data. + */ + ApiMac_securityAttribute_keyIdLookupEntry = 0xD0, + /*! + The key device entry, part of an entry of the key table. + To GET or SET to this attribute, setup the keyIndex and keyDeviceIndex + fields of ApiMac_securityPibKeyDeviceEntry_t, call + ApiMac_mlmeGetSecurityReqStruct() or ApiMac_mlmeSetSecurityReqStruct() + with a pointer to the ApiMac_securityPibKeyDeviceEntry_t structure. + For the GET, the deviceEntry field will contain the required data. + */ + ApiMac_securityAttribute_keyDeviceEntry = 0xD1, + /*! + The key usage entry, part of an entry of the key table. + To GET or SET to this attribute, setup the keyIndex and keyUsageIndex + fields of ApiMac_securityPibKeyUsageEntry_t, call + ApiMac_mlmeGetSecurityReqStruct() or ApiMac_mlmeSetSecurityReqStruct() + with a pointer to the ApiMac_securityPibKeyUsageEntry_t structure. + For the GET, the usageEntry field will contain the required data. + */ + ApiMac_securityAttribute_keyUsageEntry = 0xD2, + /*! + The MAC key entry, an entry of the key table. + To GET or SET to this attribute, setup the keyIndex + field of ApiMac_securityPibKeyEntry_t, call + ApiMac_mlmeGetSecurityReqStruct() or ApiMac_mlmeSetSecurityReqStruct() + with a pointer to the ApiMac_securityPibKeyEntry_t structure. + For the GET, the rest of the fields will contain the required data. + */ + ApiMac_securityAttribute_keyEntry = 0xD3, + /*! + The MAC device entry, an entry of the device table. + To GET or SET to this attribute, setup the deviceIndex + field of ApiMac_securityPibDeviceEntry_t, call + ApiMac_mlmeGetSecurityReqStruct() or ApiMac_mlmeSetSecurityReqStruct() + with a pointer to the ApiMac_securityPibDeviceEntry_t structure. + For the GET, the deviceEntry field will contain the required data. + */ + ApiMac_securityAttribute_deviceEntry = 0xD4, + /*! + The MAC security level entry, an entry of the security level table. + To GET or SET to this attribute, setup the levelIndex + field of ApiMac_securityPibSecurityLevelEntry_t, call + ApiMac_mlmeGetSecurityReqStruct() or ApiMac_mlmeSetSecurityReqStruct() + with a pointer to the ApiMac_securityPibSecurityLevelEntry_t structure. + For the GET, the levelEntry field will contain the required data. + */ + ApiMac_securityAttribute_securityLevelEntry = 0xD5 +} ApiMac_securityAttribute_struct_t; + +/*! Frequency Hopping PIB Get and Set Attributes - size uint8_t */ +typedef enum +{ + /*! Duration of node's unicast slot (in milliseconds) - uint8_t */ + ApiMac_FHAttribute_unicastDwellInterval = 0x2004, + /*! Duration of node's broadcast slot (in milliseconds) - uint8_t */ + ApiMac_FHAttribute_broadcastDwellInterval = 0x2005, + /*! Clock drift in PPM - uint8_t */ + ApiMac_FHAttribute_clockDrift = 0x2006, + /*! Timing accuracy in 10 microsecond resolution - uint8_t */ + ApiMac_FHAttribute_timingAccuracy = 0x2007, + /*! Unicast channel hopping function - uint8_t */ + ApiMac_FHAttribute_unicastChannelFunction = 0x2008, + /*! Broadcast channel hopping function - uint8_t */ + ApiMac_FHAttribute_broadcastChannelFunction = 0x2009, + /*! Node is propagating parent's BS-IE - uint8_t */ + ApiMac_FHAttribute_useParentBSIE = 0x200A, + /*! Estimate of routing path ETX to the PAN coordinator - uint8_t */ + ApiMac_FHAttribute_routingCost = 0x200F, + /*! RPL(1), MHDS(0) - uint8_t */ + ApiMac_FHAttribute_routingMethod = 0x2010, + /*! Node can accept EAPOL message - uint8_t */ + ApiMac_FHAttribute_eapolReady = 0x2011, + /*! Wi-SUN FAN version - uint8_t */ + ApiMac_FHAttribute_fanTPSVersion = 0x2012, +} ApiMac_FHAttribute_uint8_t; + +/*! Frequency Hopping PIB Get and Set Attributes - size uint16_t */ +typedef enum +{ + /*! + Broadcast schedule ID for broadcast channel hopping sequence - uint16_t + */ + ApiMac_FHAttribute_broadcastSchedId = 0x200B, + /*! Unicast channel number when no hopping - uint16_t */ + ApiMac_FHAttribute_unicastFixedChannel = 0x200C, + /*! Broadcast channel number when no hopping - uint16_t */ + ApiMac_FHAttribute_broadcastFixedChannel = 0x200D, + /*! Number of nodes in the PAN - uint16_t */ + ApiMac_FHAttribute_panSize = 0x200E, + /*! PAN version to notify PAN configuration changes - uint16_t */ + ApiMac_FHAttribute_panVersion = 0x2014, + /*! Time in min during which the node info considered as valid - uint16_t */ + ApiMac_FHAttribute_neighborValidTime = 0x2019, +} ApiMac_FHAttribute_uint16_t; + +/*! Frequency Hopping PIB Get and Set Attributes - size uint32_t */ +typedef enum +{ + /*! + Time between start of two broadcast slots (in milliseconds) - uint32_t + */ + ApiMac_FHAttribute_BCInterval = 0x2001, +} ApiMac_FHAttribute_uint32_t; + +/*! Frequency Hopping PIB Get and Set Attributes - array of bytes */ +typedef enum +{ + /*! The parent EUI address - ApiMac_sAddrExt_t */ + ApiMac_FHAttribute_trackParentEUI = 0x2000, + /*! Unicast excluded channels - APIMAC_FH_MAX_BIT_MAP_SIZE */ + ApiMac_FHAttribute_unicastExcludedChannels = 0x2002, + /*! Broadcast excluded channels - APIMAC_FH_MAX_BIT_MAP_SIZE */ + ApiMac_FHAttribute_broadcastExcludedChannels = 0x2003, + /*! Network Name - APIMAC_FH_NET_NAME_SIZE_MAX uint8_t */ + ApiMac_FHAttribute_netName = 0x2013, + /*! + Low order 64 bits of SHA256 hash of GTK + */ + ApiMac_FHAttribute_gtk0Hash = 0x2015, + /*! + Next low order 64 bits of SHA256 hash of GTK + */ + ApiMac_FHAttribute_gtk1Hash = 0x2016, + /*! + Next low order 64 bits of SHA256 hash of GTK + */ + ApiMac_FHAttribute_gtk2Hash = 0x2017, + /*! + Next low order 64 bits of SHA256 hash of GTK + */ + ApiMac_FHAttribute_gtk3Hash = 0x2018, +} ApiMac_FHAttribute_array_t; + +/*! FH Frame Types */ +typedef enum +{ + /*! WiSUN PAN advertisement */ + ApiMac_fhFrameType_panAdvert = 0x00, + /*! WiSUN PAN advertisement solicit */ + ApiMac_fhFrameType_panAdvertSolicit = 0x01, + /*! WiSUN PAN config */ + ApiMac_fhFrameType_config = 0x02, + /*! WiSUN PAN config solicit */ + ApiMac_fhFrameType_configSolicit = 0x03, + /*! WiSUN Data frame */ + ApiMac_fhFrameType_data = 0x04, + /*! WiSUN Ack frame */ + ApiMac_fhFrameType_ack = 0x05, + /*! WiSUN Ack frame */ + ApiMac_fhFrameType_eapol = 0x06, + /*! Internal: WiSUN Invalid frame */ + ApiMac_fhFrameType_invalid = 0xFF +} ApiMac_fhFrameType_t; + +/*! Payload IE Group IDs */ +typedef enum +{ + /*! Payload ESDU IE Group ID */ + ApiMac_payloadIEGroup_ESDU = 0x00, + /*! Payload MLME IE Group ID */ + ApiMac_payloadIEGroup_MLME = 0x01, + /*! Payload WiSUN IE Group ID */ + ApiMac_payloadIEGroup_WiSUN = 0x04, + /*! Payload Termination IE Group ID */ + ApiMac_payloadIEGroup_term = 0x0F +} ApiMac_payloadIEGroup_t; + +/*! MLME Sub IEs */ +typedef enum +{ + /*! MLME Sub IEs - short format - Coexistence IE */ + ApiMac_MLMESubIE_coexist = 0x21, + /*! MLME Sub IEs - short format - SUN Device capabilities IE */ + ApiMac_MLMESubIE_sunDevCap = 0x22, + /*! MLME Sub IEs - short format - SUN FSK Generic PHY IE */ + ApiMac_MLMESubIE_sunFSKGenPhy = 0x23, +} ApiMac_MLMESubIE_t; + +/*! WiSUN Sub IEs */ +typedef enum +{ + /*! WiSUN Sub IE - Long format - Unicast Schedule IE */ + ApiMac_wisunSubIE_USIE = 1, + /*! WiSUN Sub IE - Long format - Broadcast Schedule IE */ + ApiMac_wisunSubIE_BSIE = 2, + /*! WiSUN Sub IE - Short format - PAN IE */ + ApiMac_wisunSubIE_PANIE = 4, + /*! WiSUN Sub IE - Short format - Network Name IE */ + ApiMac_wisunSubIE_netNameIE = 5, + /*! WiSUN Sub IE - Short format - PAN Version IE */ + ApiMac_wisunSubIE_PANVersionIE = 6, + /*! WiSUN Sub IE - Short format - GTK Hash IE */ + ApiMac_wisunSubIE_GTKHashIE = 7 +} ApiMac_wisunSubIE_t; + +/*! Scan Types */ +typedef enum +{ + /*! + Energy detect scan. The device will tune to each channel and + perform and energy measurement. The list of channels and their + associated measurements will be returned at the end of the scan + */ + ApiMac_scantype_energyDetect = 0, + /*! + Active scan. The device tunes to each channel, sends a beacon + request and listens for beacons. The PAN descriptors are returned + at the end of the scan + */ + ApiMac_scantype_active = 1, + /*! + Passive scan. The device tunes to each channel and listens for + beacons. The PAN descriptors are returned at the end of the scan + */ + ApiMac_scantype_passive = 2, + /*! + Orphan scan. The device tunes to each channel and sends an orphan + notification to try and find its coordinator. The status is returned + at the end of the scan + */ + ApiMac_scantype_orphan = 3, + /*! + Enhanced Active scan. In addition to Active scan, this command is also + used by a device to locate a subset of all coordinators within its + POS during an active scan + */ + ApiMac_scantype_activeEnhanced = 5 +} ApiMac_scantype_t; + +/*! WiSUN Async Operations */ +typedef enum +{ + /*! Start Async */ + ApiMac_wisunAsycnOperation_start = 0, + /*! Stop Async */ + ApiMac_wisunAsycnOperation_stop = 1 +} ApiMac_wisunAsycnOperation_t; + +/*! WiSUN Async Frame Types */ +typedef enum +{ + /*! WiSUN Async PAN Advertisement Frame type */ + ApiMac_wisunAsyncFrame_advertisement = 0, + /*! WiSUN Async PAN Advertisement Solicitation Frame type */ + ApiMac_wisunAsyncFrame_advertisementSolicit = 1, + /*! WiSUN Async PAN Configuration Frame type */ + ApiMac_wisunAsyncFrame_config = 2, + /*! WiSUN Async PAN Configuration Solicitation Frame type */ + ApiMac_wisunAsyncFrame_configSolicit = 3 +} ApiMac_wisunAsyncFrame_t; + +/*! Freqency Hopping Dispatch Values */ +typedef enum +{ + /*! No protocol dispatch */ + ApiMac_fhDispatchType_none = 0, + /*! MHD-PDU protocol dispatch */ + ApiMac_fhDispatchType_MHD_PDU = 1, + /*! 6LowPAN protocol dispatch */ + ApiMac_fhDispatchType_6LowPAN = 2 +} ApiMac_fhDispatchType_t; + +/****************************************************************************** + Structures - Building blocks for the API for the MAC Module + *****************************************************************************/ + +/*! Extended address */ +typedef uint8_t ApiMac_sAddrExt_t[APIMAC_SADDR_EXT_LEN]; + +/*! MAC address type field structure */ +typedef struct +{ + /*! + The address can be either a long address or a short address depending + the addrMode field. + */ + union + { + /*! 16 bit address */ + uint16_t shortAddr; + /*! Extended address */ + ApiMac_sAddrExt_t extAddr; + } addr; + + /*! Address type/mode */ + ApiMac_addrType_t addrMode; +} ApiMac_sAddr_t; + +/*! Data buffer structure */ +typedef struct _apimac_sdata +{ + /*! pointer to the data buffer */ + uint8_t *p; + /*! length of the data buffer */ + uint16_t len; +} ApiMac_sData_t; + +/*! + Generic PHY Descriptor. + We are using this structure for both Channel Page 9 and Channel Page 10. + */ +typedef struct _apimac_mrfskphydesc +{ + /*! First Channel Center frequency */ + uint32_t firstChCentrFreq; + /*! Number of channels defined for the particular PHY mode */ + uint16_t numChannels; + /*! Distance between Adjacent center channel frequencies */ + uint32_t channelSpacing; + /*! 2-FSK/2-GFSK/4-FSK/4-GFSK */ + uint8_t fskModScheme; + /*! Symbol rate selection */ + uint8_t symbolRate; + /*! + Modulation index as a value encoded in + MR-FSK Generic PHY Descriptor IE + (IEEE802.15.4g section 5.2.4.20c). +
+ 2FSK MI = 0.25 + Modulation Index * 0.05 +
+ 4FSK MI is a third of 2FSK MI + */ + uint8_t fskModIndex; + /*! Channel clearance algorithm selection */ + uint8_t ccaType; +} ApiMac_MRFSKPHYDesc_t; + +/*! Common security type */ +typedef struct _apimac_sec +{ + /*! Key source */ + uint8_t keySource[APIMAC_KEY_SOURCE_MAX_LEN]; + /*! Security Level */ + uint8_t securityLevel; + /*! Key identifier mode */ + uint8_t keyIdMode; + /*! Key index */ + uint8_t keyIndex; +} ApiMac_sec_t; + +/*! Key ID Lookup Descriptor */ +typedef struct _apimac_keyidlookupdescriptor +{ + /*! Data used to identify the key */ + uint8_t lookupData[APIMAC_MAX_KEY_LOOKUP_LEN]; + /*! 0x00 indicates 5 octets; 0x01 indicates 9 octets */ + uint8_t lookupDataSize; +} ApiMac_keyIdLookupDescriptor_t; + +/*! Key Device Descriptor */ +typedef struct _apimac_keydevicedescriptor +{ + /*! Handle to the DeviceDescriptor */ + uint8_t deviceDescriptorHandle; + /*! True if the device is unique */ + bool uniqueDevice; + /*! This key exhausted the frame counter. */ + bool blackListed; +} ApiMac_keyDeviceDescriptor_t; + +/*! Key Usage Descriptor */ +typedef struct _apimac_keyusagedescriptor +{ + /*! Frame Type */ + uint8_t frameType; + /*! Command Frame Identifier */ + uint8_t cmdFrameId; +} ApiMac_keyUsageDescriptor_t; + +/*! Key Descriptor */ +typedef struct _apimac_keydescriptor +{ + /*! A list identifying this KeyDescriptor */ + ApiMac_keyIdLookupDescriptor_t *keyIdLookupList; + /*! The number of entries in KeyIdLookupList */ + uint8_t keyIdLookupEntries; + /*! + A list indicating which devices are currently using this key, including + their blacklist status. + */ + ApiMac_keyDeviceDescriptor_t *keyDeviceList; + /*! The number of entries in KeyDeviceList */ + uint8_t keyDeviceListEntries; + /*! A list indicating which frame types this key may be used with. */ + ApiMac_keyUsageDescriptor_t *keyUsageList; + /*! The number of entries in KeyUsageList */ + uint8_t keyUsageListEntries; + /*! The actual value of the key */ + uint8_t key[APIMAC_KEY_MAX_LEN]; + /*! + PIB frame counter in 802.15.4 is universal across key, + but it makes more sense to associate a frame counter + with a key. + */ + uint32_t frameCounter; +} ApiMac_keyDescriptor_t; + +/*! Device Descriptor */ +typedef struct _apimac_devicedescriptor +{ + /*! The 16-bit PAN identifier of the device */ + uint16_t panID; + /*! The 16-bit short address of the device */ + uint16_t shortAddress; + /*! + The 64-bit IEEE extended address of the device. This element is also + used inunsecuring operations on incoming frames. + */ + ApiMac_sAddrExt_t extAddress; +} ApiMac_deviceDescriptor_t; + +/*! Security Level Descriptor */ +typedef struct _apimac_securityleveldescriptor +{ + /*! Frame Type */ + uint8_t frameType; + /*! Command Frame ID */ + uint8_t commandFrameIdentifier; + /*! + The minimal required/expected security level for incoming MAC frames. + */ + uint8_t securityMinimum; + /*! + Indication of whether originating devices for which the Exempt flag is + set may override the minimum security level indicated by the Security + Minimum element. If TRUE, this indicates that for originating devices + with Exempt status, the incoming security level zero is acceptable. + */ + bool securityOverrideSecurityMinimum; +} ApiMac_securityLevelDescriptor_t; + +/*! Security Device Descriptor */ +typedef struct _apimac_secdevicedescriptor +{ + /*! Device information */ + ApiMac_deviceDescriptor_t devInfo; + /*! + The incoming frame counter of the device. This value is used to + ensure sequential freshness of frames. + */ + uint32_t frameCounter[APIMAC_MAX_KEY_TABLE_ENTRIES]; + /*! Device may override the minimum security level settings. */ + bool exempt; +} ApiMac_securityDeviceDescriptor_t; + +/*! MAC key entry structure */ +typedef struct _apimac_securitykeyentry +{ + /*! The 128-bit key */ + uint8_t keyEntry[APIMAC_KEY_MAX_LEN]; + /*! the key's index - unique */ + uint8_t keyIndex; + /*! The key's frame counter */ + uint32_t frameCounter; +} ApiMac_securityKeyEntry_t; + +/*! + Security PIB Key ID lookup entry for a Get/Set + ApiMac_securityAttribute_keyIdLookupEntry + */ +typedef struct _apimac_securitypibkeyidlookupentry +{ + /*! index into the macKeyIdLookupList */ + uint8_t keyIndex; + /*! index into macKeyIdLookupList[keyIndex] */ + uint8_t keyIdLookupIndex; + /*! Place to put the requested data */ + ApiMac_keyIdLookupDescriptor_t lookupEntry; +} ApiMac_securityPibKeyIdLookupEntry_t; + +/*! + Security PIB Key ID device entry for a Get/Set + ApiMac_securityAttribute_keyDeviceEntry + */ +typedef struct _apimac_securitypibkeydeviceentry +{ + /*! index into the macKeyDeviceList */ + uint8_t keyIndex; + /*! index into macKeyDeviceList[keyIndex] */ + uint8_t keyDeviceIndex; + /*! Place to put the requested data */ + ApiMac_keyDeviceDescriptor_t deviceEntry; +} ApiMac_securityPibKeyDeviceEntry_t; + +/*! + Security PIB Key ID usage entry for a Get/Set + ApiMac_securityAttribute_keyUsageEntry + */ +typedef struct _apimac_securitypibkeyusageentry +{ + /*! index into the macKeyUsageList */ + uint8_t keyIndex; + /*! index into macKeyUsageList[keyIndex] */ + uint8_t keyUsageIndex; + /*! Place to put the requested data */ + ApiMac_keyUsageDescriptor_t usageEntry; +} ApiMac_securityPibKeyUsageEntry_t; + +/*! + Security PIB Key entry for a Get/Set + ApiMac_securityAttribute_keyEntry + */ +typedef struct _apimac_securitypibkeyentry +{ + /*! index into the macKeyTable */ + uint8_t keyIndex; + /*! key entry */ + uint8_t keyEntry[APIMAC_KEY_MAX_LEN]; + /*! frame counter */ + uint32_t frameCounter; +} ApiMac_securityPibKeyEntry_t; + +/*! + Security PIB device entry for a Get/Set + ApiMac_securityAttribute_deviceEntry + */ +typedef struct _apimac_securitypibdeviceentry +{ + /*! index into the macDeviceTable */ + uint8_t deviceIndex; + /*! Place to put the requested data */ + ApiMac_securityDeviceDescriptor_t deviceEntry; +} ApiMac_securityPibDeviceEntry_t; + + +/*! + Security PIB level entry for a Get/Set + ApiMac_securityAttribute_securityLevelEntry + */ +typedef struct _apimac_securitypiblevelentry +{ + /*! index into the macSecurityLevelTable */ + uint8_t levelIndex; + /*! Place to put the requested data */ + ApiMac_securityLevelDescriptor_t levelEntry; +} ApiMac_securityPibSecurityLevelEntry_t; + +/*! Structure defines the Capabilities Information bit field. */ +typedef struct _apimac_capabilityinfo +{ + /*! True if the device is a PAN Coordinator */ + bool panCoord; + /*! True if the device is a full function device (FFD) */ + bool ffd; + /*! True if the device is mains powered */ + bool mainsPower; + /*! True if the device's RX is on when the device is idle */ + bool rxOnWhenIdle; + /*! True if the device is capable of sending and receiving secured frames + */ + bool security; + /*! + True if allocation of a short address in the associate procedure + is needed. + */ + bool allocAddr; +} ApiMac_capabilityInfo_t; + +/*! Data Request Transmit Options */ +typedef struct _apimac_txoptions +{ + /*! + Acknowledged transmission. The MAC will attempt to retransmit + the frame until it is acknowledged + */ + bool ack; + /*! + Indirect transmission. The MAC will queue the data and wait + for the destination device to poll for it. This can only be used + by a coordinator device + */ + bool indirect; + /*! + This proprietary option forces the pending bit set for direct + transmission + */ + bool pendingBit; + /*! + This proprietary option prevents the frame from being retransmitted + */ + bool noRetransmits; + /*! + This proprietary option prevents a MAC_MCPS_DATA_CNF + event from being sent for this frame + */ + bool noConfirm; + /*! + Use PIB value MAC_ALT_BE for the minimum backoff exponent + */ + bool useAltBE; + /*! + Use the power and channel values in macDataReq_t + instead of the PIB values + */ + bool usePowerAndChannel; +} ApiMac_txOptions_t; + +/*! MCPS data request type */ +typedef struct _apimac_mcpsdatareq +{ + /*! The address of the destination device */ + ApiMac_sAddr_t dstAddr; + /*! The PAN ID of the destination device */ + uint16_t dstPanId; + /*! The source address mode */ + ApiMac_addrType_t srcAddrMode; + /*! Application-defined handle value associated with this data request */ + uint8_t msduHandle; + /*! TX options bit mask */ + ApiMac_txOptions_t txOptions; + /*! Transmit the data frame on this channel */ + uint8_t channel; + /*! Transmit the data frame at this power level */ + uint8_t power; + /*! pointer to the payload IE list, excluding termination IEs */ + uint8_t *pIEList; + /*! length of the payload IE */ + uint16_t payloadIELen; + /*! + Freq hopping Protocol Dispatch - RESERVED for future use, should + be cleared. + */ + ApiMac_fhDispatchType_t fhProtoDispatch; + /*! Bitmap indicates which FH IE's need to be included */ + uint32_t includeFhIEs; + /*! Data buffer */ + ApiMac_sData_t msdu; + /*! Security Parameters */ + ApiMac_sec_t sec; +} ApiMac_mcpsDataReq_t; + +/*! Structure a Payload information Item */ +typedef struct _apimac_payloadieitem +{ + /*! True if payload IE type is long */ + bool ieTypeLong; + /*! IE ID */ + uint8_t ieId; + /*! IE Content Length - max size 2047 bytes */ + uint16_t ieContentLen; + /*! Pointer to the IE's content */ + uint8_t *pIEContent; +} ApiMac_payloadIeItem_t; + +/*! A Payload IE Link List record */ +typedef struct _apimac_payloadierec +{ + /*! Pointer to the next element in the linked list, NULL if no more */ + void *pNext; + /*! Payload IE information item */ + ApiMac_payloadIeItem_t item; +} ApiMac_payloadIeRec_t; + +/*! MCPS data indication type */ +typedef struct _apimac_mcpsdataind +{ + /*! The address of the sending device */ + ApiMac_sAddr_t srcAddr; + /*! The address of the destination device */ + ApiMac_sAddr_t dstAddr; + /*! The time, in backoffs, at which the data were received */ + uint32_t timestamp; + /*! + The time, in internal MAC timer units, at which the data were received + */ + uint16_t timestamp2; + /*! The PAN ID of the sending device */ + uint16_t srcPanId; + /*! The PAN ID of the destination device */ + uint16_t dstPanId; + /*! The link quality of the received data frame */ + uint8_t mpduLinkQuality; + /*! The raw correlation value of the received data frame */ + uint8_t correlation; + /*! The received RF power in units dBm */ + int8_t rssi; + /*! The data sequence number of the received frame */ + uint8_t dsn; + /*! length of the payload IE buffer (pPayloadIE) */ + uint16_t payloadIeLen; + /*! Pointer to the start of payload IEs */ + uint8_t *pPayloadIE; + /*! Frequency Hopping Frame Type */ + ApiMac_fhFrameType_t fhFrameType; + /*! Frequency hopping protocol dispatch - RESERVED for future use. */ + ApiMac_fhDispatchType_t fhProtoDispatch; + /*! Frame counter value of the received data frame (if used) */ + uint32_t frameCntr; + /*! Security Parameters */ + ApiMac_sec_t sec; + /*! Data Buffer */ + ApiMac_sData_t msdu; +} ApiMac_mcpsDataInd_t; + +/*! MCPS data confirm type */ +typedef struct _apimac_mcpsdatacnf +{ + /*! Contains the status of the data request operation */ + ApiMac_status_t status; + /*! Application-defined handle value associated with the data request */ + uint8_t msduHandle; + /*! The time, in backoffs, at which the frame was transmitted */ + uint32_t timestamp; + /*! + The time, in internal MAC timer units, at which the frame was + transmitted + */ + uint16_t timestamp2; + /*! The number of retries required to transmit the data frame */ + uint8_t retries; + /*! The link quality of the received ack frame */ + uint8_t mpduLinkQuality; + /*! The raw correlation value of the received ack frame */ + uint8_t correlation; + /*! The RF power of the received ack frame in units dBm */ + int8_t rssi; + /*! Frame counter value used (if any) for the transmitted frame */ + uint32_t frameCntr; +} ApiMac_mcpsDataCnf_t; + +/*! MCPS purge confirm type */ +typedef struct _apimac_mcpspurgecnf +{ + /*! The status of the purge request operation */ + ApiMac_status_t status; + /*! Application-defined handle value associated with the data request */ + uint8_t msduHandle; +} ApiMac_mcpsPurgeCnf_t; + +/*! PAN descriptor type */ +typedef struct _apimac_pandesc +{ + /*! The address of the coordinator sending the beacon */ + ApiMac_sAddr_t coordAddress; + /*! The PAN ID of the network */ + uint16_t coordPanId; + /*! + The superframe specification of the network, this field contains + the beacon order, superframe order, final CAP slot, battery life + extension, PAN coordinator bit, and association permit flag. + Use the following macros to parse this field: APIMAC_SFS_BEACON_ORDER(), + APIMAC_SFS_SUPERFRAME_ORDER(), APIMAC_SFS_FINAL_CAP_SLOT() + APIMAC_SFS_BLE(), APIMAC_SFS_PAN_COORDINATOR(), and + APIMAC_SFS_ASSOCIATION_PERMIT(). + */ + uint16_t superframeSpec; + /*! The logical channel of the network */ + uint8_t logicalChannel; + /*! The current channel page occupied by the network */ + uint8_t channelPage; + /*! + TRUE if coordinator accepts GTS requests. This field is not used for + enhanced beacons. + */ + bool gtsPermit; + /*! The link quality of the received beacon */ + uint8_t linkQuality; + /*! The time at which the beacon was received, in backoffs */ + uint32_t timestamp; + /*! TRUE if there was an error in the security processing */ + bool securityFailure; + /*! The security parameters for the received beacon frame */ + ApiMac_sec_t sec; +} ApiMac_panDesc_t; + +/*! MLME associate request type */ +typedef struct _apimac_macmlmeassociatereq +{ + /*! The security parameters for this message */ + ApiMac_sec_t sec; + /*! The channel on which to attempt association */ + uint8_t logicalChannel; + /*! The channel page on which to attempt association */ + uint8_t channelPage; + /*! Identifier for the PHY descriptor */ + uint8_t phyID; + /*! Address of the coordinator with which to associate */ + ApiMac_sAddr_t coordAddress; + /*! The identifier of the PAN with which to associate */ + uint16_t coordPanId; + /*! The operational capabilities of this device */ + ApiMac_capabilityInfo_t capabilityInformation; +} ApiMac_mlmeAssociateReq_t; + +/*! MLME associate response type */ +typedef struct _apimac_mlmeassociatersp +{ + /*! The security parameters for this message */ + ApiMac_sec_t sec; + /*! The address of the device requesting association */ + ApiMac_sAddrExt_t deviceAddress; + /*! The short address allocated to the device */ + uint16_t assocShortAddress; + /*! The status of the association attempt */ + ApiMac_assocStatus_t status; +} ApiMac_mlmeAssociateRsp_t; + +/*! MLME disassociate request type */ +typedef struct _apimac_mlmedisassociatereq +{ + /*! The security parameters for this message */ + ApiMac_sec_t sec; + /*! The address of the device with which to disassociate */ + ApiMac_sAddr_t deviceAddress; + /*! The PAN ID of the device */ + uint16_t devicePanId; + /*! The disassociate reason */ + ApiMac_disassocateReason_t disassociateReason; + /*! Transmit Indirect */ + bool txIndirect; +} ApiMac_mlmeDisassociateReq_t; + +/*! MLME orphan response type */ +typedef struct _apimac_mlmeorphanrsp +{ + /*! The security parameters for this message */ + ApiMac_sec_t sec; + /*! The extended address of the device sending the orphan notification */ + ApiMac_sAddrExt_t orphanAddress; + /*! The short address of the orphaned device */ + uint16_t shortAddress; + /*! + TRUE if the orphaned device is associated with this coordinator + */ + bool associatedMember; +} ApiMac_mlmeOrphanRsp_t; + +/*! MLME poll request type */ +typedef struct _apimac_mlmepollreq +{ + /*! The address of the coordinator device to poll */ + ApiMac_sAddr_t coordAddress; + /*! The PAN ID of the coordinator */ + uint16_t coordPanId; + /*! The security parameters for this message */ + ApiMac_sec_t sec; +} ApiMac_mlmePollReq_t; + +/*! MLME scan request type */ +typedef struct _apimac_mlmescanreq +{ + /*! Bit mask indicating which channels to scan */ + uint8_t scanChannels[APIMAC_154G_CHANNEL_BITMAP_SIZ]; + /*! The type of scan */ + ApiMac_scantype_t scanType; + /*! The exponent used in the scan duration calculation */ + uint8_t scanDuration; + /*! The channel page on which to perform the scan */ + uint8_t channelPage; + /*! PHY ID corresponding to the PHY descriptor to use */ + uint8_t phyID; + /*! + The maximum number of PAN descriptor results, these + results will be returned in the scan confirm. + */ + uint8_t maxResults; + /*! + Only devices with permit joining enabled respond to the enhanced + beacon request + */ + bool permitJoining; + /*! + The device will respond to the enhanced beacon request + if mpduLinkQuality is equal or higher than this value + */ + uint8_t linkQuality; + /*! + The device will then randomly determine if it is to + respond to the enhanced beacon request based on meeting + this probability (0 to 100%). + */ + uint8_t percentFilter; + /*! The security parameters for this message */ + ApiMac_sec_t sec; + /*! + When TRUE, scanDuration is ignored. When FALSE, scan duration + shall be set to scanDuration; MPMScanDuration is ignored + */ + bool MPMScan; + /*! BPAN or NBPAN */ + uint8_t MPMScanType; + /*! + If MPMScanType is BPAN, MPMScanDuration values are 0-14. + It is used in determining the max time spent scanning + for an EB in a beacon enabled PAN on the channel. + [aBaseSuperframeDuration * 2^n symbols], where + n is the MPMScanDuration. + If MPMScanType is NBPAN, valid values are 1 - 16383. + It is used in determining the max time spent scanning for an + EB in nonbeacon-enabled PAN on the channel. + [aBaseSlotDuration * n] symbols, where n + is MPMScanDuration. + */ + uint16_t MPMScanDuration; +} ApiMac_mlmeScanReq_t; + +/*! MPM(Multi-PHY layer management) parameters */ +typedef struct _apimac_mpmParams +{ + /*! + The exponent used to calculate the enhanced beacon interval. + A value of 15 indicates no EB in a beacon enabled PAN + */ + uint8_t eBeaconOrder; + /*! + Indicates the time diff between the EB and the preceeding + periodic Beacon. The valid range for this field is 10 - 15. + */ + uint8_t offsetTimeSlot; + /*! + Indicates how often the EB to tx in a non-beacon enabled PAN. A value of + 16383 indicates no EB in a non-beacon enabled PAN + */ + uint16_t NBPANEBeaconOrder; + /*! + pointer to the buffer containing the Information element IDs which needs + to be sent in Enhanced Beacon. This field is reserved for future use + and should be set to NULL. + */ + uint8_t *pIEIDs; + /*! + The number of Information Elements in the buffer (size of buffer + at pIEIDs. This field is reserved for future use and should be set to 0. + */ + uint8_t numIEs; +} ApiMac_mpmParams_t; + +/*! MLME start request type */ +typedef struct _apimac_mlmestartreq +{ + /*! + The time to begin transmitting beacons relative to the received beacon + */ + uint32_t startTime; + /*! + The PAN ID to use. This parameter is ignored if panCoordinator is FALSE + */ + uint16_t panId; + /*! + The logical channel to use. This parameter is ignored if panCoordinator + is FALSE + */ + uint8_t logicalChannel; + /*! + The channel page to use. This parameter is ignored if panCoordinator + is FALSE + */ + uint8_t channelPage; + /*! PHY ID corresponding to the PHY descriptor to use */ + uint8_t phyID; + /*! The exponent used to calculate the beacon interval */ + uint8_t beaconOrder; + /*! The exponent used to calculate the superframe duration */ + uint8_t superframeOrder; + /*! Set to TRUE to start a network as PAN coordinator */ + bool panCoordinator; + /*! + If this value is TRUE, the receiver is disabled after + MAC_BATT_LIFE_EXT_PERIODS full backoff periods following the interframe + spacing period of the beacon frame + */ + bool batteryLifeExt; + /*! + Set to TRUE to transmit a coordinator realignment prior to changing + the superframe configuration + */ + bool coordRealignment; + /*! Security parameters for the coordinator realignment frame */ + ApiMac_sec_t realignSec; + /*! Security parameters for the beacon frame */ + ApiMac_sec_t beaconSec; + /*! MPM (multi-PHY layer management) parameters */ + ApiMac_mpmParams_t mpmParams; + /*! Indicates whether frequency hopping needs to be enabled */ + bool startFH; +} ApiMac_mlmeStartReq_t; + +/*! MAC_MlmeSyncReq type */ +typedef struct _apimac_mlmesyncreq +{ + /*! The logical channel to use */ + uint8_t logicalChannel; + /*! The channel page to use */ + uint8_t channelPage; + /*! PHY ID corresponding to the PHY descriptor to use */ + uint8_t phyID; + /*! + Set to TRUE to continue tracking beacons after synchronizing with the + first beacon. Set to FALSE to only synchronize with the first beacon + */ + uint8_t trackBeacon; +} ApiMac_mlmeSyncReq_t; + +/*! MLME WiSUN Async request type */ +typedef struct _apimac_mlmewsasyncreq +{ + /*! Start or Stop Async operation */ + ApiMac_wisunAsycnOperation_t operation; + /*! Async frame type */ + ApiMac_wisunAsyncFrame_t frameType; + /*! + Bit Mask indicating which channels to send the Async frames for the + start operation + */ + uint8_t channels[APIMAC_154G_CHANNEL_BITMAP_SIZ]; + /*! The security parameters for this message */ + ApiMac_sec_t sec; +} ApiMac_mlmeWSAsyncReq_t; + +/*! Structure to pass information to the ApiMac_secAddDevice(). */ +typedef struct _apimac_secadddevice +{ + /*! PAN ID of the new device */ + uint16_t panID; + /*! short address of the new device */ + uint16_t shortAddr; + /*! extended address of the new device */ + ApiMac_sAddrExt_t extAddr; + /*! + Device descriptor exempt field value (true or false), setting this + field to true means that this device can override the minimum + security level setting. + */ + bool exempt; + /*! + key ID lookup data size as it is stored in PIB, (i.e., + 0 for 5 bytes, 1 for 9 bytes). + */ + uint8_t keyIdLookupDataSize; + /*! + key ID lookup data, to look for the key table entry and create + proper key device descriptor for this device. + */ + uint8_t keyIdLookupData[APIMAC_MAX_KEY_LOOKUP_LEN]; + /*! Frame Counter */ + uint32_t frameCounter; + /*! key device descriptor uniqueDevice field value (true or false) */ + bool uniqueDevice; + /*! + A flag (true or false) to indicate whether the device entry should be + duplicated even for the keys that do not match the key ID lookup data. + The device descriptors that are pointed by the key device descriptors + that do not match the key ID lookup data shall not update the frame counter + based on the frameCounter argument to this function or shall set the + frame counter to zero when the entry is newly created. + */ + bool duplicateDevFlag; +} ApiMac_secAddDevice_t; + +/*! Structure to pass information to the ApiMac_secAddKeyInitFrameCounter(). */ +typedef struct _apimac_secaddkeyinitframecounter +{ + /*! Key */ + uint8_t key[APIMAC_KEY_MAX_LEN]; + /*! Frame Counter */ + uint32_t frameCounter; + /*! + Key index of the mac security key table where the key needs to be + written + */ + uint8_t replaceKeyIndex; + /*! + If set to true, the function will duplicate the device table enteries + associated with the previous key, and associate it with the key. + If set to false, the function will not alter device table entries + associated with whatever key that was stored in the key table location + as designated by replaceKeyIndex. + */ + bool newKeyFlag; + /*! + Key ID lookup data size as it is stored in PIB, i.e., 0 for 5 bytes, + 1 for 9 bytes. + */ + uint8_t lookupDataSize; + /*! + Key ID lookup data, to look for the key table entry and create proper + key device descriptor for this device. + */ + uint8_t lookupData[APIMAC_MAX_KEY_LOOKUP_LEN]; +} ApiMac_secAddKeyInitFrameCounter_t; + +/*! MAC_MLME_ASSOCIATE_IND type */ +typedef struct _apimac_mlmeassociateind +{ + /*! The address of the device requesting association */ + ApiMac_sAddrExt_t deviceAddress; + /*! The operational capabilities of the device requesting association */ + ApiMac_capabilityInfo_t capabilityInformation; + /*! The security parameters for this message */ + ApiMac_sec_t sec; +} ApiMac_mlmeAssociateInd_t; + +/*! MAC_MLME_ASSOCIATE_CNF type */ +typedef struct _apimac_mlmeassociatecnf +{ + /*! Status of associate attempt */ + ApiMac_assocStatus_t status; + /*! If successful, the short address allocated to this device */ + uint16_t assocShortAddress; + /*! The security parameters for this message */ + ApiMac_sec_t sec; +} ApiMac_mlmeAssociateCnf_t; + +/*! MAC_MLME_DISASSOCIATE_IND type */ +typedef struct _apimac_mlmedisassociateind +{ + /*! The address of the device sending the disassociate command */ + ApiMac_sAddrExt_t deviceAddress; + /*! The disassociate reason */ + ApiMac_disassocateReason_t disassociateReason; + /*! The security parameters for this message */ + ApiMac_sec_t sec; +} ApiMac_mlmeDisassociateInd_t; + +/*! MAC_MLME_DISASSOCIATE_CNF type */ +typedef struct _apimac_mlmediassociatecnf +{ + /*! status of the disassociate attempt */ + ApiMac_status_t status; + /*! + The address of the device that has either requested disassociation + or been instructed to disassociate by its coordinator + */ + ApiMac_sAddr_t deviceAddress; + /*! + The pan ID of the device that has either requested disassociation + or been instructed to disassociate by its coordinator + */ + uint16_t panId; +} ApiMac_mlmeDisassociateCnf_t; + +/*! MAC Beacon data type */ +typedef struct _apimac_beacondata +{ + /*! The number of pending short addresses */ + uint8_t numPendShortAddr; + /*! + The list of device short addresses for which the sender of the beacon + has data + */ + uint16_t *pShortAddrList; + /*! The number of pending extended addresses */ + uint8_t numPendExtAddr; + /*! + The list of device short addresses for which the sender of the beacon + has data + */ + uint8_t *pExtAddrList; + /*! The number of bytes in the beacon payload of the beacon frame */ + uint8_t sduLength; + /*! The beacon payload */ + uint8_t *pSdu; +} ApiMac_beaconData_t; + +/*! Coexistence Information element content type */ +typedef struct _apimac_coexist +{ + /*! + Beacon Order field shall specify the transmission interval of the beacon + */ + uint8_t beaconOrder; + /*! + Superframe Order field shall specify the length of time during which the + superframe is active (i.e., receiver enabled), including the Beacon + frametransmission time + */ + uint8_t superFrameOrder; + /*! Final CAP slot */ + uint8_t finalCapSlot; + /*! + Enhanced Beacon Order field specifies the transmission interval + of the Enhanced Beacon frames in a beacon enabled network + */ + uint8_t eBeaconOrder; + /*! + Time offset between periodic beacon and the Enhanced Beacon. + */ + uint8_t offsetTimeSlot; + /*! + Actual slot position in which the Enhanced Beacon frame is + transmitted due to the backoff procedure in the CAP + */ + uint8_t capBackOff; + /*! + NBPAN Enhanced Beacon Order field specifies the transmission interval + between consecutive Enhanced Beacon frames in the nonbeacon-enabled mode + */ + uint16_t eBeaconOrderNBPAN; +} ApiMac_coexist_t; + +/*! MAC Enhanced beacon data type */ +typedef struct _apimac_ebeacondata +{ + /*! Beacon Coexist data */ + ApiMac_coexist_t coexist; +} ApiMac_eBeaconData_t; + +/*! MAC_MLME_BEACON_NOTIFY_IND type */ +typedef struct +{ + /*! Indicates the beacon type: beacon or enhanced beacon */ + ApiMac_beaconType_t beaconType; + /*! The beacon sequence number or enhanced beacon sequence number */ + uint8_t bsn; + /*! The PAN Descriptor for the received beacon */ + ApiMac_panDesc_t panDesc; + /*! + Beacon data union depending on beaconType, select beaconData or + or eBeaconData. + */ + union + { + /*! beacon data */ + ApiMac_beaconData_t beacon; + /*! enhanced beacon data */ + ApiMac_eBeaconData_t eBeacon; + } beaconData; +} ApiMac_mlmeBeaconNotifyInd_t; + +/*! MAC_MLME_ORPHAN_IND type */ +typedef struct _apimac_mlmeorphanind +{ + /*! The address of the orphaned device */ + ApiMac_sAddrExt_t orphanAddress; + /*! The security parameters for this message */ + ApiMac_sec_t sec; +} ApiMac_mlmeOrphanInd_t; + +/*! MAC_MLME_SCAN_CNF type */ +typedef struct _apimac_mlmescancnf +{ + /*! status of the scan request */ + ApiMac_status_t status; + /*! The type of scan requested */ + ApiMac_scantype_t scanType; + /*! The channel page of the scan */ + uint8_t channelPage; + /*! PHY ID corresponding to the PHY descriptor used during scan */ + uint8_t phyId; + /*! Bit mask of channels that were not scanned */ + uint8_t unscannedChannels[APIMAC_154G_CHANNEL_BITMAP_SIZ]; + /*! The number of PAN descriptors returned in the results list */ + uint8_t resultListSize; + /*! Depending on the scanType the results are in this union */ + union + { + /*! The list of energy measurements, one for each channel scanned */ + uint8_t *pEnergyDetect; + /*! The list of PAN descriptors, one for each beacon found */ + ApiMac_panDesc_t *pPanDescriptor; + } result; +} ApiMac_mlmeScanCnf_t; + +/*! MAC_MLME_START_CNF type */ +typedef struct _apimac_mlmestartcnf +{ + /*! status of the start request */ + ApiMac_status_t status; +} ApiMac_mlmeStartCnf_t; + +/*! MAC_MLME_SYNC_LOSS_IND type */ +typedef struct _apimac_mlmesynclossind +{ + /*! Reason that the synchronization was lost */ + ApiMac_status_t reason; + /*! The PAN ID of the realignment */ + uint16_t panId; + /*! The logical channel of the realignment */ + uint8_t logicalChannel; + /*! The channel page of the realignment */ + uint8_t channelPage; + /*! PHY ID corresponding to the PHY descriptor of the realignment */ + uint8_t phyID; + /*! The security parameters for this message */ + ApiMac_sec_t sec; +} ApiMac_mlmeSyncLossInd_t; + +/*! MAC_MLME_POLL_CNF type */ +typedef struct _apimac_mlmepollcnf +{ + /*! status of the poll request */ + ApiMac_status_t status; + /*! Set if framePending bit in data packet is set */ + uint8_t framePending; +} ApiMac_mlmePollCnf_t; + +/*! MAC_MLME_COMM_STATUS_IND type */ +typedef struct _apimac_mlmecommstatusind +{ + /*! status of the event */ + ApiMac_status_t status; + /*! The source address associated with the event */ + ApiMac_sAddr_t srcAddr; + /*! The destination address associated with the event */ + ApiMac_sAddr_t dstAddr; + /*! The PAN ID associated with the event */ + uint16_t panId; + /*! The reason the event was generated */ + ApiMac_commStatusReason_t reason; + /*! The security parameters for this message */ + ApiMac_sec_t sec; +} ApiMac_mlmeCommStatusInd_t; + +/*! MAC_MLME_POLL_IND type */ +typedef struct _apimac_mlmepollind +{ + /*! Address of the device sending the data request */ + ApiMac_sAddr_t srcAddr; + /*! Pan ID of the device sending the data request */ + uint16_t srcPanId; + /*! + indication that no MAC_McpsDataReq() is required. It is set when + MAC_MLME_POLL_IND is generated, to simply indicate that a received + data request frame was acked with pending bit cleared. + */ + bool noRsp; +} ApiMac_mlmePollInd_t; + +/*! MAC_MLME_WS_ASYNC_FRAME_IND type */ +typedef ApiMac_mcpsDataInd_t ApiMac_mlmeWsAsyncInd_t; + +/*! MAC_MLME_WS_ASYNC_FRAME_CNF type */ +typedef struct _apimac_mlmewsasynccnf +{ + /*! status of the Async request */ + ApiMac_status_t status; +} ApiMac_mlmeWsAsyncCnf_t; + +/*! + Associate Indication Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_associateIndFp_t)(ApiMac_mlmeAssociateInd_t *pAssocInd); + +/*! + Assocate Confirmation Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_associateCnfFp_t)(ApiMac_mlmeAssociateCnf_t *pAssocCnf); + +/*! + Disassociate Indication Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_disassociateIndFp_t)( + ApiMac_mlmeDisassociateInd_t *pDisassociateInd); + +/*! + Disassociate Confirm Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_disassociateCnfFp_t)( + ApiMac_mlmeDisassociateCnf_t *pDisassociateCnf); + +/*! + Beacon Notify Indication Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_beaconNotifyIndFp_t)( + ApiMac_mlmeBeaconNotifyInd_t *pBeaconNotifyInd); + +/*! + Orphan Indication Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_orphanIndFp_t)(ApiMac_mlmeOrphanInd_t *pOrphanInd); + +/*! + Scan Confirmation Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_scanCnfFp_t)(ApiMac_mlmeScanCnf_t *pScanCnf); + +/*! + Start Confirmation Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_startCnfFp_t)(ApiMac_mlmeStartCnf_t *pStartCnf); + +/*! + Sync Loss Indication Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_syncLossIndFp_t)(ApiMac_mlmeSyncLossInd_t *pSyncLossInd); + +/*! + Poll Confirm Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_pollCnfFp_t)(ApiMac_mlmePollCnf_t *pPollCnf); + +/*! + Comm Status Indication Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_commStatusIndFp_t)( + ApiMac_mlmeCommStatusInd_t *pCommStatus); + +/*! + Poll Indication Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_pollIndFp_t)(ApiMac_mlmePollInd_t *pPollInd); + +/*! + Data Confirmation Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_dataCnfFp_t)(ApiMac_mcpsDataCnf_t *pDataCnf); + +/*! + Data Indication Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_dataIndFp_t)(ApiMac_mcpsDataInd_t *pDataInd); + +/*! + Purge Confirmation Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_purgeCnfFp_t)(ApiMac_mcpsPurgeCnf_t *pPurgeCnf); + +/*! + WiSUN Async Indication Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_wsAsyncIndFp_t)(ApiMac_mlmeWsAsyncInd_t *pWsAsyncInd); + +/*! + WiSUN Async Confirmation Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t) + */ +typedef void (*ApiMac_wsAsyncCnfFp_t)(ApiMac_mlmeWsAsyncCnf_t *pWsAsyncCnf); + +/*! + Unprocessed Message Callback function pointer prototype + for the [callback table](@ref ApiMac_callbacks_t). This function will + be called when an unrecognized message is received. + */ +typedef void (*ApiMac_unprocessedFp_t)(uint16_t param1, uint16_t param2, + void *pMsg); + +/*! + Structure containing all the MAC callbacks (indications). + To receive the confirmation or indication fill in the + associated callback with a pointer to the function that + will handle that callback. To ignore a callback + set that function pointer to NULL. + */ +typedef struct _apimac_callbacks +{ + /*! Associate Indicated callback */ + ApiMac_associateIndFp_t pAssocIndCb; + /*! Associate Confirmation callback */ + ApiMac_associateCnfFp_t pAssocCnfCb; + /*! Disassociate Indication callback */ + ApiMac_disassociateIndFp_t pDisassociateIndCb; + /*! Disassociate Confirmation callback */ + ApiMac_disassociateCnfFp_t pDisassociateCnfCb; + /*! Beacon Notify Indication callback */ + ApiMac_beaconNotifyIndFp_t pBeaconNotifyIndCb; + /*! Orphan Indication callback */ + ApiMac_orphanIndFp_t pOrphanIndCb; + /*! Scan Confirmation callback */ + ApiMac_scanCnfFp_t pScanCnfCb; + /*! Start Confirmation callback */ + ApiMac_startCnfFp_t pStartCnfCb; + /*! Sync Loss Indication callback */ + ApiMac_syncLossIndFp_t pSyncLossIndCb; + /*! Poll Confirm callback */ + ApiMac_pollCnfFp_t pPollCnfCb; + /*! Comm Status Indication callback */ + ApiMac_commStatusIndFp_t pCommStatusCb; + /*! Poll Indication Callback */ + ApiMac_pollIndFp_t pPollIndCb; + /*! Data Confirmation callback */ + ApiMac_dataCnfFp_t pDataCnfCb; + /*! Data Indication callback */ + ApiMac_dataIndFp_t pDataIndCb; + /*! Purge Confirm callback */ + ApiMac_purgeCnfFp_t pPurgeCnfCb; + /*! WiSUN Async Indication callback */ + ApiMac_wsAsyncIndFp_t pWsAsyncIndCb; + /*! WiSUN Async Confirmation callback */ + ApiMac_wsAsyncCnfFp_t pWsAsyncCnfCb; + /*! Unprocessed message callback */ + ApiMac_unprocessedFp_t pUnprocessedCb; +} ApiMac_callbacks_t; + +/****************************************************************************** + Function Prototypes + *****************************************************************************/ + +/*! + * @brief Initialize this module. + * + * @param enableFH - true to enable frequency hopping, false to not. + * + * @return pointer to a wakeup variable (semaphore in some systems) + */ +extern void *ApiMac_init(bool enableFH); + +/*! + * @brief Register for MAC callbacks. + * + * @param pCallbacks - pointer to callback structure + */ +extern void ApiMac_registerCallbacks(ApiMac_callbacks_t *pCallbacks); + +/*! + * @brief Process incoming messages from the MAC stack. + */ +extern void ApiMac_processIncoming(void); + +/*! + * @brief This function sends application data to the MAC for + * transmission in a MAC data frame. + *
+ * The MAC can only buffer a certain number of data request + * frames. When the MAC is congested and cannot accept the data + * request it will initiate a callback ([ApiMac_dataCnfFp_t] + * (@ref ApiMac_dataCnfFp_t)) with + * an overflow status ([ApiMac_status_transactionOverflow] + * (@ref ApiMac_status_t)) . Eventually the MAC will become + * uncongested and initiate the callback ([ApiMac_dataCnfFp_t] + * (@ref ApiMac_dataCnfFp_t)) for + * a buffered request. At this point the application can attempt + * another data request. Using this scheme, the application can + * send data whenever it wants but it must queue data to be resent + * if it receives an overflow status. + * + * @param pData - pointer to parameter structure + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noResources] + * (@ref ApiMac_status_noResources) - Resources not available + */ +extern ApiMac_status_t ApiMac_mcpsDataReq(ApiMac_mcpsDataReq_t *pData); + +/*! + * @brief This function purges and discards a data request from the MAC + * data queue. When the operation is complete the MAC sends a + * MCPS Purge Confirm which will initiate a callback + * ([ApiMac_purgeCnfFp_t](@ref ApiMac_purgeCnfFp_t)). + * + * @param msduHandle - The application-defined handle value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noResources] + * (@ref ApiMac_status_noResources) - Resources not available + */ +extern ApiMac_status_t ApiMac_mcpsPurgeReq(uint8_t msduHandle); + +/*! + * @brief This function sends an associate request to a coordinator + * device. The application shall attempt to associate only + * with a PAN that is currently allowing association, as indicated + * in the results of the scanning procedure. In a beacon-enabled + * PAN the beacon order must be set by using ApiMac_mlmeSetReq() + * before making the call to ApiMac_mlmeAssociateReq(). + *
+ * When the associate request is complete the appliction will + * receive the [ApiMac_associateCnfFp_t] + * (@ref ApiMac_associateCnfFp_t) callback. + * + * @param pData - Pointer to parameters structure. + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noResources] + * (@ref ApiMac_status_noResources) - Resources not available + */ +extern ApiMac_status_t ApiMac_mlmeAssociateReq( + ApiMac_mlmeAssociateReq_t *pData); + +/*! + * @brief This function sends an associate response to a device + * requesting to associate. This function must be called after + * the [ApiMac_associateIndFp_t] + * (@ref ApiMac_associateIndFp_t) callback. When the associate + * response is complete the callback [ApiMac_commStatusIndFp_t] + * (@ref ApiMac_commStatusIndFp_t) is + * called to indicate the success or failure of the operation. + * + * @param pData - Pointer to parameters structure. + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noResources] + * (@ref ApiMac_status_noResources) - Resources not available + */ +extern ApiMac_status_t ApiMac_mlmeAssociateRsp( + ApiMac_mlmeAssociateRsp_t *pData); + +/*! + * @brief This function is used by an associated device to notify the + * coordinator of its intent to leave the PAN. It is also used by + * the coordinator to instruct an associated device to leave the + * PAN. When the disassociate procedure is complete the + * applications callback [ApiMac_disassociateCnfFp_t] + * (@ref ApiMac_disassociateCnfFp_t) is called. + * + * @param pData - Pointer to parameters structure. + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noResources] + * (@ref ApiMac_status_noResources) - Resources not available + */ +extern ApiMac_status_t ApiMac_mlmeDisassociateReq( + ApiMac_mlmeDisassociateReq_t *pData); + +/*! + * @brief This direct execute function retrieves an attribute value from + * the MAC PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request + */ +extern ApiMac_status_t ApiMac_mlmeGetReqBool( + ApiMac_attribute_bool_t pibAttribute, + bool *pValue); + +/*! + * @brief This direct execute function retrieves an attribute value from + * the MAC PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request + */ +extern ApiMac_status_t ApiMac_mlmeGetReqUint8( + ApiMac_attribute_uint8_t pibAttribute, + uint8_t *pValue); + +/*! + * @brief This direct execute function retrieves an attribute value from + * the MAC PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request + */ +extern ApiMac_status_t ApiMac_mlmeGetReqUint16( + ApiMac_attribute_uint16_t pibAttribute, + uint16_t *pValue); + +/*! + * @brief This direct execute function retrieves an attribute value from + * the MAC PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request + */ +extern ApiMac_status_t ApiMac_mlmeGetReqUint32( + ApiMac_attribute_uint32_t pibAttribute, + uint32_t *pValue); + +/*! + * @brief This direct execute function retrieves an attribute value from + * the MAC PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request + */ +extern ApiMac_status_t ApiMac_mlmeGetReqArray( + ApiMac_attribute_array_t pibAttribute, + uint8_t *pValue); + +/*! + * @brief This direct execute function retrieves an attribute value from + * the MAC Frequency Hopping PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeGetFhReqUint8( + ApiMac_FHAttribute_uint8_t pibAttribute, uint8_t *pValue); + +/*! + * @brief This direct execute function retrieves an attribute value from + * the MAC Frequency Hopping PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeGetFhReqUint16( + ApiMac_FHAttribute_uint16_t pibAttribute, uint16_t *pValue); + +/*! + * @brief This direct execute function retrieves an attribute value from + * the MAC Frequency Hopping PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeGetFhReqUint32( + ApiMac_FHAttribute_uint32_t pibAttribute, uint32_t *pValue); + +/*! + * @brief This direct execute function retrieves an attribute value from + * the MAC Frequency Hopping PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeGetFhReqArray( + ApiMac_FHAttribute_array_t pibAttribute, uint8_t *pValue); + +/*! + * @brief This direct execute function retrieves an attribute value from + * the MAC Secutity PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeGetSecurityReqUint8( + ApiMac_securityAttribute_uint8_t pibAttribute, uint8_t *pValue); + +/*! + * @brief This direct execute function retrieves an attribute value from + * the MAC Secutity PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeGetSecurityReqUint16( + ApiMac_securityAttribute_uint16_t pibAttribute, uint16_t *pValue); + +/*! + * @brief This direct execute function retrieves an attribute value from + * the MAC Secutity PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeGetSecurityReqArray( + ApiMac_securityAttribute_array_t pibAttribute, uint8_t *pValue); + +/*! + * @brief This direct execute function retrieves an attribute value from + * the MAC Secutity PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeGetSecurityReqStruct( + ApiMac_securityAttribute_struct_t pibAttribute, void *pValue); + +/*! + * @brief This function is called in response to an orphan notification + * from a peer device. This function must be called after + * receiving an [Orphan Indication Callback] + * (@ref ApiMac_orphanIndFp_t). + * When the orphan response is complete + * the [Comm Status Indication Callback] + * (@ref ApiMac_commStatusIndFp_t) is called to indicate the success + * or failure of the operation. + * + * + * @param pData - Pointer to parameters structure. + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noResources] + * (@ref ApiMac_status_noResources) - Resources not available + */ +extern ApiMac_status_t ApiMac_mlmeOrphanRsp(ApiMac_mlmeOrphanRsp_t *pData); + +/*! + * @brief This function is used to request pending data from the + * coordinator. When the poll request is complete the + * [Poll Confirm Callback](@ref ApiMac_pollCnfFp_t) + * is called. If a data frame of nonzero length is received from + * the coordinator the [Poll Confirm Callback] + * (@ref ApiMac_pollCnfFp_t) has a status ApiMac_status_success and + * then calls the [Data Indication Callback] + * (@ref ApiMac_dataIndFp_t) for the received data. + * + * + * @param pData - Pointer to parameters structure. + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noResources] + * (@ref ApiMac_status_noResources) - Resources not available + */ +extern ApiMac_status_t ApiMac_mlmePollReq(ApiMac_mlmePollReq_t *pData); + +/*! + * @brief This direct execute function resets the MAC. This function + * must be called once at system startup before any other + * function in the management API is called. + * + * + * @param setDefaultPib - Set to TRUE to reset the MAC PIB to its + * default values. + * + * @return always [ApiMac_status_success](@ref ApiMac_status_success) + */ +extern ApiMac_status_t ApiMac_mlmeResetReq(bool setDefaultPib); + +/*! + * @brief This function initiates an energy detect, active, passive, or + * orphan scan on one or more channels. An energy detect scan + * measures the peak energy on each requested channel. An active + * scan sends a beacon request on each channel and then listening + * for beacons. A passive scan is a receive-only operation that + * listens for beacons on each channel. An orphan scan is used to + * locate the coordinator with which the scanning device had + * previously associated. When a scan operation is complete the + * [Scan Confirm callback](@ref ApiMac_scanCnfFp_t) is called. + *
+ * For active or passive scans the application sets the maxResults + * parameter the maximum number of PAN descriptors to return. If + * maxResults is greater than zero then the application must also + * set result.panDescriptor to point to a buffer of size + * maxResults * sizeof([ApiMac_panDesc_t](@ref ApiMac_panDesc_t)) + * to store the results of + * the scan. The application must not access or deallocate this + * buffer until the [Scan Confirm Callback] + * (@ref ApiMac_scanCnfFp_t) is called. The MAC will store up to + * maxResults PAN descriptors and ignore duplicate beacons. + *
+ * An alternative way to get results for an active or passive scan + * is to set maxResults to zero or set PIB attribute + * ApiMac_attribute_autoRequest to FALSE. Then the MAC will not + * store results but rather call the [Beacon Notify Indication + * Callback](@ref ApiMac_beaconNotifyIndFp_t) for each beacon + * received. The application will not need to supply any memory + * to store the scan results but the MAC will not filter out + * duplicate beacons. + *
+ * For energy detect scans the application must set + * result.energyDetect to point to a buffer of size 18 bytes to + * store the results of the scan. The application must not + * access or deallocate this buffer until the + * [Scan Confirm Callback](@ref ApiMac_scanCnfFp_t) is called. + *
+ * An energy detect, active or passive scan may be performed + * at any time if a scan is not already in progress. However a + * device cannot perform any other MAC management operation or + * send or receive MAC data until the scan is complete. + * + * @param pData - Pointer to parameters structure. + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_scanInProgress] + * (@ref ApiMac_status_scanInProgress) - already scanning
+ * [ApiMac_status_noResources] + * (@ref ApiMac_status_noResources) - memory allocation error + * + */ +extern ApiMac_status_t ApiMac_mlmeScanReq(ApiMac_mlmeScanReq_t *pData); + +/*! + * @brief This direct execute function sets an attribute value + * in the MAC PIB. + * + * @param pibAttribute - The attribute identifier + * @param value - the attribute value + * + * @return The status of the request + */ +extern ApiMac_status_t ApiMac_mlmeSetReqBool( + ApiMac_attribute_bool_t pibAttribute, + bool value); + +/*! + * @brief This direct execute function sets an attribute value + * in the MAC PIB. + * + * @param pibAttribute - The attribute identifier + * @param value - the attribute value + * + * @return The status of the request + */ +extern ApiMac_status_t ApiMac_mlmeSetReqUint8( + ApiMac_attribute_uint8_t pibAttribute, + uint8_t value); + +/*! + * @brief This direct execute function sets an attribute value + * in the MAC PIB. + * + * @param pibAttribute - The attribute identifier + * @param value - the attribute value + * + * @return The status of the request + */ +extern ApiMac_status_t ApiMac_mlmeSetReqUint16( + ApiMac_attribute_uint16_t pibAttribute, + uint16_t value); + +/*! + * @brief This direct execute function sets an attribute value + * in the MAC PIB. + * + * @param pibAttribute - The attribute identifier + * @param value - the attribute value + * + * @return The status of the request + */ +extern ApiMac_status_t ApiMac_mlmeSetReqUint32( + ApiMac_attribute_uint32_t pibAttribute, + uint32_t value); + +/*! + * @brief This direct execute function sets an attribute value + * in the MAC PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - the attribute value + * + * @return The status of the request + */ +extern ApiMac_status_t ApiMac_mlmeSetReqArray( + ApiMac_attribute_array_t pibAttribute, + uint8_t *pValue); + +/*! + * @brief This direct execute function sets an attribute value + * in the MAC Frequency Hopping PIB. + * + * @param pibAttribute - The attribute identifier + * @param value - the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeSetFhReqUint8( + ApiMac_FHAttribute_uint8_t pibAttribute, uint8_t value); + +/*! + * @brief This direct execute function sets an attribute value + * in the MAC Frequency Hopping PIB. + * + * @param pibAttribute - The attribute identifier + * @param value - the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeSetFhReqUint16( + ApiMac_FHAttribute_uint16_t pibAttribute, uint16_t value); + +/*! + * @brief This direct execute function sets an attribute value + * in the MAC Frequency Hopping PIB. + * + * @param pibAttribute - The attribute identifier + * @param value - the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeSetFhReqUint32( + ApiMac_FHAttribute_uint32_t pibAttribute, uint32_t value); + +/*! + * @brief This direct execute function sets an attribute value + * in the MAC Frequency Hopping PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeSetFhReqArray( + ApiMac_FHAttribute_array_t pibAttribute, uint8_t *pValue); + +/*! + * @brief This direct execute function sets an attribute value + * in the MAC Security PIB. + * + * @param pibAttribute - The attribute identifier + * @param value - the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeSetSecurityReqUint8( + ApiMac_securityAttribute_uint8_t pibAttribute, uint8_t value); + +/*! + * @brief This direct execute function sets an attribute value + * in the MAC Security PIB. + * + * @param pibAttribute - The attribute identifier + * @param value - the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeSetSecurityReqUint16( + ApiMac_securityAttribute_uint16_t pibAttribute, uint16_t value); + +/*! + * @brief This direct execute function sets an attribute value + * in the MAC Security PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeSetSecurityReqArray( + ApiMac_securityAttribute_array_t pibAttribute, uint8_t *pValue); + +/*! + * @brief This direct execute function sets an attribute value + * in the MAC Security PIB. + * + * @param pibAttribute - The attribute identifier + * @param pValue - pointer to the attribute value + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupportedAttribute] + * (@ref ApiMac_status_unsupportedAttribute) - Attribute not found + */ +extern ApiMac_status_t ApiMac_mlmeSetSecurityReqStruct( + ApiMac_securityAttribute_struct_t pibAttribute, void *pValue); + +/*! + * @brief This function is called by a coordinator or PAN coordinator + * to start or reconfigure a network. Before starting a network + * the device must have set its short address. A PAN coordinator + * sets the short address by setting the attribute + * [ApiMac_attribute_shortAddress] + * (@ref ApiMac_attribute_shortAddress). A coordinator sets the + * short address through association. + *
+ * When parameter panCoordinator is TRUE, the MAC automatically + * sets attributes ApiMac_attribute_panID and + * [ApiMac_attribute_logicalChannel] + * (@ref ApiMac_attribute_logicalChannel) to the panId and + * logicalChannel + * parameters. If panCoordinator is FALSE, these parameters are + * ignored (they would already be set through association). + *
+ * The parameter beaconOrder controls whether the network is + * beacon-enabled or non beacon-enabled. For a beacon-enabled + * network this parameter also controls the beacon transmission + * interval. + *
+ * When the operation is complete the [Start Confirm Callback] + * (@ref ApiMac_startCnfFp_t) is called. + * + * @param pData - Pointer to parameters structure. + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noResources] + * (@ref ApiMac_status_noResources) - Resources not available + */ +extern ApiMac_status_t ApiMac_mlmeStartReq(ApiMac_mlmeStartReq_t *pData); + +/*! + * @brief This function requests the MAC to synchronize with the + * coordinator by acquiring and optionally tracking its beacons. + * Synchronizing with the coordinator is recommended before + * associating in a beacon-enabled network. If the beacon could + * not be located on its initial search or during tracking, the MAC + * calls the [Sync Loss Indication Callback] + * (@ref ApiMac_syncLossIndFp_t) with [ApiMac_status_beaconLoss] + * (@ref ApiMac_status_beaconLoss) as the reason. + *
+ * Before calling this function the application must set PIB + * attributes [ApiMac_attribute_beaconOrder] + * (@ref ApiMac_attribute_beaconOrder), [ApiMac_attribute_panId] + * (@ref ApiMac_attribute_panId) + * and either [ApiMac_attribute_coordShortAddress] + * (@ref ApiMac_attribute_coordShortAddress) or + * [ApiMac_attribute_coordExtendedAddress] + * (@ref ApiMac_attribute_coordExtendedAddress) to the address + * of the coordinator with which to synchronize. + *
+ * The application may wish to set PIB attribute + * [ApiMac_attribute_autoRequest] + * (@ref ApiMac_attribute_autoRequest) to FALSE before calling this + * function. Then when the MAC successfully synchronizes with + * the coordinator it will call the [Beacon Notify Indication + * Callback] (@ref ApiMac_beaconNotifyIndFp_t). After receiving + * the callback the application may set + * ApiMac_attribute_autoRequest to TRUE to stop receiving + * beacon notifications. + *
+ * This function is only applicable to beacon-enabled networks. + * + * @param pData - Pointer to parameters structure. + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noResources] + * (@ref ApiMac_status_noResources) - Resources not available + */ +extern ApiMac_status_t ApiMac_mlmeSyncReq(ApiMac_mlmeSyncReq_t *pData); + +/*! + * @brief This function returns a random byte from the MAC random number + * generator. + * + * @return A random byte. + */ +extern uint8_t ApiMac_randomByte(void); + +/*! + * @brief Update Device Table entry and PIB with new Pan Id. + * + * @param panId - the new Pan ID + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noResources] + * (@ref ApiMac_status_noResources) - Resources not available + */ +extern ApiMac_status_t ApiMac_updatePanId(uint16_t panId); + +/*! + * @brief This functions handles a WiSUN async request. + * The possible operation is Async Start or Async Stop. + * For the async start operation, the caller of this function + * can indicate which WiSUN async frame type to be + * sent on the specified channels. + * + * @param pData pointer to the asynchronous parameters structure + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noResources] + * (@ref ApiMac_status_noResources) - Resources not available + */ +extern ApiMac_status_t ApiMac_mlmeWSAsyncReq(ApiMac_mlmeWSAsyncReq_t* pData); + +/*! + * @brief This function starts the frequency hopping. Frequency hopping + * operation should have been enabled using ApiMac_enableFH() + * before calling this API. No need to call this API if you + * have called ApiMac_mlmeStartReq() with the startFH field set to + * true. + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noResources] + * (@ref ApiMac_status_noResources) - Resources not available + */ +extern ApiMac_status_t ApiMac_startFH(void); + +/*! + * @brief Parses the Group payload information element. + * This function creates a linked list (plist) from the Payload IE + * (pPayload). Each item in the linked list + * is a seperate Group IE with its own content. + *
+ * If no IEs are found pList will be set to NULL. + *
+ * The caller is responsible to release the memory for + * the linked list by calling ApiMac_freeIEList(). + *
+ * Call this function to create the list of Group IEs, then + * call ApiMac_parsePayloadSubIEs() to parse each of the group IE's + * content into sub IEs. + * + * @param pPayload - pointer to the buffer with the payload IEs. + * @param payloadLen - length of the buffer with the payload IEs. + * @param pList - pointer to link list pointer. + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noData](@ref ApiMac_status_noData) + * - pPayload or payloadLen is NULL,
+ * [ApiMac_status_unsupported](@ref ApiMac_status_unsupported) + * - invalid field found,
+ * [ApiMac_status_noResources](@ref ApiMac_status_noResources) + * - if memory allocation fails. + */ +extern ApiMac_status_t ApiMac_parsePayloadGroupIEs( + uint8_t *pPayload, uint16_t payloadLen, + ApiMac_payloadIeRec_t **pList); + +/*! + * @brief Parses the payload sub information element. + * This function creates a linked list (pList) of sub IEs from + * the Group IE content (pContent). Each item in the linked list + * is a seperate sub IE with its own content. + *
+ * If no IEs are found pList will be set to NULL. + *
+ * The caller is responsible to release the memory for + * the linked list by calling ApiMac_freeIEList(). + *
+ * Call this function after calling ApiMac_parsePayloadGroupIEs(). + * + * @param pContent - pointer to the buffer with the sub IEs. + * @param contentLen - length of the buffer with the payload IEs. + * @param pList - pointer to link list pointer. + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_noData](@ref ApiMac_status_noData) + * - pPayload or payloadLen is NULL,
+ * [ApiMac_status_unsupported](@ref ApiMac_status_unsupported) + * - invalid field found,
+ * [ApiMac_status_noResources](@ref ApiMac_status_noResources) + * - if memory allocation fails. + */ +extern ApiMac_status_t ApiMac_parsePayloadSubIEs(uint8_t *pContent, + uint16_t contentLen, + ApiMac_payloadIeRec_t **pList); + +/*! + * @brief Free the linked list allocated by ApiMac_parsePayloadGroupIEs() + * or ApiMac_parsePayloadSubIEs(). + * + * @param pList - pointer to linked list + */ +extern void ApiMac_freeIEList(ApiMac_payloadIeRec_t *pList); + +/*! + * @brief Enables the Frequency hopping operation. Make sure you call + * this function before setting any FH parameters or before + * calling ApiMac_mlmeStartReq() or ApiMac_startFH(), if you're + * using FH. + * + * @return The status of the request, as follows:
+ * [ApiMac_status_success](@ref ApiMac_status_success) + * - Operation successful
+ * [ApiMac_status_unsupported](@ref ApiMac_status_unsupported) + * - feature not available. + */ +extern ApiMac_status_t ApiMac_enableFH(void); + +/*! + * @brief Convert ApiMac_capabilityInfo_t data type to uint8 capInfo + * + * @param pMsgcapInfo - CapabilityInfo pointer + * + * @return capInfo bit mask byte + */ +extern uint8_t ApiMac_convertCapabilityInfo( + ApiMac_capabilityInfo_t *pMsgcapInfo); + +/*! + * @brief Convert from bitmask byte to API MAC capInfo + * + * @param cInfo - source + * @param pPBcapInfo - destination + */ +extern void ApiMac_buildMsgCapInfo(uint8_t cInfo, + ApiMac_capabilityInfo_t *pPBcapInfo); + +/*! + * @brief Adds a new MAC device table entry. + * + * @param pAddDevice - Add device information + * + * @return [ApiMac_status_success](@ref ApiMac_status_success) if + * successful, other status value if not. + */ +extern ApiMac_status_t ApiMac_secAddDevice(ApiMac_secAddDevice_t *pAddDevice); + +/*! + * @brief Removes MAC device table entries. + * + * @param pExtAddr - extended address of the device table entries + * that shall be removed + * + * @return [ApiMac_status_success](@ref ApiMac_status_success) if + * successful, other status value if not. + */ +extern ApiMac_status_t ApiMac_secDeleteDevice(ApiMac_sAddrExt_t *pExtAddr); + +/*! + * @brief Removes the key at the specified key Index and removes all + * MAC device table enteries associated with this key. Also + * removes(initializes) the key lookup list associated with + * this key. + * + * @param keyIndex - mac secuirty key table index of the key + * to be removed. + * + * @return [ApiMac_status_success](@ref ApiMac_status_success) if + * successful, other status value if not. + */ +extern ApiMac_status_t ApiMac_secDeleteKeyAndAssocDevices(uint8_t keyIndex); + +/*! + * @brief Removes all MAC device table entries. + * + * @return [ApiMac_status_success](@ref ApiMac_status_success) if + * successful, other status value if not. + */ +extern ApiMac_status_t ApiMac_secDeleteAllDevices(void); + +/*! + * @brief Reads the frame counter value associated with a MAC security key + * indexed by the designated key identifier and the default key + * source. + * + * @param keyId - Key ID. + * @param pFrameCounter - pointer to a buffer to store the outgoing + * frame counter of the key. + * + * @return [ApiMac_status_success](@ref ApiMac_status_success) if + * successful, other status value if not. + */ +extern ApiMac_status_t ApiMac_secGetDefaultSourceKey(uint8_t keyId, + uint32_t *pFrameCounter); + +/*! + * @brief Adds the MAC security key, adds the associated lookup list + * for the key, initializes the frame counter to the value + * provided. It also duplicates the device table enteries + * (associated with the previous key if any) if available based + * on the flag dupDevFlag value and associates the device + * descriptor with this key. + * + * @param pInfo - structure need to perform this function. + * + * @return [ApiMac_status_success](@ref ApiMac_status_success) if + * successful, other status value if not. + */ +extern ApiMac_status_t ApiMac_secAddKeyInitFrameCounter( + ApiMac_secAddKeyInitFrameCounter_t *pInfo); + +#ifdef __cplusplus +} +#endif + +#endif /* API_MAC_H */ + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ + diff --git a/components/api/inc/api_mac_linux.h b/components/api/inc/api_mac_linux.h new file mode 100644 index 0000000..0d9ec03 --- /dev/null +++ b/components/api/inc/api_mac_linux.h @@ -0,0 +1,115 @@ +/****************************************************************************** + @file api_mac_linux.h + + @brief TIMAC 2.0 API Linux implimentation header for api_mac + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +#if !defined(API_MAC_LINUX_H) +#define API_MAC_LINUX_H + +/****************************************************************************** + Constants and Definitions + *****************************************************************************/ + +/*! Debug Log flag specific to api-mac */ +#define LOG_DBG_API_MAC_wait _bitN(LOG_DBG_API_MAC_bitnum_first+0) +#define LOG_DBG_API_MAC_datastats _bitN(LOG_DBG_API_MAC_bitnum_first+1) + + +/* TX Options (from the embedded) */ +/*! Acknowledged transmission. The MAC will attempt to retransmit + the frame until it is acknowledged */ +#define MAC_TXOPTION_ACK 0x0001 +/*! GTS transmission (unused) */ +#define MAC_TXOPTION_GTS 0x0002 +/*! Indirect transmission. The MAC will queue the data and wait + for the destination device to poll for it. This can only be used + by a coordinator device */ +#define MAC_TXOPTION_INDIRECT 0x0004 +/*! This proprietary option forces the pending bit set for direct + transmission */ +#define MAC_TXOPTION_PEND_BIT 0x0008 +/*! This proprietary option prevents the frame from being retransmitted */ +#define MAC_TXOPTION_NO_RETRANS 0x0010 +/*! This proprietary option prevents a MAC_MCPS_DATA_CNF + event from being sent for this frame */ +#define MAC_TXOPTION_NO_CNF 0x0020 +/*! Use PIB value MAC_ALT_BE for the minimum backoff exponent */ +#define MAC_TXOPTION_ALT_BE 0x0040 +/*! Use the power and channel values in macDataReq_t + instead of the PIB values */ +#define MAC_TXOPTION_PWR_CHAN 0x0080 +/*! Special transmit for Green Power for CC2530 only. Must be direct */ +#define MAC_TXOPTION_GREEN_PWR 0x0100 + +/****************************************************************************** + Variables + *****************************************************************************/ + +/*! + @brief the application points this to the message interface structure. + */ +extern struct mt_msg_interface *API_MAC_msg_interface; + +/*! How long should the API-MAC wait when there are no messsages to process. */ +extern int ApiMacLinux_areq_timeout_mSecs; +/*! Default value if not overridden via configuration file */ +#define DEFAULT_ApiMacLinux_areq_timeout_mSecs (10 * 1000) + +extern struct mt_version_info MT_DEVICE_version_info; + +#endif // API_MAC_LINUX_H + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ + diff --git a/components/api/inc/mt_msg.h b/components/api/inc/mt_msg.h new file mode 100644 index 0000000..c1ecfda --- /dev/null +++ b/components/api/inc/mt_msg.h @@ -0,0 +1,757 @@ +/****************************************************************************** + @file mt_msg.h + + @brief TIMAC 2.0 API mt msg layer, linux implementation + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +/*! + * @mainpage MT_MSG + * + * Overview + * ======== + * This document describes the interface to the MT protocol layer. + * + * The API_MAC layer calls the MT_MSG layer, which in turn + * transmits bytes over either a serial port, or a TCP/IP stream socket. + * + * The protocol is quite simple, and has a few geometry parameters. + * + * On the wire, the message consists of: + * + * - An optional frame sync byte 0xfe + * - Either a 1 or 2 byte (lsb first) payload length (LEN) + * - A command 0 byte + * - A command 1 byte + * - Zero to LEN bytes of payload + * - An optional XOR Checkvalue. + * + * The optional components are specified in the mt_msg_interface structure. + * + * General Flow + * ============ + * + * - Call MT_MSG_init() + * - For each interface ... + * - fill in the mt_msg_interface structure + * - Selecting options, ie: 1 or 2byte length. + * - Various timeout lengths, etc + * - [NOTE: See the function MT_MSG_INI_settings()] + * - Call MT_MSG_interfaceCreate() + * - The message interface is ready. + * - Your application can call MT_MSG_LIST_remove() to get the next message + * + * - To send a message, do the following + * - Call MT_MSG_alloc() + * - Supply payload values to the message via MT_MSG_wrU8() and friends. + * - Set the pMsg->pTo interface pointer. + * - To send an asyncronous message call MT_MSG_tx() + * - To send a command/response message call MT_MSG_txrx() + * - The response can be found at pMsg->pSrsp; + * - Call MT_MSG_free() to release the message. + * - Eventually you can call MT_MSG_interfaceDestroy() + * See the api_mac.c implementation file for numerous examples. + */ + +#if !defined(MT_MSG_H) +#define MT_MSG_H + +#include "bitsnbits.h" +#include +#include +#include + +/* forward declarations */ +struct mt_msg; +struct mt_msg_list; +struct ini_parser; + +/* + * @brief Fragmentation, and Extended status values + */ + +#define MT_MSG_FRAG_STATUS_success 0 +#define MT_MSG_FRAG_STATUS_resend_last 1 +#define MT_MSG_FRAG_STATUS_unsupported_stackid 2 +#define MT_MSG_FRAG_STATUS_block_out_of_order 3 +#define MT_MSG_FRAG_STATUS_block_len_changed 4 +#define MT_MSG_FRAG_STATUS_mem_alloc_error 5 /* malloc failed */ +#define MT_MSG_FRAG_STATUS_frag_complete 6 + +#define MT_MSG_EXT_STATUS_mem_alloc_error 5 /* same as non-exted */ +#define MT_MSG_EXT_STATUS_frag_complete 6 +#define MT_MSG_EXT_STATUS_frag_aborted 7 +#define MT_MSG_EXT_STATUS_unsupported_ack 8 + +/* + * @def LOG_DBG_MT_MSG_traffic - Log debug messages associated with messages + */ +#define LOG_DBG_MT_MSG_traffic _bitN(LOG_DBG_MT_bitnum_first + 0) +/* + * @def LOG_DBG_MT_MSG_raw - Log very verbose (every byte) of a message + */ +#define LOG_DBG_MT_MSG_raw _bitN(LOG_DBG_MT_bitnum_first + 1) +/* + * @def LOG_DBG_MT_MSG_raw - Log items associated with async messages. + */ +#define LOG_DBG_MT_MSG_areq _bitN(LOG_DBG_MT_bitnum_first + 2) + +#define LOG_DBG_MT_MSG_fields _bitN(LOG_DBG_MT_bitnum_first + 3) + +#define LOG_DBG_MT_MSG_decode _bitN(LOG_DBG_MT_bitnum_first + 4) + +/* + * @struct mt_msg_list + * @brief Manage a list of messages + * + * Always insert at end, remove from head + */ +struct mt_msg_list { + const char *dbg_name; + intptr_t sem; + struct mt_msg *pList; +}; + +/*! + * @struct msg_interface + * @brief Messages come from and go to a message interface. + * + */ +struct mt_msg_interface { + /*! name for debug purposes */ + const char *dbg_name; + + /*! True if this is an NPI socket interface inside the npi server */ + bool is_NPI; + + /*! Should the transmission include the starting frame byte? */ + bool frame_sync; + + /*! Should the transmission include the trailing chksum */ + bool include_chksum; + + /*! flush RX on startup */ + bool startup_flush; + + /*! device handle */ + intptr_t hndl; + + /*! non-null if interface is a socket */ + struct socket_cfg *s_cfg; + + /*! non-null if interface is a uart */ + struct uart_cfg *u_cfg; + + /*! Rx thread reading on this interface */ + intptr_t rx_thread; + + /*! what is the fragment size we should use? */ + int tx_frag_size; + + /*! How many retries should we have? */ + int retry_max; + + /*! how long to wait for a fragment response on this interface */ + int frag_timeout_mSecs; + + /*! how long to wait for a message to start.. */ + int intermsg_timeout_mSecs; + + /*! how long between bytes inside a message to wait? */ + int intersymbol_timeout_mSecs; + + /*! A SREQ should respond within this many mSecs */ + int srsp_timeout_mSecs; + + /*! Stack ID for this interface */ + int stack_id; + + /*! true if this interface uses a 2byte length */ + bool len_2bytes; + + /*! for use by the rx handler */ + intptr_t rx_handler_cookie; + + /* in comming messages are put here. */ + struct mt_msg_list rx_list; + + /* current sreq is here, the srsp will be attached here */ + struct mt_msg *pCurSreq; + /* sreq sender waits for srsp here. */ + intptr_t srsp_semaphore; + + /*! Is this interface dead? should the rx thread exit? */ + bool is_dead; + + /*! points to the current message we are trying to receive */ + struct mt_msg *pCurRxMsg; + + /*! When performing a flush operation how long do we stall? */ + int flush_timeout_mSecs; + + /*! Used to lock all lists within this interface */ + intptr_t list_lock; + + /* Used to lock the interface during a transmission */ + intptr_t tx_lock; + + /*! + * Before transmitting the "tx_lock" is aquired. + * How many milliseconds should the timeout be for this lock? + * Suggestion: 2 seconds. + */ + int tx_lock_timeout; + /* + * Used when transfering a fragmented packet. + */ + struct mt_msg_iface_frag_info { + /* set once an error occurs */ + bool is_error; + /* the message we are fragmenting (or de-fragmenting) */ + struct mt_msg *pMsg; + /* on tx side, reused for each for each fragment. */ + struct mt_msg *pTxFragData; + /* what block are we on? */ + int block_cur; + /* how many blocks to send? */ + int block_count; + /* total size of transfer */ + int total_size; + /* how large is each packet in this frag sequence? */ + int this_frag_size; + + /*! When tx-ing, the ack from the remote is put here */ + struct mt_msg *pTxFragAck; + /*! When tx-ing, after an ACK is received, this semaphore is pushed */ + intptr_t tx_ack_semaphore; + + /* two seperate frags, one for TX and one for RX */ + } tx_frag, rx_frag; +}; + +/* + * @brief Message types + * @enum mt_msg_type + */ +enum mt_msg_type { + MT_MSG_TYPE_unknown, + MT_MSG_TYPE_sreq, + MT_MSG_TYPE_srsp, + MT_MSG_TYPE_poll, + MT_MSG_TYPE_areq, + + /* Extended */ + MT_MSG_TYPE_sreq_stack, + MT_MSG_TYPE_srsp_stack, + MT_MSG_TYPE_poll_stack, + MT_MSG_TYPE_areq_stack, + + /* Extended */ + MT_MSG_TYPE_sreq_frag_data, + MT_MSG_TYPE_sreq_frag_ack, + MT_MSG_TYPE_sreq_ext_status, + + /* Extended */ + MT_MSG_TYPE_srsp_frag_data, + MT_MSG_TYPE_srsp_frag_ack, + MT_MSG_TYPE_srsp_ext_status, + + /* Extended */ + MT_MSG_TYPE_areq_frag_data, + MT_MSG_TYPE_areq_frag_ack, + MT_MSG_TYPE_areq_ext_status +}; + +/*! + * @struct msg + * @brief Internal representation of a message. + */ +struct mt_msg { + /*! used to verify this is a message structure. */ + const int *check_ptr; + + /*! message sequence number, always increasing until it wraps */ + uint32_t sequence_id; + + /*! what interface did this message come from? */ + struct mt_msg_interface *pSrcIface; + + /*! what interface does this message go to? */ + struct mt_msg_interface *pDestIface; + + /*! type of message */ + enum mt_msg_type m_type; + + bool was_formatted; + + /*! Length in header, negative if unknown */ + int expected_len; + + /*! command 0 byte, contains cmd & subsystem value, negative if unknown */ + int cmd0; + + /*! command 1 byte, negative if unknown */ + int cmd1; + + /*! The xor checkvalue */ + int chksum; + + /*! Did we over/under flow the io buffer? */ + bool is_error; + + /*! When rd/wr the io buffer, this is our rdwr index */ + int iobuf_idx; + + /*! This is how many valid bytes are in the io buffer */ + int iobuf_nvalid; + + /* This (current) implementation, iobuf is fixed Future this might + * change to an allocated buf this holds the sizeof() the iobuf. + */ + int iobuf_idx_max; + + /*! io buffer for the message */ + uint8_t iobuf[ __4K ]; + + /*! Synchronous messages have responses here, otherwise this is null */ + struct mt_msg *pSrsp; + + /*! Next msg in a specific msg list */ + struct mt_msg *pListNext; + + /* If not-null, this will be included in the MT_MSG_log() output */ + /* This must be a constant string during the life of the message */ + /* HINT: use a compile time constant string here. */ + const char *pLogPrefix; +}; + +/* + * @struct mt_version_info + * @brief represents data transmitted in the SYS_VERSION_INFO request. + */ +struct mt_version_info { + int transport; + int product; + int major; + int minor; + int maint; +}; + +/* + * @brief Log this message + * @param why - log reason/why bits, see log.h + * @param pMsg - the message to log + * @param fmt - printf format message to print + * @returns void. + */ +void MT_MSG_log(int64_t why, struct mt_msg *pMsg, _Printf_format_string_ const char *fmt, ...) __attribute__((format (printf,3,4))); + +/* + * @brief Set/Determine msg type (mt_msg::m_type) + * @param pMsg - the message + * @param pMI - the interface associated with this message. + */ + +void MT_MSG_set_type(struct mt_msg *pMsg, struct mt_msg_interface *pMI); + +/* + * @brief Set the message destination interface + */ +void MT_MSG_setDestIface(struct mt_msg *pMsg, struct mt_msg_interface *pIface); + +/* + * @brief Set the message source interface + */ +void MT_MSG_setSrcIface(struct mt_msg *pMsg, struct mt_msg_interface *pIface); + +/* + * @brief Write an N-bit value to the msg payload + * @param pMsg - the message + * @param value - value being written + * @param nbits - 8, 16, 32, or 64 + * @returns void + * + * Doing it this way handles endian (lsb|msb) order issues. + */ + +void MT_MSG_wrUX_DBG(struct mt_msg *pMsg, uint64_t value, int nbits, const char *name); +#define MT_MSG_wrUX(PMSG, VALUE, NBYTES) MT_MSG_wrUX((PMSG), (VALUE), (NBYTES), NULL) + +/* + * @brief Write an 8bit value to the message payload + * @param pMsg - the message + * @param value - value being written + */ +void MT_MSG_wrU8_DBG(struct mt_msg *pMsg, uint32_t value, const char *name); +#define MT_MSG_wrU8(PMSG, VALUE) MT_MSG_wrU8_DBG((PMSG),(VALUE), NULL) + +/* + * @brief Write a 16bit value to the message payload + * @param pMsg - the message + * @param value - value being written + */ +void MT_MSG_wrU16_DBG(struct mt_msg *pMsg, uint32_t value, const char *name); +#define MT_MSG_wrU16(PMSG, VALUE) MT_MSG_wrU16_DBG((PMSG),(VALUE), NULL) + +/* @brief Write a 32bit value to the message payload + * @param pMsg - the message + * @param value - value being written + */ +void MT_MSG_wrU32_DBG(struct mt_msg *pMsg, uint32_t value, const char *name); +#define MT_MSG_wrU32(PMSG, VALUE) MT_MSG_wrU32_DBG((PMSG), (VALUE), NULL) + +/* + * @brief Write a 64bit value to the message payload + * @param pMsg - the message + * @param value - value being written + */ +void MT_MSG_wrU64_DBG(struct mt_msg *pMsg, uint64_t value, const char *name); +#define MT_MSG_wrU64(PMSG, VALUE) MT_MSG_wrU64_DBG((PMSG), (VALUE), NULL) + +/* + * @brief Write a buffer of bytes to the message payload + * @param pMsg - the message + * @param pData - bytes to write + * @param nbytes - how many bytes to write + * @returns void + * + * Note: pData can be NULL to do a dummy write. + */ +void MT_MSG_wrBuf_DBG(struct mt_msg *pMsg, const void *pData, size_t nbytes, const char *name); +#define MT_MSG_wrBuf(PMSG, BUF, NBYTES) MT_MSG_wrBuf_DBG((PMSG), (BUF), (NBYTES), NULL) + +/* + * @brief Read an N-Bit value from the message payload + * @param pMsg - the message + * @param value - value being written + * + * Doing it this way handles endian (lsb|msb) order issues. + */ +uint64_t MT_MSG_rdUX_DBG(struct mt_msg *pMsg, int nbits, const char *name); +#define MT_MSG_rdUX(PMSG,NBITS,NAME) MT_MSG_rdUX_DBG((PMSG), (NBITS), NULL) + +/* + * @brief peek into the message at the read index and fetch a byte + * @param pMsg - the message to peek into + * @param ofset - any additional ofset to the existing idx + * @returns EOF - if error, otherwise the byte. + */ +int MT_MSG_Peek_u8_DBG(struct mt_msg *pMsg, int ofset, const char *name); +#define MT_MSG_Peek_u8(PMSG, OFSET) MT_MSG_Peek_u8_DBG((PMSG), (OFSET), NULL) + +/* + * @brief Read an 8bit value from the msg payload + * @param pmsg - the message + * @returns the value read + */ +uint8_t MT_MSG_rdU8_DBG(struct mt_msg *pMsg, const char *name); +#define MT_MSG_rdU8(PMSG) MT_MSG_rdU8_DBG((PMSG), NULL) + +/* + * @brief Read a 16bit value from the msg payload + * @param pmsg - the message + * @returns the value read + */ +uint16_t MT_MSG_rdU16_DBG(struct mt_msg *pMsg, const char *name); +#define MT_MSG_rdU16(PMSG) MT_MSG_rdU16_DBG((PMSG), NULL) + +/* + * @brief Read a 32bit value from the msg payload + * @param pmsg - the message + * @returns the value read + */ +uint32_t MT_MSG_rdU32_DBG(struct mt_msg *pMsg, const char *name); +#define MT_MSG_rdU32(PMSG) MT_MSG_rdU32_DBG((PMSG), NULL) + +/* + * @brief Read an 32bit value from the msg payload + * @param pmsg - the message + * @returns the value read + */ +uint64_t MT_MSG_rdU64_DBG(struct mt_msg *pMsg, const char *name); +#define MT_MSG_rdU64(PMSG) MT_MSG_rdU64_DBG((PMSG), NULL) + +/* + * @brief read a buffer of bytes from the msg payload + * @param pMsg - the message + * @param pData - where to put the data + * @param nbytes - how many + * @returns void + * + * Note: pData can be NULL to do a dummy read. + */ +void MT_MSG_rdBuf_DBG(struct mt_msg *pMsg, void *pData, size_t nbytes, const char *name); +#define MT_MSG_rdBuf(PMSG, PDATA, LEN) MT_MSG_rdBuf_DBG((PMSG), (PDATA), (LEN), NULL) + +/* + * @brief Release/Free a message and all related resources. + * @param pMsg - the message to release/free + * + */ +void MT_MSG_free(struct mt_msg *pMsg); + +/* + * @brief clone/duplicate a message + * @param pMsg - the message to clone + * @returns new message, or NULL on error + * + * This is used in the npi server when there are more then 1 client. + * Example: 1 uart - and 2 socket connections. + * An AREQ is received from the uart, for each connection the message + * is cloned and transmitted to that specific client + */ +struct mt_msg *MT_MSG_clone(struct mt_msg *pMsg); + +/* + * @brief Allocate or find space for a new message + * @param len - expected length, or -1 if unknown + * @param cmd0 - from protocol, or -1 if unknown + * @param cmd1 - from protocol, or -1 if unknown + * + * @returns NULL on error, or pointer + * + */ +struct mt_msg *MT_MSG_alloc(int len, int cmd0, int cmd1); + +/* + * @brief Transmit (fragment if needed) and wait for a reply if applicable. + * @param pMsg - the message to transmit + * @returns 2 on success (tx + rx = 2 total messages) + * + * Notes: + * - returns 1 if the message was transmitted + * - returns 2 if a message was transmitted and received + * - Caller must also check mt_msg::is_error + * - For an SREQ, see mt_msg::pSrsp for the SRSP message. + */ +int MT_MSG_txrx(struct mt_msg *pMsg); + +/* + * @brief Initialize the MT_MSG module + * @returns void + */ +void MT_MSG_init(void); + +/* + * @brief Verify that we have parsed all incomming data. + * @param pMsg - the message we just finished parsing. + * @returns void + * + * This should be called when processing of the payload + * is complete, it varifies that the entire payload has + * been parsed. + * + */ +void MT_MSG_parseComplete(struct mt_msg *pMsg); + +/* + * @brief Create/Initialize this message interface + * @param pMI - Pointer to the msg interface to initialize + * @returns negative on error + */ +int MT_MSG_interfaceCreate(struct mt_msg_interface *pMI); + +/* + * @brief Destroy this interface + * @param pMI - pointer to the msg interface to destroy + * @returns void + */ +void MT_MSG_interfaceDestroy(struct mt_msg_interface *pMI); + +/* + * @brief Create a message list. + * @param pML - the message list to init/create + * @param dbg_name - name to create + * @returns negative error, zero success + */ +int MT_MSG_LIST_create(struct mt_msg_list *pML, const char *dbg_name, const char *dbg_name2); + +/* + * @brief Insert a message into the list + * @param pMI - Owning interface + * @param pML - msg list + * @param pMsg - the message + * @returns void + */ +void MT_MSG_LIST_insert(struct mt_msg_interface *pMI, + struct mt_msg_list *pML, struct mt_msg *pMsg); + +/* + * @brief Insert a message into the list + * @param pMI - Owning interface + * @param pML - msg list + * @param timeout_mSecs - how long to wait + * @returns NULL, or the message + */ +struct mt_msg *MT_MSG_LIST_remove(struct mt_msg_interface *pMI, + struct mt_msg_list *pML, int timeout_mSecs); + +/* + * @brief Destroy a message list + * @param pML - the message list to destroy + * @returns void + * + */ +void MT_MSG_LIST_destroy(struct mt_msg_list *pML); + +/* + * @brief mark this cmd0 byte as an AREQ. + * @param cmd0 - value to mark + * @returns - modified cmd0 + */ +uint8_t MT_MSG_cmd0_areq(int cmd0); + +/* + * @brief mark this cmd0 byte as an AREQ. + * @param cmd0 - value to mark + * @returns - modified cmd0 + */ +uint8_t MT_MSG_cmd0_sreq(int cmd0); + +/* + * @brief mark this cmd0 byte as an AREQ. + * @param cmd0 - value to mark + * @returns - modified cmd0 + */ +uint8_t MT_MSG_cmd0_srsp(int cmd0); + +/* + * @brief mark this cmd0 byte as an AREQ. + * @param cmd0 - value to mark + * @returns - modified cmd0 + */ +uint8_t MT_MSG_cmd0_poll(int cmd0); + +/* + * @brief Reformat a message for a new interface + * @param pMsg - the message to be reformatted + * + * This is used when forwarding a message from one interface to another. + * See the mt_msg::pSrcIface and mt_msg::pDestIface + * + * Example: The NPI server has two interfaces, the UART and the SOCKET. + * Each interface has different parameters (ie: the UART might require + * a frame sync byte, but the socket does not, as a result the data + * in the packet needs to 'shift' over a few bytes. + * + * This function does that shift operation. + */ +void MT_MSG_reformat(struct mt_msg *pMsg); + +/* + * @brief Handle INI file configuration parameters for a message interface. + * @param pINI - the ini file parser information + * @param pIface - the message interface structure to populate + * + * As the INI file is being parsed, this callback function can be used + * to translate various message interface settings into changes within + * the message interface structure. + */ +int MT_MSG_INI_settings(struct ini_parser *pINI, + bool *handled, + struct mt_msg_interface *pIface); + +/* + * @brief Send a loopback message + * @param pIface - where to send the message + * @param repeatCount - how many many times to repeat (0=none, 0xff=forever) + * @param mSec_rate - how often (mSecs) to repeat + * @param length - how many bytes to send + * @param pPayload - the data bytes to send + */ +int MT_MSG_loopback(struct mt_msg_interface *pIface, int repeatCount, + uint32_t mSec_rate, size_t length, const uint8_t *pPayload); + +/* + * @brief Get Ext Address + * @param pIface - destination interface + * @param pib - if not null, request the pib value (active) + * @param primary - if not null, request the factory value + * @param usr_cfg - if not null, request the user configured value + * @returns success = (2 * number_of_requests) + * + * A single request requires 2 transfers (tx and rx) a + * A successful single transfer request returns 2. + * A request for 2 items return 4 upon success. + * .. and so forth .. + * + * if multiple items are requested, there is no indication of which item failed. + * Note if the MAC address was: 12:34:56:78:9a:bc:de:f0, + * Then the result would be: 0x123456789abcdef0 + */ +int MT_MSG_getExtAddress(struct mt_msg_interface *pIface, + uint8_t *pib, + uint8_t *primary, + uint8_t *usr_cfg); + +/* + * @brief Send a SYS_VERSION_REQ, and get the reply + * @param pIface - interface to send to + * @param pInfo - where to put the result + * @returns success = 2 (tx msg + rx msg), all others are failure. + */ +int MT_MSG_getVersion(struct mt_msg_interface *pDest, + struct mt_version_info *pInfo); + +/* + * @brief Send a SYS_RESET_REQ to the interface + * @param pIface - where to send the message to + * @param reset_type - type of reset (0=hard, 1=soft) + * + * NOTE: After sending the device will reset and send a reset indication. + */ +void MT_MSG_reset(struct mt_msg_interface *pIface, int reset_type); + +#endif + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ diff --git a/components/api/inc/mt_msg_dbg.h b/components/api/inc/mt_msg_dbg.h new file mode 100644 index 0000000..0c9b9dd --- /dev/null +++ b/components/api/inc/mt_msg_dbg.h @@ -0,0 +1,168 @@ +/****************************************************************************** + @file mt_msg_dbg.h + + @brief TIMAC 2.0 mt msg - debug decoder header + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +#if !defined( MT_MSG_DBG_H ) +#define MT_MSG_DBG_H + +/* forward declarations */ +struct mt_msg_dbg_field; +struct mt_msg_dbg; + +/*! contains 'pseudo-globals' when decoding/printing message content */ +struct mt_msg_dbg_info { + /*! the message being printed */ + struct mt_msg *m_pMsg; + + /*! The debug info for the message */ + struct mt_msg_dbg *m_pDbg; + + /*! What interface is this message associated with? */ + struct mt_msg_interface *m_pIface; + + /*! What field number is this? */ + int m_field_num; + + /*! Where in the io buffer is the start of the payload */ + int m_idx_start; + + /*! Where in playload are we decoding right now? */ + int m_idx_cursor; + + /*! Where is the end of the payload */ + int m_idx_end; + + /*! What is the field we are printing? */ + struct mt_msg_dbg_field *m_pCurField; +}; + +#define FIELDTYPE_END 0 +#define FIELDTYPE_U8 1 +#define FIELDTYPE_U16 2 +#define FIELDTYPE_U32 3 +#define FIELDTYPE_MAXBYTES(n) (10000 + (n)) +#define IS_FIELDTYPE_MAXBYTES(X) (((X) >= 10000) && ((X) <= 19999)) +#define FIELDTYPE_BYTES_N(n) (20000 + (n)) +#define IS_FIELDTYPE_BYTES_N(X) (((X) >= 20000) && ((X) <= 29999)) + +/*! A field within a message */ +struct mt_msg_dbg_field { + /*! the field type, ie: FIELDTYPE_U8 */ + int m_fieldtype; + + /*! name to print for this field */ + const char *m_name; + + /*! If this field has a special case handler */ + void(*handler)(struct mt_msg_dbg_info *pW); + + /*! Next field */ + struct mt_msg_dbg_field *m_pNext; +}; + + +/*! Debug information about a message */ +struct mt_msg_dbg { + /*! The command in the message */ + int m_cmd0; + /*! The second command byte in the message */ + int m_cmd1; + + /*! What to print for debug purposes */ + const char *m_pktName; + + /*! List of fields in the message */ + struct mt_msg_dbg_field *m_pFields; + + /*! Next message in list of all msg debug detail */ + struct mt_msg_dbg *m_pNext; +}; + + +/*! + * @brief Load a message debug file, return linked list of messages + * @param filename - filename to load + * @return NULL on error, otherwise a null terminated linked list of debug info. + */ +struct mt_msg_dbg *MT_MSG_dbg_load(const char *filename); + +/*! + * @brief Free memory associated with a list of messages + * @param pMsgs - list of message debug info to free + */ +void MT_MSG_dbg_free(struct mt_msg_dbg *pMsgs); + +/*! + * @brief Decode & print detail about specified message. + * + * @param pMsg - msg to print. + * @param pIface - interface associated with this message. + * @param pDbg - list of all known message debug information to search. + * + * If (pDbg == NULL) nothing is printed. + */ +void MT_MSG_dbg_decode(struct mt_msg *pMsg, + struct mt_msg_interface *pIface, + struct mt_msg_dbg *pDbg); + +/*! + * Linked list of all known message debug information. + */ +extern struct mt_msg_dbg *ALL_MT_MSG_DBG; + +#endif + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ diff --git a/components/api/src/api_mac.c b/components/api/src/api_mac.c new file mode 100644 index 0000000..92e048b --- /dev/null +++ b/components/api/src/api_mac.c @@ -0,0 +1,3995 @@ +/****************************************************************************** + @file api_mac.c + + @brief TIMAC 2.0 API + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +/****************************************************************************** + Includes +*****************************************************************************/ + +#include "ti_semaphore.h" +#include "mutex.h" +#include "log.h" +#include "fatal.h" +#include "rand_data.h" +#include "mutex.h" +#include "timer.h" +#include "stream.h" +#include "stream_uart.h" +#include "stream_socket.h" + +#include "mt_msg.h" +#include "api_mac.h" +#include "api_mac_linux.h" + +#include +#include +#include +#include +#include + +/****************************************************************************** + Structures +*****************************************************************************/ + +/*! + @struct secPibStruct + Used to dispatch pib set/get requests from a dispatch table. +*/ +struct secPibStruct +{ + /*! the active message */ + struct mt_msg *pMsg; + /*! result of the get/set */ + ApiMac_status_t result; + /*! How many messages where transfered, ie: 2=success */ + int n_msgs; + /*! Is this get/set an error */ + bool is_error; + /*! True if setting */ + bool is_set; + /*! Attribute id as an integer */ + int attr; + /*! data location */ + void *pValue; +}; + +/*! + @struct secPibHandler + Entry in a pib sec pib get/set dispatch table. +*/ +struct secPibHandler +{ + /*! The corrisponding attribute as an integer */ + int attr; + /*! Handler for this attribute */ + void (*handler)(struct secPibStruct *pInfo); +}; + +/****************************************************************************** + Global Vars see: api_mac.h or api_mac_linux.h for details. +******************************************************************************/ + +/*! + + @brief When waiting for the next AREQ, how long to block. + + When the application calls ApiMac_processIncomming() + the code processes all pending async requests then blocks + on a semaphore waiting for the next Areq, this is the timeout + period to wait before giving up, 0 means do not wait, return + immediately. +*/ +int ApiMacLinux_areq_timeout_mSecs = DEFAULT_ApiMacLinux_areq_timeout_mSecs; + +/*! + Debug log flags for the API MAC module. + these flags are used by the "main" app when parsing the + application INI file to set/clear/enable/disable log flags. + + See the file: "log.h" for more details. +*/ +const struct ini_flag_name api_mac_log_flags[] = +{ + { .name = "api-mac-wait", .value = LOG_DBG_API_MAC_wait }, + { .name = "api-mac-stats", .value = LOG_DBG_API_MAC_datastats }, + /* terminate */ + { .name = NULL, .value = 0 } +}; + +struct mt_version_info MT_DEVICE_version_info; + +/****************************************************************************** + Constants, definitions, and Local Defines +*****************************************************************************/ + +/* These values come from the API_MAC embedded implimentation */ + +/*! Capability Information - Device is capable of becoming a PAN coordinator */ +#define CAPABLE_PAN_COORD 0x01 +/*! Capability Information - Device is an FFD */ +#define CAPABLE_FFD 0x02 +/*! + Capability Information - Device is mains powered rather than battery powered +*/ +#define CAPABLE_MAINS_POWER 0x04 +/*! Capability Information - Device has its receiver on when idle */ +#define CAPABLE_RX_ON_IDLE 0x08 +/*! + Capability Information - Device is capable of sending + and receiving secured frames +*/ +#define CAPABLE_SECURITY 0x40 +/*! + Capability Information - Request allocation of a short address in the + associate procedure +*/ +#define CAPABLE_ALLOC_ADDR 0x80 + +/*! Offset into the payload for the payload IEs */ +#define PAYLOAD_IE_OFFSET 0 +/*! Offset into the IE for the subIE */ +#define PAYLOAD_IE_SUBIE_OFFSET 0 + +/*! Macro to get the IE Type */ +#define PAYLOAD_IE_TYPE(p) (((p)[PAYLOAD_IE_OFFSET+1] >> 7) & 0x01) + +/*! Macro to get the IE Group ID */ +#define PAYLOAD_IE_GROUP_ID(p) \ + ((((uint8_t *)p)[PAYLOAD_IE_OFFSET+1] >> 3) & 0x0f) + +/*! Macro to get the IE Content Length */ +#define PAYLOAD_IE_CONTENT_LEN(p) \ + ((((uint8_t *)p)[PAYLOAD_IE_OFFSET+0] & 0x00ff) + \ + ((((uint8_t *)p)[PAYLOAD_IE_OFFSET+1] & 0x0007) << 8)) + +/*! Type value for payload IE */ +#define PAYLOAD_IE_TYPE_VAL 1 +/*! Type value for payload IE */ +#define PAYLOAD_IE_HEADER_LEN 2 + +/*! Macro to get the short subIE length */ +#define PAYLOAD_IE_SHORT_SUBIE_LEN(p) ((p)[PAYLOAD_IE_SUBIE_OFFSET+0]) + +/*! Macro to get the long subIE length */ +#define PAYLOAD_IE_LONG_SUBIE_LEN(p) \ + (((p)[PAYLOAD_IE_OFFSET+0] & 0x00ff) + \ + (((p)[PAYLOAD_IE_OFFSET+1] & 0x0007) << 8)) + +/*! Macro to get the subIE type */ +#define PAYLOAD_IE_SUBIE_TYPE(p) (((p)[PAYLOAD_IE_SUBIE_OFFSET+1] >> 7) & 0x01) + +/*! Macro to get the subIE ID */ +#define PAYLOAD_IE_SUBIE_ID(p) ((p)[PAYLOAD_IE_SUBIE_OFFSET+1] & 0x7f) + +/*! subIE header length */ +#define PAYLOAD_SUB_IE_HEADER_LEN 2 + +/*! Short subIE type */ +#define PAYLOAD_SUB_ID_IE_TYPE_SHORT 0 +/*! Long subIE type */ +#define PAYLOAD_SUB_ID_IE_TYPE_LONG 1 + +/*! Short subIE header length */ +#define PAYLOAD_SUB_ID_IE_SHORT_HEADER_LEN 2 + +/*! Payload IE SubIE Type Size */ +#define PAYLOAD_IE_SUB_IE_TYPE_SIZE 1 +/*! Payload IE SubIE Type Position */ +#define PAYLOAD_IE_SUB_IE_TYPE_POSITION 15 +/*! Payload IE SubIE ID Short Size */ +#define PAYLOAD_IE_SUB_IE_ID_SHORT_SIZE 7 +/*! Payload IE SubIE ID Short Position */ +#define PAYLOAD_IE_SUB_IE_ID_SHORT_POSITION 8 +/*! Payload IE SubIE Short Length Size */ +#define PAYLOAD_IE_SUB_IE_LEN_SHORT_SIZE 8 +/*! Payload IE SubIE Short Length Position */ +#define PAYLOAD_IE_SUB_IE_LEN_SHORT_POSITION 0 +/*! Payload IE SubIE ID Long Size */ +#define PAYLOAD_IE_SUB_IE_ID_LONG_SIZE 4 +/*! Payload IE SubIE ID Long Position */ +#define PAYLOAD_IE_SUB_IE_SUB_ID_LONG_POSITION 11 +/*! Payload IE SubIE ID Long Length Size */ +#define PAYLOAD_IE_SUB_IE_LEN_LONG_SIZE 11 +/*! Payload IE SubIE Long Length Position */ +#define PAYLOAD_IE_SUB_IE_LEN_LONG_POSITION 0 + +/*! Unpack a field from a uint16_t */ +#define IE_UNPACKING(var,size,position) (((uint16_t)(var)>>(position)) \ + &(((uint16_t)1<<(size))-1)) + +/*! Make a uint16_t from 2 uint8_t */ +#define MAKE_UINT16(low, high) (((low)&0x00FF)|(((high)&0x00FF)<<8)) + +/*! Get the SubIE type field (bool) */ +#define GET_SUBIE_TYPE(ctl) \ + (bool)(IE_UNPACKING(ctl, \ + PAYLOAD_IE_SUB_IE_TYPE_SIZE, \ + PAYLOAD_IE_SUB_IE_TYPE_POSITION)) + +/*! Get the SubIE Long ID */ +#define GET_SUBIE_ID_LONG(ctl) \ + (uint8_t)(IE_UNPACKING(ctl, \ + PAYLOAD_IE_SUB_IE_ID_LONG_SIZE, \ + PAYLOAD_IE_SUB_IE_SUB_ID_LONG_POSITION)) + +/*! Get the SubIE Long Length */ +#define GET_SUBIE_LEN_LONG(ctl) \ + (uint16_t)(IE_UNPACKING(ctl, \ + PAYLOAD_IE_SUB_IE_LEN_LONG_SIZE, \ + PAYLOAD_IE_SUB_IE_LEN_LONG_POSITION)) + +/*! Get the SubIE Short ID */ +#define GET_SUBIE_ID_SHORT(ctl) \ + (uint8_t)(IE_UNPACKING(ctl, \ + PAYLOAD_IE_SUB_IE_ID_SHORT_SIZE, \ + PAYLOAD_IE_SUB_IE_ID_SHORT_POSITION)) + +/*! Get the SubIE Short Length */ +#define GET_SUBIE_LEN_SHORT(ctl) \ + (uint16_t)(IE_UNPACKING(ctl, \ + PAYLOAD_IE_SUB_IE_LEN_SHORT_SIZE, \ + PAYLOAD_IE_SUB_IE_LEN_SHORT_POSITION)) + +/****************************************************************************** + Local Structs +******************************************************************************/ + +/* forward */ +struct mt_msg_dispatch; + +/* + @typedef msg_dispatch_handler + + @brief Function prototype for an AREQ handler. + + When an async message comes in, the handler for that message is + found in a dispatch table, this is the prototype of a handler + in that table. +*/ +typedef void msg_dispatch_handler(const struct mt_msg_dispatch *pDTE, + struct mt_msg *pMsg); + +/*! + * @struct mt_msg_dispatch + * @brief Dispatch table entry for a message handler/parser. + */ +struct mt_msg_dispatch +{ + /*! cmd0 to match against */ + int cmd0; + /*! cmd1 to match against */ + int cmd1; + /*! for use by the handler */ + intptr_t cookie; + /*! for log purposes */ + const char *dbg_prefix; + /*! handler for this command */ + msg_dispatch_handler *pHandler; +}; + +/****************************************************************************** + * Local Variables + ******************************************************************************/ + +/*! When specific ASYNC messages arrive, we call these functions. */ +static ApiMac_callbacks_t *pApiMac_callbacks; + +/*! used as random source for ApiMac_randomByte() */ +static struct rand_data_one rand_data_source; + +/****************************************************************************** + Functions. +******************************************************************************/ + +/*! + * @brief Allocate memory associated with this message. + * @param pMsg - associated message + * @param why - message for error logging + * @param cnt - number of items to allocate + * @param siz - size of each item to allocate + * + * If required, logs error messages + */ +static void *api_mac_callocMem(struct mt_msg *pMsg, + const char *pWhy, + int cnt, + int siz) +{ + void *vp; + + vp = calloc(cnt, siz); + if(vp == NULL) + { + MT_MSG_log(LOG_ERROR, pMsg, "no memory for: %s\n", pWhy); + } + return (vp); +} + +/*! + * @brief Compliment of api_mac_callocMem() + * @param pMem - data to free + */ +static void api_mac_freeMem(void *pMem) +{ + if(pMem) + { + free(pMem); + } +} + +/*! + * @brief common routine to decode a security component of a message + * @param pMsg - the message to read from + * @param pSec - the security item to fill in + */ +static void decode_Sec(struct mt_msg *pMsg, ApiMac_sec_t *pSec) +{ + MT_MSG_rdBuf_DBG(pMsg, + (void *)(&pSec->keySource[0]), + APIMAC_KEY_SOURCE_MAX_LEN, "keySource"); + pSec->securityLevel = MT_MSG_rdU8_DBG(pMsg, "securityLevel"); + pSec->keyIdMode = MT_MSG_rdU8_DBG(pMsg, "keyIdMode"); + pSec->keyIndex = MT_MSG_rdU8_DBG(pMsg, "keyIndex"); +} + +/*! + * @brief Common routine to handle a "security" component of a message. + * @param wrPtr - where to encode the security information + * @param pSec - the security information to encode + * @return updated wrPtr + * + * An example use of this can be found in ApiMac_mlmeAssociateReq() + */ +static void encode_Sec(struct mt_msg *pMsg, ApiMac_sec_t *pSec) +{ + MT_MSG_wrBuf_DBG(pMsg, + (void *)(&(pSec->keySource[0])), + APIMAC_KEY_SOURCE_MAX_LEN, "keySource"); + MT_MSG_wrU8_DBG(pMsg, pSec->securityLevel, "securityLevel"); + MT_MSG_wrU8_DBG(pMsg, pSec->keyIdMode, "keyIdMode"); + MT_MSG_wrU8_DBG(pMsg, pSec->keyIndex, "keyIndex"); +} + +/*! + * @brief Decode an address from a message + * @return void + */ +static void decode_Addr(struct mt_msg *pMsg, ApiMac_sAddr_t *pAddr) +{ + int x; + pAddr->addrMode = MT_MSG_rdU8_DBG(pMsg, "addrMode"); + switch(pAddr->addrMode) + { + default: + case ApiMac_addrType_none: + /* read something.. */ + for(x = 0 ; x < 8 ; x++) + { + pAddr->addr.extAddr[x] = MT_MSG_rdU8_DBG(pMsg, "filler"); + } + break; + case ApiMac_addrType_short: + pAddr->addr.shortAddr = MT_MSG_rdU16_DBG(pMsg, "shortAddr"); + for(x = 2 ; x < 8 ; x++) + { + /* read & toss */ + MT_MSG_rdU8_DBG(pMsg, "filler"); + } + break; + case ApiMac_addrType_extended: + for(x = 0 ; x < 8 ; x++) + { + pAddr->addr.extAddr[x] = MT_MSG_rdU8_DBG(pMsg, "extaddr"); + } + } +} + +/*! + * @brief internal helper function to encode an address + * @param pMsg - the message to write to + * @param pAddr - the address to write/encode + */ +static void encode_Addr(struct mt_msg *pMsg, const ApiMac_sAddr_t *pAddr) +{ + int x; + MT_MSG_wrU8_DBG(pMsg, pAddr->addrMode, "addrMode"); + switch(pAddr->addrMode) + { + case ApiMac_addrType_none: + /* zero fill */ + for(x = 0 ; x < 8 ; x++) + { + MT_MSG_wrU8_DBG(pMsg, 0, "addr-fill"); + } + break; + case ApiMac_addrType_short: + MT_MSG_wrU16_DBG(pMsg, pAddr->addr.shortAddr, "shortAddr"); + for(x = 2 ; x < 8 ; x++) + { + MT_MSG_wrU8_DBG(pMsg, 0,"addr-fill"); + } + break; + case ApiMac_addrType_extended: + for(x = 0 ; x < 8 ; x++) + { + MT_MSG_wrU8_DBG(pMsg, pAddr->addr.extAddr[x], "ext-addr"); + } + break; + default: + BUG_HERE("API error bad address type\n"); + /* insert fill bytes */ + MT_MSG_wrU32_DBG(pMsg, 0, "dbg-fill"); + MT_MSG_wrU32_DBG(pMsg, 0, "dbg-fill"); + break; + } +} + +/*! + * @brief common code to parse a pan descriptor from an MT message + * + * @param pMsg - message to parse + * @param pD - where to put the message + * @param flavor - 0 if a beacon, !0 if a scan response type + */ +static void api_rd_panDesc(struct mt_msg *pMsg, + ApiMac_panDesc_t *pD) +{ + decode_Addr(pMsg, &(pD->coordAddress)); + pD->coordPanId = MT_MSG_rdU16_DBG(pMsg, "coordPanId"); + pD->superframeSpec = MT_MSG_rdU16_DBG(pMsg, "superFrameSpec"); + pD->logicalChannel = MT_MSG_rdU8_DBG(pMsg, "logicalChannel"); + pD->channelPage = MT_MSG_rdU8_DBG(pMsg, "channelPage"); + pD->gtsPermit = MT_MSG_rdU8_DBG(pMsg, "gtsPermit"); + pD->linkQuality = MT_MSG_rdU8_DBG(pMsg, "linkQuality"); + pD->timestamp = MT_MSG_rdU32_DBG(pMsg, "timestamp"); + pD->securityFailure = MT_MSG_rdU8_DBG(pMsg, "securityFailure"); + decode_Sec(pMsg, &(pD->sec)); +} + +static bool is_bad_addr( ApiMac_sAddrExt_t p ) +{ + int x; + /* A bad MAC address is defined as all 1s */ + for( x = 0 ; x < APIMAC_SADDR_EXT_LEN ; x++ ){ + if( p[x] != 0x0ff ){ + return false; + } + } + return true; +} + + +/*! + Initialize this module. + + Public function defined in api_mac.h +*/ +void *ApiMac_init(bool enableFH) +{ + int r; + bool b; + + MT_MSG_init(); + + if( API_MAC_msg_interface == NULL ) + { + BUG_HERE("msg interface not specified(NULL)\n"); + } + + r = MT_MSG_interfaceCreate(API_MAC_msg_interface); + if(r != 0) + { + FATAL_printf("Cannot init interface (%d)\n", r); + } + + memset( (void *)(&MT_DEVICE_version_info), 0, sizeof(MT_DEVICE_version_info) ); + r = MT_MSG_getVersion( API_MAC_msg_interface, &MT_DEVICE_version_info ); + if( r != 2 ){ + FATAL_printf("Cannot get VERSION info from CoProcessor\n"); + } + + + if(enableFH) + { + ApiMac_enableFH(); + } + + ApiMac_mlmeResetReq(true); + + /* get mac address from the co-processor */ + { + ApiMac_sAddrExt_t cfg, prim; + /* First: the one from the CCFG */ + r = MT_MSG_getExtAddress( API_MAC_msg_interface, NULL, prim, cfg ); + if( r != 4 ){ + FATAL_printf("Cannot get MAC addresses from CoProcessor\n"); + } + /* if not programed, use the factory one */ + b = is_bad_addr( cfg ); + if( b ){ + memcpy( cfg, prim, APIMAC_SADDR_EXT_LEN); + } + + /* Oh no things are horrible bad! */ + if( is_bad_addr( cfg )){ + /* we must invent a random one */ + RAND_DATA_initOne( &(rand_data_source), ((uint32_t)( TIMER_getAbsNow() ) )); + int x; + for( x = 0 ; x < APIMAC_SADDR_EXT_LEN ; x++ ){ + cfg[x] = ApiMac_randomByte(); + } + /* Set the Local admin bit */ + cfg[0] |= 2; + /* unicast bit */ + cfg[0] &= (~1); + } + + ApiMac_mlmeSetReqArray( ApiMac_attribute_extendedAddress, cfg ); + } + + + /* We return "other" list semaphore. + When we get an AREQ, we post here + If some external event occurs + We let the caller post here also + */ + return ((void *)(API_MAC_msg_interface->rx_list.sem)); +} + +/*! + Register for MAC callbacks. + + Public function defined in api_mac.h +*/ +void ApiMac_registerCallbacks(ApiMac_callbacks_t *pCallbacks) +{ + pApiMac_callbacks = pCallbacks; +} + +/*! + * @brief Process an associate indication + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_associate_ind(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + int r; + ApiMac_mlmeAssociateInd_t indication; + + (void)p; + + memset((void *)(&indication), 0, sizeof(indication)); + + MT_MSG_rdBuf_DBG(pMsg, + (void *)(&indication.deviceAddress[0]), + APIMAC_SADDR_EXT_LEN, "extaddr"); + + r = MT_MSG_rdU8_DBG(pMsg, "capInfo"); + ApiMac_buildMsgCapInfo((uint8_t)(r), + &(indication.capabilityInformation)); + + decode_Sec(pMsg, &indication.sec); + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + + if(pApiMac_callbacks->pAssocIndCb) + { + (*(pApiMac_callbacks->pAssocIndCb))(&indication); + } +} + +/*! + * @brief Process a sync loss indication + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_sync_loss_ind(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mlmeSyncLossInd_t indication; + + (void)p; + + memset((void *)(&indication), 0, sizeof(indication)); + + indication.reason = MT_MSG_rdU8_DBG(pMsg, "reason"); + indication.panId = MT_MSG_rdU16_DBG(pMsg, "panID"); + indication.logicalChannel = MT_MSG_rdU8_DBG(pMsg, "logicalChannel"); + indication.channelPage = MT_MSG_rdU8_DBG(pMsg, "channelPage"); + indication.phyID = MT_MSG_rdU8_DBG(pMsg, "phyID"); + decode_Sec(pMsg, &indication.sec); + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + + if(pApiMac_callbacks->pSyncLossIndCb) + { + (*(pApiMac_callbacks->pSyncLossIndCb))(&indication); + } +} + +/*! + * @brief Process a data conformation + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_data_cnf(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mcpsDataCnf_t indication; + + (void)p; + + memset((void *)(&indication), 0, sizeof(indication)); + + indication.status = MT_MSG_rdU8_DBG(pMsg, "status"); + indication.msduHandle = MT_MSG_rdU8_DBG(pMsg, "msdu-handle"); + indication.timestamp = MT_MSG_rdU32_DBG(pMsg, "timestamp"); + indication.timestamp2 = MT_MSG_rdU16_DBG(pMsg, "timestamp2"); + indication.retries = MT_MSG_rdU8_DBG(pMsg, "retries" ); + indication.mpduLinkQuality = MT_MSG_rdU8_DBG(pMsg, "mpduLinkQuality"); + indication.correlation = MT_MSG_rdU8_DBG(pMsg, "correlation"); + indication.rssi = MT_MSG_rdU8_DBG(pMsg, "rssi" ); + indication.frameCntr = MT_MSG_rdU32_DBG(pMsg, "frameCntr"); + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + + if(pApiMac_callbacks->pDataCnfCb) + { + (*(pApiMac_callbacks->pDataCnfCb))(&indication); + } +} + +/*! + * @brief Process a data indication + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_data_ind(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mcpsDataInd_t indication; + + memset((void *)(&indication), 0, sizeof(indication)); + + (void)p; + + decode_Addr(pMsg, (&indication.srcAddr)); + decode_Addr(pMsg, (&indication.dstAddr)); + indication.timestamp = MT_MSG_rdU32_DBG(pMsg, "timestamp"); + indication.timestamp2 = MT_MSG_rdU16_DBG(pMsg, "timestamp2"); + indication.srcPanId = MT_MSG_rdU16_DBG(pMsg, "srcPanId"); + indication.dstPanId = MT_MSG_rdU16_DBG(pMsg, "dstPanId"); + indication.mpduLinkQuality = MT_MSG_rdU8_DBG(pMsg, "mdpuLinkQuality"); + indication.correlation = MT_MSG_rdU8_DBG(pMsg, "correlation"); + indication.rssi = MT_MSG_rdU8_DBG(pMsg, "rssi"); + indication.dsn = MT_MSG_rdU8_DBG(pMsg, "dsn"); + decode_Sec(pMsg, &indication.sec); + indication.frameCntr = MT_MSG_rdU32_DBG(pMsg, "frameCntr"); + + indication.msdu.len = MT_MSG_rdU16_DBG(pMsg, "msdu.len"); + indication.payloadIeLen = MT_MSG_rdU16_DBG(pMsg, "payloadIeLen"); + + indication.msdu.p = &(pMsg->iobuf[ pMsg->iobuf_idx ]); + MT_MSG_rdBuf_DBG(pMsg, NULL, indication.msdu.len, "msdu.data"); + + indication.pPayloadIE = &(pMsg->iobuf[ pMsg->iobuf_idx ]); + MT_MSG_rdBuf_DBG(pMsg, NULL, indication.payloadIeLen, "payloadData"); + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + + + LOG_printf( LOG_DBG_API_MAC_datastats, + "data-ind: len=%2d addr: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", + pMsg->expected_len, + indication.srcAddr.addr.extAddr[0], + indication.srcAddr.addr.extAddr[1], + indication.srcAddr.addr.extAddr[2], + indication.srcAddr.addr.extAddr[3], + indication.srcAddr.addr.extAddr[4], + indication.srcAddr.addr.extAddr[5], + indication.srcAddr.addr.extAddr[6], + indication.srcAddr.addr.extAddr[7]); + + if(pApiMac_callbacks->pDataIndCb) + { + (*(pApiMac_callbacks->pDataIndCb))(&indication); + } +} + +/*! + * @brief Process a purge confirmation + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_purge_cnf(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mcpsPurgeCnf_t indication; + + (void)p; + + memset((void *)(&indication), 0, sizeof(indication)); + + indication.status = MT_MSG_rdU8_DBG(pMsg, "status"); + indication.msduHandle = MT_MSG_rdU8_DBG(pMsg, "handle"); + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + + if(pApiMac_callbacks->pPurgeCnfCb) + { + (*(pApiMac_callbacks->pPurgeCnfCb))(&indication); + } +} + +/*! + * @brief Process an orphan indication + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_orphan_ind(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mlmeOrphanInd_t indication; + + (void)p; + + memset((void *)(&indication), 0, sizeof(indication)); + + MT_MSG_rdBuf_DBG(pMsg, + (void *)(&indication.orphanAddress[0]), + APIMAC_SADDR_EXT_LEN, "ext-addr"); + LOG_printf( LOG_DBG_API_MAC_datastats, + "orphan: %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x\n", + indication.orphanAddress[0], + indication.orphanAddress[1], + indication.orphanAddress[2], + indication.orphanAddress[3], + indication.orphanAddress[4], + indication.orphanAddress[5], + indication.orphanAddress[6], + indication.orphanAddress[7]); + + decode_Sec(pMsg, &(indication.sec)); + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + + if(pApiMac_callbacks->pOrphanIndCb) + { + (*(pApiMac_callbacks->pOrphanIndCb))(&indication); + } +} + +/*! + * @brief Process an associate confirmation + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_associate_cnf(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mlmeAssociateCnf_t indication; + + (void)(p); + + memset((void *)(&indication), 0, sizeof(indication)); + + indication.status = MT_MSG_rdU8_DBG(pMsg, "status"); + indication.assocShortAddress = MT_MSG_rdU16_DBG(pMsg, "shorAddress"); + decode_Sec(pMsg, &indication.sec); + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + + if(pApiMac_callbacks->pAssocCnfCb) + { + (*(pApiMac_callbacks->pAssocCnfCb))(&indication); + } +} + +/*! + * @brief Process a beacon notify message + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_beacon_notify(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + int x; + int idx_save; + ApiMac_mlmeBeaconNotifyInd_t indication; + + (void)(p); + + /* simplify, do this check at the top. */ + if(pApiMac_callbacks->pBeaconNotifyIndCb == NULL) + { + return; + } + + memset((void *)(&indication), 0, sizeof(indication)); + + indication.beaconType = MT_MSG_rdU8_DBG(pMsg, "beacontype"); + indication.bsn = MT_MSG_rdU8_DBG(pMsg, "bsn"); + switch(indication.beaconType) + { + default: + MT_MSG_log(LOG_ERROR, pMsg, + "unknown beacon type: %d\n", + indication.beaconType); + break; + case ApiMac_beaconType_normal: + /* standard beacon */ + indication.panDesc.timestamp = MT_MSG_rdU32_DBG(pMsg, "timestamp"); + decode_Addr(pMsg, &(indication.panDesc.coordAddress)); + indication.panDesc.coordPanId = MT_MSG_rdU16_DBG(pMsg, "pan-PandID"); + indication.panDesc.superframeSpec = MT_MSG_rdU16_DBG(pMsg, "pan-super-frame"); + indication.panDesc.logicalChannel = MT_MSG_rdU8_DBG(pMsg, "pan-logical-channel"); + indication.panDesc.channelPage = MT_MSG_rdU8_DBG(pMsg, "pan-channel-page"); + indication.panDesc.gtsPermit = MT_MSG_rdU8_DBG(pMsg, "pan-gts-permit"); + indication.panDesc.linkQuality = MT_MSG_rdU8_DBG(pMsg, "pan-link-quality"); + indication.panDesc.securityFailure = MT_MSG_rdU8_DBG(pMsg, "pan-security-failure"); + decode_Sec(pMsg, &(indication.panDesc.sec)); + indication.beaconData.beacon.numPendShortAddr = MT_MSG_rdU8_DBG(pMsg, "num-pend-short-addr"); + indication.beaconData.beacon.numPendExtAddr = MT_MSG_rdU8_DBG(pMsg, "num-pend-ext-addr"); + indication.beaconData.beacon.sduLength = MT_MSG_rdU8_DBG(pMsg, "sdu-length"); + + /* remember where we are now. */ + idx_save = pMsg->iobuf_idx; + /* fake parse these ... */ + MT_MSG_rdBuf_DBG(pMsg, NULL, + 2 * indication.beaconData.beacon.numPendShortAddr, + "pend-short-addr"); + MT_MSG_rdBuf_DBG(pMsg, NULL, + 8 * indication.beaconData.beacon.numPendExtAddr, + "pend-ext-addr"); + MT_MSG_rdBuf_DBG(pMsg, NULL, + indication.beaconData.beacon.sduLength, "sdu.data"); + MT_MSG_parseComplete(pMsg); + + if(pMsg->is_error) + { + goto fail_1; + } + + /* allocate space for these */ + indication.beaconData.beacon.pShortAddrList = + (uint16_t *)api_mac_callocMem(pMsg, + "beacon", + indication.beaconData.beacon.numPendShortAddr+1, + sizeof(uint16_t)); + indication.beaconData.beacon.pExtAddrList = + (uint8_t *)api_mac_callocMem(pMsg, + "beacon", + indication.beaconData.beacon.numPendExtAddr+1, + 8); + indication.beaconData.beacon.pSdu = + (uint8_t *)api_mac_callocMem(pMsg, + "beacon", + indication.beaconData.beacon.sduLength+1, + 1); + + if(pMsg->is_error) + { + goto fail_1; + } + /* reset to the starting point */ + pMsg->iobuf_idx = idx_save; + + /* and read properly to do byte swap if required */ + for(x = 0 ; x < indication.beaconData.beacon.numPendShortAddr ; x++) + { + indication.beaconData.beacon.pShortAddrList[x] = + MT_MSG_rdU16_DBG(pMsg, "short-addr"); + } + + /* read properly to deal with alignment */ + for(x = 0 ; x < indication.beaconData.beacon.numPendExtAddr ; x++) + { + MT_MSG_rdBuf_DBG(pMsg, + indication.beaconData.beacon.pExtAddrList + (x *8), + 8, "dummy"); + } + + /* these are just bytes.. */ + MT_MSG_rdBuf_DBG(pMsg, + indication.beaconData.beacon.pSdu, + indication.beaconData.beacon.sduLength, "sdu-data"); + + MT_MSG_parseComplete(pMsg); + if(!(pMsg->is_error)) + { + (*(pApiMac_callbacks->pBeaconNotifyIndCb))(&indication); + } + fail_1: + if(indication.beaconData.beacon.pShortAddrList) + { + api_mac_freeMem((void *)(indication.beaconData.beacon.pShortAddrList)); + indication.beaconData.beacon.pShortAddrList = NULL; + } + if(indication.beaconData.beacon.pExtAddrList) + { + api_mac_freeMem((void *)(indication.beaconData.beacon.pExtAddrList)); + indication.beaconData.beacon.pExtAddrList = NULL; + } + if(indication.beaconData.beacon.pSdu) + { + api_mac_freeMem((void *)(indication.beaconData.beacon.pSdu)); + indication.beaconData.beacon.pSdu = NULL; + } + + break; + case ApiMac_beaconType_enhanced: + indication.beaconData.eBeacon.coexist.beaconOrder = MT_MSG_rdU8_DBG(pMsg, "beaconOrder"); + indication.beaconData.eBeacon.coexist.superFrameOrder = MT_MSG_rdU8_DBG(pMsg, "superFrameOrder"); + indication.beaconData.eBeacon.coexist.finalCapSlot = MT_MSG_rdU8_DBG(pMsg, "finalCapSlot"); + indication.beaconData.eBeacon.coexist.eBeaconOrder = MT_MSG_rdU8_DBG(pMsg, "eBeaconOrder"); + indication.beaconData.eBeacon.coexist.offsetTimeSlot = MT_MSG_rdU8_DBG(pMsg, "offsetTimeSlot"); + indication.beaconData.eBeacon.coexist.capBackOff = MT_MSG_rdU8_DBG(pMsg, "capBackOff"); + indication.beaconData.eBeacon.coexist.eBeaconOrderNBPAN = MT_MSG_rdU16_DBG(pMsg, "beaconordernpan"); + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + break; + } + if(pApiMac_callbacks->pBeaconNotifyIndCb) + { + (*(pApiMac_callbacks->pBeaconNotifyIndCb))(&indication); + } + break; + } +} + +/*! + * @brief Process a disassociate indication + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_disassociate_ind(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mlmeDisassociateInd_t indication; + + (void)(p); + + memset((void *)(&indication), 0, sizeof(indication)); + + MT_MSG_rdBuf_DBG(pMsg, + (void *)(&indication.deviceAddress[0]), + APIMAC_SADDR_EXT_LEN, "ext-addr"); + indication.disassociateReason = MT_MSG_rdU8_DBG(pMsg, "reason"); + decode_Sec(pMsg, &(indication.sec)); + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + + if(pApiMac_callbacks->pDisassociateIndCb) + { + (*(pApiMac_callbacks->pDisassociateIndCb))(&indication); + } +} + +/*! + * @brief Process a disassociate confirmation + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_disassociate_cnf(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mlmeDisassociateCnf_t indication; + + (void)(p); + + memset((void *)(&indication), 0, sizeof(indication)); + + indication.status = MT_MSG_rdU8_DBG(pMsg, "status"); + decode_Addr(pMsg, &indication.deviceAddress); + indication.panId = MT_MSG_rdU16_DBG(pMsg, "pan-id"); + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + + if(pApiMac_callbacks->pDisassociateCnfCb) + { + (*(pApiMac_callbacks->pDisassociateCnfCb))(&indication); + } +} + +/*! + * @brief Process a poll confirmation + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_poll_cnf(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mlmePollCnf_t indication; + + (void)(p); + + memset((void *)(&indication), 0, sizeof(indication)); + + indication.status = MT_MSG_rdU8_DBG(pMsg ,"status"); + indication.framePending = MT_MSG_rdU8_DBG(pMsg, "framePending"); + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + + if(pApiMac_callbacks->pPollCnfCb) + { + (*(pApiMac_callbacks->pPollCnfCb))(&indication); + } +} + +/*! + * @brief Process a scan confirmation + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_scan_cnf(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + int x; + ApiMac_panDesc_t *pPD; + ApiMac_mlmeScanCnf_t indication; + uint8_t *pU8; + + (void)(p); + + pU8 = NULL; + pPD = NULL; + + memset((void *)(&indication), 0, sizeof(indication)); + + indication.status = MT_MSG_rdU8_DBG(pMsg, "status"); + + indication.scanType = MT_MSG_rdU8_DBG(pMsg, "scanType"); + indication.channelPage = MT_MSG_rdU8_DBG(pMsg, "channelPage"); + indication.phyId = MT_MSG_rdU8_DBG(pMsg, "phyId"); + MT_MSG_rdBuf_DBG(pMsg, (void *)(indication.unscannedChannels), 17, "unscannedchannels"); + indication.resultListSize = MT_MSG_rdU8_DBG(pMsg, "resultListSize"); + + switch(indication.scanType) + { + default: + LOG_printf(LOG_ERROR, + "areq-scan-cnf unknown type: %d\n", + indication.scanType); + pMsg->is_error = true; + break; + case ApiMac_scantype_orphan: + if(indication.resultListSize) + { + MT_MSG_log(LOG_ERROR, pMsg, "orphan scan size not zero?\n"); + } + break; + case ApiMac_scantype_energyDetect: + pU8 = (uint8_t *)api_mac_callocMem(pMsg, + "scan result", + indication.resultListSize + 1, + sizeof(uint8_t)); + indication.result.pEnergyDetect = pU8; + if(pMsg->is_error) + { + break; + } + MT_MSG_rdBuf_DBG(pMsg, + (void *)(pU8), + indication.resultListSize, + "energydata"); + break; + case ApiMac_scantype_activeEnhanced: + case ApiMac_scantype_active: + case ApiMac_scantype_passive: + pPD = (ApiMac_panDesc_t *)api_mac_callocMem( + pMsg, + "scan result", + indication.resultListSize + 1, + sizeof(*indication.result.pPanDescriptor)); + + indication.result.pPanDescriptor = pPD; + if(pMsg->is_error) + { + break; + } + for(x = 0; x < indication.resultListSize; x++) + { + api_rd_panDesc(pMsg, pPD + x); + } + break; + } + + /* did we properly parse this? */ + MT_MSG_parseComplete(pMsg); + + if(!pMsg->is_error) + { + if(pApiMac_callbacks->pScanCnfCb) + { + (*(pApiMac_callbacks->pScanCnfCb))(&indication); + } + } + if(pPD) + { + api_mac_freeMem((void *)(pPD)); + pPD = NULL; + } + + if(pU8) + { + api_mac_freeMem((void *)(pU8)); + } +} + +/*! + * @brief Process a communications status indication + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_comm_status_ind(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mlmeCommStatusInd_t indication; + + (void)(p); + + memset((void *)(&indication), 0, sizeof(indication)); + + indication.status = MT_MSG_rdU8_DBG(pMsg, "status"); + decode_Addr(pMsg, &indication.srcAddr); + decode_Addr(pMsg, &indication.dstAddr); + indication.panId = MT_MSG_rdU16_DBG(pMsg, "panID"); + indication.reason = MT_MSG_rdU8_DBG(pMsg, "reason"); + decode_Sec(pMsg, &indication.sec); + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + + if(pApiMac_callbacks->pCommStatusCb) + { + (*(pApiMac_callbacks->pCommStatusCb))(&indication); + } +} + +/*! + * @brief Process a start confirmation + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_start_cnf(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mlmeStartCnf_t indication; + + (void)(p); + + memset((void *)(&indication), 0, sizeof(indication)); + + indication.status = MT_MSG_rdU8_DBG(pMsg, "status"); + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + + if(pApiMac_callbacks->pStartCnfCb) + { + (*(pApiMac_callbacks->pStartCnfCb))(&indication); + } +} + +/*! + * @brief Process a WiSun async confirm + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_ws_async_cnf(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mlmeWsAsyncCnf_t indication; + + (void)(p); + + memset((void *)(&indication), 0, sizeof(indication)); + + indication.status = MT_MSG_rdU8_DBG(pMsg, "status"); + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + + if(pApiMac_callbacks->pWsAsyncCnfCb) + { + (*(pApiMac_callbacks->pWsAsyncCnfCb))(&indication); + } +} + +/*! + * @brief Process a WiSun async indication. + * + * @param p - dispatch table entry + * @param pMsg - the message to process. + */ +static void process_areq_ws_async_ind(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mlmeWsAsyncInd_t indication; + + (void)(p); + + memset((void *)(&indication), 0, sizeof(indication)); + + decode_Addr(pMsg, &indication.srcAddr); + decode_Addr(pMsg, &indication.dstAddr); + indication.timestamp = MT_MSG_rdU32_DBG(pMsg, "timestamp"); + indication.timestamp2 = MT_MSG_rdU16_DBG(pMsg, "timestamp2"); + indication.srcPanId = MT_MSG_rdU16_DBG(pMsg, "src-pan-id"); + indication.dstPanId = MT_MSG_rdU16_DBG(pMsg, "dst-pan-id"); + indication.mpduLinkQuality = MT_MSG_rdU8_DBG(pMsg, "mdpu-link-quality"); + indication.correlation = MT_MSG_rdU8_DBG(pMsg, "correlation"); + indication.rssi = MT_MSG_rdU8_DBG(pMsg, "rssi"); + indication.dsn = MT_MSG_rdU8_DBG(pMsg, "dsn"); + decode_Sec(pMsg, &(indication.sec)); + indication.frameCntr = MT_MSG_rdU32_DBG(pMsg, "framecntr"); + indication.fhFrameType = MT_MSG_rdU8_DBG(pMsg,"frameType" ); + // indication.fhProtoDispatch = MT_MSG_rdU8_DBG(pMsg, "fh-protodisptch"); + indication.msdu.len = MT_MSG_rdU16_DBG(pMsg, "msdu-len"); + indication.payloadIeLen = MT_MSG_rdU16_DBG(pMsg, "payload-ie-len" ); + + if(indication.msdu.len) + { + indication.msdu.p = api_mac_callocMem(pMsg, + "ws_async_ind", + indication.msdu.len, + sizeof(uint8_t)); + MT_MSG_rdBuf_DBG(pMsg, (void *)(indication.msdu.p), + indication.msdu.len, + "msdu.data"); + } + if(indication.payloadIeLen) + { + indication.pPayloadIE = api_mac_callocMem(pMsg, + "ws_async_ind", + indication.payloadIeLen, + sizeof(uint8_t)); + MT_MSG_rdBuf_DBG(pMsg, + (void *)(indication.pPayloadIE), + indication.payloadIeLen, "payload"); + + } + + MT_MSG_parseComplete(pMsg); + if(!pMsg->is_error) + { + if(pApiMac_callbacks->pWsAsyncIndCb) + { + (*(pApiMac_callbacks->pWsAsyncIndCb))(&indication); + } + } + if(indication.msdu.p) + { + api_mac_freeMem((void *)indication.msdu.p); + indication.msdu.p = NULL; + } + if(indication.pPayloadIE) + { + api_mac_freeMem((void *)(indication.pPayloadIE)); + indication.pPayloadIE = NULL; + } +} + +/*! + * @brief process a poll indication. + * @param pMsg - the message + */ +static void process_areq_poll_ind(const struct mt_msg_dispatch *p, + struct mt_msg *pMsg) +{ + ApiMac_mlmePollInd_t indication; + + (void)(p); + + decode_Addr(pMsg, &indication.srcAddr); + indication.srcPanId = MT_MSG_rdU16_DBG(pMsg, "srcPanId"); + indication.noRsp = MT_MSG_rdU8_DBG(pMsg, "noRsp") ? true : false; + + MT_MSG_parseComplete(pMsg); + if(pMsg->is_error) + { + return; + } + if(pApiMac_callbacks->pPollIndCb) + { + (*(pApiMac_callbacks->pPollIndCb))(&indication); + } +} + +/*! + * @brief Internal function to process/handle messages. + * + * @param pMsg - the message to process + */ +static void process_areq(struct mt_msg *pMsg) +{ + const struct mt_msg_dispatch *p; + + /* Lookup table to dispatch messages */ + static const struct mt_msg_dispatch lut[] = { + { + .cmd0 = 0x42, + .cmd1 = 0x80, + .dbg_prefix = "sync-loss-ind" , + .pHandler = process_areq_sync_loss_ind + }, + { + .cmd0 = 0x42, + .cmd1 = 0x81, + .dbg_prefix = "associate-ind" , + .pHandler = process_areq_associate_ind + }, + { + .cmd0 = 0x42, + .cmd1 = 0x82, + .dbg_prefix = "associate-cnf" , + .pHandler = process_areq_associate_cnf + }, + { + .cmd0 = 0x42, + .cmd1 = 0x83, + .dbg_prefix = "beacon-notify" , + .pHandler = process_areq_beacon_notify }, + { + .cmd0 = 0x42, + .cmd1 = 0x84, + .dbg_prefix = "data-cnf" , + .pHandler = process_areq_data_cnf }, + { + .cmd0 = 0x42, + .cmd1 = 0x85, + .dbg_prefix = "data-ind" , + .pHandler = process_areq_data_ind + }, + { + .cmd0 = 0x42, + .cmd1 = 0x86, + .dbg_prefix = "disassociate-ind" , + .pHandler = process_areq_disassociate_ind + }, + { + .cmd0 = 0x42, + .cmd1 = 0x87, + .dbg_prefix = "disassociate-cnf" , + .pHandler = process_areq_disassociate_cnf + }, + + /* 0x88- not used */ + /* 0x89- not used */ + + { + .cmd0 = 0x42, + .cmd1 = 0x8a, + .dbg_prefix = "orphan-ind" , + .pHandler = process_areq_orphan_ind + }, + { + .cmd0 = 0x42, + .cmd1 = 0x8b, + .dbg_prefix = "poll-cnf" , + .pHandler = process_areq_poll_cnf + }, + { + .cmd0 = 0x42, + .cmd1 = 0x8c, + .dbg_prefix = "scan-cnf" , + .pHandler = process_areq_scan_cnf + }, + { + .cmd0 = 0x42, + .cmd1 = 0x8d, + .dbg_prefix = "status-ind" , + .pHandler = process_areq_comm_status_ind + }, + { + .cmd0 = 0x42, + .cmd1 = 0x8e, + .dbg_prefix = "start-cnf" , + .pHandler = process_areq_start_cnf + }, + /* 0x8f - not used */ + { + .cmd0 = 0x42, + .cmd1 = 0x90, + .dbg_prefix = "purge-cnf" , + .pHandler = process_areq_purge_cnf + }, + { + .cmd0 = 0x42, + .cmd1 = 0x91, + .dbg_prefix = "poll-ind" , + .pHandler = process_areq_poll_ind + }, + { + .cmd0 = 0x42, + .cmd1 = 0x92, + .dbg_prefix = "ws-async-cnf" , + .pHandler = process_areq_ws_async_cnf + }, + { + .cmd0 = 0x42, + .cmd1 = 0x93, + .dbg_prefix = "ws-async-ind" , + .pHandler = process_areq_ws_async_ind + }, + /* terminate */ + { .pHandler = NULL } + }; + + if(pApiMac_callbacks == NULL) + { + MT_MSG_log(LOG_ERROR, pMsg, "no-callbacks\n"); + return; + } + + p = lut; + + while(p->pHandler) + { + if((p->cmd0 == pMsg->cmd0) && (p->cmd1 == pMsg->cmd1)) + { + break; + } + p++; + } + if(p->pHandler) + { + pMsg->pLogPrefix = p->dbg_prefix; + LOG_printf(LOG_DBG_MT_MSG_traffic, + "%s: rx: %s\n", + pMsg->pSrcIface->dbg_name, + pMsg->pLogPrefix); + MT_MSG_log(LOG_DBG_MT_MSG_areq, pMsg, "process-areq\n"); + (*(p->pHandler))(p, pMsg); + } + else + { + pMsg->pLogPrefix = "unknown-areq"; + if( (pMsg->cmd0 == 0x41) && (pMsg->cmd1 == 0x80) ) + { + /* Reset indication */ + pMsg->pLogPrefix = "reset-indication"; + int reason; + const char *r_str; + int transport; + int product; + int major; + int minor; + int maint; + + reason = MT_MSG_rdU8_DBG( pMsg, "reason" ); + switch( reason ){ + default: r_str = "unknown"; break; + case 0: r_str = "hardware"; break; + case 1: r_str = "host-req"; break; + case 2: r_str = "hal-assert"; break; + case 3: r_str = "mac-assert"; break; + case 4: r_str = "rtos-assert"; break; + } + transport = MT_MSG_rdU8_DBG( pMsg, "transport" ); + product = MT_MSG_rdU8_DBG( pMsg, "product" ); + major = MT_MSG_rdU8_DBG( pMsg, "major" ); + minor = MT_MSG_rdU8_DBG( pMsg, "minor" ); + maint = MT_MSG_rdU8_DBG( pMsg, "maint" ); + MT_MSG_log( LOG_ALWAYS, pMsg, + "Reset Indication: reason: %d (%s) version: %d/%d/%d/%d/%d\n", + reason, r_str, + transport, + product, + major, + minor, + maint ); + } else { + MT_MSG_log(LOG_DBG_MT_MSG_areq, pMsg, "***UNKNOWN AREQ***\n"); + LOG_hexdump(LOG_DBG_MT_MSG_areq, 0, pMsg->iobuf, pMsg->iobuf_nvalid); + } + /* an AREQ we do not know/understand. */ + if(pApiMac_callbacks) + { + if(pApiMac_callbacks->pUnprocessedCb) + { + pApiMac_callbacks->pUnprocessedCb(0, 0, (void *)(pMsg)); + } + } + } +} + +/*! + Process at most one incomming messages + Public function defined in api_mac.h +*/ +void ApiMac_processIncoming(void) +{ + struct mt_msg *pMsg; + + pMsg = MT_MSG_LIST_remove(API_MAC_msg_interface, + &(API_MAC_msg_interface->rx_list), + ApiMacLinux_areq_timeout_mSecs); + + if(pMsg == NULL) + { + LOG_printf(LOG_DBG_API_MAC_wait, "no-msg\n"); + return; + } + + /* process the message */ + if(pMsg->m_type == MT_MSG_TYPE_areq) + { + process_areq(pMsg); + } + else + { + /* embedded code passes: + src + 0 + pointer to message. + + We have no specific source, so we set src=0 + */ + MT_MSG_log(LOG_ERROR, pMsg, "unprocessed-msg\n"); + if(pApiMac_callbacks) + { + if(pApiMac_callbacks->pUnprocessedCb) + { + pApiMac_callbacks->pUnprocessedCb(0, 0, (void *)(pMsg)); + } + } + } + MT_MSG_free(pMsg); +} + +/*! + * @brief Convert API txOptions to bitmasked txOptions. + * + * @param txOptions - tx options structure + * @return bitmasked txoptions + */ +static uint16_t convertTxOptions(ApiMac_txOptions_t *txOptions) +{ + uint16_t retVal = 0; + + if(txOptions->ack == true) + { + retVal |= MAC_TXOPTION_ACK; + } + if(txOptions->indirect == true) + { + retVal |= MAC_TXOPTION_INDIRECT; + } + if(txOptions->pendingBit == true) + { + retVal |= MAC_TXOPTION_PEND_BIT; + } + if(txOptions->noRetransmits == true) + { + retVal |= MAC_TXOPTION_NO_RETRANS; + } + if(txOptions->noConfirm == true) + { + retVal |= MAC_TXOPTION_NO_CNF; + } + if(txOptions->useAltBE == true) + { + retVal |= MAC_TXOPTION_ALT_BE; + } + if(txOptions->usePowerAndChannel == true) + { + retVal |= MAC_TXOPTION_PWR_CHAN; + } + + return (retVal); +} + +/*! + * @brief Internal function to send a synchronous request expecting a status + * + * @param pMsg - the message to send. + * @return the status byte code returned from the remote end. + * + * Note: This routine also frees both messsages (tx and response) + */ +static int API_MAC_TxRx_Status(struct mt_msg *pMsg) +{ + int r; + + r = MT_MSG_txrx(pMsg); + + /* We should get 2 back. + 1 = we transmitted a message + 1 = we rx'ed a message + ===== + 1+1 = 2 = success + */ + if(r != 2) + { + /* Something is wrong... */ + r = ApiMac_status_badState; + goto fail; + } + + /* Got response */ + /* status is a single byte. */ + r = MT_MSG_rdU8_DBG(pMsg->pSrsp, "status"); + /* we should be done now */ + MT_MSG_parseComplete(pMsg->pSrsp); + + /* anything wrong? */ + if(pMsg->is_error || pMsg->pSrsp->is_error) + { + r = ApiMac_status_invalidParameter; + } + LOG_printf(LOG_DBG_MT_MSG_traffic, + "SREQ: (%s) SRSP: Result: %d (0x%02x)\n", + pMsg->pLogPrefix, r, r); +fail: + MT_MSG_free(pMsg); + return (r); +} + +/*! + * @brief Allocate a new message + * @param len - expected payload length, or -1 if unknown + * @param cmd0 - cmd0 value + * @param cmd1 - cmd1 value + * @return pointer to an allocated message, or NULL if no memory + */ +static struct mt_msg *api_new_msg(int len, int cmd0, + int cmd1, + const char *dbg_prefix) +{ + struct mt_msg *pMsg; + + pMsg = MT_MSG_alloc(len, cmd0, cmd1); + if(pMsg) + { + pMsg->pLogPrefix = dbg_prefix; + MT_MSG_setSrcIface(pMsg, NULL); + MT_MSG_setDestIface(pMsg, API_MAC_msg_interface); + } + return (pMsg); +} + +/*! + This function sends application data to the MAC for + transmission in a MAC data frame. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mcpsDataReq(ApiMac_mcpsDataReq_t *pData) +{ + struct mt_msg *pMsg; + int n; + n = 0x23; + n = n + pData->msdu.len; + n = n + pData->payloadIELen; + + pMsg = api_new_msg(n, 0x22, 0x05, "mcpsDataReq"); + if(!pMsg) + { + return (ApiMac_status_noResources); + } + encode_Addr(pMsg, &(pData->dstAddr)); + MT_MSG_wrU16_DBG(pMsg, pData->dstPanId, "dstPanId"); + MT_MSG_wrU8_DBG(pMsg, pData->srcAddrMode , "srcAddrMode"); + MT_MSG_wrU8_DBG(pMsg, pData->msduHandle, "msduHandle"); + MT_MSG_wrU8_DBG(pMsg, convertTxOptions(&(pData->txOptions)), "txOptions"); + MT_MSG_wrU8_DBG(pMsg, pData->channel, "channel"); + MT_MSG_wrU8_DBG(pMsg, pData->power, "power"); + encode_Sec(pMsg, &(pData->sec)); + MT_MSG_wrU32_DBG(pMsg, pData->includeFhIEs, "includeFhIEs"); + + MT_MSG_wrU16_DBG(pMsg, pData->msdu.len, "msdu.len"); + MT_MSG_wrU16_DBG(pMsg, pData->payloadIELen, "payloadIELen"); + + MT_MSG_wrBuf_DBG(pMsg, pData->msdu.p, pData->msdu.len, "msdu-data"); + MT_MSG_wrBuf_DBG(pMsg, pData->pIEList, pData->payloadIELen, "payload-IE"); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + This function purges and discards a data request from the MAC + data queue. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mcpsPurgeReq(uint8_t msduHandle) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(1, 0x22, 0x0e, "mcpsPurgeReq"); + if(!pMsg) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrU8_DBG(pMsg, msduHandle, "handle"); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + This function sends an associate request to a coordinator + device. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeAssociateReq(ApiMac_mlmeAssociateReq_t *pData) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0x1a, 0x22, 0x06, "mlmeAssociateReq"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrU8_DBG(pMsg, pData->logicalChannel, "logicalChannel"); + MT_MSG_wrU8_DBG(pMsg, pData->channelPage, "channelPage"); + MT_MSG_wrU8_DBG(pMsg, pData->phyID, "phyID"); + encode_Addr(pMsg, &(pData->coordAddress)); + MT_MSG_wrU16_DBG(pMsg, pData->coordPanId, "coordPanId"); + MT_MSG_wrU8_DBG(pMsg, + ApiMac_convertCapabilityInfo( + &(pData->capabilityInformation)), + "capabilityInfo"); + encode_Sec(pMsg, &(pData->sec)); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + This function is used by an associated device to notify the + coordinator of its intent to leave the PAN. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeDisassociateReq(ApiMac_mlmeDisassociateReq_t *pData) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0x18, 0x22, 0x07, "mlmeDisassociateReq"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + + encode_Addr(pMsg, &(pData->deviceAddress)); + MT_MSG_wrU16_DBG(pMsg, pData->devicePanId, "panId"); + MT_MSG_wrU8_DBG(pMsg, pData->disassociateReason, "reason"); + MT_MSG_wrU8_DBG(pMsg, pData->txIndirect , "txIndirect"); + encode_Sec(pMsg, &(pData->sec)); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + * @brief Internal common routine to handle all PIB get requests. + * + * @param cmd0 - command 0 value to use + * @param cmd1 - command 1 value to use + * @param att_id - the attribute id + * @param wiresize - transmission size of the item + * @param datasize - variable size of the item + * @param pValue - pointer to the value + * + * + * If the wiresize & data size is positive + * The value is a numeric (byte swap applies) + * else + * (negative) the value is an array of bytes + * + * Also see: API_MAC_Set_Common() + */ +static int API_MAC_Get_Common(int cmd0, + int cmd1, + int att_id, + int wiresize, + int datasize, + void *pValue) +{ + int r; + uint64_t v; + struct mt_msg *pMsg; + struct mt_msg *pSrsp; + int l; + + v = 0; + + /* some attributes are 16bit numbers */ + if(att_id > 0x100) + { + l = 2; + } + else + { + l = 1; + } + pMsg = api_new_msg(l, cmd0, cmd1, "pib-get-common"); + if(!pMsg) + { + return (ApiMac_status_noResources); + } + + if(l == 1) + { + MT_MSG_wrU8_DBG(pMsg, att_id, "pib-id8"); + } + else + { + MT_MSG_wrU16_DBG(pMsg, att_id, "pib-id16"); + } + + // security requests require two index dummy bytes + switch (att_id) + { + /* NOTE: "security" structures are not handled in this function. */ + /* Hence they are not listed here */ + + /* security array of bytes */ + case ApiMac_securityAttribute_autoRequestKeySource: + case ApiMac_securityAttribute_defaultKeySource: + case ApiMac_securityAttribute_panCoordExtendedAddress: + /* uint8s */ + case ApiMac_securityAttribute_keyTableEntries: + case ApiMac_securityAttribute_deviceTableEntries: + case ApiMac_securityAttribute_securityLevelTableEntries: + case ApiMac_securityAttribute_autoRequestSecurityLevel: + case ApiMac_securityAttribute_autoRequestKeyIdMode: + case ApiMac_securityAttribute_autoRequestKeyIndex: + /* uint16s */ + case ApiMac_securityAttribute_panCoordShortAddress: + /* uint32s - there are none */ + /* uint64s - there are none */ + + MT_MSG_wrU8_DBG(pMsg, 0, "idx1-not-used"); + MT_MSG_wrU8_DBG(pMsg, 0, "idx2-not-used"); + break; + default: + // these do not apply. + break; + } + + /* do the transfer */ + r = MT_MSG_txrx(pMsg); + + if(r != 2) + { + r = ApiMac_status_badState; + goto fail; + } + + pSrsp = pMsg->pSrsp; + + /* read the status byte */ + r = MT_MSG_rdU8_DBG(pSrsp, "status"); + if(r != ApiMac_status_success) + { + goto fail; + } + + if(wiresize < 0) + { + /* Negative is an array of bytes */ + /* so negate the size and call rdBuf */ + MT_MSG_rdBuf_DBG(pSrsp, pValue, -wiresize, "data-bytes"); + } + else + { + switch(wiresize) + { + default: + BUG_HERE("invalid wiresize: %d\n", wiresize); + break; + case 1: + v = MT_MSG_rdU8_DBG(pSrsp, "pib-value8"); + break; + case 2: + v = MT_MSG_rdU16_DBG(pSrsp, "pib-value16"); + break; + case 4: + v = MT_MSG_rdU32_DBG(pSrsp, "pib-value32"); + break; + case 8: + v = MT_MSG_rdU64_DBG(pSrsp, "pib-value64"); + break; + } + } + MT_MSG_parseComplete(pSrsp); + + if(pSrsp->is_error) + { + /* something is wrong */ + r = ApiMac_status_unsupportedAttribute; + goto fail; + } + + if(datasize < 0) + { + /* negative case was handled above, both wire & data size + are either both positive, or both negative */ + } + else + { + switch(datasize) + { + default: + BUG_HERE("invalid data: %d\n", wiresize); + break; + case 1: + (*(uint8_t *)(pValue)) = (uint8_t)(v); + break; + case 2: + (*(uint16_t *)(pValue)) = (uint16_t)(v); + break; + case 4: + (*(uint32_t *)(pValue)) = (uint32_t)(v); + break; + case 8: + (*(uint64_t *)(pValue)) = (uint64_t)(v); + break; + } + } + r = ApiMac_status_success; +fail: + if(pMsg) + { + MT_MSG_free(pMsg); + } + if( r != ApiMac_status_success ) + { + LOG_printf(LOG_ERROR, "*** ERROR ** Set/Get operation failed with status code: 0x%02x\n", r); + } + return (r); +} + +/*! + * @brief Internal common routine to handle all PIB set requests. + * + * @param cmd0 - the command 0 value to use + * @param cmd1 - the command 1 value to use + * @param att_id - the attribute id + * @param wiresize - size of the value on the wire + * @param datasize - size of the value in memory + * @param pValue - pointer to the value + * + * Also see: API_MAC_Get_Common() + */ +static int API_MAC_Set_Common(int cmd0, + int cmd1, + int att_id, + int wiresize, + uint64_t v) +{ + struct mt_msg *pMsg; + ApiMac_status_t r; + int n_wrote; + int len; + + if(wiresize < 0) + { + BUG_HERE("wrong api use\n"); + } + /* +1 for the attribute number */ + /* +N for the wiressize */ + len = 1; + if( att_id < 0x0100 ) + { + /* non-frequency hopping gets filler bytes */ + len += 16; + } + else + { + /* frequency hopping *DOES*NOT* get filler bytes */ + len += 1; /* All FH attribute ids are 16bit not 8bit */ + len += wiresize; + } + pMsg = api_new_msg(len, cmd0, cmd1, "pib-set-common"); + + if(!pMsg) + { + return (ApiMac_status_noResources); + } + + n_wrote = 0; + if(att_id > 0x100) + { + MT_MSG_wrU16_DBG(pMsg, att_id, "pib-id16"); + n_wrote += 2; + } + else + { + MT_MSG_wrU8_DBG(pMsg, att_id, "pib-id8"); + n_wrote += 1; + } + + switch(wiresize) + { + default: + BUG_HERE("invalid wiresize: %d\n", wiresize); + break; + case 1: + MT_MSG_wrU8_DBG(pMsg , (uint8_t)(v), "pib-value8"); + n_wrote += 1; + break; + case 2: + MT_MSG_wrU16_DBG(pMsg , (uint16_t)(v), "pib-value16"); + n_wrote += 2; + break; + case 4: + MT_MSG_wrU32_DBG(pMsg , (uint32_t)(v), "pib-value32"); + n_wrote += 4; + break; + case 8: + MT_MSG_wrU64_DBG(pMsg , (uint64_t)(v), "pib-value64"); + n_wrote += 8; + break; + } + + // insert filler as required. + while( n_wrote < len ){ + MT_MSG_wrU8_DBG(pMsg, 0, "filler"); + n_wrote++; + } + + r = (API_MAC_TxRx_Status(pMsg)); + if( r != ApiMac_status_success ) + { + LOG_printf(LOG_ERROR, "**ERROR** Set/Operation failed with status code: 0x%02x\n", r); + } + return (r); +} + +/*! + * @brief Common code to handle a PIB item Get/Set array type. + * @param is_set - true if set operation + * @param cmd0 - the command value + * @param cmd1 - the command value + * @param pib_attribute - the attribute id. + * @param pValue - pointer to the data being transfered. + */ +static ApiMac_status_t API_MAC_SetGetArray_Common(bool is_set, + int cmd0, + int cmd1, + int pib_attribute, + uint8_t *pValue) +{ + int n; + struct mt_msg *pMsg; + int wiresize; + int datasize; + bool is_secure; + ApiMac_status_t r; + + wiresize = 0; + datasize = 0; + + /* Assume it is not a security releated request */ + is_secure = false; + switch( pib_attribute ) + { + case ApiMac_securityAttribute_autoRequestKeySource: + case ApiMac_securityAttribute_defaultKeySource: + case ApiMac_securityAttribute_panCoordExtendedAddress: + is_secure = true; + break; + default: + is_secure = false; + break; + } + + switch (pib_attribute) + { + default: + break; + case ApiMac_attribute_beaconPayload: + wiresize = 16; + datasize = 16; + break; + case ApiMac_securityAttribute_autoRequestKeySource: + case ApiMac_securityAttribute_defaultKeySource: + case ApiMac_securityAttribute_panCoordExtendedAddress: + case ApiMac_attribute_coordExtendedAddress: + case ApiMac_attribute_extendedAddress: + case ApiMac_FHAttribute_trackParentEUI: + wiresize = 8; + datasize = 8; + break; + case ApiMac_FHAttribute_gtk0Hash: + case ApiMac_FHAttribute_gtk1Hash: + case ApiMac_FHAttribute_gtk2Hash: + case ApiMac_FHAttribute_gtk3Hash: + wiresize = APIMAC_FH_GTK_HASH_SIZE; + datasize = APIMAC_FH_GTK_HASH_SIZE; + break; + + case ApiMac_FHAttribute_unicastExcludedChannels: + case ApiMac_FHAttribute_broadcastExcludedChannels: + wiresize = APIMAC_FH_MAX_BIT_MAP_SIZE; + break; + case ApiMac_FHAttribute_netName: + wiresize = APIMAC_FH_NET_NAME_SIZE_MAX; + break; + } + + if(wiresize == 0) + { + BUG_HERE("unknown attribute id: %d (0x%x)\n", pib_attribute, pib_attribute); + return (ApiMac_status_unsupportedAttribute); + } + + if(!is_set) + { + return (API_MAC_Get_Common(cmd0, + cmd1, + pib_attribute, + -wiresize, + -datasize, + pValue)); + } + /* sets are different */ + + /* determine msg length */ + n = 0; + if( pib_attribute < 0x100 ) + { + n += 1; + } + else + { + n += 2; + } + if( is_secure ) + { + n = n + 2; + } + n = n + wiresize; + + pMsg = api_new_msg(n, cmd0, cmd1, "pib-getset-array-common"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + if(pib_attribute < 0x100) + { + MT_MSG_wrU8_DBG(pMsg, pib_attribute, "pib-id8"); + } + else + { + MT_MSG_wrU16_DBG(pMsg, pib_attribute, "pib-id16"); + } + if(is_secure) + { + MT_MSG_wrU8_DBG(pMsg, 0, "idx1-not-used"); + MT_MSG_wrU8_DBG(pMsg, 0, "idx2-not-used"); + } + MT_MSG_wrBuf_DBG(pMsg, pValue, wiresize, "data-bytes"); + + r = (API_MAC_TxRx_Status(pMsg)); + if( r != ApiMac_status_success ) + { + LOG_printf(LOG_ERROR, "**ERROR** Set/Operation failed with status code: 0x%02x\n", r); + } + return (r); +} + +/*! + This function gets an attribute value + in the MAC PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeGetReqBool(ApiMac_attribute_bool_t pibAttribute, + bool *pValue) +{ + return (API_MAC_Get_Common(0x022, + 0x08, + pibAttribute, + 1, sizeof(bool), + (void *)(pValue))); +} + +/*! + This function gets an attribute value + in the MAC PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeGetReqUint8(ApiMac_attribute_uint8_t pibAttribute, + uint8_t *pValue) +{ + return (API_MAC_Get_Common(0x022, + 0x08, + pibAttribute, + 1, + sizeof(uint8_t), + (void *)(pValue))); +} + +/*! + This function gets an attribute value + in the MAC PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeGetReqUint16(ApiMac_attribute_uint16_t pibAttribute, + uint16_t *pValue) +{ + return (API_MAC_Get_Common(0x022, + 0x08, + pibAttribute, + 2, + sizeof(uint16_t), + (void *)(pValue))); +} + +/*! + This function gets an attribute value + in the MAC PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeGetReqUint32(ApiMac_attribute_uint32_t pibAttribute, + uint32_t *pValue) +{ + return (API_MAC_Get_Common(0x022, + 0x08, + pibAttribute, + 4, + sizeof(uint32_t), + (void *)(pValue))); +} + +/*! + This function gets an attribute value + in the MAC PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeGetReqArray(ApiMac_attribute_array_t pibAttribute, + uint8_t *pValue) +{ + + return (API_MAC_SetGetArray_Common(false, + 0x22, + 0x08, + pibAttribute, + (void *)(pValue))); +} + +/*! + This function sets an attribute value + in the MAC PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeSetReqArray(ApiMac_attribute_array_t pibAttribute, + uint8_t *pValue) +{ + + return (API_MAC_SetGetArray_Common(true, + 0x22, + 0x09, + pibAttribute, + (void *)(pValue))); +} + +/*! + This function gets an attribute value + in the MAC PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeGetFhReqUint16( + ApiMac_FHAttribute_uint16_t pibAttribute, + uint16_t *pValue) +{ + return (API_MAC_Get_Common(0x22, + 0x42, + pibAttribute, + 2, + sizeof(uint16_t), + pValue)); +} + +/*! + This function gets an attribute value + in the MAC PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeGetFhReqUint32( + ApiMac_FHAttribute_uint32_t pibAttribute, + uint32_t *pValue) +{ + return (API_MAC_Get_Common(0x22, + 0x42, + pibAttribute, + 2, + sizeof(uint32_t), + pValue)); +} + +ApiMac_status_t ApiMac_mlmeSetFhReqArray( + ApiMac_FHAttribute_array_t pibAttribute, uint8_t *pValue) +{ + return (API_MAC_SetGetArray_Common(true, 0x22, 0x43, pibAttribute, pValue)); +} + +/*! + This function gets an FH attribute value + in the MAC PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeGetFhReqArray( + ApiMac_FHAttribute_array_t pibAttribute, uint8_t *pValue) +{ + return (API_MAC_SetGetArray_Common(false, + 0x22, + 0x42, + pibAttribute, + pValue)); +} + +/*! + This function gets an attribute value + in the MAC Security PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeGetSecurityReqUint8( + ApiMac_securityAttribute_uint8_t pibAttribute, uint8_t *pValue) +{ + return (API_MAC_Get_Common(0x22, + 0x30, + pibAttribute, + 1, + 1, + (void *)(pValue))); +} + +/*! + This function gets an attribute value + in the MAC Security PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeGetSecurityReqUint16( + ApiMac_securityAttribute_uint16_t pibAttribute, uint16_t *pValue) +{ + return (API_MAC_Get_Common(0x22, + 0x30, + pibAttribute, + 2, + 2, + (void *)(pValue))); +} + +/*! + This function gets an attribute value + in the MAC Security PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeGetSecurityReqArray( + ApiMac_securityAttribute_array_t pibAttribute, uint8_t *pValue) +{ + return (API_MAC_SetGetArray_Common(false, + 0x22, + 0x30, + pibAttribute, + (void *)(pValue))); +} + +/*! + * @brief Handle a pib security attribute key table request + * @param p - security get/set operational details. + * See common_ApiMac_mlmeGetSetSecurityReqStruct() for details + */ +static void sec_pib_ApiMac_securityAttribute_keyTable(struct secPibStruct *p) +{ + if(!(p->is_set) || (p->pValue)) + { + /* Linux code only supports a NULL here */ + LOG_printf(LOG_ERROR, "%s: pib: %d SET and only NULL supported\n", + __FUNCTION__, p->attr); + p->is_error = true; + return; + } + MT_MSG_wrU8_DBG(p->pMsg, p->attr, "addr"); + MT_MSG_wrU8_DBG(p->pMsg, 0, "idx1"); /* index1 */ + MT_MSG_wrU8_DBG(p->pMsg, 0, "idx2"); /* index2 */ + + p->n_msgs = MT_MSG_txrx(p->pMsg); + if(p->n_msgs == 2) + { + p->result = MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "status"); + } +} + + +/*! + * @brief Handle a pib security attribute key id lookup entry request request + * @param p - security get/set operational details. + * See common_ApiMac_mlmeGetSetSecurityReqStruct() for details + */ +static void +sec_pib_ApiMac_securityAttribute_keyIdLookupEntry(struct secPibStruct *p) +{ + ApiMac_securityPibKeyIdLookupEntry_t *pSecPibKeyIdLookupEntry; + + pSecPibKeyIdLookupEntry = + (ApiMac_securityPibKeyIdLookupEntry_t *)(p->pValue); + + MT_MSG_wrU8_DBG(p->pMsg, + p->attr, "attr"); + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibKeyIdLookupEntry->keyIndex, "keyIndex"); /* index1 */ + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibKeyIdLookupEntry->keyIdLookupIndex, "lookupIndex"); + + if(p->is_set) + { + MT_MSG_wrBuf_DBG(p->pMsg, + pSecPibKeyIdLookupEntry->lookupEntry.lookupData, + sizeof(pSecPibKeyIdLookupEntry->lookupEntry.lookupData), + "lookupData"); + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibKeyIdLookupEntry->lookupEntry.lookupDataSize, + "lookupSize"); + } + + p->n_msgs = MT_MSG_txrx(p->pMsg); + if(p->n_msgs != 2) + { + return; + } + /* read status byte */ + p->result = MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "status"); + if(p->is_set) + { + return; + } + + pSecPibKeyIdLookupEntry->keyIndex = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "keyIndex"); + pSecPibKeyIdLookupEntry->keyIdLookupIndex = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "keyIdLookupIndex"); + + MT_MSG_rdBuf_DBG(p->pMsg->pSrsp, + pSecPibKeyIdLookupEntry->lookupEntry.lookupData, + sizeof(pSecPibKeyIdLookupEntry->lookupEntry.lookupData), + "lookupData"); + pSecPibKeyIdLookupEntry->lookupEntry.lookupDataSize = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "lookupDataSize"); +} + +/*! + * @brief Handle a pib security attribute key device entry request + * @param p - security get/set operational details. + * See common_ApiMac_mlmeGetSetSecurityReqStruct() for details + */ +static void +sec_pib_ApiMac_securityAttribute_keyDeviceEntry(struct secPibStruct *p) +{ + ApiMac_securityPibKeyDeviceEntry_t *pSecPibKeyDeviceEntry; + + pSecPibKeyDeviceEntry = (ApiMac_securityPibKeyDeviceEntry_t *)(p->pValue); + + MT_MSG_wrU8_DBG(p->pMsg, + p->attr, + "attr"); + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibKeyDeviceEntry->keyIndex, + "keyIndex"); /* index1 */ + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibKeyDeviceEntry->keyDeviceIndex, + "keyDeviceIndex"); /* index2 */ + + if(p->is_set) + { + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibKeyDeviceEntry->deviceEntry.deviceDescriptorHandle, + "descriptorHandle"); + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibKeyDeviceEntry->deviceEntry.uniqueDevice, + "uniqueDevice"); + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibKeyDeviceEntry->deviceEntry.blackListed, + "blackListed"); + } + p->n_msgs = MT_MSG_txrx(p->pMsg); + if(p->n_msgs != 2) + { + return; + } + + p->result = MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "status"); + if(p->is_set) + { + return; + } + + pSecPibKeyDeviceEntry->keyIndex = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "idx1"); /* index1 */ + pSecPibKeyDeviceEntry->keyDeviceIndex = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "idx2"); /* index2 */ + + pSecPibKeyDeviceEntry->deviceEntry.deviceDescriptorHandle = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "descriptorHandle"); + pSecPibKeyDeviceEntry->deviceEntry.uniqueDevice = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "uniqueDevice"); + pSecPibKeyDeviceEntry->deviceEntry.blackListed = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "blacklisted"); +} + +/*! + * @brief handle a pib security key usage entry + * @param p - security get/set operational details. + * See common_ApiMac_mlmeGetSetSecurityReqStruct() for details + */ +static void +sec_pib_ApiMac_securityAttribute_keyUsageEntry(struct secPibStruct *p) +{ + ApiMac_securityPibKeyUsageEntry_t *pSecPibKeyUsageEntry; + + pSecPibKeyUsageEntry = (ApiMac_securityPibKeyUsageEntry_t *)(p->pValue); + + MT_MSG_wrU8_DBG(p->pMsg, + p->attr, + "attr"); + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibKeyUsageEntry->keyIndex, + "keyIndex"); /* index1 */ + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibKeyUsageEntry->keyUsageIndex, + "keyUsageIndex"); /* index2 */ + + if(p->is_set) + { + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibKeyUsageEntry->usageEntry.frameType, + "frameType"); + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibKeyUsageEntry->usageEntry.cmdFrameId, + "cmdframeId"); + } + + p->n_msgs = MT_MSG_txrx(p->pMsg); + if(p->n_msgs != 2) + { + return; + } + + p->result = MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "status"); + if(p->is_set) + { + return; + } + + pSecPibKeyUsageEntry->keyIndex = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, + "keyIndex"); + pSecPibKeyUsageEntry->keyUsageIndex = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, + "keyUsageIndex"); + + pSecPibKeyUsageEntry->usageEntry.frameType = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, + "frameType"); + pSecPibKeyUsageEntry->usageEntry.cmdFrameId = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, + "cmdframeId"); +} + +/* + * @brief handle a pib key entry request. + * @param p - security get/set operational details. + * See common_ApiMac_mlmeGetSetSecurityReqStruct() for details + */ +static void sec_pib_ApiMac_securityAttribute_keyEntry(struct secPibStruct *p) +{ + ApiMac_securityPibKeyEntry_t *pSecPibKeyEntry; + + pSecPibKeyEntry = (ApiMac_securityPibKeyEntry_t *)(p->pValue); + + MT_MSG_wrU8_DBG(p->pMsg, p->attr, "attr"); + /* index1 */ + MT_MSG_wrU8_DBG(p->pMsg, pSecPibKeyEntry->keyIndex, "keyIndex"); + MT_MSG_wrU8_DBG(p->pMsg, 0, "notused"); /* not used */ + + if(p->is_set) + { + MT_MSG_wrBuf_DBG(p->pMsg, + pSecPibKeyEntry->keyEntry, + sizeof(pSecPibKeyEntry->keyEntry), + "keyEntry"); + MT_MSG_wrU32_DBG(p->pMsg, + pSecPibKeyEntry->frameCounter, + "frameCounter"); + } + + p->n_msgs = MT_MSG_txrx(p->pMsg); + if(p->n_msgs != 2) + { + return; + } + + p->result = MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "status"); + if(p->is_set) + { + return; + } + + pSecPibKeyEntry->keyIndex = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "keyIndex"); /* index1 */ + /* toss unused byte */ + (void)MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "unused"); + + MT_MSG_rdBuf_DBG(p->pMsg->pSrsp, + pSecPibKeyEntry->keyEntry, + sizeof(pSecPibKeyEntry->keyEntry), + "keyEntry"); + pSecPibKeyEntry->frameCounter = + MT_MSG_rdU32_DBG(p->pMsg->pSrsp, + "frameCounter"); +} + +/*! + * @brief handle a pib security key device entry + * @param p - security get/set operational details. + * See common_ApiMac_mlmeGetSetSecurityReqStruct() for details + */ +static void sec_pib_ApiMac_securityAttribute_deviceEntry(struct secPibStruct *p) +{ + int x; + ApiMac_securityPibDeviceEntry_t *pSecPibDeviceEntry; + + pSecPibDeviceEntry = (ApiMac_securityPibDeviceEntry_t *)(p->pValue); + + MT_MSG_wrU8_DBG(p->pMsg, + p->attr, + "attr"); + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibDeviceEntry->deviceIndex, + "deviceIndex"); /* index1 */ + MT_MSG_wrU8_DBG(p->pMsg, + 0, + "not-used"); /* not used */ + + if(p->is_set) + { + MT_MSG_wrU16_DBG(p->pMsg, + pSecPibDeviceEntry->deviceEntry.devInfo.panID, + "panID"); + MT_MSG_wrU16_DBG(p->pMsg, + pSecPibDeviceEntry->deviceEntry.devInfo.shortAddress, + "shortAddr"); + MT_MSG_wrBuf_DBG(p->pMsg, + pSecPibDeviceEntry->deviceEntry.devInfo.extAddress, + sizeof(pSecPibDeviceEntry->deviceEntry.devInfo.extAddress), + "extAddr"); + MT_MSG_wrU8_DBG(p->pMsg, + pSecPibDeviceEntry->deviceEntry.exempt, + "exempt"); + for(x = 0; x < APIMAC_MAX_KEY_TABLE_ENTRIES; x++) + { + MT_MSG_wrU32_DBG(p->pMsg, + pSecPibDeviceEntry->deviceEntry.frameCounter[x], + "framecounter"); + } + } + + p->n_msgs = MT_MSG_txrx(p->pMsg); + if(p->n_msgs != 2) + { + return; + } + + p->result = MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "status"); + if(p->is_set) + { + return; + } + + pSecPibDeviceEntry->deviceIndex = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "deviceIndex"); /* index1 */ + /* toss */ + (void)MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "notused"); /* not used */ + + pSecPibDeviceEntry->deviceEntry.devInfo.panID = + MT_MSG_rdU16_DBG(p->pMsg->pSrsp, "panID"); + pSecPibDeviceEntry->deviceEntry.devInfo.shortAddress = + MT_MSG_rdU16_DBG(p->pMsg->pSrsp, "shortAddr"); + MT_MSG_rdBuf_DBG(p->pMsg->pSrsp, + pSecPibDeviceEntry->deviceEntry.devInfo.extAddress, + sizeof(pSecPibDeviceEntry->deviceEntry.devInfo.extAddress), + "extAddr"); + + pSecPibDeviceEntry->deviceEntry.exempt = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "exempt"); + for(x = 0; x < APIMAC_MAX_KEY_TABLE_ENTRIES; x++) + { + pSecPibDeviceEntry->deviceEntry.frameCounter[x] = + MT_MSG_rdU32_DBG(p->pMsg->pSrsp, + "frameCounter"); + } +} + +/*! + * @brief handle a pib security level entry + * See common_ApiMac_mlmeGetSetSecurityReqStruct() for details + * @param p - security get/set structure with operational details. + */ +static void sec_pib_ApiMac_securityAttribute_securityLevelEntry( + struct secPibStruct *p) +{ + ApiMac_securityPibSecurityLevelEntry_t *pSecLevelEntry; + + pSecLevelEntry = (ApiMac_securityPibSecurityLevelEntry_t *)(p->pValue); + + MT_MSG_wrU8_DBG(p->pMsg, + p->attr, "attr"); + MT_MSG_wrU8_DBG(p->pMsg, + pSecLevelEntry->levelIndex, + "levelIndex"); + MT_MSG_wrU8_DBG(p->pMsg, + 0, + "notused"); + + if(p->is_set) + { + MT_MSG_wrU8_DBG(p->pMsg, + pSecLevelEntry->levelEntry.frameType, + "frameType"); + MT_MSG_wrU8_DBG(p->pMsg, + pSecLevelEntry->levelEntry.commandFrameIdentifier, + "frameIdentifier"); + MT_MSG_wrU8_DBG(p->pMsg, + pSecLevelEntry->levelEntry.securityMinimum, + "securityMinimum"); + MT_MSG_wrU8_DBG(p->pMsg, + pSecLevelEntry->levelEntry.securityOverrideSecurityMinimum, + "override-security"); + } + + p->n_msgs = MT_MSG_txrx(p->pMsg); + if(p->n_msgs != 2) + { + return; + } + + p->result = MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "status"); + + if(p->is_set) + { + return; + } + + pSecLevelEntry->levelIndex = MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "level-index"); + /* toss */ + (void)MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "ignore"); + + pSecLevelEntry->levelEntry.frameType = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "frameType"); + pSecLevelEntry->levelEntry.commandFrameIdentifier = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "frameIdentifier"); + pSecLevelEntry->levelEntry.securityMinimum = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "securityMinimum"); + pSecLevelEntry->levelEntry.securityOverrideSecurityMinimum = + MT_MSG_rdU8_DBG(p->pMsg->pSrsp, "override-security"); +} + +/*! + * @brief Common code to handle security pib get/set for structures. + * specific items are handled via the lookup table [above] + * @param is_set - true if set operation + * @param pibAttribute - the attribute id + * @param pValue - pointer to the value (to save or get) + * @returns status of the get/set request from the device. + */ +static ApiMac_status_t common_ApiMac_mlmeGetSetSecurityReqStruct( + int is_set, + ApiMac_securityAttribute_struct_t pibAttribute, void *pValue) +{ + int x; + struct secPibStruct pdata; + + /* dispatch table */ + static const struct secPibHandler sec_pib_handlers[] = + { + { .attr = ApiMac_securityAttribute_keyTable, + .handler = sec_pib_ApiMac_securityAttribute_keyTable + }, + { .attr = ApiMac_securityAttribute_keyIdLookupEntry, + .handler = sec_pib_ApiMac_securityAttribute_keyIdLookupEntry + }, + { .attr = ApiMac_securityAttribute_keyDeviceEntry, + .handler = sec_pib_ApiMac_securityAttribute_keyDeviceEntry + }, + { .attr = ApiMac_securityAttribute_keyUsageEntry, + .handler = sec_pib_ApiMac_securityAttribute_keyUsageEntry + }, + { .attr = ApiMac_securityAttribute_keyEntry, + .handler = sec_pib_ApiMac_securityAttribute_keyEntry + }, + { .attr = ApiMac_securityAttribute_deviceEntry, + .handler = sec_pib_ApiMac_securityAttribute_deviceEntry + }, + { .attr = ApiMac_securityAttribute_securityLevelEntry, + .handler = sec_pib_ApiMac_securityAttribute_securityLevelEntry + }, + + /* terminate */ + {.attr = 0,.handler = NULL } + }; + + memset((void *)(&pdata), 0, sizeof(pdata)); + pdata.attr = (int)(pibAttribute); + pdata.pValue = pValue; + pdata.is_set = is_set; + pdata.pMsg = api_new_msg(-1, + 0x22, + is_set ? 0x31 : 0x30, + "mlmeGetSetSecurityReqStruct"); + + if(pdata.pMsg == NULL) + { + pdata.result = ApiMac_status_noResources; + goto err; + } + + /* look up in the table. */ + for(x = 0; sec_pib_handlers[x].handler; x++) + { + if(pdata.attr == sec_pib_handlers[x].attr) + { + break; + } + } + + /* do we have a handler? */ + if(sec_pib_handlers[x].handler == NULL) + { + pdata.result = ApiMac_status_unsupportedAttribute; + BUG_HERE("unknown atribute: 0x%02x", pdata.attr); + goto err; + } + + /* Assume something is wrong.. */ + pdata.result = ApiMac_status_invalidParameter; + /* call the handler */ + (*(sec_pib_handlers[x].handler))(&pdata); + + /* in all get/set cases we should have had 2 transfers. */ + if(pdata.n_msgs != 2) + { + /* we had a transfer error */ + pdata.is_error = true; + pdata.result = ApiMac_status_badState; + goto err; + } + /* we should have parsed the entire srsp message */ + MT_MSG_parseComplete(pdata.pMsg->pSrsp); + + /* if we had a tx error or a rx or r-xparse error */ + /* we are done.. */ + if(pdata.pMsg->is_error || pdata.pMsg->pSrsp->is_error) + { + /* some message had an error */ + pdata.is_error = true; + pdata.result = ApiMac_status_badState; + } + +err: + if(pdata.pMsg) + { + MT_MSG_free(pdata.pMsg); + pdata.pMsg = NULL; + } + /* otherwise we return the status */ + if( pdata.result != ApiMac_status_success ) + { + LOG_printf(LOG_ERROR, "**ERROR** Set request failed code: 0x%02x\n", pdata.result); + } + return (pdata.result); +} + +/*! + This function gets an attribute value + in the MAC Security PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeGetSecurityReqStruct( + ApiMac_securityAttribute_struct_t pibAttribute, void *pValue) +{ + return (common_ApiMac_mlmeGetSetSecurityReqStruct(false, + pibAttribute, + pValue)); +} + +/*! + This function gets an attribute value + in the MAC PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeSetReqBool(ApiMac_attribute_bool_t pibAttribute, + bool value) +{ + return (API_MAC_Set_Common(0x22, 0x09, pibAttribute, 1, value)); +} + +/*! + This function gets an attribute value + in the MAC PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeSetReqUint8(ApiMac_attribute_uint8_t pibAttribute, + uint8_t value) +{ + return (API_MAC_Set_Common(0x22, 0x09, pibAttribute, 1, value)); +} + +/*! + This function gets an attribute value + in the MAC PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeSetReqUint16( + ApiMac_attribute_uint16_t pibAttribute, + uint16_t value) +{ + return (API_MAC_Set_Common(0x22, 0x09, pibAttribute, 2, value)); +} + +/*! + This function gets an attribute value + in the MAC PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeSetReqUint32( + ApiMac_attribute_uint32_t pibAttribute, + uint32_t value) +{ + return (API_MAC_Set_Common(0x22, 0x09, pibAttribute, 4, value)); +} + +static ApiMac_status_t API_MAC_SetSecurity_Common( int cmd0, + int cmd1, + int att_id, + int wiresize, + uint64_t value ) +{ + struct mt_msg *pMsg; + struct mt_msg *pSrsp; + int l; + int r; + + pMsg = api_new_msg(-1, cmd0, cmd1, "pib-getset-secure"); + if(!pMsg) + { + return (ApiMac_status_noResources); + } + + /* some attributes are 16bit numbers */ + if(att_id > 0x100) + { + l = 2; + } + else + { + l = 1; + } + + if(l == 1) + { + MT_MSG_wrU8_DBG(pMsg, att_id, "pib-id8"); + } + else + { + MT_MSG_wrU16_DBG(pMsg, att_id, "pib-id16"); + } + MT_MSG_wrU8_DBG(pMsg, 0, "idx1-not-used"); + MT_MSG_wrU8_DBG(pMsg, 0, "idx2-not-used"); + switch (wiresize) { + case 1: + MT_MSG_wrU8_DBG(pMsg, (uint8_t)value, "value8"); + break; + case 2: + MT_MSG_wrU16_DBG(pMsg, (uint16_t)value, "value16"); + break; + case 4: + MT_MSG_wrU32_DBG(pMsg, (uint32_t)value, "value32"); + break; + case 8: + MT_MSG_wrU64_DBG(pMsg, value, "value64"); + break; + } + /* do the transfer */ + r = MT_MSG_txrx(pMsg); + + /* Did we transfer 2 messages? */ + if(r != 2) + { + r = ApiMac_status_badState; + goto fail; + } + + pSrsp = pMsg->pSrsp; + + /* read the status byte */ + r = MT_MSG_rdU8_DBG(pSrsp, "status"); + MT_MSG_parseComplete(pSrsp); + if(pMsg->is_error || pSrsp->is_error) + { + r = ApiMac_status_badState; + } + else + { + r = ApiMac_status_success; + } +fail: + if(pMsg) + { + MT_MSG_free(pMsg); + } + if( r != ApiMac_status_success ) + { + LOG_printf(LOG_ERROR, "**ERROR** Set/Operation failed with status code: 0x%02x\n", r); + } + return (r); +} + +/*! + This function sets an attribute value + in the MAC Security PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeSetSecurityReqUint8( + ApiMac_securityAttribute_uint8_t pibAttribute, + uint8_t value) +{ + return (API_MAC_SetSecurity_Common(0x22, 0x31, pibAttribute, 1, value)); +} + +/*! + This function sets an attribute value + in the MAC Security PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeSetSecurityReqUint16( + ApiMac_securityAttribute_uint16_t pibAttribute, + uint16_t value) +{ + return (API_MAC_SetSecurity_Common(0x22, 0x31, pibAttribute, 2, value)); +} + + +/*! + This function sets an attribute value + in the MAC Security PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeSetSecurityReqArray( + ApiMac_securityAttribute_array_t pibAttribute, uint8_t *pValue) +{ + return (API_MAC_SetGetArray_Common(true, + 0x22, + 0x31, + pibAttribute, + (void *)(pValue))); +} + +/*! + This function sets an attribute value + in the MAC Security PIB. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeSetSecurityReqStruct( + ApiMac_securityAttribute_struct_t pibAttribute, void *pValue) +{ + return (common_ApiMac_mlmeGetSetSecurityReqStruct(true, + pibAttribute, + pValue)); +} + +/*! + @brief Sets a parameter in the FH PIB + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeSetFhReqUint8( + ApiMac_FHAttribute_uint8_t pibAttribute, uint8_t value) +{ + return (API_MAC_Set_Common(0x22, 0x43, pibAttribute, 1, value)); +} + +/*! + Sets a parameter in the FH PIB + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeGetFhReqUint8( + ApiMac_FHAttribute_uint8_t pibAttribute, uint8_t *pValue) +{ + return (API_MAC_Get_Common(0x22, + 0x42, + pibAttribute, + 1, + sizeof(uint8_t), + (void *)pValue)); +} + +/*! + Sets a parameter in the FH PIB + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeSetFhReqUint16( + ApiMac_FHAttribute_uint16_t pibAttribute, + uint16_t value) +{ + return (API_MAC_Set_Common(0x22, 0x43, pibAttribute, 2, value)); +} + +/*! + Sets a parameter in the FH PIB + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeSetFhReqUint32( + ApiMac_FHAttribute_uint32_t pibAttribute, + uint32_t value) +{ + return (API_MAC_Set_Common(0x22, 0x43, pibAttribute, 4, value)); +} + +/*! + This function is called in response to an orphan notification + from a peer device. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeOrphanRsp(ApiMac_mlmeOrphanRsp_t *pData) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0x16, 0x22, 0x51, "mlmeOrphanRsp"); + if(!pMsg) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrBuf_DBG(pMsg, + (void *)(&pData->orphanAddress[0]), + APIMAC_SADDR_EXT_LEN, "ext-addr"); + MT_MSG_wrU16_DBG(pMsg, pData->shortAddress, "shortAddr"); + MT_MSG_wrU8_DBG(pMsg, pData->associatedMember, "assocatedMember"); + encode_Sec(pMsg, &(pData->sec)); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + This function is used to request pending data from the coordinator. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmePollReq(ApiMac_mlmePollReq_t *pData) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0x16, 0x22, 0x0d, "mlmePollReq"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + encode_Addr(pMsg, &(pData->coordAddress)); + MT_MSG_wrU16_DBG(pMsg, pData->coordPanId, "panID"); + encode_Sec(pMsg, &(pData->sec)); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + This function must be called once at system startup before any other + function in the management API is called. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeResetReq(bool setDefaultPib) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0x01, 0x22, 0x01, "mlmeResetReq"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + MT_MSG_wrU8_DBG(pMsg, setDefaultPib, "resetParam"); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + This function initiates an energy detect, active, passive, or + orphan scan on one or more channels. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeScanReq(ApiMac_mlmeScanReq_t *pData) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(23+17, 0x22, 0x0c, "mlmeScanReq"); + if(!pMsg) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrU8_DBG(pMsg, pData->scanType , "scanType"); + MT_MSG_wrU8_DBG(pMsg, pData->scanDuration , "scanDuration"); + MT_MSG_wrU8_DBG(pMsg, pData->channelPage , "channelPage"); + MT_MSG_wrU8_DBG(pMsg, pData->phyID , "phyID"); + MT_MSG_wrU8_DBG(pMsg, pData->maxResults , "maxResults"); + MT_MSG_wrU8_DBG(pMsg, pData->permitJoining, "permitJoining"); + MT_MSG_wrU8_DBG(pMsg, pData->linkQuality , "linkQuality"); + MT_MSG_wrU8_DBG(pMsg, pData->percentFilter, "percentFilter"); + MT_MSG_wrU8_DBG(pMsg, pData->MPMScan , "MPMScan"); + MT_MSG_wrU8_DBG(pMsg, pData->MPMScanType , "MPMScantype"); + MT_MSG_wrU16_DBG(pMsg, pData->MPMScanDuration, "MPMScanDuration"); + encode_Sec(pMsg, &(pData->sec)); + + MT_MSG_wrBuf_DBG(pMsg, pData->scanChannels, sizeof(pData->scanChannels), "scanChannels"); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + This function is called by a coordinator or PAN coordinator + to start or reconfigure a network. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeStartReq(ApiMac_mlmeStartReq_t *pData) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0x2a + pData->mpmParams.numIEs, 0x22, 0x03, "mlmeStartReq"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrU32_DBG(pMsg, pData->startTime, "startTime"); + MT_MSG_wrU16_DBG(pMsg, pData->panId, "panId"); + MT_MSG_wrU8_DBG(pMsg, pData->logicalChannel, "logicalChannel"); + MT_MSG_wrU8_DBG(pMsg, pData->channelPage, "channelPage"); + MT_MSG_wrU8_DBG(pMsg, pData->phyID, "phyID"); + MT_MSG_wrU8_DBG(pMsg, pData->beaconOrder, "beaconOrder"); + MT_MSG_wrU8_DBG(pMsg, pData->superframeOrder, "superframeOrder"); + MT_MSG_wrU8_DBG(pMsg, pData->panCoordinator, "panCoordinator"); + MT_MSG_wrU8_DBG(pMsg, pData->batteryLifeExt, "batteryLifeExt"); + MT_MSG_wrU8_DBG(pMsg, pData->coordRealignment , "coordRealignment"); + encode_Sec(pMsg, &(pData->realignSec)); + encode_Sec(pMsg, &(pData->beaconSec)); + MT_MSG_wrU8_DBG(pMsg, pData->startFH, "startFH"); + MT_MSG_wrU8_DBG(pMsg, pData->mpmParams.eBeaconOrder, "eBeaconOrder"); + MT_MSG_wrU8_DBG(pMsg, pData->mpmParams.offsetTimeSlot, "offsetTimeSlot"); + MT_MSG_wrU16_DBG(pMsg, pData->mpmParams.NBPANEBeaconOrder, "NBPANEBeaconOrder"); + MT_MSG_wrU8_DBG(pMsg, pData->mpmParams.numIEs, "numIEs"); + MT_MSG_wrBuf_DBG(pMsg, pData->mpmParams.pIEIDs, pData->mpmParams.numIEs, "ieids"); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + This function requests the MAC to synchronize with the + coordinator by acquiring and optionally tracking its beacons. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeSyncReq(ApiMac_mlmeSyncReq_t *pData) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0x04, 0x22, 0x04, "mlmeSyncReq"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrU8_DBG(pMsg, pData->logicalChannel, "logicalChannel"); + MT_MSG_wrU8_DBG(pMsg, pData->channelPage, "channelPage"); + MT_MSG_wrU8_DBG(pMsg, pData->trackBeacon, "trackBeacon"); + MT_MSG_wrU8_DBG(pMsg, pData->phyID, "phyID"); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + This function returns a random byte from the (internal) random number + generator. + + Public function defined in api_mac.h +*/ +uint8_t ApiMac_randomByte(void) +{ + return (RAND_DATA_nextByte(&rand_data_source)); +} + +/*! + Update Device Table entry and PIB with new Pan Id. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_updatePanId(uint16_t panId) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0x02, 0x22, 0x32, "updatePanId"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrU16_DBG(pMsg, panId, "panID"); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + This functions handles the WiSUN async request. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeWSAsyncReq(ApiMac_mlmeWSAsyncReq_t* pData) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(13+17, 0x22, 0x44, "mlmeWSAsyncReq"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrU8_DBG(pMsg, pData->operation, "operation" ); + MT_MSG_wrU8_DBG(pMsg, pData->frameType, "frame-type"); + encode_Sec(pMsg, &(pData->sec)); + MT_MSG_wrBuf_DBG(pMsg, + (void *)(&(pData->channels[0])), + APIMAC_154G_CHANNEL_BITMAP_SIZ, "chnl-bitmap"); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + This function starts frequency hopping. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_startFH(void) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0, 0x22, 0x41, "startFH"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + * @brief Common function to parse the payload information element. + * + * @param pPayload - pointer to the buffer with the payload IEs. + * @param payloadLen - length of the buffer with the payload IEs. + * @param pList - pointer to point of place to allocated the link list. + * @param group - true to check for termination IE. + * + * @return ApiMac_status_t + */ +static ApiMac_status_t parsePayloadIEs(uint8_t *pContent, uint16_t contentLen, + ApiMac_payloadIeRec_t **pList, + bool group) +{ + ApiMac_payloadIeRec_t* pIe = (ApiMac_payloadIeRec_t*) NULL; + ApiMac_payloadIeRec_t* pTempIe; + uint16_t lenContent = 0; + ApiMac_status_t status = ApiMac_status_success; + + if((pContent == NULL) || (contentLen == 0)) + { + return (ApiMac_status_noData); + } + + /* Initialize the list pointer */ + *pList = (ApiMac_payloadIeRec_t*) NULL; + + while(lenContent < contentLen) + { + uint16_t hdr; + bool typeLong; + uint8_t ieId; + + hdr = MAKE_UINT16(pContent[0], pContent[1]); + pContent += PAYLOAD_IE_HEADER_LEN; /* Move past the header */ + + typeLong = GET_SUBIE_TYPE(hdr); + if(typeLong) + { + ieId = GET_SUBIE_ID_LONG(hdr); + } + else + { + ieId = GET_SUBIE_ID_SHORT(hdr); + } + + if(group) + { + if(!typeLong) + { + /* Only long IE types when parsing Group IEs */ + status = ApiMac_status_unsupported; + break; + } + + if(ApiMac_payloadIEGroup_term == ieId) + { + /* Termination IE found */ + break; + } + } + + pTempIe = (ApiMac_payloadIeRec_t *)malloc( + sizeof(ApiMac_payloadIeRec_t)); + + if(pTempIe) + { + memset(pTempIe, 0, sizeof(ApiMac_payloadIeRec_t)); + + /* If nothing in the list, add the node first otherwise + add it to the end of the list */ + if(*pList == NULL) + { + *pList = pTempIe; + } + else + { + /* pIe should point to the previous node, + since it was allocated in the previous iteration */ + pIe->pNext = pTempIe; + } + + pIe = pTempIe; + pTempIe = NULL; + + /* Fill in the IE information */ + pIe->item.ieTypeLong = typeLong; + pIe->item.ieId = ieId; + + if(pIe->item.ieTypeLong) + { + pIe->item.ieContentLen = GET_SUBIE_LEN_LONG(hdr); + } + else + { + pIe->item.ieContentLen = GET_SUBIE_LEN_SHORT(hdr); + } + pIe->item.pIEContent = pContent; + + /* Update length and pointer */ + lenContent += PAYLOAD_IE_HEADER_LEN + pIe->item.ieContentLen; + pContent += pIe->item.ieContentLen; + } + else + { + status = ApiMac_status_noResources; + break; + } + } + + if((status != ApiMac_status_success) && (NULL != *pList)) + { + /* not successful in parsing all header ie's, free the linked list */ + pIe = *pList; + while(NULL != pIe) + { + pTempIe = pIe->pNext; + api_mac_freeMem((void *)pIe); + pIe = pTempIe; + } + *pList = NULL; + } + + return (status); +} + +/*! + Parses the payload information elements. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_parsePayloadGroupIEs( + uint8_t *pPayload, uint16_t payloadLen, + ApiMac_payloadIeRec_t **pList) +{ + return (parsePayloadIEs(pPayload, payloadLen, pList, true)); +} + +/*! + Parses the payload Sub Information Elements. + + Public function defined in api_mac.h +*/ +extern ApiMac_status_t ApiMac_parsePayloadSubIEs( + uint8_t *pContent, + uint16_t contentLen, + ApiMac_payloadIeRec_t **pList) +{ + return (parsePayloadIEs(pContent, contentLen, pList, false)); +} + +/*! + Free memory allocated by ApiMac. + + Public function defined in api_mac.h +*/ +void ApiMac_freeIEList(ApiMac_payloadIeRec_t *pList) +{ + /* Loop through the list */ + while(pList) + { + ApiMac_payloadIeRec_t *pTmp = pList; + + /* Move to the next item in the list */ + pList = pTmp->pNext; + + /* free the current item */ + api_mac_freeMem((void *)pTmp); + } +} + +/*! + Enables the Frequency hopping operation. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_enableFH(void) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0, 0x22, 0x40, "enableFH"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + Sends the association response to the device + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_mlmeAssociateRsp(ApiMac_mlmeAssociateRsp_t *pData) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0x16, 0x22, 0x50, "mlmeAssociateRsp"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrBuf_DBG(pMsg, &(pData->deviceAddress[0]), + APIMAC_SADDR_EXT_LEN, + "deviceAddr"); + MT_MSG_wrU16_DBG(pMsg, + pData->assocShortAddress, + "shortAddr"); + MT_MSG_wrU8_DBG(pMsg, + pData->status, + "status"); + + encode_Sec(pMsg, &(pData->sec)); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + Convert ApiMac_capabilityInfo_t data type to uint8_t capInfo + + Public function defined in api_mac.h +*/ +uint8_t ApiMac_convertCapabilityInfo(ApiMac_capabilityInfo_t *pMsgcapInfo) +{ + uint8_t capInfo = 0; + + if(pMsgcapInfo->panCoord) + { + capInfo |= CAPABLE_PAN_COORD; + } + + if(pMsgcapInfo->ffd) + { + capInfo |= CAPABLE_FFD; + } + + if(pMsgcapInfo->mainsPower) + { + capInfo |= CAPABLE_MAINS_POWER; + } + + if(pMsgcapInfo->rxOnWhenIdle) + { + capInfo |= CAPABLE_RX_ON_IDLE; + } + + if(pMsgcapInfo->security) + { + capInfo |= CAPABLE_SECURITY; + } + + if(pMsgcapInfo->allocAddr) + { + capInfo |= CAPABLE_ALLOC_ADDR; + } + + return (capInfo); +} + +/*! + Convert from bitmask byte to API MAC capInfo + + Public function defined in api_mac.h +*/ +void ApiMac_buildMsgCapInfo(uint8_t cInfo, ApiMac_capabilityInfo_t *pPBcapInfo) +{ + if(cInfo & CAPABLE_PAN_COORD) + { + pPBcapInfo->panCoord = 1; + } + + if(cInfo & CAPABLE_FFD) + { + pPBcapInfo->ffd = 1; + } + + if(cInfo & CAPABLE_MAINS_POWER) + { + pPBcapInfo->mainsPower = 1; + } + + if(cInfo & CAPABLE_RX_ON_IDLE) + { + pPBcapInfo->rxOnWhenIdle = 1; + } + + if(cInfo & CAPABLE_SECURITY) + { + pPBcapInfo->security = 1; + } + + if(cInfo & CAPABLE_ALLOC_ADDR) + { + pPBcapInfo->allocAddr = 1; + } +} + +/*! + Adds a new MAC device table entry. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_secAddDevice(ApiMac_secAddDevice_t *pAddDev) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0x1d, 0x22, 0x33, "secAddDevice"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrU16_DBG(pMsg, + pAddDev->panID , + "panId"); + MT_MSG_wrU16_DBG(pMsg, + pAddDev->shortAddr , + "shortAddr"); + MT_MSG_wrBuf_DBG(pMsg, + pAddDev->extAddr, APIMAC_SADDR_EXT_LEN, + "extAddr"); + MT_MSG_wrU32_DBG(pMsg, + pAddDev->frameCounter, + "frameCounter"); + MT_MSG_wrU8_DBG(pMsg, + pAddDev->exempt, + "exempt"); + MT_MSG_wrU8_DBG(pMsg, + pAddDev->uniqueDevice, + "uniqueDevice"); + MT_MSG_wrU8_DBG(pMsg, + pAddDev->duplicateDevFlag, + "duplicateDevFlag"); + MT_MSG_wrU8_DBG(pMsg, + pAddDev->keyIdLookupDataSize, + "lookupSize"); + MT_MSG_wrBuf_DBG(pMsg, + pAddDev->keyIdLookupData, APIMAC_MAX_KEY_LOOKUP_LEN, + "lookupData"); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + Removes MAC device table entries. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_secDeleteDevice(ApiMac_sAddrExt_t *pExtAddr) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0x08, 0x22, 0x34, "secDeleteDevice"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrBuf_DBG(pMsg, pExtAddr, APIMAC_SADDR_EXT_LEN, "extAddr"); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + Removes the key at the specified key Index and removes all MAC device table + enteries associated with this key. + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_secDeleteKeyAndAssocDevices(uint8_t keyIndex) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0x01, 0x022, 0x36, "secDeleteKeyAndAssocDevices"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrU8_DBG(pMsg, keyIndex, "keyIndex"); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + Removes all MAC device table entries + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_secDeleteAllDevices(void) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0, 0x22, 0x35, "secDeleteAllDevices"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + + return (API_MAC_TxRx_Status(pMsg)); +} + +/*! + Reads the frame counter value associated with a MAC security key indexed + by the designated key identifier and the default key source + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_secGetDefaultSourceKey(uint8_t keyId, + uint32_t *pFrameCounter) +{ + struct mt_msg *pMsg; + int r; + + pMsg = api_new_msg(1, 0x22, 0x37, "secGetDefaultSourceKey"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrU8_DBG(pMsg, keyId, "key-id"); + + r = MT_MSG_txrx(pMsg); + if(r != 2) + { + r = ApiMac_status_badState; + goto fail; + } + /* read the response */ + r = MT_MSG_rdU8_DBG(pMsg->pSrsp, "response"); + *pFrameCounter = MT_MSG_rdU32_DBG(pMsg->pSrsp, "framecounter"); + MT_MSG_parseComplete(pMsg->pSrsp); + if(pMsg->is_error || pMsg->pSrsp->is_error) + { + r = ApiMac_status_invalidParameter; + } +fail: + MT_MSG_free(pMsg); + return (r); +} + +/*! + Adds the MAC security key, adds the associated lookup list for the key, + initializes the frame counter to the value provided + + Public function defined in api_mac.h +*/ +ApiMac_status_t ApiMac_secAddKeyInitFrameCounter( + ApiMac_secAddKeyInitFrameCounter_t *pInfo) +{ + struct mt_msg *pMsg; + + pMsg = api_new_msg(0x20, 0x22, 0x38, "secAddKeyInitFrameCounter"); + if(pMsg == NULL) + { + return (ApiMac_status_noResources); + } + + MT_MSG_wrU8_DBG(pMsg, + pInfo->newKeyFlag , + "newKeyFlag"); + MT_MSG_wrU8_DBG(pMsg, + pInfo->replaceKeyIndex, + "replaceKeyIndex"); + MT_MSG_wrBuf_DBG(pMsg, + pInfo->key, + sizeof(pInfo->key), + "key"); + MT_MSG_wrU32_DBG(pMsg, + pInfo->frameCounter, + "frameCounter"); + MT_MSG_wrU8_DBG(pMsg, + pInfo->lookupDataSize, + "lookupSize"); + MT_MSG_wrBuf_DBG(pMsg, + pInfo->lookupData, + sizeof(pInfo->lookupData) , + "lookupData"); + + return (API_MAC_TxRx_Status(pMsg)); +} + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ diff --git a/components/api/src/mt_msg.c b/components/api/src/mt_msg.c new file mode 100644 index 0000000..f9ece6f --- /dev/null +++ b/components/api/src/mt_msg.c @@ -0,0 +1,2978 @@ +/****************************************************************************** + @file mt_msg.c + + @brief TIMAC 2.0 API mt layer implimentation. + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +/****************************************************************************** + Includes + *****************************************************************************/ + +#include "compiler.h" +#include "mt_msg.h" +#include "mt_msg_dbg.h" +#include "log.h" +#include "mutex.h" +#include "threads.h" +#include "stream.h" +#include "stream_socket.h" +#include "stream_uart.h" +#include "timer.h" +#include "ti_semaphore.h" +#include "fatal.h" + +#include +#include +#include + +/****************************************************************************** + Variables, globals & locals + *****************************************************************************/ + +/* These are INI file log flag names, this array is used by "app_main" + for the specific application (ie: npi_server, or appsrv/gateway) + See the LOG.H file for details about log flags. +*/ +const struct ini_flag_name mt_msg_log_flags[] = { + { .name = "mt-msg-traffic" , .value = LOG_DBG_MT_MSG_traffic }, + { .name = "mt-msg-raw" , .value = LOG_DBG_MT_MSG_raw }, + { .name = "mt-msg-areq" , .value = LOG_DBG_MT_MSG_areq }, + { .name = "mt-msg-fields" , .value = LOG_DBG_MT_MSG_fields }, + { .name = "mt-msg-decode" , .value = LOG_DBG_MT_MSG_decode }, + /* terminate */ + { .name = NULL } +}; + +/*! used to track the order of messages. */ +static unsigned msg_sequence_counter; + +/* Used to verify a msg pointer is a message pointer. */ +static const int msg_check_value = 'm'; + +/* Used to identify an incomming msg */ +static const char _incomming_msg[] = "incomming-msg"; + +struct mt_version_info MT_DEVICE_version_info; + +/****************************************************************************** + Functions + *****************************************************************************/ + +/* + Public funnction in mt_msg.h - see mt_msg.h + */ +void MT_MSG_init(void) +{ + /* nothing todo, everything is done inside the */ + /* MT_MSG_IFaceInit() call */ +} + +/*! + * @brief calculate the checksum of the message + * @param tf, ascii f specifies src interface + * @param len - how long is the data payload + * @returns xor checksum. + */ +static int MT_MSG_calc_chksum(struct mt_msg *pMsg, int tf, int len) +{ + bool b; + int x; + int chksum; + + /* start at 1, just past the frame sync byte. */ + chksum = 0; + /* ASSUME: there is no frame sync byte */ + x = 0; + + if(tf == 'f') /* which interface do we use? */ + { + b = pMsg->pSrcIface->frame_sync; + } + else + { + b = pMsg->pDestIface->frame_sync; + } + if(b) + { + /* start after the frame sync byte */ + x++; + } + for(/* above */ ; x < len ; x++) + { + chksum ^= ((int)pMsg->iobuf[x]); + } + return (chksum & 0x0ff); +} + +/* + Sets the message type in mt_msg::m_type + see mt_msg.h +*/ +void MT_MSG_set_type(struct mt_msg *pMsg, struct mt_msg_interface *pMI) +{ + int major; + int minor; + const int *iPtr; + int x; + + static const int lut_major[] = { + MT_MSG_TYPE_poll, + MT_MSG_TYPE_sreq, + MT_MSG_TYPE_areq, + MT_MSG_TYPE_srsp + }; + + /* assume... */ + pMsg->m_type = MT_MSG_TYPE_unknown; + + if((pMsg->cmd0 < 0) || (pMsg->cmd0 > 255)) + { + return; + } + major = _bitsXYof(pMsg->cmd0, 7, 5); + if((major >= 0) && (major <= 3)) + { + pMsg->m_type = lut_major[major]; + return; + } + + /* to continue, we need the extended byte... */ + + /* need to know the associated interface */ + if(pMI == NULL) + { + return; + } + + /* Where does the payload start in the message? */ + x = (pMI->frame_sync ? 1 : 0) + + (pMI->len_2bytes ? 2 : 1) + + 1 + + 1; + + /* do we have the extension byte yet? */ + if(pMsg->iobuf_nvalid < x) + { + return; /* no */ + } + + /* fetch the extension byte */ + minor = pMsg->iobuf[x]; + + /* extract the "minor" type */ + minor = _bitsXYof(minor, 7, 3); + + /* assume it is not found */ + iPtr = NULL; + switch (minor) + { + default: + /* unknown */ + break; + case 0: /* not used */ + break; + case 1: + /* stack specific */ + { + static const int stack_lut[] = { + MT_MSG_TYPE_unknown, + MT_MSG_TYPE_sreq_stack, + MT_MSG_TYPE_areq_stack, + MT_MSG_TYPE_srsp_stack + }; + iPtr = stack_lut; + } + break; + case 2: + { + /* fragmentation data */ + static const int frag_data_lut[] = { + MT_MSG_TYPE_unknown, + MT_MSG_TYPE_sreq_frag_data, + MT_MSG_TYPE_areq_frag_data, + MT_MSG_TYPE_srsp_frag_data + }; + iPtr = frag_data_lut; + break; + } + case 3: + { + /* Fragmentation ACK */ + static const int frag_ack_lut[] = { + MT_MSG_TYPE_unknown, + MT_MSG_TYPE_sreq_frag_ack, + MT_MSG_TYPE_areq_frag_ack, + MT_MSG_TYPE_srsp_frag_ack + }; + iPtr = frag_ack_lut; + break; + } + case 4: + { + /* Extended status */ + static const int ext_status_lut[] = { + MT_MSG_TYPE_unknown, + MT_MSG_TYPE_sreq_ext_status, + MT_MSG_TYPE_areq_ext_status, + MT_MSG_TYPE_srsp_ext_status + }; + iPtr = ext_status_lut; + break; + } + } + + if(iPtr) + { + /* clear the extension bit */ + /* and get the major type.. */ + major = major & 0x03; + if(iPtr[major] >= 0) + { + pMsg->m_type = iPtr[major]; + } + } +} + +/*! + * @brief Format a message for transmission. + * @param pMsg + * + * This inserts the correct byte sequence into + * the mt_msg::io_buf, including any frame sync + * and/or any checksums. + */ +static void MT_MSG_format_msg(struct mt_msg *pMsg) +{ + int n; + + /* where does the payload start? */ + n = ((pMsg->pDestIface->frame_sync ? 1 : 0) + + (pMsg->pDestIface->len_2bytes ? 2 : 1) + + 1 + /* cmd0 */ + 1); /* cmd1 */ + + if(pMsg->iobuf_idx < 0) + { + /* no payload was ever written */ + pMsg->iobuf_idx = n; + } + + /* update the length if needed */ + if(pMsg->expected_len < 0) + { + pMsg->expected_len = pMsg->iobuf_idx - n; + } + + if( (pMsg->expected_len + n) != pMsg->iobuf_idx ) + { + BUG_HERE("Expected len: %d, actual len: %d\n", + (pMsg->expected_len + n), pMsg->iobuf_idx); + } + + /* reset io buffer so we can insert header */ + pMsg->iobuf_idx = 0; + + /* frame sync */ + if(pMsg->pDestIface->frame_sync) + { + MT_MSG_wrU8(pMsg, 0xfe); + } + + /* Length */ + if(pMsg->pDestIface->len_2bytes) + { + MT_MSG_wrU16(pMsg, pMsg->expected_len); + } + else + { + MT_MSG_wrU8(pMsg, pMsg->expected_len); + } + + /* cmd0/cmd1 */ + MT_MSG_wrU8(pMsg, pMsg->cmd0); + MT_MSG_wrU8(pMsg, pMsg->cmd1); + + /* skip over the data/payload */ + MT_MSG_wrBuf(pMsg, NULL, pMsg->expected_len); + + /* and capture the number of valid bytes */ + pMsg->iobuf_nvalid = pMsg->iobuf_idx; + + /* if needed, the checksum */ + if(pMsg->pDestIface->include_chksum) + { + /* calculate the checksum */ + pMsg->chksum = MT_MSG_calc_chksum(pMsg, 't', pMsg->iobuf_nvalid); + /* go back to the checksum location and write it */ + MT_MSG_wrU8(pMsg, pMsg->chksum); + } +} + +/* + Log a message + see mt_msg.h +*/ +void MT_MSG_log(int64_t why, struct mt_msg *pMsg, const char *fmt, ...) +{ + va_list ap; + int x; + + /* auto flag errors */ + if(why == LOG_ERROR) + { + pMsg->is_error = true; + } + + /* if we do not log ... leave */ + if(!LOG_test(why)) + { + return; + } + + /* we do multiple things here so we lock/unlock */ + LOG_lock(); + + /* print the message */ + va_start(ap, fmt); + LOG_vprintf(why, fmt, ap); + va_end(ap); + + /* if we have an error make this clear! */ + if(pMsg->is_error) + { + LOG_printf(why, "ERROR: "); + } + + /* do we have a prefix for this message? */ + if(pMsg->pLogPrefix) + { + LOG_printf(why, "%s ", pMsg->pLogPrefix); + } + + LOG_printf(why, "msg(%04x) nbytes=%d len=%d [", + (unsigned)(pMsg->sequence_id), + pMsg->iobuf_nvalid, + pMsg->expected_len); + /* we print some bytes not all of the bytes */ + for(x = 0 ; (x < pMsg->iobuf_nvalid) && (x < 8) ; x++) + { + LOG_printf(why, " 0x%02x", pMsg->iobuf[x]); + } + LOG_printf(why, "]\n"); + + LOG_unLock(); +} + +/* + This function reformats a message (the payload) within a message + it us used when forwarding a message from one interface to another + + See mt_msg.h for more discussion. +*/ +void MT_MSG_reformat(struct mt_msg *pMsg) +{ + int F_start; + int T_start; + + /* on the from side ... where does our payload begin? */ + F_start = ( + (pMsg->pSrcIface->frame_sync ? 1 : 0) + + (pMsg->pSrcIface->len_2bytes ? 2 : 1) + + 1 + /* cmd0 */ + 1); /* cmd1 */ + + /* on the to side ... where does our payload begin? */ + T_start = ( + (pMsg->pDestIface->frame_sync ? 1 : 0) + + (pMsg->pDestIface->len_2bytes ? 2 : 1) + + 1 + /* cmd0 */ + 1); /* cmd1 */ + + /* If we have payload... */ + if(pMsg->expected_len) + { + /* And it needs to move/shift */ + if(F_start != T_start) + { + /* then shift it */ + memmove( + (void *)(&(pMsg->iobuf[T_start])), + (void *)(&(pMsg->iobuf[F_start])), + pMsg->expected_len); + } + } + pMsg->iobuf_nvalid = T_start + pMsg->expected_len; + + /* adjust the write pointer */ + pMsg->iobuf_idx = T_start + pMsg->expected_len; + + MT_MSG_log(LOG_DBG_MT_MSG_traffic, pMsg, + "Reformatted msg from: %s to %s (fstart=%d, tstart=%d, len=%d)\n", + pMsg->pSrcIface->dbg_name, pMsg->pDestIface->dbg_name, + F_start, T_start, pMsg->iobuf_idx); +} + +/*! + * @brief If the write index was not set, do that now. + * @param pMsg - the message + */ +static void init_wr_idx(struct mt_msg *pMsg) +{ + /* if not set yet */ + if(pMsg->iobuf_idx >= 0) + { + return; + } + + /* set to payload */ + /* BECAUSE - we write payloads */ + pMsg->iobuf_idx = ( + (pMsg->pDestIface->frame_sync ? 1 : 0) + /* frame sync */ + /* if needed, 2nd len byte */ + (pMsg->pDestIface->len_2bytes ? 2 : 1) + + 1 + /* cmd 0 */ + 1); /* cmd 1 */ +} + +/*! + Write an N-BIT value to the io stream + see mt_msg.h +*/ +void MT_MSG_wrUX_DBG(struct mt_msg *pMsg, uint64_t value, + int nbits, const char *name) +{ + int x; + + if(pMsg->is_error) + { + return; + } + if(name) + { + LOG_printf(LOG_DBG_MT_MSG_fields, "%s: wr_u%d: %*s: %lld, 0x%llx\n", + pMsg->pLogPrefix, + nbits, + 20, + name, + (long long)value, + (unsigned long long)value); + } + + /* set the write index */ + init_wr_idx(pMsg); + + /* write data in little endian form */ + while(nbits) + { + x = pMsg->iobuf_idx; + if(!_inrange(x, 0, pMsg->iobuf_idx_max)) + { + pMsg->is_error = true; + BUG_HERE("wr buf overflow\n"); + return; + } + + pMsg->iobuf[x] = (uint8_t)(value); + x++; + value = value >> 8; + pMsg->iobuf_idx = x; + pMsg->iobuf_nvalid = x; + nbits -= 8; + + } +} + +/* + Write a U8 value to the mt_msg::io_buf + see mt_msg.h +*/ +void MT_MSG_wrU8_DBG(struct mt_msg *pMsg, uint32_t value, const char *name) +{ + MT_MSG_wrUX_DBG(pMsg, value, 8, name); +} + +/* + Write a U16 value to the mt_msg::io_buf + see mt_msg.h +*/ +void MT_MSG_wrU16_DBG(struct mt_msg *pMsg, uint32_t value, const char *name) +{ + MT_MSG_wrUX_DBG(pMsg, value, 16, name); +} + +/* + Write a U32 value to the mt_msg::io_buf + see mt_msg.h +*/ +void MT_MSG_wrU32_DBG(struct mt_msg *pMsg, uint32_t value, const char *name) +{ + MT_MSG_wrUX_DBG(pMsg, value, 32, name); +} + +/* + Write a U64 value to the mt_msg::io_buf + see mt_msg.h +*/ +void MT_MSG_wrU64_DBG(struct mt_msg *pMsg, uint64_t value, const char *name) +{ + MT_MSG_wrUX_DBG(pMsg, value, 64, name); +} + +/* + Write a byte buffer to the mt_msg::io_buf + see mt_msg.h +*/ +void MT_MSG_wrBuf_DBG(struct mt_msg *pMsg, const void *pData, + size_t nbytes, const char *name) +{ + if(pMsg->is_error) + { + return; + } + + /* init the index */ + init_wr_idx(pMsg); + + /* are we done? */ + if(nbytes == 0) + { + return; + } + + /* do we go to far? */ + if((pMsg->iobuf_idx + ((int)nbytes)) > pMsg->iobuf_idx_max) + { + pMsg->is_error = true; + BUG_HERE("msg wr overflow\n"); + return; + } + + if(name) + { + LOG_printf(LOG_DBG_MT_MSG_fields, "%s: wrBuf: %*s, len: %d\n", + pMsg->pLogPrefix, 20, name, (int)nbytes); + } + /* is this a dummy or real write? */ + if(pData) + { + /* we might be doing a dummy write */ + memcpy((void *)(&(pMsg->iobuf[pMsg->iobuf_idx])), pData, nbytes); + } + pMsg->iobuf_idx += (int)nbytes; + pMsg->iobuf_nvalid += (int)nbytes; +} + +/* + Peek (ahead) into the message at a specific byte offset. + see mt_msg.h +*/ +int MT_MSG_Peek_u8_DBG(struct mt_msg *pMsg, int ofset, const char *name) +{ + int x; + + /* if not set yet */ + if(pMsg->iobuf_idx < 0) + { + /* set to start of message */ + /* Because we parse messages */ + pMsg->iobuf_idx = 0; + } + + x = pMsg->iobuf_idx + ofset; + if(!_inrange(x, 0, pMsg->iobuf_nvalid)) + { + return (EOF); + } + x = pMsg->iobuf[x] & 0x0ff; + + LOG_printf(LOG_DBG_MT_MSG_fields, "%s: peek_u8: %s: %d, 0x%02x\n", + pMsg->pLogPrefix, + name, + (int)x, + (int)x); + + return (x); +} + +/* + Read an N-bit value from the mt_msg::io_buf + see mt_msg.h +*/ +uint64_t MT_MSG_rdUX_DBG(struct mt_msg *pMsg, int nbits, const char *name) +{ + int x; + int y; + uint64_t v; + uint64_t v2; + + if(pMsg->is_error) + { + return (0); + } + + /* if not set yet */ + if(pMsg->iobuf_idx < 0) + { + /* set to start of message */ + /* because we parse messages */ + pMsg->iobuf_idx = 0; + } + + v = 0; + + /* Data is transmitted LSB first */ + for(x = 0 ; x < nbits ; x += 8) + { + y = pMsg->iobuf_idx; + if(!_inrange(y, 0, pMsg->iobuf_nvalid)) + { + v = (uint64_t)-1; + BUG_HERE("msg rd underflow\n"); + break; + } + v2 = pMsg->iobuf[y]; + y++; + pMsg->iobuf_idx = y; + + v2 = v2 << x; + v = v | v2; + } + + if(name) + { + LOG_printf(LOG_DBG_MT_MSG_fields, "%s: rd_u%d: %*s: %5lld, 0x%0*llx\n", + pMsg->pLogPrefix, + nbits, + 12, + name, + (long long)v, + (nbits / 4), + (unsigned long long)v); + } + return (v); +} + +/* + Read a U8 value from the mt_msg::io_buf + see mt_msg.h + */ +uint8_t MT_MSG_rdU8_DBG(struct mt_msg *pMsg, const char *name) +{ + return ((uint8_t)MT_MSG_rdUX_DBG(pMsg, 8, name)); +} + +/* + Read a U16 value from the mt_msg::io_buf + see mt_msg.h +*/ +uint16_t MT_MSG_rdU16_DBG(struct mt_msg *pMsg, const char *name) +{ + return ((uint16_t)MT_MSG_rdUX_DBG(pMsg, 16, name)); +} + +/* + Read a U32 value from the mt_msg::io_buf + see mt_msg.h +*/ +uint32_t MT_MSG_rdU32_DBG(struct mt_msg *pMsg, const char *name) +{ + return ((uint32_t)MT_MSG_rdUX_DBG(pMsg, 32, name)); +} + +/* + Read a U64 value from the mt_msg::io_buf + see mt_msg.h +*/ +uint64_t MT_MSG_rdU64_DBG(struct mt_msg *pMsg, const char *name) +{ + return (MT_MSG_rdUX_DBG(pMsg, 64, name)); +} + +/* + Parsing is complete, is everything ok? + See mt_msg.h +*/ +void MT_MSG_parseComplete(struct mt_msg *pMsg) +{ + int n; + + /* where should the iobuf_idx be? */ + n = (pMsg->pSrcIface->frame_sync ? 1 : 0) + /* sync byte */ + (pMsg->pSrcIface->len_2bytes ? 2 : 1) + + 1 + /* cmd0 */ + 1 + /* cmd1 */ + /* finally the payload */ + pMsg->expected_len; + + /* hmm is it wrong? */ + if(pMsg->iobuf_idx != n) + { + /* then we have an error */ + pMsg->is_error = true; + MT_MSG_log(LOG_ERROR, pMsg, "%s: incomplete parse\n", + pMsg->pSrcIface->dbg_name); + BUG_HERE("incomplete parse"); + } +} + +/* + Read a chunk of bytes from the mt_msg::io_buf + see mt_msg.h +*/ +void MT_MSG_rdBuf_DBG(struct mt_msg *pMsg, + void *pData, + size_t nbytes, + const char *name) +{ + /* we don't read any more if we hit an error */ + if(pMsg->is_error) + { + return; + } + + /* if not set yet */ + if(pMsg->iobuf_idx < 0) + { + /* set to start of message */ + /* because we parse complete messages */ + pMsg->iobuf_idx = 0; + } + + if(nbytes == 0) + { + return; + } + + /* are we reading past the end? */ + if((pMsg->iobuf_idx + ((int)nbytes)) > pMsg->iobuf_idx_max) + { + pMsg->is_error = true; + BUG_HERE("msg rd underflow\n"); + return; + } + + if(name) + { + LOG_printf(LOG_DBG_MT_MSG_fields, "%s: rdBuf: %*s, len: %d\n", + pMsg->pLogPrefix, 20, name, (int)nbytes); + } + + /* pData might be NULL if we are doing a "dummy read" */ + /* meaning: Sometimes we need to skip over payload bytes */ + if(pData) + { + memcpy(pData, (void *)(&(pMsg->iobuf[pMsg->iobuf_idx])), nbytes); + } + pMsg->iobuf_idx += (int)nbytes; +} + +/* + Release this message back into the heap + see mt_msg.h +*/ +void MT_MSG_free(struct mt_msg *pMsg) +{ + if(pMsg == NULL) + { + return; + } + + if(pMsg->check_ptr != &(msg_check_value)) + { + BUG_HERE("not a message ptr: %p\n", (void *)(pMsg)); + return; + } + + /* release everything in this list */ + if(pMsg->pListNext) + { + MT_MSG_free(pMsg->pListNext); + pMsg->pListNext = NULL; + } + + /* and the srsp for this message */ + if(pMsg->pSrsp) + { + MT_MSG_free(pMsg->pSrsp); + pMsg->pSrsp = NULL; + } + + /* make it unusable. */ + memset((void *)(pMsg), 0, sizeof(*pMsg)); + free((void *)pMsg); +} + +/*! + * @brief Local function to reset a message so we can reuse it. + * @param pMsg - the message + * @param len - expected length + * @param cmd0 - value for command 0 + * @param cmd1 - value for command 1 + * + * Also see MT_MSG_alloc() + */ +static void MT_MSG_resetMsg(struct mt_msg *pMsg, int len, int cmd0, int cmd1) +{ + pMsg->is_error = false; + pMsg->cmd0 = cmd0; + pMsg->cmd1 = cmd1; + + /* set length unknown */ + /* will be set upon first rd/wr of message */ + pMsg->iobuf_idx = -1; + pMsg->iobuf_nvalid = 0; + + MT_MSG_set_type(pMsg, NULL); + + /* Set the length */ + pMsg->expected_len = len; + if(len < 0) + { + /*---------------------------------------- + NOTE: LEN might be negative. + Why? Because the size is not known yet. + ---------------------------------------- */ + } + else + { + /* sanity check Total size + 1 = sync byte + 2 = len byte (worse case) + 1 = cmd0 + 1 = cmd1 + *len* = provided + 1 = checksum + ====== + 5 + len + */ + if((len + 5) > sizeof(pMsg->iobuf)) + { + BUG_HERE("msg too big\n"); + } + } + +} + +/* + Allocate (from heap) a message, initialize as required + see mt_msg.h +*/ +struct mt_msg *MT_MSG_alloc(int len, int cmd0, int cmd1) +{ + struct mt_msg *pMsg; + + /* get memory */ + pMsg = calloc(1, sizeof(*pMsg)); + if(pMsg == NULL) + { + BUG_HERE("no memory\n"); + } + + /* initialize it */ + if(pMsg) + { + pMsg->sequence_id = msg_sequence_counter++; + pMsg->check_ptr = &(msg_check_value); + /* current implimentation is a u8 array local to the struct */ + pMsg->iobuf_idx_max = sizeof(pMsg->iobuf); + + MT_MSG_resetMsg(pMsg, len, cmd0, cmd1); + } + return (pMsg); +} + +/* + Clone (copy) a message + + Public function defined in mt_msg +*/ +struct mt_msg *MT_MSG_clone(struct mt_msg *pOrig) +{ + struct mt_msg_interface *pMI;; + struct mt_msg *pClone; + int save_id; + + pClone = MT_MSG_alloc(pOrig->expected_len, pOrig->cmd0, pOrig->cmd1); + if(pClone == NULL) + { + MT_MSG_log(LOG_ERROR, pOrig, "clone failed no memory\n"); + return (NULL); + } + + /* save this */ + save_id = pClone->sequence_id; + + /* make sure it has an interface of some type */ + pMI = pOrig->pSrcIface; + if(pMI == NULL) + { + pMI = pOrig->pDestIface; + } + if(pMI == NULL) + { + FATAL_printf("this message has no interface\n"); + } + + LOG_printf(LOG_DBG_MT_MSG_traffic, + "MT_MSG: clone(%s, id: %d) to: id: %d\n", + pMI->dbg_name, + pOrig->sequence_id, + save_id); + + *pClone = *pOrig; + pClone->sequence_id = save_id; + + if(pClone->pSrsp) + { + pClone->pSrsp = MT_MSG_clone(pClone->pSrsp); + } + + /* The clone is not in a list it is new. */ + pClone->pListNext = NULL; + + pClone->was_formatted = false; + /* Done */ + return (pClone); +} + +/* + * @brief Transmit a message + * @param pMsg - the message t transmit + * @returns number of messages transmitteed (1=success) + */ +static int MT_MSG_tx_raw(struct mt_msg *pMsg) +{ + int r; + + /* insert frame sync, cmd0/1 and checksum */ + MT_MSG_format_msg(pMsg); + + LOG_lock(); + MT_MSG_dbg_decode(pMsg, pMsg->pDestIface, ALL_MT_MSG_DBG); + + MT_MSG_log(LOG_DBG_MT_MSG_traffic, pMsg, "%s: TX Msg (start) [%s]\n", + pMsg->pDestIface->dbg_name, + pMsg->pLogPrefix); + + if(LOG_test(LOG_DBG_MT_MSG_raw)) + { + LOG_printf(LOG_DBG_MT_MSG_raw, "%s: TX %d bytes\n", + pMsg->pDestIface->dbg_name, + pMsg->iobuf_nvalid); + LOG_hexdump(LOG_DBG_MT_MSG_raw, 0, pMsg->iobuf, pMsg->iobuf_nvalid); + } + LOG_unLock(); + + /* send the bytes */ + r = STREAM_wrBytes(pMsg->pDestIface->hndl, + (void *)(pMsg->iobuf), + pMsg->iobuf_nvalid, -1); + + LOG_printf(LOG_DBG_MT_MSG_traffic, + "%s: TX Msg (Complete) r=%d [%s]\n", + pMsg->pDestIface->dbg_name, r, + pMsg->pLogPrefix); + /* great success? */ + if(r == pMsg->iobuf_nvalid) + { + /* we transmitted 1 message */ + return (1); + } + + MT_MSG_log(LOG_ERROR, pMsg, "%s: cannot transmit r=%d\n", + pMsg->pDestIface->dbg_name, + r); + /* we transmitted 0 messages */ + return (0); +} + +/* + * @brief common code to send an extended status packet. + * @param pMI - the message interface + * @param pFI - the fragmentation info to use (tx or rx) + * @param blocktype - either 3(frag ack) or 4(extended status) + * @param statuscode - value to send. + */ +static void common_send_status(struct mt_msg_interface *pMI, + struct mt_msg_iface_frag_info *pFI, + int blocktype, int statuscode) +{ + struct mt_msg *pStatus; + + /* get a message to send */ + pStatus = MT_MSG_alloc(3, pFI->pMsg->cmd0 | _bit7, pFI->pMsg->cmd1); + if(pStatus == NULL) + { + pFI->is_error = true; + return; + } + + /* fill in the message */ + pStatus->pLogPrefix = "frag-status"; + + MT_MSG_setDestIface(pStatus, pMI); + + MT_MSG_wrU8(pStatus, (blocktype << 3) | pMI->stack_id); + MT_MSG_wrU8(pStatus, pFI->block_cur); + MT_MSG_wrU8(pStatus, statuscode); + /* and send it */ + MT_MSG_tx_raw(pStatus); + + /* and release it */ + MT_MSG_free(pStatus); + pStatus = NULL; +} + +/*! + * @brief Send an extended status packet. + * @param pMI - the interface + * @param pFI - the fragment info (tx or rx) + * @param statuscode - what status to send + */ +static void send_extended_status(struct mt_msg_interface *pMI, + struct mt_msg_iface_frag_info *pFI, + int statuscode) +{ + // 4 is the extended status message + common_send_status(pMI, pFI, 4, statuscode); +} + +/*! + * @brief send a normal frag_ack packet + * @param pMI - the interface + * @param pFI - the fragment info (tx or rx) + * @param statuscode - what status to send + */ +static void send_frag_ack_packet(struct mt_msg_interface *pMI, + struct mt_msg_iface_frag_info *pFI, + int statuscode) +{ + // 3 is the "frag-ack" message + common_send_status(pMI, pFI, 3, statuscode); +} + +/*! + * @brief Abort with an out of order message + * @param pMI - the interface + * @param pFI - the fragment info (tx or rx) + */ +static void send_frag_abort_outoforder(struct mt_msg_interface *pMI, + struct mt_msg_iface_frag_info *pFI) +{ + send_frag_ack_packet(pMI, pFI, MT_MSG_FRAG_STATUS_block_out_of_order); +} + +/*! + * @brief Wait for the fragment ack to occur (or a timeout, or an error) + * @param pMI - the interface in use + * @return 0 on succes + */ +static int wait_for_frag_ack(struct mt_msg_interface *pMI) +{ + int r; + struct mt_msg *pAck; + int ack_block; + int ack_status; + + /* Fragments are like sreq/srsp... */ + /* so we use the srsp timeout here */ + LOG_printf(LOG_DBG_MT_MSG_traffic, "Waiting for frag-ack\n"); + + SEMAPHORE_waitWithTimeout(pMI->tx_frag.tx_ack_semaphore, + pMI->srsp_timeout_mSecs); + + MUTEX_lock(pMI->list_lock,-1); + pAck = pMI->tx_frag.pTxFragAck; + if(pAck) + { + pMI->tx_frag.pTxFragAck = pAck->pListNext; + } + MUTEX_unLock(pMI->list_lock); + + if(pAck == NULL) + { + LOG_printf(LOG_DBG_MT_MSG_traffic, "timeout: frag-ack\n"); + /* no response */ + /* we send the current block again. */ + /* do not advance */ + r = 0; + goto done; + } + + /* ignore the extended version byte */ + MT_MSG_rdU8(pAck); + /* read blocknumber */ + ack_block = MT_MSG_rdU8(pAck); + ack_status = MT_MSG_rdU8(pAck); + MT_MSG_parseComplete(pAck); + if(pAck->is_error) + { + /* we are toast.. */ + /* out of sequence abort */ + send_frag_abort_outoforder(pMI,&(pMI->tx_frag)); + /* we are dead */ + pMI->tx_frag.is_error = true; + /* do not advance */ + r = 0; + goto done; + } + /* resend last block? */ + if(ack_status == MT_MSG_FRAG_STATUS_resend_last) + { + r = 0; /* do not advance */ + goto done; + } + /* success? */ + if((ack_status == MT_MSG_FRAG_STATUS_success) || + (ack_status == MT_MSG_FRAG_STATUS_frag_complete)) + { + /* send next block */ + if(ack_block == pMI->tx_frag.block_cur) + { + /* yea, we advance */ + r = 1; + goto done; + } + } + pMI->tx_frag.is_error = true; + MT_MSG_log(LOG_ERROR, pAck, "block:%d, bad ack status: %d\n", + ack_block, ack_status); + /* we don't understand the status.. */ + send_frag_abort_outoforder(pMI, &(pMI->tx_frag)); + /* do not advance */ + r = 0; +done: + if(pAck) + { + MT_MSG_free(pAck); + pAck = NULL; + } + return (r); +} + +/*! + * @brief Send a fragment chunk.. + * @param pMI - the interface in use. + * Also see wait_for_frag_ack() + */ +static void frag_tx_one_block(struct mt_msg_interface *pMI) +{ + int rd_offset; + int n; + + /* housekeeping.. */ + pMI->tx_frag.pTxFragData->pLogPrefix = "frag-data"; + LOG_printf(LOG_DBG_MT_MSG_traffic, "TX: %s:(frag) block: %d of %d\n", + pMI->dbg_name, pMI->tx_frag.block_cur+1, pMI->tx_frag.block_count); + + /* reset the data packet. */ + MT_MSG_resetMsg(pMI->tx_frag.pTxFragData, -1, + pMI->tx_frag.pMsg->cmd0 | _bit7, pMI->tx_frag.pMsg->cmd1); + + /* set interfaces */ + + /* it has no source */ + MT_MSG_setSrcIface(pMI->tx_frag.pTxFragData, NULL); + /* it has an interface */ + MT_MSG_setDestIface(pMI->tx_frag.pTxFragData, pMI); + + /* insert the extended header */ + MT_MSG_wrU8(pMI->tx_frag.pTxFragData, (2 << 3) | pMI->stack_id); + + MT_MSG_wrU8(pMI->tx_frag.pTxFragData, pMI->tx_frag.block_cur); + MT_MSG_wrU16(pMI->tx_frag.pTxFragData, pMI->tx_frag.total_size); + + /* where do we get our data? */ + rd_offset = (pMI->tx_frag.block_cur * pMI->tx_frag.this_frag_size); + + /* do not send more then the fragment size */ + n = pMI->tx_frag.pMsg->expected_len - rd_offset; + if(n > pMI->tx_frag.this_frag_size) + { + n = pMI->tx_frag.this_frag_size; + } + + /* Adjust rd offset to just after the packet header */ + rd_offset += + (pMI->frame_sync ? 1 : 0) + + (pMI->len_2bytes ? 2 : 1) + + 1 + /* cmd0 */ + 1; /* cmd1 */ + + /* now insert data */ + MT_MSG_wrBuf(pMI->tx_frag.pTxFragData, + pMI->tx_frag.pMsg->iobuf + rd_offset, n); + MT_MSG_set_type(pMI->tx_frag.pTxFragData, pMI); + MT_MSG_tx_raw(pMI->tx_frag.pTxFragData); +} + +/*! + * @brief transmit a fragment block and recevie the ack + * @param pMI - interface to handle the fragment block + * @returns number of frag blocks sent (success=1) + * Return 1 to advance to the block + * Return 0 to retransmit the current block + * set "is_error" if we should abandon + */ +static int frag_txrx_one_block(struct mt_msg_interface *pMI) +{ + int trynum; + int r; + + r = 0; + for(trynum = 0; trynum < pMI->retry_max; trynum++) + { + LOG_printf(LOG_DBG_MT_MSG_traffic, + "TX: Block: %d of %d, Try: %d of %d\n", + pMI->tx_frag.block_cur+1, pMI->tx_frag.block_count, + trynum, pMI->retry_max); + + frag_tx_one_block(pMI); + if(pMI->tx_frag.is_error) + { + break; + } + + r = wait_for_frag_ack(pMI); + /* if success or error, we are done */ + if((r > 0) || (pMI->tx_frag.is_error)) + { + break; + } + } + return (r); +} + +/*! + * @brief Chop up, loop over, and transmit a message via fragmentation + * @param pMsg - msg to transmit + * @return 1 - on success 1 [big] message was transmitted. + */ +static int MT_MSG_tx_fragment(struct mt_msg *pMsg) +{ + int r; + struct mt_msg_interface *pMI; + + pMI = pMsg->pDestIface; + + pMI->tx_frag.pMsg = pMsg; + pMI->tx_frag.is_error = false; + + pMI->tx_frag.total_size = pMsg->expected_len; + pMI->tx_frag.this_frag_size = pMsg->pDestIface->tx_frag_size; + pMI->tx_frag.block_cur = 0; + pMI->tx_frag.block_count = + (pMsg->expected_len + pMI->tx_frag.this_frag_size - 1) / + pMI->tx_frag.this_frag_size; + + pMI->tx_frag.pTxFragData = MT_MSG_alloc(-1, + pMsg->cmd0 | _bit7, + pMsg->cmd1); + if(pMI->tx_frag.pTxFragData == NULL) + { + MT_MSG_log(LOG_ERROR, pMsg, "no memory to fragment\n"); + pMI->tx_frag.is_error = true; + } + else + { + /* for each block.. */ + r = 0; + for(pMI->tx_frag.block_cur = 0; + pMI->tx_frag.block_cur < pMI->tx_frag.block_count; + pMI->tx_frag.block_cur += r) + { + + if(pMI->tx_frag.is_error) + { + break; + } + + /* transfer the block */ + r = frag_txrx_one_block(pMI); + /* this returns: */ + /* 0 - resend current block */ + /* or +1 to send the next block */ + } + } + + /* what is our result? */ + if(pMI->tx_frag.is_error) + { + send_extended_status(pMI, &(pMI->tx_frag), + MT_MSG_EXT_STATUS_frag_aborted); + /* we transmitted 0 packets */ + r = 0; + } + else + { + /* we send the last block *NUMBER* not the *COUNT* + Due to the for() loop above + "block_cur == block_count" + We must send the last block number + not the *block*count* in the extended status. + */ + pMI->tx_frag.block_cur--; + send_extended_status(pMI, &(pMI->tx_frag), + MT_MSG_EXT_STATUS_frag_complete); + /* we transmitted 1 packet */ + r = 1; + } + + /* cleanup */ + pMI->tx_frag.pMsg = NULL; + pMI->tx_frag.pTxFragAck = NULL; + + if(pMI->tx_frag.pTxFragData) + { + MT_MSG_free(pMI->tx_frag.pTxFragData); + pMI->tx_frag.pTxFragData = NULL; + } + + return (r); +} + +/*! + * @brief Transmit a message [this is not rx, see MT_MSG_txrx()] + * @param pMsg - the message to transmit + * @return 1 upon success [1 msg transmitted] + */ +static int MT_MSG_tx(struct mt_msg *pMsg) +{ + int r; + /* Set the message type */ + MT_MSG_set_type(pMsg, pMsg->pDestIface); + + /* if there was an error, we don't tx */ + if(pMsg->is_error || (pMsg->m_type == MT_MSG_TYPE_unknown)) + { + /* we transmitted ZERO packets. */ + r = 0; + goto done; + } + + /* Do we fragment? */ + if(pMsg->pDestIface->len_2bytes) + { + /* we don't need to check for fragmentation */ + } + else + { + if((pMsg->iobuf_nvalid > 256) || + (pMsg->iobuf_nvalid >= pMsg->pDestIface->tx_frag_size)) + { + /* yes, we fragment */ + r = MT_MSG_tx_fragment(pMsg); + goto done; + } + } + + r = MT_MSG_tx_raw(pMsg); +done: + return (r); +} + +/* + release resources for this message interface + see mt_msg.h +*/ +void MT_MSG_interfaceDestroy(struct mt_msg_interface *pMI) +{ + if(pMI == NULL) + { + return; + } + + LOG_printf(LOG_DBG_MT_MSG_traffic, + "%s: Destroy interface\n", pMI->dbg_name); + pMI->is_dead = true; + + /* kill off any messages we have in process */ + if(pMI->pCurRxMsg) + { + MT_MSG_free(pMI->pCurRxMsg); + pMI->pCurRxMsg = NULL; + } + + /* close our connection */ + if(pMI->hndl) + { + STREAM_close(pMI->hndl); + /* is this a socket connection? */ + if(pMI->s_cfg) + { + if(pMI->s_cfg->ascp == 'c') + { + SOCKET_CLIENT_destroy(pMI->hndl); + } + else + { + SOCKET_SERVER_destroy(pMI->hndl); + } + } + pMI->hndl = 0; + } + + /* and our rx thread */ + if(pMI->rx_thread) + { + THREAD_destroy(pMI->rx_thread); + pMI->rx_thread = 0; + } + + /* any pending message are tossed */ + MT_MSG_LIST_destroy(&(pMI->rx_list)); + + /* our lock */ + if(pMI->list_lock) + { + MUTEX_destroy(pMI->list_lock); + pMI->list_lock = 0; + } + + /* our SREQ/SRSP semaphore */ + if(pMI->srsp_semaphore) + { + SEMAPHORE_destroy(pMI->srsp_semaphore); + pMI->srsp_semaphore = 0; + } + + /* our fragmentation semaphore */ + if(pMI->tx_frag.tx_ack_semaphore) + { + SEMAPHORE_destroy(pMI->tx_frag.tx_ack_semaphore); + pMI->tx_frag.tx_ack_semaphore = 0; + } + + if(pMI->tx_lock) + { + MUTEX_destroy(pMI->tx_lock); + pMI->tx_lock = 0; + } + + /* Any pending sreq is dead */ + MT_MSG_free(pMI->pCurSreq); + pMI->pCurSreq = NULL; + + /* we do *NOT* zap (zero) the interface. */ + /* The caller may need to release destroy the handle. */ +} + +/*! + * @brief Read N bytes from the interface and insert into the message + * @param pMsg - the message to insert into + * @param n - how many bytes we need + * @param timeout_mSecs - how long to wait + * @returns nbytes valid in the rx buffer (total) + */ +static int mt_msg_rx_bytes(struct mt_msg_interface *pMI, + int n, int timeout_mSecs) +{ + struct mt_msg *pMsg; + int r; + int nneed; + + pMsg = pMI->pCurRxMsg; + + /* do we already have enough? */ + if(pMsg->iobuf_nvalid >= n) + { + return (n); + } + /* how many *MORE* do we need? */ + nneed = n - pMsg->iobuf_nvalid; + + /* go read */ + r = STREAM_rdBytes(pMI->hndl, + pMsg->iobuf + pMsg->iobuf_nvalid, + nneed, + timeout_mSecs); + if(r > 0) + { + /* great success? */ + pMsg->iobuf_nvalid += r; + } + if(r <= 0) + { + if(STREAM_isSocket(pMI->hndl)) + { + /* did we get a tcpip disconnect? */ + if(!STREAM_SOCKET_isConnected(pMI->hndl)) + { + LOG_printf(LOG_DBG_MT_MSG_traffic, + "%s: Socket is dead\n", + pMI->dbg_name); + pMI->is_dead = true; + } + } + else + { + if(r < 0) + { + /* USB uarts die if they are disconnected */ + pMI->is_dead = true; + } + } + } + /* log ... */ + if(pMsg->iobuf_nvalid) + { + if(LOG_test(LOG_DBG_MT_MSG_raw)) + { + LOG_printf(LOG_DBG_MT_MSG_raw, + "%s: nbytes-avail: %d\n", + pMI->dbg_name, + pMsg->iobuf_nvalid); + LOG_hexdump(LOG_DBG_MT_MSG_raw, + 0, + pMI->pCurRxMsg->iobuf, + pMI->pCurRxMsg->iobuf_nvalid); + } + } + + return (pMsg->iobuf_nvalid); +} + +/*! + * @brief - read a message from the interface. + * @param pMI - msg interface + * @returns NULL if no message received, otherwise a valid msg + */ +static struct mt_msg *mt_msg_rx(struct mt_msg_interface *pMI) +{ + int r; + int nneed; + struct mt_msg *pMsg; + + /* do we allocate a new message? */ + if(pMI->pCurRxMsg == NULL) + { + pMI->pCurRxMsg = MT_MSG_alloc(-1, -1, -1); + /* allocation error :-(*/ + if(pMI->pCurRxMsg == NULL) + { + return (NULL); + } + pMI->pCurRxMsg->pLogPrefix = _incomming_msg; + MT_MSG_setSrcIface(pMI->pCurRxMsg, pMI); + } + else + { + MT_MSG_resetMsg(pMI->pCurRxMsg, -1, -1, -1); + } + + pMsg = pMI->pCurRxMsg; + + LOG_printf(LOG_DBG_MT_MSG_traffic, + "%s: rx-msg looking for start\n", + pMI->dbg_name); + +try_again: + /* zap what we have */ + pMsg->iobuf_nvalid = 0; + /* zap the existing buffer for debug reasons */ + memset((void *)(&(pMsg->iobuf[0])), 0, pMsg->iobuf_idx_max); + + /* how many bytes should we get? */ + nneed = ( + (pMI->frame_sync ? 1 : 0) + /* sync */ + (pMI->len_2bytes ? 2 : 1) + /* len */ + 1 + /* cmd0 */ + 1 + /* cmd1 */ + 0 + /* unknown length yet */ + (pMI->include_chksum ? 1 : 0)); /* checksum */ + +read_more: + r = mt_msg_rx_bytes(pMI, nneed, pMI->intermsg_timeout_mSecs); + if(r == 0) + { + LOG_printf(LOG_DBG_MT_MSG_traffic, "%s: rx-silent\n", pMI->dbg_name); + return (NULL); + } + + if(r < 0) + { + /* something is wrong */ + LOG_printf(LOG_DBG_MT_MSG_traffic, "%s: Io error?\n", pMI->dbg_name); + return (NULL); + } + + /* we start reading at byte 0 in the message */ + pMsg->iobuf_idx = 0; + + /* should we find a frame sync? */ + if(pMI->frame_sync) + { + /* hunt for the sync byte */ + /* and move the sync byte to byte 0 in the buffer */ + uint8_t *p8; + + p8 = (uint8_t *)memchr((void *)(&pMsg->iobuf[0]), + 0xfe, + pMsg->iobuf_nvalid); + if(p8 == NULL) + { + /* not found */ + MT_MSG_log(LOG_DBG_MT_MSG_traffic | LOG_DBG_MT_MSG_raw, + pMsg, "Garbage data...\n"); + goto try_again; + } + + /* frame sync must start at zero. */ + if(p8 != pMsg->iobuf) + { + /* need to shift data over some */ + + /* how many bytes to shift? */ + int n; + n = (int)(&(pMsg->iobuf[pMsg->iobuf_nvalid]) - p8); + /* shift */ + memmove((void *)(&pMsg->iobuf[0]), (void *)p8, n); + /* zero what we deleted */ + memset((void *)(&(pMsg->iobuf[n])), 0, pMsg->iobuf_nvalid - n); + pMsg->iobuf_nvalid = n; + /* Do we have enough bytes? */ + if(nneed > pMsg->iobuf_nvalid) + { + /* No - we need more, go get more */ + goto read_more; + } + } + /* DUMMY read of the sync byte */ + MT_MSG_rdU8(pMsg); + } + + /* Found start */ + /* how big is our length? */ + if(pMI->len_2bytes) + { + pMsg->expected_len = MT_MSG_rdU16(pMsg); + } + else + { + pMsg->expected_len = MT_MSG_rdU8(pMsg); + } + + pMsg->cmd0 = MT_MSG_rdU8(pMsg); + pMsg->cmd1 = MT_MSG_rdU8(pMsg); + + nneed += pMsg->expected_len; + + /* read the data component */ + r = mt_msg_rx_bytes(pMI, nneed, pMI->intersymbol_timeout_mSecs); + if(r != nneed) + { + /* something is wrong? */ + if(r > 0) + { + /* we got some ... but not enough .. */ + LOG_printf(LOG_DBG_MT_MSG_raw, + "Short read ... got: %d, want: %d, try again...\n", + nneed, r); + goto read_more; + } + MT_MSG_log(LOG_ERROR, pMsg, "%s: expected: %d, got: %d\n", + pMI->dbg_name, nneed, r); + dump_recover: + LOG_printf(LOG_DBG_MT_MSG_traffic, "Flushing RX stream\n"); + /* Dump all incomming data until we find a sync byte */ + STREAM_rdDump(pMI->hndl, pMI->flush_timeout_mSecs); + goto try_again; + } + + /* Dummy read to the end of the data. */ + /* this puts us at the checksum byte (if present) */ + MT_MSG_rdBuf(pMsg, NULL, pMsg->expected_len); + + /* do the checksum */ + if(pMI->include_chksum) + { + r = MT_MSG_calc_chksum(pMsg, 'f', pMsg->iobuf_nvalid); + if(r != 0) + { + MT_MSG_log(LOG_ERROR, pMI->pCurRxMsg, "%s: chksum error\n", + pMI->dbg_name); + LOG_hexdump(!LOG_ERROR, 0, pMsg->iobuf, pMsg->iobuf_nvalid); + goto dump_recover; + } + } + /* We have a message */ + MT_MSG_set_type(pMsg, pMsg->pSrcIface); + /* Set the iobuf_idx to the start of the payload */ + + /* since we will be parsing the message... */ + /* Set the iobuf_idx to the start of the payload */ + pMsg->iobuf_idx = ( + (pMI->frame_sync ? 1 : 0) + + (pMI->len_2bytes ? 2 : 1) + + 1 + /* cmd0 */ + 1 /* cmd1 */ + ); + /* next time we need to allocate a new message */ + pMI->pCurRxMsg = NULL; + + /* return our message */ + return (pMsg); +} + +/*! + * @brief We have received an extended status message handle it + * @param pMsg - the message + * @return NULL if we are not done with the fragmentation + */ +static struct mt_msg *handle_ext_status(struct mt_msg *pMsg) +{ + int block_num; + int status; + const char *cp; + + /* ignore the version byte */ + MT_MSG_rdU8(pMsg); + block_num = MT_MSG_rdU8(pMsg); + status = MT_MSG_rdU8(pMsg); + + switch (status) + { + default: + cp = "unknown"; + break; + case MT_MSG_EXT_STATUS_mem_alloc_error: + cp = "alloc-error"; + break; + case MT_MSG_EXT_STATUS_frag_complete: + cp = "frag-complete"; + break; + case MT_MSG_EXT_STATUS_frag_aborted: + cp = "aborted"; + break; + case MT_MSG_EXT_STATUS_unsupported_ack: + cp = "unsupported-ack"; + break; + } + MT_MSG_log(LOG_DBG_MT_MSG_traffic, pMsg, "extended status: block: %d, %s\n", + block_num, cp); + MT_MSG_free(pMsg); + pMsg = NULL; + return (NULL); +} + +/*! + * @brief Send the fragmentation ack for blocknum. + * @param pMI - where to send it + * @param pFI - fragmentation info + */ +static void send_frag_ack(struct mt_msg_interface *pMI, + struct mt_msg_iface_frag_info *pFI) +{ + struct mt_msg *pAck; + + /* create our extended packet */ + pAck = MT_MSG_alloc(3, pFI->pMsg->cmd0 | _bit7, pFI->pMsg->cmd1); + if(pAck == NULL) + { + /* nothing we can do.. */ + return; + } + pAck->pLogPrefix = "frag-ack"; + MT_MSG_setDestIface(pAck, pMI); + MT_MSG_wrU8(pAck, (3 << 3) | pMI->stack_id); + MT_MSG_wrU8(pAck, pFI->block_cur); + + if((pFI->block_cur+ 1) == pFI->block_count) + { + MT_MSG_wrU8(pAck, MT_MSG_FRAG_STATUS_frag_complete); + } + else + { + MT_MSG_wrU8(pAck, MT_MSG_FRAG_STATUS_success); + } + MT_MSG_tx_raw(pAck); + MT_MSG_free(pAck); +} + +/*! + * @brief handle first packet of a fragmented message + * @param pRxmsg - the fragment we just received. + * @return 0 success + */ +static int rx_first_frag_block(struct mt_msg *pRxMsg) +{ + struct mt_msg_interface *pMI; + int rd_loc; + int wr_loc; + + pMI = pRxMsg->pSrcIface; + + /* we don't use these */ + pMI->rx_frag.pTxFragAck = NULL; + pMI->rx_frag.pTxFragData = NULL; + + /* we have no error (YET!) */ + pMI->rx_frag.is_error = false; + + /* we'll keep this here. */ + pMI->rx_frag.pMsg = pRxMsg; + + /* skip the version byte */ + MT_MSG_rdU8(pMI->rx_frag.pMsg); + + /* read the block number */ + /* must start with block 0 */ + pMI->rx_frag.block_cur = MT_MSG_rdU8(pMI->rx_frag.pMsg); + + pMI->rx_frag.total_size = MT_MSG_rdU16(pMI->rx_frag.pMsg); + + /* "-4" is because the size of *this* extended header is 4 bytes. */ + pMI->rx_frag.this_frag_size = pMI->rx_frag.pMsg->expected_len - 4; + + /* determine how many blocks we should receive */ + pMI->rx_frag.block_count = + (pMI->rx_frag.total_size + pMI->rx_frag.this_frag_size - 1) / + pMI->rx_frag.this_frag_size; + + MT_MSG_log(LOG_DBG_MT_MSG_traffic, + pMI->rx_frag.pMsg, "RX Frag: Block %d of %d, frag size: %d\n", + pMI->rx_frag.block_cur + 1, + pMI->rx_frag.block_count, + pMI->rx_frag.this_frag_size); + + /* sanity check, did we get block 0? */ + if(pMI->rx_frag.block_cur != 0) + { + MT_MSG_log(LOG_ERROR, pMI->rx_frag.pMsg, "RX-non-first-block\n"); + + /* abort */ + send_frag_abort_outoforder(pMI, &(pMI->rx_frag)); + + /* toss the message we just received */ + MT_MSG_free(pMI->rx_frag.pMsg); + pMI->rx_frag.pMsg = NULL; + /* we handled ZERO messages */ + return (0); + } + + /* Now, move the data in the message to the front */ + /* we are going to throw away the extended header */ + + /* this is where the payload should be when done */ + wr_loc = + (pMI->frame_sync ? 1 : 0) + + (pMI->len_2bytes ? 2 : 1) + + 1 + /* cmd0 */ + 1; /* cmd1 */ + + /* the payload currently is after the header */ + rd_loc = wr_loc + 4; + + /* now move the data */ + memmove((void *)(&(pMI->rx_frag.pMsg->iobuf[wr_loc])), + (void *)(&(pMI->rx_frag.pMsg->iobuf[rd_loc])), + pMI->rx_frag.this_frag_size); + + /* update the expected size */ + pMI->rx_frag.pMsg->expected_len = pMI->rx_frag.total_size; + /* clear the extended bit */ + pMI->rx_frag.pMsg->cmd0 &= 0x7f; + + /* send our ack. */ + send_frag_ack(pMI, &(pMI->rx_frag)); + /* we successfully handled 1 message */ + return (1); +} + +/*! + * @brief We have received an extended packet of type fragment data. + * @param pMI - where it came from + * @param pRxFrag - what we received. + */ +static struct mt_msg *handle_data_fragment(struct mt_msg *pRxFrag) +{ + struct mt_msg_interface *pMI; + int this_block; + int this_len; + int rd_loc; + int wr_loc; + bool last_block; + bool bad; + + /* recover the interface */ + pMI = pRxFrag->pSrcIface; + + /* first packet is special. */ + if(pMI->rx_frag.pMsg == NULL) + { + rx_first_frag_block(pRxFrag); + return (NULL); + } + + /* all others are handled here. */ + + /* throw away the 1st byte */ + MT_MSG_rdU8(pRxFrag); + this_block = MT_MSG_rdU8(pRxFrag); + this_len = MT_MSG_rdU16(pRxFrag); + + /* detect errors and cleanup */ + if(pMI->rx_frag.block_cur == this_block) + { + MT_MSG_log(LOG_DBG_MT_MSG_traffic, + pRxFrag, + "RX Frag: Duplicate block %d\n", + this_block); + abort_clean_up: + if(pMI->rx_frag.pMsg) + { + MT_MSG_free(pMI->rx_frag.pMsg); + pMI->rx_frag.pMsg = NULL; + } + if(pRxFrag) + { + MT_MSG_free(pRxFrag); + pRxFrag = NULL; + } + return (NULL); + } + + if(pMI->rx_frag.total_size != this_len) + { + MT_MSG_log(LOG_ERROR, pRxFrag, + "RX Frag: total size change (was: %d, now: %d)\n", + pMI->rx_frag.total_size, this_len); + send_frag_abort_outoforder(pMI, &(pMI->rx_frag)); + goto abort_clean_up; + } + + /* is this the last block? */ + last_block = false; + if((this_block + 1) == pMI->rx_frag.block_count) + { + last_block = true; + } + + /* block order wrong? */ + if((pMI->rx_frag.block_cur + 1) != this_block) + { + MT_MSG_log(LOG_ERROR, pRxFrag, + "RX Frag: out of order, expect %d, got %d\n", + (pMI->rx_frag.block_cur + 1), this_block); + send_frag_abort_outoforder(pMI, &(pMI->rx_frag)); + goto abort_clean_up; + } + + /* how big is this specific fragment? */ + this_len = pRxFrag->expected_len - 4; + + /* size must not change */ + bad = false; + if(last_block) + { + /* last block can be smaller, but not larger */ + bad = (this_len > pMI->rx_frag.this_frag_size); + } + else + { + /* internal blocks must be same size */ + bad = (this_len != pMI->rx_frag.this_frag_size); + } + + if(bad) + { + /* it changed, this is wrong, so abort */ + MT_MSG_log(LOG_ERROR, + pRxFrag, + "RX Frag: block len change new: %d, old: %d\n", + this_len, pMI->rx_frag.this_frag_size); + send_frag_ack_packet(pMI, + &(pMI->rx_frag), + MT_MSG_FRAG_STATUS_block_len_changed); + goto abort_clean_up; + } + + /* update the block number. */ + pMI->rx_frag.block_cur = this_block; + + MT_MSG_log(LOG_DBG_MT_MSG_traffic, + pRxFrag, + "RX-Frag: Block %d of %d\n", + this_block + 1, + pMI->rx_frag.block_count); + + /* otherwise we are good, copy the data */ + rd_loc = + 4 + /* go past the extended header */ + (pMI->frame_sync ? 1 : 0) + + (pMI->len_2bytes ? 2 : 1) + + 1 + /* cmd0 */ + 1; /* cmd1; */ + + /* where do we put it? */ + wr_loc = pMI->rx_frag.block_cur * pMI->rx_frag.this_frag_size; + /* go past the header in the 'whole' packet. */ + wr_loc += + (pMI->frame_sync ? 1 : 0) + + (pMI->len_2bytes ? 2 : 1) + + 1 + /* cmd0 */ + 1; /* cmd1 */ + + /* copy the data. */ + memcpy((void *)(&(pMI->rx_frag.pMsg->iobuf[wr_loc])), + (void *)(&(pRxFrag->iobuf[rd_loc])), + this_len); + + /* send our ack */ + send_frag_ack(pMI, &(pMI->rx_frag)); + + /* we no longer need the fragment */ + MT_MSG_free(pRxFrag); + pRxFrag = NULL; + + struct mt_msg *pWhole; + pWhole = NULL; + if(last_block) + { + /* send COMPLETE */ + send_extended_status(pMI, + &(pMI->rx_frag), + MT_MSG_EXT_STATUS_frag_complete); + + pWhole = pMI->rx_frag.pMsg; + pMI->rx_frag.pMsg = NULL; + + /* set the parse point. */ + pWhole->iobuf_idx = + (pMI->frame_sync ? 1 : 0) + + (pMI->len_2bytes ? 2 : 1) + + 1 + /* cmd0 */ + 1; /* cmd1 */ + + } + return (pWhole); +} + +/*! + * @brief We have received an extended packet, handle it + * @param pMsg- the packet we received. + */ +static struct mt_msg *handle_extend_packet(struct mt_msg *pMsg) +{ + struct mt_msg_interface *pMI; + const char *cp; + /* recover where it came from */ + + pMI = pMsg->pSrcIface; + + cp = NULL; + switch (pMsg->m_type) + { + default: + pMsg = NULL; + BUG_HERE("invalid msg type\n"); + break; + case MT_MSG_TYPE_sreq_frag_ack: + if(cp == NULL) cp = "sreq_frag_ack"; + /* fallthru; */ + case MT_MSG_TYPE_areq_frag_ack: + if(cp == NULL) cp = "areq_frag_ack"; + /* fallthru; */ + case MT_MSG_TYPE_srsp_frag_ack: + if(cp == NULL) cp = "srsp_frag_ack"; + /* let sender deal with this. */ + pMsg->pLogPrefix = cp; + MT_MSG_log(LOG_DBG_MT_MSG_traffic, pMsg, "RX frag-ack\n"); + + MUTEX_lock(pMI->list_lock, -1); + pMsg->pListNext = pMI->tx_frag.pTxFragAck; + pMI->tx_frag.pTxFragAck = pMsg; + pMsg = NULL; + MUTEX_unLock(pMI->list_lock); + SEMAPHORE_put(pMI->tx_frag.tx_ack_semaphore); + break; + case MT_MSG_TYPE_sreq_frag_data: + if(cp == NULL) cp = "sreq_frag_data"; + /* fallthrugh */ + case MT_MSG_TYPE_areq_frag_data: + if(cp == NULL) cp = "areq_frag_data"; + /* fallthrugh */ + case MT_MSG_TYPE_srsp_frag_data: + if(cp == NULL) cp = "srsp_frag_data"; + pMsg->pLogPrefix = cp; + pMsg = handle_data_fragment(pMsg); + break; + case MT_MSG_TYPE_sreq_ext_status: + if(cp == NULL) cp = "sreq_ext_status"; + /* fallthru; */ + case MT_MSG_TYPE_areq_ext_status: + if(cp == NULL) cp = "areq_ext_status"; + /* fallthru; */ + case MT_MSG_TYPE_srsp_ext_status: + if(cp == NULL) cp = "srsp_ext_status"; + pMsg->pLogPrefix = cp; + pMsg = handle_ext_status(pMsg); + break; + } + return (pMsg); +} + +/*! + * @brief rx thread that handles all incomming messages. + * @param cookie - the message interface in disguise + * @return nothing important. + */ +static intptr_t mt_msg_rx_thread(intptr_t cookie) +{ + int a; + int b; + struct mt_msg_interface *pMI; + struct mt_msg *pRxMsg; + + /* recover our message */ + pMI = (struct mt_msg_interface *)(cookie); + /* run till we die */ + for(;;) + { + if(pMI->is_dead) + { + break; + } + + if(STREAM_isError(pMI->hndl)) + { + LOG_printf(LOG_ERROR, "%s: Dead\n", pMI->dbg_name); + break; + } + + /* rx a message (this is a blocking call) */ + pRxMsg = mt_msg_rx(pMI); + if(pRxMsg == NULL) + { + continue; + } + /* Debug dump if requested */ + MT_MSG_dbg_decode(pRxMsg, pRxMsg->pSrcIface, ALL_MT_MSG_DBG); + + /* if this message has the extension bit.. */ + if(pRxMsg->cmd0 & _bit7) + { + pRxMsg = handle_extend_packet(pRxMsg); + } + + /* did we complete the decoding of a the extended packet? */ + /* or if we got a normall packet... */ + if(pRxMsg == NULL) + { + /* nothing left to do... */ + continue; + } + + if(pRxMsg->m_type == MT_MSG_TYPE_areq) + { + areq_msg: + MT_MSG_log(LOG_DBG_MT_MSG_traffic, pRxMsg, "rx areq\n"); + /* async request */ + MT_MSG_LIST_insert(pMI, &(pMI->rx_list), pRxMsg); + pRxMsg = NULL; + continue; + } + + if(pRxMsg->m_type == MT_MSG_TYPE_poll) + { + /* polls are handled as an areq */ + goto areq_msg; + } + + if(pRxMsg->m_type == MT_MSG_TYPE_sreq) + { + /* polls are handled as an areq */ + goto areq_msg; + } + + /* it should match our current Sreq */ + /* and it might not match our Sreq */ + if(pMI->pCurSreq == NULL) + { + /* But there is no current sreq? */ + MT_MSG_log(LOG_DBG_MT_MSG_traffic, pRxMsg, "no pending sreq?\n"); + /* treat as an areq */ + goto areq_msg; + } + + /* Does this match? */ + + /* Upper bits[7:5] = message type */ + /* Lower bits[4:0] = subsystem number */ + /* We only care about the subsystem number */ + a = _bitsXYof(pMI->pCurSreq->cmd0, 4, 0); + b = _bitsXYof(pRxMsg->cmd0, 4, 0); + if((a == b) && (pMI->pCurSreq->cmd1 == pRxMsg->cmd1)) + { + /* All is well */ + } + else + { + /* does not match.. */ + MT_MSG_log(LOG_DBG_MT_MSG_traffic, + pRxMsg, + "sreq(cmd0=0x%02x, cmd1=0x%02x) does not match\n", + pMI->pCurSreq->cmd0, + pMI->pCurSreq->cmd1); + /* treat as areq */ + goto areq_msg; + } + + /* attach it to the request */ + pMI->pCurSreq->pSrsp = pRxMsg; + pMI->pCurSreq = NULL; + pRxMsg = NULL; + /* wake up the waiter */ + SEMAPHORE_put(pMI->srsp_semaphore); + } + LOG_printf(LOG_ERROR, "%s: rx-thread dead\n", pMI->dbg_name); + /* we die */ + return (0); +} + +/* + Initialize a message interface. + see mt_msg.h +*/ +int MT_MSG_interfaceCreate(struct mt_msg_interface *pMI) +{ + int r; + + pMI->is_dead = false; + + /* + The handle may come in pre-populated. + or we may need to create our socket interface + */ + if(pMI->s_cfg) + { + if(pMI->s_cfg->ascp == 's') + { + /* + you really need to do this instead: + (A) create the socket. + (B) set socket to listen mode. + (C) then accept socket connections + (D) For each accepted socket... + Possibly create new threads for each socket. + That is not something we do here. + */ + BUG_HERE("server socket is not supported here\n"); + } + else + { + /* create our socket */ + pMI->hndl = SOCKET_CLIENT_create(pMI->s_cfg); + if(pMI->hndl) + { + /* then connect */ + r = SOCKET_CLIENT_connect(pMI->hndl); + if(r < 0) + { + /* destroy if we could not connect */ + SOCKET_CLIENT_destroy(pMI->hndl); + pMI->hndl = 0; + } + } + } + } + else if(pMI->u_cfg) + { + pMI->hndl = STREAM_createUart(pMI->u_cfg); + if(pMI->hndl) + { + /* go flush all incomming data */ + if( pMI->startup_flush ) + STREAM_rdDump(pMI->hndl, pMI->flush_timeout_mSecs); + } + } + else + { + /* Connection is a *SOCKET* */ + /* Verify we have a socket handle! */ + if(pMI->hndl == 0) + { + BUG_HERE("no interface pointer\n"); + } + } + + if(pMI->hndl == 0) + { + goto bad; + } + + r= MT_MSG_LIST_create(&(pMI->rx_list), pMI->dbg_name, "rx-msgs"); + if(r != 0) + { + goto bad; + } + + pMI->tx_lock = MUTEX_create("mi-tx-lock"); + pMI->srsp_semaphore = SEMAPHORE_create("srsp-semaphore", 0); + pMI->tx_frag.tx_ack_semaphore = SEMAPHORE_create("frag-semaphore", 0); + pMI->list_lock = MUTEX_create("mi-lock"); + + if((pMI->tx_lock == 0) || + (pMI->srsp_semaphore == 0) || + (pMI->tx_frag.tx_ack_semaphore == 0) || + (pMI->list_lock == 0)) + { + goto bad; + } + + /* attempt to choose reasonable defaults */ + if(pMI->tx_frag_size == 0) + { + /* + 1 byte frame sync [optional] + 1 byte len + 1 byte cmd0 + 1 byte cmd1 + ext: 1 byte version + ext: 2 byte total length + ext: 1 byte block number + *variable* data + 1 byte checksum [optional] + ======= + 9 bytes allocated, worse case + 256 - 9 = 247 + */ + pMI->tx_frag_size = 247; + } + + if(pMI->retry_max == 0) + { + pMI->retry_max = 3; + } + + if(pMI->frag_timeout_mSecs == 0) + { + pMI->frag_timeout_mSecs = 2000; + } + + if(pMI->intersymbol_timeout_mSecs == 0) + { + pMI->intersymbol_timeout_mSecs = 100; + } + + if(pMI->srsp_timeout_mSecs == 0) + { + pMI->srsp_timeout_mSecs = 3000; + } + + if(pMI->flush_timeout_mSecs == 0) + { + pMI->flush_timeout_mSecs = 50; + } + + if(pMI->intermsg_timeout_mSecs == 0) + { + pMI->intermsg_timeout_mSecs = 3000; + } + + if(pMI->tx_lock_timeout == 0) + { + pMI->tx_lock_timeout = 3000; + } + + /* create the thread last... because it is going to run */ + pMI->rx_thread = THREAD_create(pMI->dbg_name, + mt_msg_rx_thread, + (intptr_t)(pMI), + THREAD_FLAGS_DEFAULT); + + if((pMI->hndl == 0) || (pMI->rx_thread == 0)) + { + bad: + /* problem? */ + MT_MSG_interfaceDestroy(pMI); + return (-1); + } + else + { + return (0); + } +} + +/* + Create a message list + see mt_msg.h +*/ +int MT_MSG_LIST_create(struct mt_msg_list *pML, + const char *dbg_name, + const char *name2) +{ + size_t len; + char *cp; + + memset((void *)(pML), 0, sizeof(*pML)); + + /* +1 - for null byte + * +1 - for "-" in %s-%s" below + * total 2 + */ + len = 2 + strlen(dbg_name); + if(name2) + { + len += strlen(name2); + } + else + { + /* nothing to add */ + } + cp = calloc(1, len); + if(cp) + { + if(name2) + { + (void)snprintf(cp, len, "%s-%s", dbg_name, name2); + } + else + { + strcpy(cp, dbg_name); + } + pML->dbg_name = cp; + } + pML->sem = SEMAPHORE_create(dbg_name, 0); + pML->pList = NULL; + + if((pML->dbg_name == NULL) || + (pML->sem == 0)) + { + MT_MSG_LIST_destroy(pML); + return (-1); + } + else + { + return (0); + } +} + +/* + Insert a message into this message list. + see mt_msg.h +*/ +void MT_MSG_LIST_insert(struct mt_msg_interface *pMI, + struct mt_msg_list *pML, + struct mt_msg *pMsg) +{ + struct mt_msg **ppMsg; + + MUTEX_lock(pMI->list_lock,-1); + ppMsg = &(pML->pList); + + /* nothing follows this guy */ + pMsg->pListNext = NULL; + + /* goto end of the list */ + while(*ppMsg) + { + ppMsg = &((*ppMsg)->pListNext); + } + + /* add to end */ + *ppMsg = pMsg; + + MUTEX_unLock(pMI->list_lock); + + SEMAPHORE_put(pML->sem); +} + +/* + Remove a message from this message list. + see mt_msg.h +*/ +struct mt_msg *MT_MSG_LIST_remove(struct mt_msg_interface *pMI, + struct mt_msg_list *pML, int timeout_mSecs) +{ + struct mt_msg *pMsg; + + /* did data arrive? */ + SEMAPHORE_waitWithTimeout(pML->sem, timeout_mSecs); + + /* remove */ + MUTEX_lock(pMI->list_lock, -1); + + pMsg = pML->pList; + if(pMsg) + { + pML->pList = pMsg->pListNext; + pMsg->pListNext = NULL; + } + + MUTEX_unLock(pMI->list_lock); + + return (pMsg); +} + +/* + Destroy a message list + see mt_msg.h +*/ +void MT_MSG_LIST_destroy(struct mt_msg_list *pML) +{ + struct mt_msg *pMsg; + + /* the list might be in a strange state */ + /* not fully initialized */ + /* do this carefully */ + + while(pML->pList) + { + pMsg = pML->pList; + pML->pList = pMsg->pListNext; + pMsg->pListNext = NULL; + + MT_MSG_free(pMsg); + } + + if(pML->sem) + { + SEMAPHORE_destroy(pML->sem); + pML->sem = 0; + } + + if(pML->dbg_name) + { + free_const((const void *)(pML->dbg_name)); + pML->dbg_name = NULL; + } + + memset((void *)(pML), 0, sizeof(*pML)); + +} + +/* + Transmit this message, and if needed receive the srsp reply + see mt_msg.h +*/ +int MT_MSG_txrx(struct mt_msg *pMsg) +{ + int r; + struct mt_msg_interface *pMI; + + /* get our destination interface */ + pMI = pMsg->pDestIface; + + /* do not transmit 2 messages at the same time */ + r = MUTEX_lock(pMI->tx_lock, pMI->tx_lock_timeout); + if(r != 0) + { + LOG_printf(LOG_ERROR, "%s: Interface lock timeout\n", pMI->dbg_name); + MT_MSG_log(LOG_ERROR, pMsg, "Interface lock timeout\n"); + /* we transmitted zero messages */ + return (0); + } + + /* We have no response yet */ + pMsg->pSrsp = NULL; + + MT_MSG_set_type(pMsg, pMI); + + if(pMsg->m_type == MT_MSG_TYPE_unknown) + { + BUG_HERE("unknown msg type\n"); + } + + /* we are about to send an SREQ */ + if(pMI->pCurSreq) + { + /* There should *not* be any pending + * or left over SREQ from before... + * if there is one, it is a bug. */ + BUG_HERE("interface: %s, has a pending SREQ!\n", pMI->dbg_name); + } + + /* this is our pending SREQ... */ + pMI->pCurSreq = pMsg; + /* send our message */ + r = MT_MSG_tx(pMsg); + + /* could we send it? */ + if(r != 1) + { + MT_MSG_log(LOG_ERROR, + pMsg, + "Cannot transmit, result: %d (expected: 1)\n", r); + + /* No, ... cleanup */ + /* we have nothing pending any more. */ + pMI->pCurSreq = NULL; + pMsg->is_error = true; + /* did not transmit and did not receive */ + r = 0; + goto done; + } + + /* we transmitted, so our result so far is 1. */ + r = 1; + /* is this a command expecting a response? */ + if(pMsg->m_type != MT_MSG_TYPE_sreq) + { + /* we have nothing pending any more. */ + pMI->pCurSreq = NULL; + } + else + { + /* wait for the response... */ + SEMAPHORE_waitWithTimeout(pMI->srsp_semaphore, pMI->srsp_timeout_mSecs); + /* clear the SREQ */ + pMI->pCurSreq = NULL; + /* Did we get our answer? */ + if(pMsg->pSrsp) + { + /* Yea!! Success! */ + /* we received +1 */ + r = r + 1; + /* --- Total =2 */ + } + } +done: + MUTEX_unLock(pMI->tx_lock); + return (r); +} + +/* + mark this cmd0 byte as a poll. + Public function mt_msg.h +*/ +uint8_t MT_MSG_cmd0_poll(int cmd0) +{ + return ((0 << 5) | _bitsXYof(cmd0, 4, 0)); +} + +/* + mark this cmd0 byte as sreq + Public function mt_msg.h +*/ +uint8_t MT_MSG_cmd0_sreq(int cmd0) +{ + return ((1 << 5) | _bitsXYof(cmd0, 4, 0)); +} + +/* + mark this cmd0 byte as an areq + Public function mt_msg.h +*/ +uint8_t MT_MSG_cmd0_areq(int cmd0) +{ + return ((2 << 5) | _bitsXYof(cmd0, 4, 0)); +} + +/* + mark this cmd0 byte as an srsp + Public function mt_msg.h +*/ +uint8_t MT_MSG_cmd0_srsp(int cmd0) +{ + return ((3 << 5) | _bitsXYof(cmd0, 4, 0)); +} + +/* + Set the destination interface + Public function in mt_msg.h +*/ +void MT_MSG_setDestIface(struct mt_msg *pMsg, struct mt_msg_interface *pIface) +{ + pMsg->pDestIface = pIface; + /* once the destination interface is known */ + /* we can initialize the write index. */ + init_wr_idx(pMsg); +} + +/* + Set the source interface + Public function in mt_msg.h +*/ +void MT_MSG_setSrcIface(struct mt_msg *pMsg, struct mt_msg_interface *pIface) +{ + pMsg->pSrcIface = pIface; +} + +/* + Reset so we can reuse the message + Public function mt_msg.h +*/ +void MT_MSG_reset(struct mt_msg_interface *pIface, int type) +{ + struct mt_msg *pMsg; + int r; + + /* allocate the message */ + pMsg = MT_MSG_alloc(1, 0x21, 0x01); + if(pMsg == NULL) + { + return; + } + + pMsg->pLogPrefix = "reset-cmd"; + + MT_MSG_setDestIface(pMsg, pIface); + /* set type */ + MT_MSG_wrU8(pMsg, (uint8_t)(type)); + + /* send & receive */ + r = MT_MSG_txrx(pMsg); + (void)r; + /* done */ + MT_MSG_free(pMsg); +} + +/*! + * @brief internal function to get an address from the device. + * @param pMI - the interface + * @param typecode - the type of address to get + * @param result - where to put it + * + * @return 2 (txmsg + rxmsg = 2 total msgs) on success + */ +static int get_extAddr(struct mt_msg_interface *pMI, + int typecode, + uint8_t *result) +{ + struct mt_msg *pMsg; + struct mt_msg *pReply; + int r; + int x; + int v; + + /* not requested so we are done */ + if(result == NULL) + { + return (0); + } + + *result = 0; + + /* allocate message */ + pMsg = MT_MSG_alloc(1, 0x27, 0xee); + if(!pMsg) + { + return (0); + } + pMsg->pLogPrefix = "get-ext-addr"; + MT_MSG_setDestIface(pMsg, pMI); + + pMsg->pLogPrefix = "get-ext-addr"; + /* specify what we want */ + MT_MSG_wrU8(pMsg, (uint8_t)(typecode)); + + /* get the result */ + r = MT_MSG_txrx(pMsg); + + /* did we transfer 2 messages? */ + if(r == 2) + { + pReply = pMsg->pSrsp; + /* Good, decode result */ + /* get type */ + v = MT_MSG_rdU8(pReply); + if(v != typecode) + { + /* something is wrong */ + MT_MSG_log(LOG_ERROR, pReply, + "Invalid ext-addr type code: 0x%02x\n", + (unsigned)(v)); + } + for( x = 0 ; x < 8 ; x++){ + result[x] = MT_MSG_rdU8(pReply); + } + + /* check at end */ + MT_MSG_parseComplete(pReply); + if(pReply->is_error) + { + MT_MSG_log(LOG_ERROR, pReply, "Get ExtFailed\n"); + r = 0; + } + else + { + /* success! */ + } + } + MT_MSG_free(pMsg); + return (r); +} + +/* + Get an any number of addresses from the device + Public function in mt_msg.h +*/ +int MT_MSG_getExtAddress(struct mt_msg_interface *pIface, + uint8_t *pib, + uint8_t *primary, + uint8_t *usr_cfg) +{ + int r; + r = 0; + r += get_extAddr(pIface, 0, pib); + r += get_extAddr(pIface, 1, primary); + r += get_extAddr(pIface, 2, usr_cfg); + return (r); +} + +/* + Request software version of the device + Public function in mt_msg.h +*/ +int MT_MSG_getVersion(struct mt_msg_interface *pIface, + struct mt_version_info *pInfo) +{ + struct mt_msg *pMsg; + int r; + + if(pInfo) + { + memset((void *)(pInfo), 0, sizeof(*pInfo)); + } + pMsg = MT_MSG_alloc(0, 0x21, 0x02); + if(!pMsg) + { + return (0); + } + pMsg->pLogPrefix = "get-version"; + MT_MSG_setDestIface(pMsg, pIface); + pMsg->pLogPrefix = "get-version"; + /* no data */ + if(pInfo) + { + memset((void *)(pInfo), 0, sizeof(*pInfo)); + } + r = MT_MSG_txrx(pMsg); + if(r != 2) + { + MT_MSG_free(pMsg); + pMsg = NULL; + return (r); + } + + if(pInfo) + { + pInfo->transport = MT_MSG_rdU8(pMsg->pSrsp); + pInfo->product = MT_MSG_rdU8(pMsg->pSrsp); + pInfo->major = MT_MSG_rdU8(pMsg->pSrsp); + pInfo->minor = MT_MSG_rdU8(pMsg->pSrsp); + pInfo->maint = MT_MSG_rdU8(pMsg->pSrsp); + MT_MSG_parseComplete(pMsg->pSrsp); + + if(pMsg->pSrsp->is_error) + { + /* we did not properly transfer 2 messages */ + r = 0; + memset((void *)(pInfo), 0, sizeof(*pInfo)); + } + } + MT_MSG_free(pMsg); + return (r); +} + +/* + Perform a loop back test with the device + Public function defined in mt_msg.h +*/ +int MT_MSG_loopback(struct mt_msg_interface *pIface, int repeatCount, + uint32_t mSec_rate, size_t length, const uint8_t *pPayload) + +{ + const uint8_t *pReply; + struct mt_msg *pMsg; + int r; + int x; + + pMsg = MT_MSG_alloc(1 + 4 + ((int)length), 0x27, 0x10); + if(pMsg == NULL) + { + return (0); + } + pMsg->pLogPrefix = "loopback"; + MT_MSG_setDestIface(pMsg, pIface); + MT_MSG_wrU8(pMsg, repeatCount); + MT_MSG_wrU32(pMsg, mSec_rate); + MT_MSG_wrBuf(pMsg, pPayload, length); + + r = MT_MSG_txrx(pMsg); + if(r == 2) + { + /* we got our reply! */ + /* we don't care about the N repeats */ + MT_MSG_rdU8(pMsg->pSrsp); + /* we don't care about the time */ + MT_MSG_rdU32(pMsg->pSrsp); + pReply = &(pMsg->pSrsp->iobuf[pMsg->pSrsp->iobuf_idx]); + MT_MSG_rdBuf(pMsg->pSrsp, NULL, length); + MT_MSG_parseComplete(pMsg->pSrsp); + + if(pMsg->is_error) + { + /* no sense in comparing the data, something is wrong */ + r = 0; /* fail */ + } + else + { + /* compare the data */ + x = memcmp(pReply, pPayload, length); + if(x != 0) + { + MT_MSG_log(LOG_ERROR, + pMsg->pSrsp, + "loop back data does not match\n"); + r = 0; /* fail */ + } + } + } + MT_MSG_free(pMsg); + return (r); +} + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ diff --git a/components/api/src/mt_msg_dbg_core.c b/components/api/src/mt_msg_dbg_core.c new file mode 100644 index 0000000..2c425a0 --- /dev/null +++ b/components/api/src/mt_msg_dbg_core.c @@ -0,0 +1,266 @@ +/****************************************************************************** + @file mt_msg_dbg_core.c + + @brief TIMAC 2.0 mt msg - debug decoder. + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +#include "compiler.h" +#include "mt_msg.h" +#include "mt_msg_dbg.h" +#include "log.h" +#include "mutex.h" +#include "threads.h" +#include "stream.h" +#include "stream_socket.h" +#include "stream_uart.h" +#include "timer.h" +#include "ti_semaphore.h" +#include "fatal.h" + +#include +#include +#include + +struct mt_msg_dbg *ALL_MT_MSG_DBG; + +static void print_field(struct mt_msg_dbg_info *pV) +{ + uint32_t v, a, b, c, d; + int n, x; + + /* handle ... array of bytes type */ + n = -1; + if (IS_FIELDTYPE_BYTES_N(pV->m_pCurField->m_fieldtype)) + { + n = pV->m_pCurField->m_fieldtype - FIELDTYPE_BYTES_N(0); + } + if (IS_FIELDTYPE_MAXBYTES(pV->m_pCurField->m_fieldtype)) + { + n = pV->m_pCurField->m_fieldtype - FIELDTYPE_MAXBYTES(0); + x = (pV->m_idx_end - pV->m_idx_cursor); + if( n > x ) + { + n = x; + } + } + + if( n >= 0 ) + { + LOG_printf(LOG_ALWAYS, "%s: DBG: %s Byte: %2d | %s = ", + pV->m_pIface->dbg_name, + pV->m_pDbg->m_pktName, + pV->m_idx_cursor, + pV->m_pCurField->m_name); + for (a = 0; ((int)a) < n; a++ ) + { + LOG_printf(LOG_ALWAYS, "%02x ", + (unsigned)(pV->m_pMsg->iobuf[pV->m_idx_cursor + a])); + } + LOG_printf(LOG_ALWAYS, "\n"); + return; + } + + a = b = c = d = v = 0; + LOG_printf(LOG_ALWAYS, "%s: DBG: %s Byte: %2d | %s = ", + pV->m_pIface->dbg_name, + pV->m_pDbg->m_pktName, + pV->m_idx_cursor, + pV->m_pCurField->m_name); + + switch( pV->m_pCurField->m_fieldtype ){ + default: + BUG_HERE("unknown field type? %d\n", pV->m_pCurField->m_fieldtype); + break; + case FIELDTYPE_U8: + a = pV->m_pMsg->iobuf[pV->m_idx_cursor + 0]; + LOG_printf(LOG_ALWAYS, "% 3d (0x%02x)\n", (int)(a), (unsigned)(a)); + pV->m_idx_cursor += 1; + break; + case FIELDTYPE_U16: + a = pV->m_pMsg->iobuf[pV->m_idx_cursor + 0]; + b = pV->m_pMsg->iobuf[pV->m_idx_cursor + 1]; + a = a + (b << 8); + LOG_printf(LOG_ALWAYS, "0x%04x\n", (unsigned)(a)); + pV->m_idx_cursor += 2; + break; + case FIELDTYPE_U32: + a = pV->m_pMsg->iobuf[pV->m_idx_cursor + 0]; + b = pV->m_pMsg->iobuf[pV->m_idx_cursor + 1]; + c = pV->m_pMsg->iobuf[pV->m_idx_cursor + 2]; + d = pV->m_pMsg->iobuf[pV->m_idx_cursor + 3]; + a = a + (b << 8) + (c << 16) + (d << 24); + LOG_printf(LOG_ALWAYS, "0x%08x\n", + (unsigned)(a)); + pV->m_idx_cursor += 4; + break; + } +} + +/* + Decode & log a message for debug purposes + + Public function in mt_msg.h + */ +void MT_MSG_dbg_decode(struct mt_msg *pMsg, + struct mt_msg_interface *pIface, + struct mt_msg_dbg *pDbg) +{ + struct mt_msg_dbg_info v; + int m; + + if( pDbg == NULL ) + { + /* We have no dbg info... so leave */ + return; + } + /* if not enabled leave */ + if( !LOG_test(LOG_DBG_MT_MSG_decode) ){ + return; + } + + + memset((void *)(&v), 0, sizeof(v)); + v.m_pMsg = pMsg; + v.m_pIface = pIface; + + /* where is the data portion? */ + v.m_idx_start = 0; + /* go past header */ + if (v.m_pIface->frame_sync) + { + v.m_idx_start += 1; + } + + if (v.m_pIface->len_2bytes) + { + v.m_idx_start += 2; + } + else + { + v.m_idx_start += 1; + } + /* cmd0/cmd1 */ + v.m_idx_start += 2; + v.m_idx_end = v.m_idx_start + v.m_pMsg->expected_len; + + /* setup cur */ + v.m_idx_cursor = v.m_idx_start; + + v.m_pDbg= pDbg; + while(v.m_pDbg) + { + m = 1; + if ( v.m_pDbg->m_cmd0 == -1) + { + /* -1 = match all */ + } else if( v.m_pMsg->cmd0 != v.m_pDbg->m_cmd0 ) + { + m = 0; + } + + if (v.m_pDbg->m_cmd1 == -1) + { + /* -1 = match all */ + } + else if (v.m_pMsg->cmd1 != v.m_pDbg->m_cmd1) + { + m = 0; + } + + if( m ) + { + break; + } + v.m_pDbg = v.m_pDbg->m_pNext; + } + + if (v.m_pDbg == NULL) + { + LOG_printf(LOG_ALWAYS, + "%s: DBG: Unknown msg: 0x%02x 0x%02x\n", + v.m_pIface->dbg_name, + v.m_pMsg->cmd0, v.m_pMsg->cmd1); + return; + } + + if (v.m_pDbg->m_pktName) + { + LOG_printf(LOG_ALWAYS, "%s: DBG: %s\n", + v.m_pIface->dbg_name, v.m_pDbg->m_pktName); + } + + /* could be this msg has fields */ + v.m_pCurField = v.m_pDbg->m_pFields; + if (v.m_pCurField == NULL) + { + /* no fields, no data */ + if (v.m_pMsg->expected_len) + { + LOG_printf(LOG_ALWAYS, "%s: msg-len: %d no detail availabe\n", + v.m_pIface->dbg_name, v.m_pMsg->expected_len); + } + return; + } + + while (v.m_pCurField) + { + print_field(&v); + v.m_pCurField = v.m_pCurField->m_pNext; + } + LOG_printf(LOG_ALWAYS,"%s: DBG %s: end\n", + v.m_pIface->dbg_name, v.m_pDbg->m_pktName); +} + + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ diff --git a/components/api/src/mt_msg_dbg_load.c b/components/api/src/mt_msg_dbg_load.c new file mode 100644 index 0000000..21cf433 --- /dev/null +++ b/components/api/src/mt_msg_dbg_load.c @@ -0,0 +1,465 @@ +/****************************************************************************** + @file mt_msg_dbg_load.c + + @brief TIMAC 2.0 mt msg - debug decoder config file parser. + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +#include "compiler.h" +#include "mt_msg.h" +#include "mt_msg_dbg.h" +#include "log.h" +#include "mutex.h" +#include "threads.h" +#include "stream.h" +#include "stream_socket.h" +#include "stream_uart.h" +#include "timer.h" +#include "ti_semaphore.h" +#include "fatal.h" + +#include +#include +#include +#include + +struct dbg_load_info; +typedef int parse_func_t(struct dbg_load_info *pDLI); + +struct dbg_load_info { + intptr_t m_handle; + int m_is_error; + const char *m_filename; + char m_buf[100]; + int m_lineno; + int m_arg_count; + int m_arg_idx; + char *m_argv[100]; + parse_func_t *pCurParseFunc; + struct mt_msg_dbg *m_pAllMsgs; +}; + +/* forward decloration */ +static int parse_state_no_msg(struct dbg_load_info *pDLI); + +/* like perl chomp() remove any/all trailing \r\n */ +static void my_chomp(char *orig_cp) +{ + char *cp; + cp = strchr(orig_cp, '\n'); + if (cp) + { + *cp = 0; + } + cp = strchr(orig_cp, '\r'); + if (cp) + { + *cp = 0; + } +} + +/* Remove leading & trailing white space from a string*/ +static void my_strtrim(char *orig_cp) +{ + char *cp; + + cp = orig_cp; + /* leading white space */ + while (*cp) + { + if (isspace(*cp)) + { + memmove(cp, cp + 1, strlen(cp + 1) + 1); + continue; + } + else + { + break; + } + } + + /* trailing white space */ + while (*orig_cp) + { + cp = strchr(orig_cp, 0); + cp--; + if (isspace(*cp)) + { + *cp = 0; + continue; + } + else + { + break; + } + } +} + +/* Read next line from the stream */ +static int next_line( struct dbg_load_info *pDLI ) +{ + char *cp; + + pDLI->m_arg_count = 0; + pDLI->m_arg_idx = 0; + pDLI->m_argv[0] = NULL; + + cp = STREAM_fgets(pDLI->m_buf, sizeof(pDLI->m_buf), pDLI->m_handle); + if( cp == NULL ) + { + return EOF; + } + + pDLI->m_lineno++; + my_chomp(pDLI->m_buf); + my_strtrim(pDLI->m_buf); + /* comments? */ + if (pDLI->m_buf[0] == ';') + { + pDLI->m_buf[0] = 0; + return 0; + } + if (pDLI->m_buf[0] == '#' ) + { + pDLI->m_buf[0] = 0; + return 0; + } + + if( (pDLI->m_buf[0] == '/') && (pDLI->m_buf[1] == '/') ) + { + pDLI->m_buf[0] = 0; + return 0; + } + + cp = pDLI->m_buf; + + /* tokenize */ + for (;;) + { + pDLI->m_argv[pDLI->m_arg_count] = strtok(cp, " \t"); + cp = NULL; + if (pDLI->m_argv[pDLI->m_arg_count]) + { + pDLI->m_arg_count++; + continue; + } + else + { + break; + } + } + + return 0; +} + +/* print and record an error */ +static void do_error( struct dbg_load_info *pDLI, const char *fmt, ... ) +{ + va_list ap; + pDLI->m_is_error = 1; + LOG_printf(LOG_ERROR, "%s:%d: ", pDLI->m_filename, pDLI->m_lineno); + va_start(ap, fmt); + LOG_vprintf(LOG_ERROR, fmt, ap); + va_end(ap); +} + +/* strdup the arg as a string */ +static const char *arg_str(struct dbg_load_info *pDLI) +{ + const char *cp; + + cp = pDLI ->m_argv[pDLI->m_arg_idx]; + if( cp==NULL ) + { + do_error(pDLI, "missing parameter\n"); + return NULL; + } + cp = strdup(cp); + if( cp == NULL ) + { + do_error(pDLI, "no memory\n"); + } + pDLI->m_arg_idx += 1; + return cp; +} + +/* arg should be an long */ +static long arg_long(struct dbg_load_info *pDLI) +{ + long r; + const char *cp; + char *ep; + + cp = pDLI->m_argv[pDLI->m_arg_idx]; + pDLI->m_arg_idx++; + if( cp == NULL ) + { + do_error(pDLI, "Missing parameter\n"); + return 0; + } + r = strtol(cp, &ep, 0); + if( (cp !=ep ) && (*ep == 0) ) + { + return r; + } + do_error(pDLI, "not a number: %s\n",cp); + return 0; +} + + +/* arg should be a u8 value */ +static int arg_u8(struct dbg_load_info *pDLI) +{ + int r; + r = arg_long(pDLI); + if ((r < 0) || (r > 255)) + { + do_error(pDLI, "invalid range\n"); + } + return r; +} + +#if 0 /* not used remove warning. */ +static int arg_u16(struct dbg_load_info *pDLI) +{ + int r; + r = arg_long(pDLI); + if ((r < 0) || (r > 65535)) + { + do_error(pDLI, "invalid range\n"); + } + return r; +} +#endif + +/* state function used when parsing fields */ +static int parse_fields(struct dbg_load_info *pDLI) +{ + struct mt_msg_dbg_field *pF; + struct mt_msg_dbg_field **ppF; + + /* field syntax: + ** u8 NAME + ** u16 NAME + ** u32 name + ** bytes name COUNT + ** end + */ + + if (0 == strcmp("end", pDLI->m_argv[0])) + { + pDLI->pCurParseFunc = parse_state_no_msg; + return 0; + } + pF = (struct mt_msg_dbg_field *)calloc(1, sizeof(*pF)); + if (pF == NULL) + { + do_error(pDLI, "no memory\n"); + return -1; + } + + /* insert at end */ + ppF = &(pDLI->m_pAllMsgs->m_pFields); + while( *ppF ) + { + ppF = &((*ppF)->m_pNext); + } + *ppF = pF; + + /* handle field name first*/ + pDLI->m_arg_idx++; + pF->m_name = arg_str(pDLI); + + if (0 == strcmp("u8", pDLI->m_argv[0])) + { + pF->m_fieldtype = FIELDTYPE_U8; + return 0; + } + if (0 == strcmp("u16", pDLI->m_argv[0])) + { + pF->m_fieldtype = FIELDTYPE_U16; + return 0; + } + if (0 == strcmp("u32", pDLI->m_argv[0])) + { + pF->m_fieldtype = FIELDTYPE_U32; + return 0; + } + if (0 == strcmp("bytes", pDLI->m_argv[0])) + { + pF->m_fieldtype = FIELDTYPE_BYTES_N(0); + pF->m_fieldtype += arg_long(pDLI); + return 0; + } + if (0 == strcmp("max-bytes", pDLI->m_argv[0])) + { + pF->m_fieldtype = FIELDTYPE_MAXBYTES(0); + pF->m_fieldtype += arg_long(pDLI); + return 0; + } + + do_error(pDLI, "unknown: %s\n", pDLI->m_argv[0]); + return -1; +} + +/* parse state function when not-parsing fields */ +static int parse_state_no_msg(struct dbg_load_info *pDLI) +{ + struct mt_msg_dbg *p; + int t; + + t = 0; + if (0 == strcmp(pDLI->m_argv[0], "simple-msg")) + { + t = 1; + } + if (0 == strcmp(pDLI->m_argv[0], "complex-msg")) + { + pDLI->pCurParseFunc = parse_fields; + t = 1; + } + if (t == 0) + { + do_error(pDLI, "unknown: %s\n", pDLI->m_argv[0]); + return -1; + } + + pDLI->m_arg_idx = 1; + p = (struct mt_msg_dbg *)calloc(1, sizeof(*p)); + if( p == NULL ) + { + BUG_HERE("no memory\n"); + } + p->m_pktName = arg_str(pDLI); + p->m_cmd0 = arg_u8(pDLI); + p->m_cmd1 = arg_u8(pDLI); + + p->m_pNext = pDLI->m_pAllMsgs; + pDLI->m_pAllMsgs = p; + return 0; +} + + +/* public function, this loads(parses) a message definition file */ +struct mt_msg_dbg *MT_MSG_dbg_load(const char *filename) +{ + struct dbg_load_info dli; + + memset((void *)(&dli), 0, sizeof(dli)); + + dli.m_filename = filename; + dli.m_handle = STREAM_createRdFile(filename); + if (dli.m_handle == 0) + { + return NULL; + } + + dli.pCurParseFunc = parse_state_no_msg; + while( next_line( &dli ) != EOF ) + { + if( dli.m_arg_count == 0 ) + { + continue; + } + if (dli.pCurParseFunc(&dli) == -1) + { + break; + } + } + STREAM_close(dli.m_handle); + if (dli.m_is_error) + { + /* yes this is a leak but this is debug code */ + MT_MSG_dbg_free(dli.m_pAllMsgs); + return NULL; + } + return dli.m_pAllMsgs; +} + +/* free a debug message */ +static void do_free(struct mt_msg_dbg *pDbg) +{ + struct mt_msg_dbg_field *pF; + + /* Free each field */ + while(pDbg->m_pFields) + { + pF = pDbg->m_pFields; + pDbg->m_pFields = pF->m_pNext; + free( (void *)(pF->m_name) ); + free(pF); + } + /* the packet name */ + free( (void *)(pDbg->m_pktName) ); + /* finally the packet */ + free(pDbg); +} + +void MT_MSG_dbg_free(struct mt_msg_dbg *pMsgs) +{ + struct mt_msg_dbg *pNext; + + /* walk list, freeing messages */ + while (pMsgs) + { + /* de-link */ + pNext = pMsgs->m_pNext; + pMsgs->m_pNext = NULL; + /* free */ + do_free(pMsgs); + /* next */ + pMsgs = pNext; + } +} + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ diff --git a/components/api/src/mt_msg_ini.c b/components/api/src/mt_msg_ini.c new file mode 100644 index 0000000..71c0ab6 --- /dev/null +++ b/components/api/src/mt_msg_ini.c @@ -0,0 +1,175 @@ +/****************************************************************************** + @file mt_msg_ini.c + + @brief TIMAC 2.0 API parse interface config from ini file + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +/****************************************************************************** + Includes +*****************************************************************************/ + +#include "compiler.h" +#include "mt_msg.h" +#include "ini_file.h" + +#include "log.h" + +#include +#include +#include + +/****************************************************************************** + Functions +*****************************************************************************/ + +/* + Parse elements from an INI file for a message interface. + + Public function defined in mt_msg.h +*/ +int MT_MSG_INI_settings(struct ini_parser *pINI, + bool *handled, + struct mt_msg_interface *pMI) +{ + int *iptr; + bool *bptr; + + iptr = NULL; + bptr = NULL; + + if(pINI->item_name == NULL) + { + return (0); + } + + if(INI_itemMatches(pINI, NULL, "include-chksum")) + { + bptr = &(pMI->include_chksum); + bgood: + *bptr = INI_valueAsBool(pINI); + *handled = true; + return (0); + } + + if( INI_itemMatches(pINI, NULL, "startup-flush") ){ + bptr = &(pMI->startup_flush); + goto bgood; + } + + if(INI_itemMatches(pINI, NULL, "frame-sync")) + { + bptr = &(pMI->frame_sync); + goto bgood; + } + + if(INI_itemMatches(pINI, NULL, "fragmentation-size")) + { + iptr = &(pMI->tx_frag_size); + igood: + *iptr = INI_valueAsInt(pINI); + *handled = true; + return (0); + } + + if(INI_itemMatches(pINI, NULL, "retry-max")) + { + iptr = &(pMI->retry_max); + goto igood; + } + + if(INI_itemMatches(pINI, NULL, "fragmentation-timeout-msecs")) + { + iptr = &(pMI->frag_timeout_mSecs); + goto igood; + } + + if(INI_itemMatches(pINI, NULL, "intersymbol-timeout-msecs")) + { + iptr = &(pMI->intersymbol_timeout_mSecs); + goto igood; + } + + if(INI_itemMatches(pINI, NULL, "srsp-timeout-msecs")) + { + iptr = &(pMI->srsp_timeout_mSecs); + goto igood; + } + + if(INI_itemMatches(pINI, NULL, "intermsg-timeout-msecs")) + { + iptr = &(pMI->intermsg_timeout_mSecs); + goto igood; + } + + if(INI_itemMatches(pINI, NULL, "flush-timeout-msecs")) + { + iptr = &(pMI->flush_timeout_mSecs); + goto igood; + } + + if(INI_itemMatches(pINI, NULL, "len-2bytes")) + { + bptr = &pMI->len_2bytes; + goto bgood; + } + + if(INI_itemMatches(pINI, NULL, "tx-lock-timeout")) + { + iptr = &(pMI->tx_lock_timeout); + goto igood; + } + return (0); +} + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ diff --git a/components/common/Makefile b/components/common/Makefile new file mode 100644 index 0000000..0b21580 --- /dev/null +++ b/components/common/Makefile @@ -0,0 +1,96 @@ +############################################################# +# @file Makefile +# +# @brief TIMAC 2.0 Common Library Makefile +# +# Group: WCS LPC +# $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ +# +############################################################# +# $License: BSD3 2016 $ +# +# Copyright (c) 2015, Texas Instruments Incorporated +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# * Neither the name of Texas Instruments Incorporated nor the names of +# its contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +############################################################# +# $Release Name: TI-15.4Stack Linux x64 SDK$ +# $Release Date: July 14, 2016 (2.00.00.30)$ +############################################################# + +# By default, we make the library file +_default: _libfile + +# basic boiler plate makefile stuff +include ../../scripts/front_matter.mak + +# What is the name of our library? +LIB_NAME=common + + +C_SOURCES_linux += linux/linux_specific.c +C_SOURCES_linux += linux/linux_uart.c + +C_SOURCES_generic += src/debug_helpers.c +C_SOURCES_generic += src/fatal.c +C_SOURCES_generic += src/fifo.c +C_SOURCES_generic += src/hexline.c +C_SOURCES_generic += src/ini_file.c +C_SOURCES_generic += src/log.c +C_SOURCES_generic += src/log_ini.c +C_SOURCES_generic += src/mutex.c +C_SOURCES_generic += src/rand_data.c +C_SOURCES_generic += src/stream_common.c +C_SOURCES_generic += src/stream_file.c +C_SOURCES_generic += src/stream_mem.c +C_SOURCES_generic += src/stream_socket_client.c +C_SOURCES_generic += src/stream_socket_ini.c +C_SOURCES_generic += src/stream_socket_private.c +C_SOURCES_generic += src/stream_socket_server.c +C_SOURCES_generic += src/stream_uart_ini.c +C_SOURCES_generic += src/threads.c +C_SOURCES_generic += src/timer.c +C_SOURCES_generic += src/timer_cb.c +C_SOURCES_generic += src/ti_semaphore.c +C_SOURCES_generic += src/unix_fdrw.c + +C_SOURCES += ${C_SOURCES_linux} +C_SOURCES += ${C_SOURCES_generic} + + +# And include the final library portion +include ../../scripts/library.mak + +# ======================================== +# Texas Instruments Micro Controller Style +# ======================================== +# Local Variables: +# mode: makefile-gmake +# End: +# vim:set filetype=make + diff --git a/components/common/inc/bitsnbits.h b/components/common/inc/bitsnbits.h new file mode 100644 index 0000000..6ca6bbd --- /dev/null +++ b/components/common/inc/bitsnbits.h @@ -0,0 +1,195 @@ +/****************************************************************************** + @file bitsnbits.h + + @brief TIMAC 2.0 API bitsnbits - bit numbers, K & M values, bit manipulation + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +#if !defined(bitsnbits_h) +#define bitsnbits_h + +/*! + * @file bitsnbits.h + * + * @brief - Various BIT definitions and power of 2 value definitions. + */ + +#define _bitN(N) (1ULL << (N)) + +#define _bit0 _bitN(0) +#define _bit1 _bitN(1) +#define _bit2 _bitN(2) +#define _bit3 _bitN(3) +#define _bit4 _bitN(4) +#define _bit5 _bitN(5) +#define _bit6 _bitN(6) +#define _bit7 _bitN(7) +#define _bit8 _bitN(8) +#define _bit9 _bitN(9) +#define _bit10 _bitN(10) +#define _bit11 _bitN(11) +#define _bit12 _bitN(12) +#define _bit13 _bitN(13) +#define _bit14 _bitN(14) +#define _bit15 _bitN(15) +#define _bit16 _bitN(16) +#define _bit17 _bitN(17) +#define _bit18 _bitN(18) +#define _bit19 _bitN(19) +#define _bit20 _bitN(20) +#define _bit21 _bitN(21) +#define _bit22 _bitN(22) +#define _bit23 _bitN(23) +#define _bit24 _bitN(24) +#define _bit25 _bitN(25) +#define _bit26 _bitN(26) +#define _bit27 _bitN(27) +#define _bit28 _bitN(28) +#define _bit29 _bitN(29) +#define _bit30 _bitN(30) +#define _bit31 _bitN(31) +#define _bit32 _bitN(32) +#define _bit33 _bitN(33) +#define _bit34 _bitN(34) +#define _bit35 _bitN(35) +#define _bit36 _bitN(36) +#define _bit37 _bitN(37) +#define _bit38 _bitN(38) +#define _bit39 _bitN(39) +#define _bit40 _bitN(40) +#define _bit41 _bitN(41) +#define _bit42 _bitN(42) +#define _bit43 _bitN(43) +#define _bit44 _bitN(44) +#define _bit45 _bitN(45) +#define _bit46 _bitN(46) +#define _bit47 _bitN(47) +#define _bit48 _bitN(48) +#define _bit49 _bitN(49) +#define _bit50 _bitN(50) +#define _bit51 _bitN(51) +#define _bit52 _bitN(52) +#define _bit53 _bitN(53) +#define _bit54 _bitN(54) +#define _bit55 _bitN(55) +#define _bit56 _bitN(56) +#define _bit57 _bitN(57) +#define _bit58 _bitN(58) +#define _bit59 _bitN(59) +#define _bit60 _bitN(60) +#define _bit61 _bitN(61) +#define _bit62 _bitN(62) +#define _bit63 _bitN(63) + +#define __nK(n) ((n) * 1024) +#define __1K __nK(1) +#define __2K __nK(2) +#define __4K __nK(4) +#define __8K __nK(8) +#define __16K __nK(16) +#define __32K __nK(32) +#define __64K __nK(64) +#define __128K __nK(128) +#define __256K __nK(256) +#define __512K __nK(512) +#define __1024K __nK(1024) +#define __2048K __nK(2048) +#define __4096K __nK(4096) + +#define __nM(n) ((n) * __1K * __1K) +#define __1M __nM(1) +#define __2M __nM(2) +#define __4M __nM(4) +#define __8M __nM(8) +#define __16M __nM(16) +#define __32M __nM(32) +#define __64M __nM(64) +#define __128M __nM(128) +#define __256M __nM(256) +#define __512M __nM(512) +#define __1024M __nM(1024) +#define __2048M __nM(2048) +/* _4096M - skip, it is 4gig, bigger then 32bits */ + +#define __nG(n) ((n) * __1M * __1K) +#define __1G __nG(1) +#define __2G __nG(2) +#define __3G __nG(3) +/* we don't do 4G, because that is just beyond 32bits */ + +/* @brief Is bit N set in this VALUE */ +#define _bit_IsSet(VALUE, N) (!!((VALUE) & _bit(N))) + +/* @brief Is bit N clear in this VALUE */ +#define _bit_IsClr(VALUE, N) (!(_bit_IsSet(VALUE,N))) + +/* @brief Set bit N in this VALUE */ +#define _bit_Set(VALUE,N) (VALUE) |= _bitN(N) + +/* @brief Clear bit N in this VALUE */ +#define _bit_Clr(VALUE,N) (VALUE) &= (~_bitN(N)) + +/* @brief Extract bit N from this value */ +#define _bitXof(VALUE,N) (((VALUE) >> (N)) & 1) + +/* @brief Extract the bit field from [MSB:LSB] inclusive from this VALUE */ +#define _bitsXYof(VALUE,MSB,LSB) \ + (((VALUE) >> (LSB)) & ((1 << ((MSB)-(LSB)+1))-1)) + +/* @brief Is this value within the range (L =< VALUE < H) */ +#define _inrange(V,L,HPLUS1) \ + (((V) >= (L)) && ((V) < (HPLUS1))) +#endif + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ + diff --git a/components/common/inc/compiler.h b/components/common/inc/compiler.h new file mode 100644 index 0000000..5583453 --- /dev/null +++ b/components/common/inc/compiler.h @@ -0,0 +1,74 @@ +/****************************************************************************** + @file compiler.h + + @brief TIMAC 2.0 API Handle different compiler types macros, etc. + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +#if defined(__linux__) +#include "compiler_gcc.h" +#endif + +#if defined(_MSC_VER) +#include "compiler_microsoft.h" +#endif + +/* + * standard "free()" function inside a wrapper to + * elminate the '-Wcast-qual' warning for gcc. + * + * And other warnings ... from other compilers. + */ +void free_const(const void *vp); + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ diff --git a/components/common/inc/compiler_gcc.h b/components/common/inc/compiler_gcc.h new file mode 100644 index 0000000..26a4d53 --- /dev/null +++ b/components/common/inc/compiler_gcc.h @@ -0,0 +1,103 @@ +/****************************************************************************** + @file compiler_gcc.h + + @brief TIMAC 2.0 API gcc compiler specific items. + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +/* + * @def _Printf_format_string_ + * See compiler_microsoft.h + * + * This macro is used to identify a printf() + * format string, when compiling for GCC + * this macro becomes nothing and we use + * the __attribute__ instead. + * + * Syntatically Microsoft tools want the 'decoration' + * in a different place then GCC so there + * is no means to have a single macro + */ +#define _Printf_format_string_ + +/* + * @def MSVC_NO_RETURN + * see compiler_microsoft.h + * + * This macro when compiling for GCC + * becomes nothing, and we use the other + * macro GCC_NO_RETURN + * + * Syntatically Microsoft tools want the 'decoration' + * in a different place then GCC so there + * is no means to have a single macro + */ +#define MSVC_NO_RETURN + +/* + * @def GCC_NO_RETURN + * + * Mark the function as no return for GCC + * This is GCC's way of doing this + * Microsoft has another way... + */ +#define GCC_NO_RETURN __attribute((noreturn)) + +/* + * @def COMPILER_isBigEndian + * @brief Evaluates to true (non-zero) if the compiler target is big-endian. + */ +#define COMPILER_isBigEndian (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) +#define COMPILER_isLittleEndian (!COMPILER_isBigEndian) + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ diff --git a/components/common/inc/debug_helpers.h b/components/common/inc/debug_helpers.h new file mode 100644 index 0000000..98b9bcb --- /dev/null +++ b/components/common/inc/debug_helpers.h @@ -0,0 +1,279 @@ +/****************************************************************************** + @file debug_helpers.h + + @brief TIMAC 2.0 API Application Server Debug(test) thread. + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ +#if !defined(DEBUG_THREAD_H) +#define DEBUG_THREAD_H + +#include +#include + +#define DEBUG_KEY_non_ascii 0x8000 +#define DEBUG_KEY_alt_modifier 0x0100 +#define DEBUG_KEY_shift_modifier 0x0200 +#define DEBUG_KEY_ctrl_modifier 0x0400 + +#define DEBUG_KEY_u_arrow (DEBUG_KEY_non_ascii + 1) +#define DEBUG_KEY_d_arrow (DEBUG_KEY_non_ascii + 2) +#define DEBUG_KEY_l_arrow (DEBUG_KEY_non_ascii + 3) +#define DEBUG_KEY_r_arrow (DEBUG_KEY_non_ascii + 4) +#define DEBUG_KEY_pgup (DEBUG_KEY_non_ascii + 5) +#define DEBUG_KEY_pgdn (DEBUG_KEY_non_ascii + 6) +#define DEBUG_KEY_home (DEBUG_KEY_non_ascii + 7) +#define DEBUG_KEY_end (DEBUG_KEY_non_ascii + 8) +#define DEBUG_KEY_fX(X) (DEBUG_KEY_non_ascii + 0x10 + (X) /* 0x10 through 0x1f */) + +#define DEBUG_KEY_cu_arrow (DEBUG_KEY_u_arrow + DEBUG_KEY_ctrl_modifier) +#define DEBUG_KEY_cd_arrow (DEBUG_KEY_d_arrow + DEBUG_KEY_ctrl_modifier) +#define DEBUG_KEY_cl_arrow (DEBUG_KEY_l_arrow + DEBUG_KEY_ctrl_modifier) +#define DEBUG_KEY_cr_arrow (DEBUG_KEY_r_arrow + DEBUG_KEY_ctrl_modifier) + +#define DEBUG_KEY_cpgup (DEBUG_KEY_pgup + DEBUG_KEY_ctrl_modifier) +#define DEBUG_KEY_cpgdn (DEBUG_KEY_pgdn + DEBUG_KEY_ctrl_modifier) +#define DEBUG_KEY_chome (DEBUG_KEY_home + DEBUG_KEY_ctrl_modifier) +#define DEBUG_KEY_cend (DEBUG_KEY_end + DEBUG_KEY_ctrl_modifier) + +#define DEBUG_KEY_sfX(X) (DEBUG_KEY_shift_modifier + DEBUG_KEY_fX(X)) +#define DEBUG_KEY_cfX(X) (DEBUG_KEY_ctrl_modifier + DEBUG_KEY_fX(X)) +#define DEBUG_KEY_afX(X) (DEBUG_KEY_alt_modifier + DEBUG_KEY_fX(X)) + +#define DEBUG_KEY_f1 DEBUG_KEY_fX(1) /* plain function keys */ +#define DEBUG_KEY_f2 DEBUG_KEY_fX(2) +#define DEBUG_KEY_f3 DEBUG_KEY_fX(3) +#define DEBUG_KEY_f4 DEBUG_KEY_fX(4) +#define DEBUG_KEY_f5 DEBUG_KEY_fX(5) +#define DEBUG_KEY_f6 DEBUG_KEY_fX(6) +#define DEBUG_KEY_f7 DEBUG_KEY_fX(7) +#define DEBUG_KEY_f8 DEBUG_KEY_fX(8) +#define DEBUG_KEY_f9 DEBUG_KEY_fX(9) +#define DEBUG_KEY_f10 DEBUG_KEY_fX(10) +#define DEBUG_KEY_f11 DEBUG_KEY_fX(11) +#define DEBUG_KEY_f12 DEBUG_KEY_fX(12) + +#define DEBUG_KEY_sf1 DEBUG_KEY_sfX(1) /* shift function keys */ +#define DEBUG_KEY_sf2 DEBUG_KEY_sfX(2) +#define DEBUG_KEY_sf3 DEBUG_KEY_sfX(3) +#define DEBUG_KEY_sf4 DEBUG_KEY_sfX(4) +#define DEBUG_KEY_sf5 DEBUG_KEY_sfX(5) +#define DEBUG_KEY_sf6 DEBUG_KEY_sfX(6) +#define DEBUG_KEY_sf7 DEBUG_KEY_sfX(7) +#define DEBUG_KEY_sf8 DEBUG_KEY_sfX(8) +#define DEBUG_KEY_sf9 DEBUG_KEY_sfX(9) +#define DEBUG_KEY_sf10 DEBUG_KEY_sfX(10) +#define DEBUG_KEY_sf11 DEBUG_KEY_sfX(11) +#define DEBUG_KEY_sf12 DEBUG_KEY_sfX(12) + +#define DEBUG_KEY_cf1 DEBUG_KEY_cfX(1) /* control function keys */ +#define DEBUG_KEY_cf2 DEBUG_KEY_cfX(2) +#define DEBUG_KEY_cf3 DEBUG_KEY_cfX(3) +#define DEBUG_KEY_cf4 DEBUG_KEY_cfX(4) +#define DEBUG_KEY_cf5 DEBUG_KEY_cfX(5) +#define DEBUG_KEY_cf6 DEBUG_KEY_cfX(6) +#define DEBUG_KEY_cf7 DEBUG_KEY_cfX(7) +#define DEBUG_KEY_cf8 DEBUG_KEY_cfX(8) +#define DEBUG_KEY_cf9 DEBUG_KEY_cfX(9) +#define DEBUG_KEY_cf10 DEBUG_KEY_cfX(10) +#define DEBUG_KEY_cf11 DEBUG_KEY_cfX(11) +#define DEBUG_KEY_cf12 DEBUG_KEY_cfX(12) + +#define DEBUG_KEY_af1 DEBUG_KEY_afX(1) /* alt function keys */ +#define DEBUG_KEY_af2 DEBUG_KEY_afX(2) +#define DEBUG_KEY_af3 DEBUG_KEY_afX(3) +#define DEBUG_KEY_af4 DEBUG_KEY_afX(4) +#define DEBUG_KEY_af5 DEBUG_KEY_afX(5) +#define DEBUG_KEY_af6 DEBUG_KEY_afX(6) +#define DEBUG_KEY_af7 DEBUG_KEY_afX(7) +#define DEBUG_KEY_af8 DEBUG_KEY_afX(8) +#define DEBUG_KEY_af9 DEBUG_KEY_afX(9) +#define DEBUG_KEY_af10 DEBUG_KEY_afX(10) +#define DEBUG_KEY_af11 DEBUG_KEY_afX(11) +#define DEBUG_KEY_af12 DEBUG_KEY_afX(12) + +struct debug_menu_item { + const char *txt; + intptr_t cookie; + void (*handler)(const struct debug_menu_item *p, intptr_t cookie); +}; + +struct debug_getstr_info { + const char *prompt; + char *buf; + size_t buflen; + bool no_nl; + const char *defaultvalue; + int callnum; /* set to zero the first time you call get_string2 */ +}; + +struct debug_getnum_info { + const char *prompt; + int nbits; + bool is_base16; + bool is_signed; + bool default_value; + int64_t sv; + uint64_t uv; +}; + +extern intptr_t debug_thread_id; + +extern intptr_t DEBUG_thread(intptr_t cookie); + +/*! + * @brief make the console beep. + */ +extern void DEBUG_beep(void); + +/*! + * @brief printf to the debug interface. + * @param fmt - printf format string. + */ +extern void DEBUG_printf(const char *fmt, ...); + +/*! + * @brief building block for DEBUG_printf() + * @param fmt - printf format string. + * @param ap - parameter list + */ +extern void DEBUG_vprintf(const char *fmt, va_list ap); + +/*! + * @brief returntrue if a key has been pressed/waiting. + */ +extern bool DEBUG_kbhit(void); + +/*! + * @brief unget a key back, like ungetc() + * @param key - the key to unget. + */ +extern void DEBUG_ungetkey(int key); + +/*! + * @brief get key from keyboard, + * @return Returns EOF if there is no key pressed + */ +extern int DEBUG_getkey(int timeout); + +/*! + * @brief Wait for ever for a key + */ +extern int DEBUG_getkey_waitforever(void); + +/*! + * @brief get a string from user for debug reasons. + * @param str - buffer to put string + * @param len - size of string buffer. + * @return negative if the debug interface dies. + */ +extern int DEBUG_get_string(char *str, size_t len); + +/*! + * @brief fancy get string, with default value for the string + * @pInfo - fancy details to get a string (ie: Default value etc) + * @return negative if the debug interface dies. + */ +extern int DEBUG_get_string2(struct debug_getstr_info *pInfo); + +/*! + * @brief Get a number in a fancy way, defaults, etc + * @param pGni - pointer to get-number-info holding get details. + * @return negative if the debug interface dies. + */ +extern int DEBUG_getnum(struct debug_getnum_info *pGni); + +/*! + * @brief Simple ask user for an integer + * @param value - where to store value. + */ +extern int DEBUG_get_integer(int *value); + +/*! + * @get an numbre, with a prompt and a default default value + * @param prompt - user prompt + * @param value - where to store result + * @param default_value - default value + * @return negative if the debug interface dies. + */ +extern int DEBUG_get_integer2(const char *prompt, int *value, int default_value ); + +/*! + * @brief simple get a signed 64bit number + * @param value - store here + * @return negative if the debug interface dies. + */ +extern int DEBUG_get_int64(int64_t *value); + +/*! + * @brief simple get a unsigned 64bit number + * @param value - store here + * @return negative if the debug interface dies. + */ +extern int DEBUG_get_uint64(uint64_t *value); + +/*! + * @brief present user with a menu and call menu functions + * @param pMenu - null terminated list of menu items + * @param cookie - for menu callback + */ +extern void DEBUG_menu(const struct debug_menu_item *pMenu, intptr_t extra_cookie); + +/*! + * @brief handle sub menu within a menu + */ +extern void DEBUG_submenu(const struct debug_menu_item *pMenu, intptr_t extra_cookie); + +#endif + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ + diff --git a/components/common/inc/fatal.h b/components/common/inc/fatal.h new file mode 100644 index 0000000..265544d --- /dev/null +++ b/components/common/inc/fatal.h @@ -0,0 +1,97 @@ +/****************************************************************************** + @file fatal.h + + @brief TIMAC 2.0 API handle fatal errors + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +#if !defined(FATAL_H) +#define FATAL_H + +#include "compiler.h" + +/* + * OVERVIEW + * ========= + * + * These functions print (log) a message and exit the application + */ +#include + +/*! + * @brief print a message like the unix perror() function and exit + * @param msg - the message to print + * @returns - this function does not return it exits the application + * + * See: "man 3 perror" for more details behind the name "perror" + */ +void MSVC_NO_RETURN FATAL_perror(const char *msg) GCC_NO_RETURN; + +/*! + * @brief printf() a fatal error message and exit. + * @param fmt - the printf() format message + * @returns - this function does not return it exits the application + */ +void MSVC_NO_RETURN FATAL_printf(_Printf_format_string_ const char *fmt, ... ) + GCC_NO_RETURN __attribute__((format (printf,1,2))); + +/*! + * @brief FATAL_printf() building block function. + * @param fmt - the printf() format message + * @returns - this function does not return it exits the application + */ +void MSVC_NO_RETURN FATAL_vprintf(const char *fmt, va_list ap) GCC_NO_RETURN; + +#endif + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ diff --git a/components/common/inc/fifo.h b/components/common/inc/fifo.h new file mode 100644 index 0000000..60b77f0 --- /dev/null +++ b/components/common/inc/fifo.h @@ -0,0 +1,308 @@ +/****************************************************************************** + @file fifo.h + + @brief TIMAC 2.0 API generic fifo interface + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +#if !defined(FIFO_H) +#define FIFO_H + +/** ============================================================================ + * Overview + * ======== + * + * This impliments the classic FIFO data structure. + * + * ============================================================================ + */ + +#include +#include +#include + +#ifdef __cplusplus +extern "C" +{ +#endif + +/*! + * @brief create a fifo + * + * @param name - usable string for debug purposes. + * @param item_size - size of 1 item in the fifo + * @param fifo_depth - how deep (in items) is the fifo + * @param use_mutex - if true, a mutex will be allocated to protect this fifo. + * + * @return success: non-zero handle upon success. + */ +intptr_t FIFO_create(const char *name, + size_t item_size, + size_t fifo_depth, + bool use_mutex); + +/*! + * @brief Destroy a fifo + * + * @param h - handle returned by FIFO_create() + * + */ +void FIFO_destroy(intptr_t h); + +/*! + * @brief stdio library style fgetc() function for a fifo. + * + * @param h - the fifo handle returned by FIFO_create() + * + * @return EOF (when empty), or the unsigned char returned as an integer + * + * Note: This assumes the underlying item_size is 1 byte + */ +int FIFO_fgetc(intptr_t h); + +/*! + * @brief stdio library style fputc() function for a fifo. + * + * @param c - the byte to write + * @param h - the fifo handle returned by FIFO_create() + * + * @return -1 on error, or the unsigned byte cast to an integer + * + * Note: This assumes the underlying item_size is 1 byte + */ +int FIFO_fputc(int c, intptr_t h); + +/*! + * @brief How many items can be put into the FIFO? + * + * @param h - the fifo handle returned by FIFO_create() + * + * @returns negative on error(invalid handle), or 0..fifo_depth + */ +int FIFO_getSpaceAvail(intptr_t h); + +/*! + * @brief How many items are in the fifo already + * + * @param h - the fifo handle returned by FIFO_create() + * + * @returns negative on error(invalid handle), or 0..fifo_depth + */ +int FIFO_getItemsAvail(intptr_t h); + +/*! + * @brief Insert items (n) into the fifo + * + * @param h - the fifo handle returned by FIFO_create() + * @param pDdata - pointer to the data to insert + * @param cnt - number of items + * + * @returns negative on error (invalid handle), or 0..actual inserted + * + * This is equal to: FIFO_insertWithTimeout(h, pData, cnt, 0); + */ +int FIFO_insert(intptr_t h, const void *pData, size_t cnt); + +/*! + * @brief Insert items (n) into the fifo with timeout + * + * @param h - the fifo handle returned by FIFO_create() + * @param pDdata - pointer to the data to insert + * @param cnt - number of items + * @param timeout_mSecs - timeout (wait for spae) + * + * @returns negative on error (invalid handle), or 0..actual inserted + */ +int FIFO_insertWithTimeout(intptr_t h, + const void *pData, + size_t cnt, + int timeout_mSecs); + +/*! + * @brief Remove items (n) from the fifo + * + * @param h - the fifo handle returned by FIFO_create() + * @param pDdata - items will be placed herepointer to the data to insert + * @param cnt - number of items + * + * @returns negative on error (invalid handle), or 0..actual removed + * + * This is equal to: FIFO_removeWithTimeout(h, pData, cnt, 0); + */ +int FIFO_remove(intptr_t h, void *pdata, size_t cnt); + +/*! + * @brief Remove items (n) from the fifo + * + * @param h - the fifo handle returned by FIFO_create() + * @param pDdata - items will be placed herepointer to the data to insert + * @param cnt - number of items + * @param timeout_mSecs - timeout in miliseconds + * + * @returns negative on error (invalid handle), or 0..actual removed + * + */ +int FIFO_removeWithTimeout(intptr_t h, + void *pdata, + size_t cnt, + int timeout_mSecs); + +/*! + * @brief Get parameters to support zero-copy into fifo (for example DMA usage) + * + * @param h - the fifo handle returned by FIFO_create() + * @param ppData - pointer-pointer for the data transfer pointer + * @param item_count - pointer to the count of items that can be removed + * @param item_size - how big each item is + * + * @returns negative if handle is invalid. + * + * Example: + * \code + * // In the DMA start-transfer, do this: + * FIFO_insertDMA_setup(h, &pBuf, &n, &s); + * + * // Presumably a DMA hardware would do this + * nbytes = n * s; + * while(nbytes){ + * UART_putc(*pBuf); + * pBuf++; + * nbytes--; + * } + * + * // the dma end-of-transfer interrupt would do this + * FIFO_insertDMA_update(h, n); + * \endcode + */ +int FIFO_insertDMA_setup(intptr_t h, + void **pData, + size_t *item_count, + size_t *item_size); + +/*! + * @brief Called affter DMA insert operation is complete, updates the fifo + * + * @param h - the fifo handle returned by FIFO_create() + * @param actual - the actual count transfered + * + * Note: If the actual count is zero this function can be optionally skipped. + * + */ +void FIFO_insertDMA_update(intptr_t h, size_t actual); + +/*! + * @brief Get parameters to suppor zero-copy from fifo (for example DMA usage) + * + * @param h - the fifo handle returned by FIFO_create() + * @param ppData - pointer-pointer for the data transfer pointer + * @param item_count - pointer to the count of items that can be inserted + * @param item_size - how big each item is + * + * @returns negative if handle is invalid. + * + * Example: + * \code + * // In the DMA start start transfer, do this: + * FIFO_removeDMA_setup(h, &pBuf, &n, &s); + * + * // Presumably a DMA hardware would do this + * nbytes = n * s; + * while(nbytes){ + * *pBuf = UART_GetByte() + * pBuf++; + * nbytes--; + * } + * + * // the dma end-of-transfer interrupt would do this + * FIFO_insertDMA_update(h, n); + * \endcode + */ +int FIFO_removeDMA_setup(intptr_t h, + void **pData, + size_t *item_count, + size_t *item_size); + +/*! + * @brief Called affter DMA Remove operation is complete; updates the fifo + * + * @param h - the fifo handle returned by FIFO_create() + * @param actual - the actual count transfered + * + * Note: If the actual count is zero this function can be optionally skipped. + */ +void FIFO_removeDMA_update(intptr_t h, size_t actual); + +/*! + * @brief Wait for data to inserted into the fifo + * @param h - fifo handle from FIFO_create() with mutex = true + * @param mSec_timeout - how long to wait. + * @returns negative on error, 0(timeout) postive you should check the fifo. + */ +int FIFO_waitForInsert(intptr_t h, int mSec_timeout); + +/*! + * @brief Wait for data to be removed + * @param h - fifo handle from FIFO_create() with mutex = true + * @param mSec_timeout - how long to wait. + * @returns negative on error, 0(timeout) postive you should check the fifo. + */ +int FIFO_waitForRemove(intptr_t h, int mSec_timeout); + +#ifdef __cplusplus +} +#endif + +#endif + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ + diff --git a/components/common/inc/hexline.h b/components/common/inc/hexline.h new file mode 100644 index 0000000..fa1e008 --- /dev/null +++ b/components/common/inc/hexline.h @@ -0,0 +1,119 @@ +/****************************************************************************** + @file hexline.h + + @brief TIMAC 2.0 API Debug hex dump helper functions + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +#if !defined(HEXLINE_H) +#define HEXLINE_H + +#include +#include + +/*! + * @brief HEXLINE_working variables + */ +struct hexline { + /*! Address to be printed */ + uint64_t addr; + + /*! Pointer to the data to be printed */ + const void *pBytes; + + /*! How many bytes to print */ + size_t nbytes; + + /*! How many are complete */ + size_t ndone; + + /* ! Working buffer (your text will be put here) */ + char buf[90]; +}; + +/*! + * @brief Initialize a HEXLINE Working buffer + * + * @param pH - pointer to the hexline structure + * @param addr - address field initializer + * @param pBytes - pointer to the data bytes to dump + * @param nbytes - count of bytes to dump + * + */ +void HEXLINE_init(struct hexline *pH, + uint64_t addr, + const void *pBytes, + size_t nbytes); + +/*! + * @brief Format one line (up to 16 bytes) of hex dump data. + * + * @param pHexLine - structure initalized by HEXLINE_Init() + * + * Example + * \code + * + * HEXLINE_Init(&h, 0x1234000, buffer, 1000); + * + * while(h.ndone < h.nbyes){ + * HEXLINE_format(&h); + * printf("%s\n", h.buf); + * } + * \endcode + */ +void HEXLINE_format(struct hexline *pHexLine); + +#endif + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ + diff --git a/components/common/inc/hlos_specific.h b/components/common/inc/hlos_specific.h new file mode 100644 index 0000000..f1b0348 --- /dev/null +++ b/components/common/inc/hlos_specific.h @@ -0,0 +1,202 @@ +/****************************************************************************** + @file hlos_specific.h + + @brief TIMAC 2.0 API Prototypes for Highlevel OS specific functions. (HLOS = Windows, Linux, etc) + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +#if !defined(HLOS_SPECIFIC_H) +#define HLOS_SPECIFIC_H + +/* + * internal generic functions + * used by the generic layer to do things + * with a specific os + */ + +/* + * @brief Exit, with some fatal error code. + * @param the exit code + */ +void MSVC_NO_RETURN _FATAL_exit(int code) GCC_NO_RETURN; + +/* + * @brief Exit, main use case is MS Windows apps. + * + * This a message and waits for the user to press enter. + * On windows, this is important otherwise on windows + * the console application sort of "flashes" on screen. + */ +void MSVC_NO_RETURN _EXIT_pause(int code) GCC_NO_RETURN; + +/* + * @brief Lock the world, globally and atomically. + */ +void _ATOMIC_global_lock(void); + +/* + * @brief Unlock the world, globally and atomically. + */ +void _ATOMIC_global_unlock(void); + +/* + * @brief Create an atomic (mutex) type lock + */ +intptr_t _ATOMIC_local_create(void); + +/* + * @brief Destroy an atomic (mutex) type lock + */ +void _ATOMIC_local_destroy(intptr_t h); + +/* + * @brief Lock an atomic item (take exclusive ownersship of) + * @param h - the atomic object + * @param timeout_mSecs -1=forever, 0=non-blocking, >0 mSec timeout + * This supports recursive locks. + */ +int _ATOMIC_local_lock(intptr_t h, int timeout_mSecs); + +/* @brief Unlock the atomic item (release the mutex) + * Note: the unlocking thread must be the locking thread. + */ +void _ATOMIC_local_unlock(intptr_t h); + +/* + * @brief Create a counting semaphore. + */ +intptr_t _ATOMIC_sem_create(void); + +/* + * @brief Destroy a counting semaphore. + */ +void _ATOMIC_sem_destroy(intptr_t h); + +/* + * @brief the current count value of a semaphore + */ +int _ATOMIC_sem_cnt(intptr_t h); + +/* + * @brief Subtract/Get/Consume from the semaphore + * @param h - semaphore + * @param timeout_mSecs -1=forever, 0=non-blocking, >0 mSec timeout + */ +int _ATOMIC_sem_get(intptr_t h, int timeout_mSecs); + +/* + * @brief Add/Put/Produce to a seamphore + */ +void _ATOMIC_sem_put(intptr_t h); + +/* + * @brief Get the current absolute wall clock time. + */ +uint64_t _TIMER_getAbsNow(void); + +/* + * @brief Sleep for n Milliseconds + */ +void _TIMER_sleep(uint32_t mSecs); + +/* + * @brief Return the current thread id. + */ +intptr_t _THREAD_self(void); + +/* + * @brief Create a thread + * @param thread_func - the thread code + * @param param - a parameter for the thread + * Note: the thread runs when created. + */ +intptr_t _THREAD_create(const char *dbg_name, + intptr_t (*thread_func)(intptr_t threadparam), + intptr_t param); + +/* + * @brief The thread wants to exit instead of returning. + */ +void _THREAD_exit(void); + +/* + * @brief Destroy a thread. + */ +void _THREAD_destroy(intptr_t os_token); + +/* + * @brief Make the console beep + */ +void _DEBUG_beep(void); + +/* + * @brief disable keyboard key as you type + */ +void _DEBUG_echo_off(void); + +/* + * @brief re-enable keyboard echo as you type + */ +void _DEBUG_echo_on(void); + +/* + * @brief Poll the keyboard if no key is pressed return EOF otherwise the key + * + * see debug_helpers.h for definition of keys like F1, PgUp, etc + */ +int _DEBUG_getkey(void); + +#endif + +/* + * ======================================== + * Texas Instruments Micro Controller Style + * ======================================== + * Local Variables: + * mode: c + * c-file-style: "bsd" + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + * vim:set filetype=c tabstop=4 shiftwidth=4 expandtab=true + */ + diff --git a/components/common/inc/ini_file.h b/components/common/inc/ini_file.h new file mode 100644 index 0000000..e5bc9d8 --- /dev/null +++ b/components/common/inc/ini_file.h @@ -0,0 +1,412 @@ +/****************************************************************************** + @file ini_file.h + + @brief TIMAC 2.0 API Parse INI files to configure appliations + + Group: WCS LPC + $Target Devices: Linux: AM335x, Embedded Devices: CC1310, CC1350$ + + ****************************************************************************** + $License: BSD3 2016 $ + + Copyright (c) 2015, Texas Instruments Incorporated + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + * Neither the name of Texas Instruments Incorporated nor the names of + its contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, + THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ****************************************************************************** + $Release Name: TI-15.4Stack Linux x64 SDK$ + $Release Date: July 14, 2016 (2.00.00.30)$ + *****************************************************************************/ + +#include +#include +#include + +/* + * @file ini_file.h + * + * @brief This parses Windows style INI file used for configuration + * + * The general form of an ini file that is supported is shown below + * Note this code has a reasonable limit on the INI file line length + * all lines must be less then 4K bytes. + * + * \code + * ;; Comment.. + * [strings] + * quoted = "Hichhiker\'s Guide To the Galaxy" + * noquote = Hello world how are you + * quoted2 = " leading spaces" + * quoted3 = "trailing spaces " + * + * [numbers] + * decnumber = 42 + * hexnumber = 0x42 + * octnumber = 042 + * ; An astrix is decimal 42 also + * singlequote = '*' + * \endcode + * + * Example C Code that uses this + * ============================= + * + * \code + * int my_ini_callback(struct ini_rd_detail *pINI) + * { + * // Just check one item + * if(INI_itemMatches(pINI, "numbers", NULL)){ + * printf("We are in the numbers section\n"); + * } + * // check both items + * if(INI_itemMatches(pINI, "numbers", "decnumber")){ + * v = INI_valueAsInt(pINI); + * if(pINI->is_error){ + * printf("%s:%d: Not a number!\n", + * pINI->filename, pINI->lineno); + * // Tell parser to stop ... we have a problem + * return (-1); + * } + * printf("The value is: %d\n", v); + * return 0; + * } + * // we could do more checks here + * return 0; + * } + * + * int main(...) + * { + * INI_Read("myconfig.ini", my_ini_callback, 0); + * } + * \endcode + * + */ +#if !defined(INI_FILE_H) +#define INI_FILE_H + +/* Forward delcoration */ +struct ini_parser; + +/*! + * @typedef ini_rd_callback + * @param pIPD - parse details, see ini_parser + * @param handled - set to true if the item was handled. + * @return 0 to keep going, negative to stop (this is not an error) + * + * This is the callback handler used by the INI file parser. + * the user (application) provides this function to the ini file parser + * + * To declare an error in the callback, you have 2 options + * - Option 1: Call INI_syntaxError(), or + * - Option 2: Set pIPD->is_error = true + * + */ + +typedef int ini_rd_callback(struct ini_parser *pINI, bool *handled); + +/*! + * @struct ini_parser + * + * @brief provides details to the parser callback while parsing an INI file + */ + +struct ini_parser { + /* did an error occur? */ + bool is_error; + + /* have we already dequoted the value? */ + bool did_dequote; + + /* stream we are reading from */ + intptr_t stream; + + /* the current callback function */ + ini_rd_callback *callback_fn; + /* for use by the callback */ + intptr_t client_cookie; + + /* filename we are reading */ + const char *filename; + /* line number we are reading */ + int lineno; + + /* parser uses for its working storage */ + char workbuf[4096]; + /* current section name */ + char cur_section[50]; + /* the name is NULL or points into the workbuffer */ + char *item_name; + /* the value is NULL or points into the workbuffer */ + char *item_value; +}; + +/*! + * @brief strdup() the value and return it. + * @return strdup'ed value or null on error + * + * If strdup() fails, an appropriate log message is created. + */ +char *INI_itemValue_strdup(struct ini_parser *pINI); + +/*! + * @brief Determine if the value is a simple integer + * @param pINI - current parser information + * @param value - the value is stored here if function returns true + * @returns boolean true if tests pass. + */ +bool INI_isValueInt(struct ini_parser *pINI, int *value); + +/*! + * @brief Determine if the value is a simple integer + * @param pINI - current parser information + * @param value - the value is stored here if function returns true + * @returns boolean true if tests pass. + */ +int INI_valueAsInt(struct ini_parser *pINI); + +/*! + * @brief Determine if the value is a unsigned 64bit number + * @param pINI - current parser information + * @param value - the value is stored here if function returns true + * @returns true if tests pass. + */ +bool INI_isValueBool(struct ini_parser *pINI, bool *value); + +/*! + * @brief Determine if the value is a unsigned 64bit number + * @param pINI - current parser information + * @returns boolean true if tests pass. + */ +bool INI_isValueU64(struct ini_parser *pINI, uint64_t *value); + +/*! + * @brief Determine if the value is a Signed 64bit number + * @param pINI - current parser information + * @param value - the value is stored here if function returns true + * @returns boolean true if tests pass. + */ +bool INI_isValueS64(struct ini_parser *pINI, int64_t *value); + +/*! + * @brief Determine if the value is a double, or not + * @param pINI - current parser information + * @param value - the value is stored here if function returns true + * @returns boolean true if tests pass. + */ +bool INI_isValueDouble(struct ini_parser *pINI, double *value); + +/*! + * @brief Log an error message about the syntax error at the current file & line + * @param pINI - current parser details + * @param fmt - printf like error message. + * + * Prints: