ScarletLib / Scarlet

C# cross-platform robotics library with hardware support for Raspberry Pi and BeagleBone Black.
https://github.com/huskyroboticsteam/Scarlet/wiki
GNU Lesser General Public License v3.0
7 stars 3 forks source link

Integrate priority-based buffer into `Client` and `Server` #1

Closed LouYu2015 closed 6 years ago

LouYu2015 commented 6 years ago

Summary:


Communications in Communications/PacketBuffer.cs:


Communications.Packet in Communication/Packet.cs:


Communications.Client in Communications/Client.cs:


Communications.Server in Communications/Server.cs:


Communications in Communications/Constants.cs:

CaiB commented 6 years ago

Also, removing all of the testing-related DLL/XML files would probably be best, since we probably can't actually host them with the license on this repository.

If we do remove those files, what does someone need to do after cloning the repository to make everything work again?

LouYu2015 commented 6 years ago

I found that VS can automatically restore packages folder if I delete UnitTest\bin. Maybe the reason why it failed previously is that VS won't rebuild packages folder if UnitTest\bin exists. Now we can safely remove the files in it. However, I may need to copy codes to another branch so that those files won't show up in the history (they will remain in this branch's history even if I delete them).

LouYu2015 commented 6 years ago

I successfully removed the history of packages folder by using filter-branch. Now we can keep this branch.

LouYu2015 commented 6 years ago

Revision is pushed to the branch: https://github.com/huskyroboticsteam/Scarlet/pull/1/commits/9503196e409e439ed8c9d4d80e31fb9289b00551

CaiB commented 6 years ago

I also just went through and made a lot of style-related changes (no functional changes should have been made). The big two things that I saw were omitting this.. We like to use this. for all field accessors/assignments to make it clear that it's a field, and hopefully reduce the number of times we accidentally type the wrong variable. The other thing was just various spacing changes. Bringing blocks into single lines, and reducing the amount of wasted space in comments. With these changes, I reduced the linecount by almost 100 lines, while (in my opinion) making things more readable.

Have a look at the kinds of changes that I made, so that you can keep them in mind for future changes.

@Baldstrom We should probably better define our style guidelines for things like this, to help others understand what we expect. Right now, our documentation is a bit lacking in that department, and we will need to make it more clear if we have more people contributing.

LouYu2015 commented 6 years ago

Unit test passed after merging. However, there is a minor issue: there are two entries of .vs in .gitignore now.