DCAITI Robot Hardware
1.0
|
#include "communication/UARTCom.hpp"
#include "communication/UCommands.hpp"
#include "communication/UValue.hpp"
#include "misc/Utils.hpp"
#include "constants.h"
#include "MotorWheel.h"
Functions | |
U_FrameType | parseFrameType (uint8_t *d) |
extracts frametype from data package More... | |
uint8_t | fromFrameType (U_FrameType ft) |
translates frametype to corresponding byte value More... | |
U_Component | parseComponent (uint8_t *d) |
extract component information More... | |
uint8_t | fromComponent (U_Component cp) |
translates component into byte value More... | |
U_Request | parseRequest (uint8_t *d) |
extracts request information from data package More... | |
uint32_t | parseTimestamp (uint8_t *d) |
extracts timestamp from data package More... | |
uint16_t | computeChecksum (uint8_t *d, uint8_t pl) |
computes checksum from data package More... | |
int | correctChecksum (uint8_t *d) |
checks if checksum inside package and computed checksum from package data are the same More... | |
void | showPackage (uint8_t *d, int pl) |
debugging function, prints out package data More... | |
void | clearPackage (uint8_t *d) |
erases all package data and sets the array to 0 More... | |
void | handleRequest (uint8_t *d) |
executes commands according to incoming request More... | |
void | handlePackage (uint8_t *d, int pl) |
package handler, checks for errors first, then proceeds to extract information from the data package More... | |
Variables | |
uint8_t | currentParseIndex |
int | payloadLength |
uint32_t | currentTimestamp = 0 |
MotorWheel | wheelLeft |
MotorWheel | wheelRight |
void clearPackage | ( | uint8_t * | d | ) |
erases all package data and sets the array to 0
d | data package |
uint16_t computeChecksum | ( | uint8_t * | d, |
uint8_t | pl | ||
) |
computes checksum from data package
d | data package |
pl | payload length |
int correctChecksum | ( | uint8_t * | d | ) |
checks if checksum inside package and computed checksum from package data are the same
d | data package |
uint8_t fromComponent | ( | U_Component | cp | ) |
translates component into byte value
cp | component |
uint8_t fromFrameType | ( | U_FrameType | ft | ) |
translates frametype to corresponding byte value
ft | frametype |
void handlePackage | ( | uint8_t * | d, |
int | pl | ||
) |
package handler, checks for errors first, then proceeds to extract information from the data package
d | |
pl |
void handleRequest | ( | uint8_t * | d | ) |
executes commands according to incoming request
d | data package |
U_Component parseComponent | ( | uint8_t * | d | ) |
extract component information
d | data package |
U_FrameType parseFrameType | ( | uint8_t * | d | ) |
extracts frametype from data package
d | data package |
U_Request parseRequest | ( | uint8_t * | d | ) |
extracts request information from data package
d | data package |
uint32_t parseTimestamp | ( | uint8_t * | d | ) |
extracts timestamp from data package
d | data package |
void showPackage | ( | uint8_t * | d, |
int | pl | ||
) |
debugging function, prints out package data
d | data package |
pl | payload length |
uint8_t currentParseIndex |
uint32_t currentTimestamp = 0 |
int payloadLength |
|
extern |
|
extern |