Class ShipMessageFactory


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

      • constructShipMsg

        public static byte[] constructShipMsg​(int messageType,
                                              byte[] messageValue)
      • cmiMsg

        public static byte[] cmiMsg​(byte cmiHead,
                                    byte[] cmiRemainder)
      • smeHelloMsg

        public static byte[] smeHelloMsg​(byte[] smeHelloValue)
      • smeProtMsg

        public static byte[] smeProtMsg​(byte[] smeProtHandshakeValue)
      • smePinMsg

        public static byte[] smePinMsg​(byte[] smePinValue)
      • cdeMsg

        public static byte[] cdeMsg​(byte[] cdeValue)
      • connectionCloseMsg

        public static byte[] connectionCloseMsg​(byte[] connCloseMsg)
      • parseSmeHelloBody

        public static byte[] parseSmeHelloBody​(ConnectionHelloPhaseType phaseType,
                                               java.lang.Integer waitForReady,
                                               java.lang.Boolean prolongationReq)
        constructs and returns a SME_HELLO message with the given parameters.
        Returns:
        the complete SME_HELLO message as a byte array
      • parseSmeHelloBody

        public static byte[] parseSmeHelloBody​(HelloMsg s)
        same as the other parseSmeHelloBody but with SmeHello as parameter
        Returns:
        the complete SME_HELLO message as a byte array
      • parseSmeProtHBody

        public static byte[] parseSmeProtHBody​(ProtocolHandshakeTypeType handshakeType,
                                               int major,
                                               int minor,
                                               java.util.List<java.lang.String> formats)
        constructs and returns a SME_PROT_H message with the given parameters
        Returns:
        the complete SME_PROT_H message as a byte array
      • parseSmeProtHBody

        public static byte[] parseSmeProtHBody​(ProtocolHandshakeMsg ph)
        same as the other parseSmeProtHBody method but with ProtocolHandshake Object as parameter for ease of use
        Parameters:
        ph - the object to parse
        Returns:
        the complete SME_PROT_H message as a byte array
      • parseSmePinBody

        public static byte[] parseSmePinBody​(PinMsg pinMsg)
      • parseSmePinBody

        public static byte[] parseSmePinBody​(java.lang.String pin)
      • parseCdeBody

        public static byte[] parseCdeBody​(CDEMsg cdeMsg)
      • parseCdeBody

        public static byte[] parseCdeBody​(java.lang.String header,
                                          java.lang.String payload,
                                          @Nullable
                                          CDEMsg.ExtensionType extType)
      • parseConnectionCloseBody

        public static byte[] parseConnectionCloseBody​(CloseMsg closeMsg)