updated Users Guide, added fix for nwkTopology for TI-RTOS
authorHector Ramos <h-ramos@ti.com>
Thu, 18 Dec 2014 01:14:52 +0000 (17:14 -0800)
committerHector Ramos <h-ramos@ti.com>
Thu, 18 Dec 2014 01:14:52 +0000 (17:14 -0800)
docs/ZNP Host User's Guide.pdf [changed mode: 0755->0644]
examples/ZNP Host Users Guide.pdf [deleted file]
examples/cmdLine/cmdLine.h
examples/dataSendRcv/dataSendRcv.h
examples/nwkTopology/nwkTopology.c
examples/nwkTopology/nwkTopology.h
examples/servDisc/servDisc.h

old mode 100755 (executable)
new mode 100644 (file)
index 34717c2..d4e74f7
Binary files a/docs/ZNP Host User's Guide.pdf and b/docs/ZNP Host User's Guide.pdf differ
diff --git a/examples/ZNP Host Users Guide.pdf b/examples/ZNP Host Users Guide.pdf
deleted file mode 100644 (file)
index 695a41c..0000000
Binary files a/examples/ZNP Host Users Guide.pdf and /dev/null differ
index 0449ce3c6af247496ad234439d65557cb350b4e1..31b226972c43251dce103a7ab792a5b18b47c3cd 100755 (executable)
@@ -36,8 +36,8 @@
  *\r
  */\r
 \r
-#ifndef AFDATASENDRCV_H\r
-#define AFDATASENDRCV_H\r
+#ifndef CMDLINE_H\r
+#define CMDLINE_H\r
 \r
 #ifdef __cplusplus\r
 extern "C"\r
@@ -52,4 +52,4 @@ void appInitQ(void);
 }\r
 #endif\r
 \r
-#endif /* AFDATASENDRCV_H */\r
+#endif /* CMDLINE_H */\r
index 32f9acdca848966a4d734ae7b65159f6765b5cb3..041d0c64d63aeed57474cedf48c6b882153fb00f 100755 (executable)
@@ -36,8 +36,8 @@
  *\r
  */\r
 \r
-#ifndef AFDATASENDRCV_H\r
-#define AFDATASENDRCV_H\r
+#ifndef DATASENDRCV_H\r
+#define DATASENDRCV_H\r
 \r
 #ifdef __cplusplus\r
 extern "C"\r
@@ -53,4 +53,4 @@ void appInitQ(void);
 }\r
 #endif\r
 \r
-#endif /* AFDATASENDRCV_H */\r
+#endif /* DATASENDRCV_H */\r
index cda30cdec96cebabe7ba5f743c7794968d5215a9..bfdd82482e3eb0692171eba3791e4aa45f0b184a 100644 (file)
@@ -58,6 +58,9 @@
  * MACROS\r
  */\r
 \r
+#define MAX_CHILDREN 20\r
+#define MAX_NODE_LIST 64\r
+\r
 /*********************************************************************\r
  * TYPES\r
  */\r
@@ -155,10 +158,10 @@ typedef struct
        uint16_t NodeAddr;\r
        uint8_t Type;\r
        uint8_t ChildCount;\r
-       ChildNode_t childs[256];\r
+       ChildNode_t childs[MAX_CHILDREN];\r
 } Node_t;\r
 \r
-Node_t nodeList[64];\r
+Node_t nodeList[MAX_NODE_LIST];\r
 uint8_t nodeCount = 0;\r
 static uint8_t mtSysResetIndCb(ResetIndFormat_t *msg)\r
 {\r
@@ -243,15 +246,17 @@ static uint8_t mtZdoMgmtLqiRspCb(MgmtLqiRspFormat_t *msg)
 {\r
        uint8_t devType = 0;\r
        uint8_t devRelation = 0;\r
+       uint8_t localNodeCount = nodeCount;\r
        MgmtLqiReqFormat_t req;\r
 \r
        if (msg->Status == MT_RPC_SUCCESS)\r
        {\r
-               nodeList[nodeCount].NodeAddr = msg->SrcAddr;\r
-               nodeList[nodeCount].Type = (msg->SrcAddr == 0 ?\r
+               nodeCount++;\r
+               nodeList[localNodeCount].NodeAddr = msg->SrcAddr;\r
+               nodeList[localNodeCount].Type = (msg->SrcAddr == 0 ?\r
                DEVICETYPE_COORDINATOR :\r
                                                                DEVICETYPE_ROUTER);\r
-               nodeList[nodeCount].ChildCount = 0;\r
+               nodeList[localNodeCount].ChildCount = 0;\r
                uint32_t i;\r
                for (i = 0; i < msg->NeighborLqiListCount; i++)\r
                {\r
@@ -260,11 +265,11 @@ static uint8_t mtZdoMgmtLqiRspCb(MgmtLqiRspFormat_t *msg)
                                >> 4) & 7);\r
                        if (devRelation == 1)\r
                        {\r
-                               uint8_t cCount = nodeList[nodeCount].ChildCount;\r
-                               nodeList[nodeCount].childs[cCount].ChildAddr =\r
+                               uint8_t cCount = nodeList[localNodeCount].ChildCount;\r
+                               nodeList[localNodeCount].childs[cCount].ChildAddr =\r
                                        msg->NeighborLqiList[i].NetworkAddress;\r
-                               nodeList[nodeCount].childs[cCount].Type = devType;\r
-                               nodeList[nodeCount].ChildCount++;\r
+                               nodeList[localNodeCount].childs[cCount].Type = devType;\r
+                               nodeList[localNodeCount].ChildCount++;\r
                                if (devType == DEVICETYPE_ROUTER)\r
                                {\r
                                        req.DstAddr = msg->NeighborLqiList[i].NetworkAddress;\r
@@ -273,7 +278,6 @@ static uint8_t mtZdoMgmtLqiRspCb(MgmtLqiRspFormat_t *msg)
                                }\r
                        }\r
                }\r
-               nodeCount++;\r
        }\r
        else\r
        {\r
index 1ab803cec4d69c35a21a0509dd648ed8684619a2..07a88de01acdc9d73b52dbf874a02b48a2e9df7c 100755 (executable)
@@ -36,8 +36,8 @@
  *\r
  */\r
 \r
-#ifndef AFDATASENDRCV_H\r
-#define AFDATASENDRCV_H\r
+#ifndef NWKTOPOLOGY_H\r
+#define NWKTOPOLOGY_H\r
 \r
 #ifdef __cplusplus\r
 extern "C"\r
@@ -52,4 +52,4 @@ void appInitQ(void);
 }\r
 #endif\r
 \r
-#endif /* AFDATASENDRCV_H */\r
+#endif /* NWKTOPOLOGY_H */\r
index 606daaf4f427a19ede96805367f6ca07dca57d6f..14ea31c38503c40ee49cfd5351c82a684a937542 100755 (executable)
@@ -36,8 +36,8 @@
  *\r
  */\r
 \r
-#ifndef AFDATASENDRCV_H\r
-#define AFDATASENDRCV_H\r
+#ifndef SERVDISC_H\r
+#define SERVDISC_H\r
 \r
 #ifdef __cplusplus\r
 extern "C"\r
@@ -52,4 +52,4 @@ void appInitQ(void);
 }\r
 #endif\r
 \r
-#endif /* AFDATASENDRCV_H */\r
+#endif /* SERVDISC_H */\r