#pragma once #include "connection.h" struct Client { void* buffer; size_t max_size; size_t size; uint8_t hostbyte; int16_t seq; struct Connection* connection; }; static inline uint8_t host2byte(uint8_t host, uint8_t index) { return index * 32 + host; } static inline void byte2host(uint8_t b, uint8_t* host, uint8_t* index) { *host = (b & 0x1F); *index = b >> 5; } // Not sure what these are for, but they are used for the hostbyte static const uint8_t DEFAULT_CLIENT_HOST = 9; static const uint8_t DEFAULT_CLIENT_INDEX = 6; static const uint8_t DEFAULT_ROBOT_INDEX = 0;