Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: DigiLogger
Fork of XBeeLib_vs by
FrameBuffer Class Reference
storage class for incoming frames More...
#include <FrameBuffer.h>
| Public Member Functions | |
| FrameBuffer (uint8_t size, uint16_t max_payload_len) | |
| Constructor. | |
| ~FrameBuffer () | |
| Destructor. | |
| ApiFrame * | get_next_free_frame () | 
| get_next_free_frame returns the next free frame | |
| bool | complete_frame (ApiFrame *frame) | 
| complete_frame sets the status of the frame to complete once the data has been set in the buffer. | |
| bool | free_frame (ApiFrame *frame) | 
| free_frame makes the frame available to be reused in future | |
| ApiFrame * | get_next_complete_frame () | 
| get_next_complete_frame returns the pointer to the next complete frame | |
| uint32_t | get_dropped_frames_count () | 
| get_dropped_frames_count returns the number of dropped frames since latest call to this method | |
| Protected Types | |
| enum | FrameStatus { FrameStatusFree = 0, FrameStatusAssigned, FrameStatusComplete } | 
| frame statusMore... | |
| Protected Attributes | |
| buf_element_t * | _frm_buf | 
| buffer array | |
| uint8_t | _head | 
| head frame index | |
| uint8_t | _tail | 
| tail frame index for application | |
| uint32_t | _dropped_frames | 
| dropped frames | |
Detailed Description
storage class for incoming frames
Definition at line 33 of file FrameBuffer.h.
Member Enumeration Documentation
| enum FrameStatus  [protected] | 
frame status
Definition at line 76 of file FrameBuffer.h.
Constructor & Destructor Documentation
| FrameBuffer | ( | uint8_t | size, | 
| uint16_t | max_payload_len | ||
| ) | 
Constructor.
Definition at line 24 of file FrameBuffer.cpp.
| ~FrameBuffer | ( | ) | 
Destructor.
Definition at line 36 of file FrameBuffer.cpp.
Member Function Documentation
| bool complete_frame | ( | ApiFrame * | frame ) | 
complete_frame sets the status of the frame to complete once the data has been set in the buffer.
- Parameters:
- 
  pointer to the buffer we want to set as complete 
- Returns:
- true on success, false otherwise
Definition at line 67 of file FrameBuffer.cpp.
| bool free_frame | ( | ApiFrame * | frame ) | 
free_frame makes the frame available to be reused in future
- Parameters:
- 
  frame to release 
Definition at line 104 of file FrameBuffer.cpp.
| uint32_t get_dropped_frames_count | ( | void | ) | 
get_dropped_frames_count returns the number of dropped frames since latest call to this method
- Returns:
- the number of dropped frames since latest call to this method
Definition at line 119 of file FrameBuffer.cpp.
| ApiFrame * get_next_complete_frame | ( | void | ) | 
get_next_complete_frame returns the pointer to the next complete frame
- Returns:
- the pointer to the selected buffer
Definition at line 82 of file FrameBuffer.cpp.
| ApiFrame * get_next_free_frame | ( | void | ) | 
get_next_free_frame returns the next free frame
- Returns:
- a pointer to the next free frame
Definition at line 45 of file FrameBuffer.cpp.
Field Documentation
| uint32_t _dropped_frames  [protected] | 
dropped frames
Definition at line 95 of file FrameBuffer.h.
| buf_element_t* _frm_buf  [protected] | 
buffer array
Definition at line 83 of file FrameBuffer.h.
| uint8_t _head  [protected] | 
head frame index
Definition at line 89 of file FrameBuffer.h.
| uint8_t _tail  [protected] | 
tail frame index for application
Definition at line 92 of file FrameBuffer.h.
Generated on Tue Jul 12 2022 20:10:44 by
 1.7.2
 1.7.2 
    