A libery to connect to telegesis zigbee module. Bassed on implemtation of XBEE

Fork of xbee_lib by Tristan Hughes

Revision:
31:c59bc92a047e
Parent:
30:f9cdb6f62586
Child:
33:101f953225a6
--- a/telegesis.h	Fri Nov 28 09:28:26 2014 +0000
+++ b/telegesis.h	Fri Nov 28 10:53:09 2014 +0000
@@ -29,12 +29,23 @@
 #define ESCAPE 0x7d
 #define MAX_FRAME_DATA_SIZE 90
 #define ZdataSize 80
+//--------------------------------------------------------------------------------------------------------------------
+//Typedef....
+
 typedef struct {
  char Ready;
  char ID[17];
  char Data[ZdataSize];   
 }ZdatRec;
 
+typedef struct {
+ unsigned char channel;
+ char PID[5];
+} PanVisibleRec;
+
+//--------------------------------------------------------------------------------------------------------------------
+
+
 class zigbee
 {
 private:
@@ -118,15 +129,10 @@
    char Devicetype[4];
    /** Gives type of HW
    */
-   char PanNumber[5];
-   /** Gives number on current PAN of HW
-   */
-   int PanChan;
-   /* channel nummer on pan
-   */
-   int PansNear[5];
-   /* Gives pannumber af those near
-   */
+   int NPanVisible; //antal pans i nærheden
+   PanVisibleRec PanVisible[5]; //Pans og deres ID
+   PanVisibleRec AktuelPan;   //Hvilket pan denne er på
+
    char HWType[15];
    /** incomming data
    */
@@ -188,7 +194,7 @@
     bool wait4Offline();
     bool wait4JPAN();
     bool wait4str(char *p);
-    char *list[ZdataSize];
+    char *list[30];
     size_t comma_parse ( char *line, char *list[], size_t size );
 };