summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWI/include/machwiAssociateHandler.h
blob: 85c733e67eb5e49f8f05e79340bd5fd59908f570 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/******************************************************************************
  \file machwiAssociateHandler.h
  
  \brief machwiAssociateHandler header file.
  
  \author
    Atmel Corporation: http://www.atmel.com \n
    Support email: avr@atmel.com

  Copyright (c) 2008-2011, Atmel Corporation. All rights reserved.
  Licensed under Atmel's Limited License Agreement (BitCloudTM).

  \internal
    History:     
      15/06/07 ALuzhetsky - Created.
******************************************************************************/

#ifndef _MACHWIASSOCIATEHANDLER_H
#define _MACHWIASSOCIATEHANDLER_H

/******************************************************************************
                        Includes section.
******************************************************************************/
#include <machwiManager.h>

/******************************************************************************
                       Types section
******************************************************************************/
typedef enum
{
  MACHWI_IDLE_ASSOCIATE_STATE,
  MACHWI_SET_CHANNEL_ASSOCIATE_STATE,
  MACHWI_SET_PAGE_ASSOCIATE_STATE,
  MACHWI_SET_COORD_PAN_ID_ASSOCIATE_STATE,
  MACHWI_SET_SHORT_ADDR_ASSOCIATE_STATE,
  MACHWI_CLR_RX_ON_WHEN_IDLE_ASSOCIATE_STATE,
  MACHWI_TX_ASSOCIATE_REQUEST_ASSOCIATE_STATE,
  MACHWI_WAIT_TX_DATA_REQUEST_ASSOCIATE_STATE,
  MACHWI_TX_DATA_REQUEST_ASSOCIATE_STATE,
  MACHWI_WAIT_ASSOCIATE_RESP_FRAME_ASSOCIATE_STATE,
  MACHWI_SET_TRX_OFF_ASSOCIATE_STATE,
} MachwiAssociateState_t;

/******************************************************************************
                   Prototypes section
******************************************************************************/
/******************************************************************************
 Checks associate request parameters, sends associate and data request commands.
 Waits for the responce.
 Parameters:
   none.
 Returns:
   current status of operation (success or "in progress").
******************************************************************************/
MachwiHandlerResult_t machwiAssociateReqHandler(void);

#ifdef _FFD_
/******************************************************************************
 Checks associate responce parameters, and puts the responce to the transaction
 queue.
 Parameters:
   none.
 Returns:
   current status of operation (success or "in progress").
******************************************************************************/
MachwiHandlerResult_t machwiAssociateRespHandler(void);
#endif //_FFD_

/******************************************************************************
  Indicates, that associate response command frame was received.
  Parameters:
    associateRespDescr - associate response command frame description.
  Returns:
    none.
******************************************************************************/
void machwiAssociateRespInd(MAC_FrameDescr_t *associateRespDescr);

#ifdef _FFD_
/******************************************************************************
  Indicates, that associate request command frame was received.
  Parameters:
    associateReqDescr - associate request command frame description.
  Returns:
    none.
******************************************************************************/
void machwiAssociateReqInd(MAC_FrameDescr_t *associateReqDescr);
#endif //_FFD_

/******************************************************************************
  Resets associate handler.
  Parameters:
    none.
  Returns:
    none.
******************************************************************************/
void machwiResetAssociateHandler(void);


#endif /* _MACHWIASSOCIATEHANDLER_H */

// eof machwiAssociateHandler.h