Skip to content

Enhancement: Extending the existing comms protocol and have SAP6 display active station name #42

@divereigh

Description

@divereigh

One of the things that is extremely frustrating (and confusing) to deal with is when a leg or a splay gets attached to the wrong station. If this is not discovered & corrected quickly, it can lead to any drawing in the sketching program (SexyTopo etc) being wrong. We are going to have to go back into a particular cave to confirm exactly where the walls are due to one of these not being discovered at the time.

One of the ideas I have to help remove this error is for the "active station" (the "FROM" station for any legs or splays) to be transmitted to the SAP6 and displayed. This is then a reminder to the instrument holder to verify they are at the right station that the sketcher is expecting.

However the first major problem is that the existing protocol for communicating between the SAP6 and the sketching program appears to very hard to extend and maintain backward compatibility.

For example there is no version number in the protocol so that the devices can settle on what protocol version to use.

Another example is there is no general format for the data to be sent, such that an unknown option can be ignored by the receiving end doesn't understand them. A classic way to do this is to have an option code, but then immediately follow it by a byte count of the length of the actual data (could be zero), then of course any data itself. That way if an option is not supported, the receiving device knows to ignore that many bytes before looking for the next option.

So given that, the only solution I can see is to add something like a "I support protocol versioning" option (command?), which each end sends to the other at the initial connection, then they can send another option with the actual maximum they support so then they settle on the maximum, if none that first option is not sent, then the other end only supports version 1. I need to go through the existing code to confirm what it will do when it receives an unknown option.

Would to know other people's thoughts on this on 1) the idea of sending the station id, but more importantly 2) how we extend the existing protocol without breaking backwards compatibility - something that I believe the protocol will have to address at some point.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions