Lab3 Omnet++
Lab3 Omnet++
Lab3 Omnet++
The sender also has to print the bitstream before the single bit error and after it
if any, in the console in the following format.
message “hi” :
00000100
01101000
01101001
00000101
The receiver node would check if there is any thing wrong in the received
bitstream, if there is error, it should print an error message.
If the message is correct, the receiver will convert the message back to its
original string given from the user and print it like the following.
The original message is “hi”.
You are not to make the sender send the “original string” obviously.
16 Lab3 requirement
helping notes
You have to do XOR operation on all the payload characters to calculate the even
parity check bits. What is the easiest way to do this ?
Before sending the message back we have to convert it to c-string as message name
is of type c-string, so what to do ?
Convert each char to asci again using (char)bitset.to_ulong() .
Append the characters to one string .
Send the string as the message name.
At the receiver side, do the reverse conversion again.
17
Thank You !!