Cubelets API Documentation 2.0
C API
Loading...
Searching...
No Matches
bv_utils.h
Go to the documentation of this file.
1
5#ifndef IMAGO_BV_UTILS_H
6#define IMAGO_BV_UTILS_H
7
8#include <stdint.h>
9#include "routing_table.h"
10
18uint8_t weighted_average(void);
19
29uint8_t inverse(uint8_t bv);
30
38uint8_t minimum(void);
39
47uint8_t maximum(void);
48
59void set_block_value(uint32_t id, uint8_t bv );
60
70uint8_t get_block_value(uint32_t id);
71
72uint8_t valid_entry_count;
73#endif
uint8_t maximum(void)
Returns the largest block value from neighboring blocks.
uint8_t inverse(uint8_t bv)
Returns the inverse of the supplied block value.
uint8_t get_block_value(uint32_t id)
Get the block value of a remote Cubelet.
uint8_t weighted_average(void)
Calculates a block value based on the on the weighted average of neighbors block values.
uint8_t minimum(void)
Returns the smallest block value from neighboring blocks.
void set_block_value(uint32_t id, uint8_t bv)
Manually override the block value of a specific block in the construction.