-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathClientProcessor.h
40 lines (30 loc) · 952 Bytes
/
ClientProcessor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* ClientProcessor.h
*
* Created on: 23 Apr 2019
* Author: Faisal
*/
#ifndef CLIENTPROCESSOR_H_
#define CLIENTPROCESSOR_H_
#include <string.h>
#include <omnetpp.h>
#include <bitset>
#include <iostream>
using namespace omnetpp;
class ClientProcessor : public cSimpleModule
{
protected:
virtual void initialize(int stage) override;
virtual void handleMessage(cMessage *msg) override;
virtual int numInitStages() const override;
unsigned int countSetBits(unsigned int n);
std::string generateRandomKey(int keyLength);
std::string convertToBinary(int initialKey);
std::string compareBasis(std::string statesUsed, std::string receivedStates, std::string randomBits);
public:
void initializeNetwork();
void initiateQKDRequest(std::string source, std::string destination);
void printMacTable();
void printKeyTable();
};
#endif /* CLIENTPROCESSOR_H_ */