aps_frag.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /**************************************************************************************************
  2. Filename: aps_frag.h
  3. Revised: $Date: 2011-05-27 16:00:27 -0700 (Fri, 27 May 2011) $
  4. Revision: $Revision: 26145 $
  5. Description: Implements APS Application Data Unit Fragmentation
  6. Copyright 2006-2011 Texas Instruments Incorporated. All rights reserved.
  7. IMPORTANT: Your use of this Software is limited to those specific rights
  8. granted under the terms of a software license agreement between the user
  9. who downloaded the software, his/her employer (which must be your employer)
  10. and Texas Instruments Incorporated (the "License"). You may not use this
  11. Software unless you agree to abide by the terms of the License. The License
  12. limits your use, and you acknowledge, that the Software may not be modified,
  13. copied or distributed unless embedded on a Texas Instruments microcontroller
  14. or used solely and exclusively in conjunction with a Texas Instruments radio
  15. frequency transceiver, which is integrated into your product. Other than for
  16. the foregoing purpose, you may not use, reproduce, copy, prepare derivative
  17. works of, modify, distribute, perform, display or sell this Software and/or
  18. its documentation for any purpose.
  19. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  20. PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  21. INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  22. NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  23. TEXAS INSTRUMENTS OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT,
  24. NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  25. LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  26. INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  27. OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  28. OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  29. (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  30. Should you have any questions regarding your right to use this Software,
  31. contact Texas Instruments Incorporated at www.TI.com.
  32. **************************************************************************************************/
  33. #ifndef APSF_H
  34. #define APSF_H
  35. #ifdef __cplusplus
  36. extern "C"
  37. {
  38. #endif
  39. /* ------------------------------------------------------------------------------------------------
  40. * Includes
  41. * ------------------------------------------------------------------------------------------------
  42. */
  43. #include "ZComDef.h"
  44. #include "AF.h"
  45. /* ------------------------------------------------------------------------------------------------
  46. * Constants
  47. * ------------------------------------------------------------------------------------------------
  48. */
  49. #define APSF_SCHED_EVT 0x0001
  50. #define APSF_MAX_WINDOW_SIZE 8 // Maximum allowable fragmentation window size.
  51. /* ------------------------------------------------------------------------------------------------
  52. * Macros
  53. * ------------------------------------------------------------------------------------------------
  54. */
  55. #define APSF_Enabled (APSF_taskID != 0xff)
  56. /* ------------------------------------------------------------------------------------------------
  57. * Global Variables
  58. * ------------------------------------------------------------------------------------------------
  59. */
  60. extern uint8 APSF_taskID;
  61. /* ------------------------------------------------------------------------------------------------
  62. * Functions
  63. * ------------------------------------------------------------------------------------------------
  64. */
  65. /*
  66. * Task Initialization
  67. */
  68. extern void APSF_Init(uint8 task_id);
  69. /*
  70. * Task Event Processor
  71. */
  72. extern void APSF_Init(uint8 task_id);
  73. extern UINT16 APSF_ProcessEvent( uint8 task_id, UINT16 events );
  74. extern afStatus_t APSF_SendFragmented(APSDE_DataReq_t *pReq);
  75. extern void APSF_ProcessAck(aps_FrameFormat_t *aff, uint16 srcAddr, uint8 status);
  76. extern void APSF_SendOsalMsg(uint8 *msgPtr);
  77. typedef afStatus_t APSF_SendFragmented_t(APSDE_DataReq_t *pReq);
  78. typedef void APSF_ProcessAck_t(aps_FrameFormat_t *aff, uint16 srcAddr, uint8 status);
  79. typedef void APSF_SendOsalMsg_t(uint8 *msgPtr);
  80. extern APSF_SendFragmented_t *apsfSendFragmented;
  81. extern APSF_ProcessAck_t *apsfProcessAck;
  82. extern APSF_SendOsalMsg_t *apsfSendOsalMsg;
  83. #ifdef __cplusplus
  84. }
  85. #endif
  86. #endif
  87. /**************************************************************************************************
  88. */