summaryrefslogtreecommitdiffhomepage
path: root/digital/beacon/src/network.h
diff options
context:
space:
mode:
authorFlorent Duchon2012-03-18 12:22:02 +0100
committerFlorent Duchon2012-03-18 16:30:37 +0100
commita54ad9edce697133a024aff096e50f7e4f389d5b (patch)
tree9b87c5f8fce3fc0127a2e36b8a809508c1a3298b /digital/beacon/src/network.h
parent8ac7f52728a8ec2a09a6eeebc3cf5d4afff9b485 (diff)
digital/beacon: import Zigbit stack (bitcloud) & avr sources
Diffstat (limited to 'digital/beacon/src/network.h')
-rw-r--r--digital/beacon/src/network.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/digital/beacon/src/network.h b/digital/beacon/src/network.h
new file mode 100644
index 00000000..c9734df4
--- /dev/null
+++ b/digital/beacon/src/network.h
@@ -0,0 +1,58 @@
+/**************************************************************************//**
+ \file Peer2Peer.h
+
+ \brief Peer-2-peer sample application header file.
+
+ \author
+ Atmel Corporation: http://www.atmel.com \n
+ Support email: avr@atmel.com
+
+ Copyright (c) 2008 , Atmel Corporation. All rights reserved.
+ Licensed under Atmel's Limited License Agreement (BitCloudTM).
+
+ \internal
+ History:
+ 14.10.09 A. Taradov - Added FIFO for received packets
+******************************************************************************/
+
+#ifndef _NETWORK_H
+#define _NETWORK_H
+
+// #define MAX_RETRIES_BEFORE_REJOIN 6
+
+// typedef struct
+// {
+// uint8_t header[APS_ASDU_OFFSET];
+// uint8_t data;
+// uint8_t footer[APS_AFFIX_LENGTH - APS_ASDU_OFFSET];
+// }buff_t;
+
+
+typedef struct
+{
+ uint8_t messageId; // message ID
+ uint8_t data[APP_MAX_PACKET_SIZE]; // data
+}AppMessage_t;
+
+// Application network messsage buffer descriptor
+typedef struct
+{
+ uint8_t header[APS_ASDU_OFFSET]; // Auxiliary header (required by stack)
+ AppMessage_t message; // Application message
+ uint8_t footer[APS_AFFIX_LENGTH - APS_ASDU_OFFSET]; // Auxiliary footer (required by stack)
+}AppMessageBuffer_t;
+
+
+
+
+void APS_DataIndication(APS_DataInd_t* dataInd);
+void APS_DataConf(APS_DataConf_t* confInfo);
+void ZDO_StartNetworkConf(ZDO_StartNetworkConf_t* confirmInfo);
+void initNetwork(void);
+void startNetwork(void);
+void send_data(void);
+void send_angle(int angle_degree);
+
+#endif // ifndef _NETWORK_H
+
+// eof network.h