19 return value ?
"Yes" :
"No";
35 float a = round(value / precision);
36 return fixNegativeZero(a * precision);
40 while (
param[0] ==
' ') {
43 int len = efiStrlen(
param);
44 while (len > 0 &&
param[len - 1] ==
' ') {
52 uint32_t len = efiStrlen(prefix);
53 if (efiStrlen(line) < len) {
56 for (uint32_t i = 0; i < len; i++) {
57 if (line[i] != prefix[i]) {
65 constexpr
int bufferLength = 10;
69 size_t idx = bufferLength - 1;
75 auto digit = num % radix;
86 }
while ((num /= radix) != 0);
91 while (idx < bufferLength)
155 unsigned long hash = 5381;
158 while ( (c = *str++) ) {
160 hash = ((hash << 5) + hash) + c;
170 #if EFI_HISTOGRAMS && ! EFI_UNIT_TEST
172 int len =
hsReport(histogram, report);
175 logging.append(PROTOCOL_MSG LOG_DELIMITER);
177 for (
int i = 0; i < len; i++)
180 logging.append(LOG_DELIMITER);
189 float limitRateOfChange(
float newValue,
float oldValue,
float incrLimitPerSec,
float decrLimitPerSec,
float secsPassed) {
190 if (newValue >= oldValue)
191 return (incrLimitPerSec <= 0.0f) ? newValue : oldValue + minF(newValue - oldValue, incrLimitPerSec * secsPassed);
192 return (decrLimitPerSec <= 0.0f) ? newValue : oldValue - minF(oldValue - newValue, decrLimitPerSec * secsPassed);
196 bool afterCurrent =
test >= current;
197 bool beforeNext =
test < next;
199 if (next > current) {
203 return afterCurrent && beforeNext;
210 return afterCurrent || beforeNext;
214 static int getBitRangeCommon(
const uint8_t data[],
int bitIndex,
int bitWidth,
int secondByteOffset) {
215 int byteIndex = bitIndex >> 3;
216 int shift = bitIndex - byteIndex * 8;
217 int value = data[byteIndex];
218 if (shift + bitWidth > 8) {
219 value = value + data[secondByteOffset + byteIndex] * 256;
221 int mask = (1 << bitWidth) - 1;
222 return (value >> shift) & mask;
void appendPrintf(const char *fmt,...)
Buffered console output stream header.
char * itoa10(char *p, int num)
float limitRateOfChange(float newValue, float oldValue, float incrLimitPerSec, float decrLimitPerSec, float secsPassed)
int djb2lowerCase(const char *str)
bool startsWith(const char *line, const char *prefix)
char * efiTrim(char *param)
static int getBitRangeCommon(const uint8_t data[], int bitIndex, int bitWidth, int secondByteOffset)
static char * itoa_signed(char *p, int num, unsigned radix)
bool isPhaseInRange(float test, float current, float next)
float efiRound(float value, float precision)
void printHistogram(Logging *logging, histogram_s *histogram)
This function knows how to print a histogram_s summary.
const char * boolToString(bool value)
static char * ltoa_internal(char *p, uint32_t num, unsigned radix)
int mytolower(const char c)
int getBitRangeLsb(const uint8_t data[], int bitIndex, int bitWidth)
int getBitRangeMsb(const uint8_t data[], int bitIndex, int bitWidth)
int hsReport(histogram_s *h, int *report)
Prepare histogram report.
This data structure is used to analyze CPU performance.
UNUSED(samplingTimeSeconds)
void scheduleLogging(Logging *logging)
static BigBufferHandle buffer
static tstrWifiInitParam param