Files
szakdoga-comms/src/anou.h
T
2026-10-08 15:14:42 +02:00

25 lines
999 B
C++

#ifndef ANOU_H
#define ANOU_H
#include <iostream>
using namespace std;
class ANOUServer
{
string portname; //name of the serial port eg.: /dev/ttyUSB1)
char buffer[1024]; //message buffer
char* addresses; //known client addresses
public:
int ConfigureSerialPort(); //configuring the serial port
int StartListener(); //start listening on the serial port
int WriteSerialPort(char* message); //write the message to the serial port
char* AssemblePacket(char src_addr, char dst_addr, char* message); //assemble the full packet, with the source and destination address too
int SHAW(bool force_readdress); //Stateful Host Addressing Waterfall protocol
char* SetVar6(char var_index, int var_value); //used to create a 6 bit long variable altering message
char* SetVar12(char var_index, int var_value); //used to create a 12 bit long variable altering message
char* Response(char address); //specifies an address the client should make a response to
};
#endif