Guest_imported
New member
- Jan 1, 1970
- 0
Hello
One of the things that I have to do is to read a binery file containing messages.
I have to read one bit(character) at the time, so I can compare it to my message key. If my message key is 15 then I have to search the file until I find the hex bit that is the number 15. After I have found the 15 which means that my message is starting than I have to take all the bits after that one until I find another bit say he 0x3 that menas end of message. I have to take all the bits (hex) and convert it to ascii so I can display my message. After that I still need to continue to do the same thing and check for my messages until the file end.
(what I'm trying to do is to simulate the data-link layer).
Thank you
One of the things that I have to do is to read a binery file containing messages.
I have to read one bit(character) at the time, so I can compare it to my message key. If my message key is 15 then I have to search the file until I find the hex bit that is the number 15. After I have found the 15 which means that my message is starting than I have to take all the bits after that one until I find another bit say he 0x3 that menas end of message. I have to take all the bits (hex) and convert it to ascii so I can display my message. After that I still need to continue to do the same thing and check for my messages until the file end.
(what I'm trying to do is to simulate the data-link layer).
Thank you