Class SmeProtH
- java.lang.Object
-
- org.openmuc.jeebus.ship.state.machine.smeproth.SmeProtH
-
public class SmeProtH extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidabort(ProtHError error, StateHandlerContext context)static booleanisValidMsg(ProtocolHandshakeTypeType expectedType, ProtocolHandshakeMsg msg)Check that the given message is valid.static booleanversionSupported(int major, int minor, int maxMajor, int maxMinor)Check that the version <major,minor> is ≤ to the version <maxMajor,maxMinor>
-
-
-
Method Detail
-
abort
public static void abort(ProtHError error, StateHandlerContext context)
-
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 typemsg- 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 versionminor- queried minor versionmaxMajor- max supported major versionmaxMinor- max supported minor version- Returns:
- whether the given version is supported
-
-