Class SmeProtH


  • public class SmeProtH
    extends java.lang.Object
    • Method Detail

      • isValidMsg

        public static boolean isValidMsg​(ProtocolHandshakeTypeType expectedType,
                                         ProtocolHandshakeMsg msg)
        Check that the given message is valid. If not, also logs why the message was invalid.
        Parameters:
        expectedType - expected message type
        msg - message to check
        Returns:
        whether the message is valid
      • versionSupported

        public static boolean versionSupported​(int major,
                                               int minor,
                                               int maxMajor,
                                               int maxMinor)
        Check that the version <major,minor> is ≤ to the version <maxMajor,maxMinor>
        Parameters:
        major - queried major version
        minor - queried minor version
        maxMajor - max supported major version
        maxMinor - max supported minor version
        Returns:
        whether the given version is supported