xrp style wpilib comms
Loading...
Searching...
No Matches
byteutils.h
Go to the documentation of this file.
1#ifndef BYTEUTILS_H
2#define BYTEUTILS_H
3
4// from https://github.com/wpilibsuite/xrp-wpilib-firmware/blob/main/include/byteutils.h
5
6#include <stdint.h>
10float networkToFloat(char* buf, int offset = 0);
11
15int16_t networkToInt16(char* buf, int offset = 0);
16
20uint16_t networkToUInt16(char* buf, int offset = 0);
21
25int32_t networkToInt32(char* buf, int offset = 0);
26
30uint32_t networkToUInt32(char* buf, int offset = 0);
31
35void floatToNetwork(float num, char* buf, int offset = 0);
36
40void int16ToNetwork(int16_t num, char* buf, int offset = 0);
41
45void uint16ToNetwork(uint16_t num, char* buf, int offset = 0);
46
50void int32ToNetwork(int32_t num, char* buf, int offset = 0);
51
55void uint32ToNetwork(uint32_t num, char* buf, int offset = 0);
56
57#endif // BYTEUTILS_H
58
void int16ToNetwork(int16_t num, char *buf, int offset=0)
Definition byteutils.cpp:54
void int32ToNetwork(int32_t num, char *buf, int offset=0)
Definition byteutils.cpp:70
void uint16ToNetwork(uint16_t num, char *buf, int offset=0)
Definition byteutils.cpp:62
int32_t networkToInt32(char *buf, int offset=0)
Definition byteutils.cpp:30
float networkToFloat(char *buf, int offset=0)
Definition byteutils.cpp:9
void uint32ToNetwork(uint32_t num, char *buf, int offset=0)
Definition byteutils.cpp:80
uint32_t networkToUInt32(char *buf, int offset=0)
Definition byteutils.cpp:37
int16_t networkToInt16(char *buf, int offset=0)
Definition byteutils.cpp:16
void floatToNetwork(float num, char *buf, int offset=0)
Definition byteutils.cpp:44
uint16_t networkToUInt16(char *buf, int offset=0)
Definition byteutils.cpp:23