make some fixes, refactor some variables, finish most of the packet code
This commit is contained in:
+14
-8
@@ -1,19 +1,25 @@
|
||||
#ifndef ANOU_H
|
||||
#define ANOU_H
|
||||
|
||||
#include <iostream>
|
||||
using namespace std;
|
||||
|
||||
class ANOUServer
|
||||
{
|
||||
char* portname; //name of the serial port (eg.: /dev/ttyUSB1)
|
||||
string portname; //name of the serial port eg.: /dev/ttyUSB1)
|
||||
char buffer[1024]; //message buffer
|
||||
int* addresses; //known client addresses
|
||||
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(int src_addr, int dst_addr, char** message)
|
||||
char* AssembleMessage(int type, char* mode, char* value); //append the value and the message type to the message mode
|
||||
int SHAW(bool force_readdress); //Stateful Host Addressing Waterfall protocol
|
||||
char ConfigureSerialPort(); //configuring the serial port
|
||||
char StartListener(); //start listening on the serial port
|
||||
char 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
|
||||
char 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
|
||||
Reference in New Issue
Block a user