Class DataRateLimits
-
- All Implemented Interfaces:
public class DataRateLimits
This class is used to detect if any overflow or underflow can appear. Regarding to the BLE throughput of the user's smartphone and the data rate wanted by the user
-
-
Constructor Summary
Constructors Constructor Description DataRateLimits()
-
Method Summary
Modifier and Type Method Description static boolean
isRfTxUnderflow(int bleDataRate, int rfDataRate, int pktSizeInBytes, int payloadSizeInBytes)
Checks if a TX Underflow (blanks between packets) can appear static boolean
isRfTxOverflow(int bleDataRate, int rfDataRate, int pktSizeInBytes, int payloadSizeInBytes)
Checks if a TX Overflow (TX buffers are full before we finish sending a message) can appear static boolean
isRfRxOverflow(int bleDataRate, int rfDataRate, int pktSizeInBytes, int captureSizeWantedInBytes, boolean isRleEnable)
Checks if a RX Overflow (RX buffers are full before we finish collecting a message) can appear -
-
Method Detail
-
isRfTxUnderflow
static boolean isRfTxUnderflow(int bleDataRate, int rfDataRate, int pktSizeInBytes, int payloadSizeInBytes)
Checks if a TX Underflow (blanks between packets) can appear
- Parameters:
bleDataRate
- BLE throughput of the smartphone (in bits/s)rfDataRate
- RF data rate entered by the user (in bits/s)pktSizeInBytes
- the size in bytes of one pkt (choosen by the user)payloadSizeInBytes
- the size in bytes of the message to send- Returns:
true if there may be a TX underflow, false if not
-
isRfTxOverflow
static boolean isRfTxOverflow(int bleDataRate, int rfDataRate, int pktSizeInBytes, int payloadSizeInBytes)
Checks if a TX Overflow (TX buffers are full before we finish sending a message) can appear
- Parameters:
bleDataRate
- BLE throughput of the smartphone (in bits/s)rfDataRate
- RF data rate entered by the user (in bits/s)pktSizeInBytes
- Size in bytes of one pkt (choosen by the user)payloadSizeInBytes
- Size in bytes of the message to send- Returns:
true if there may be a TX overflow, false if not
-
isRfRxOverflow
static boolean isRfRxOverflow(int bleDataRate, int rfDataRate, int pktSizeInBytes, int captureSizeWantedInBytes, boolean isRleEnable)
Checks if a RX Overflow (RX buffers are full before we finish collecting a message) can appear
- Parameters:
bleDataRate
- BLE throughput of the smartphone (in bits/s)rfDataRate
- RF data rate entered by the user (in bits/s)pktSizeInBytes
- Size in bytes of one pkt (choosen by the user)captureSizeWantedInBytes
- Size in bytes of the minimum message size to capture- Returns:
true if there may be a RX overflow, false if not
-
-
-
-