@staticmethod
def protocol_a_checksum(data):
    """calculate a checksum for given data

        Checksum for protocol A is a binary sum of the rest of the packet

        :param data: input data
        :type data: bytes
        :returns: checksum as a hex string
        :rtype: str
        """
    s = 0
    for c in data:
        s += c
    return '%02X' % (s % 255)
