agileRTOS (zrtos)  Version 0.8.0 (ghostbuster)
error_count.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024 ykat UG (haftungsbeschraenkt) - All Rights Reserved
3  *
4  * Permission for non-commercial use is hereby granted,
5  * free of charge, without warranty of any kind.
6  */
7 #ifndef ZRTOS_ERROR_COUNT_H
8 #define ZRTOS_ERROR_COUNT_H
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 
14 #include <zrtos/error.h>
15 
16 typedef struct _zrtos_error_count_t{
17  size_t length;
19 
21  thiz->length = 0;
22 
23  return true;
24 }
25 
27  thiz->length = 0;
28 }
29 
32  ,zrtos_error_t err
33 ){
34  if(zrtos_error__is_error(err)){
35  thiz->length++;
36  }
37 
38  return ZRTOS_ERROR__SUCCESS;
39 }
40 
41 #ifdef __cplusplus
42 }
43 #endif
44 #endif
zrtos_error_t zrtos_error_count__add(zrtos_error_count_t *thiz, zrtos_error_t err)
Definition: error_count.h:30
struct _zrtos_error_count_t zrtos_error_count_t
bool zrtos_error_count__init(zrtos_error_count_t *thiz)
Definition: error_count.h:20
bool zrtos_error__is_error(zrtos_error_t thiz)
Definition: error.h:156
Successful program execution status.
Definition: error.h:22
void zrtos_error_count__deinit(zrtos_error_count_t *thiz)
Definition: error_count.h:26
zrtos_error_t
Definition: error.h:20