kiros-rs / kiros

Cross-platform Rust abstractions for rescue robot systems
https://kiros-rs.github.io
MIT License
2 stars 0 forks source link

Intelligent packet validation #4

Closed Finchiedev closed 3 years ago

Finchiedev commented 3 years ago

The newly-implemented packet validation function is functional, but has a serious flaw - it cannot tell between different packets, and can only make broad assumptions about the contents of the packet. I propose that we match against the opcode and make intelligent decisions based upon the specifications made in the e-manual. Additionally, an extra parameter will probably have to be passed to the function to specify if the packet is incoming or outgoing, in order to make further decisions about whether or not the packet is valid.

Finchiedev commented 3 years ago

Something to consider - should the validation handled by functions such as bulk_read be migrated into this function?

Finchiedev commented 3 years ago

The servo_connection file could then validate every incoming/outgoing packet and somehow notify (Result?) that communication has failed.

Finchiedev commented 3 years ago

This has been resolved thanks to the control-table refactor