Package org.openmuc.jship.message
Class ShipMessageFactory
- java.lang.Object
-
- org.openmuc.jship.message.ShipMessageFactory
-
public class ShipMessageFactory extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
cdeMsg(byte[] cdeValue)
static byte[]
cmiMsg(byte cmiHead, byte[] cmiRemainder)
static byte[]
connectionCloseMsg(byte[] connCloseMsg)
static byte[]
constructShipMsg(int messageType, byte[] messageValue)
static byte[]
parseCdeBody(java.lang.String header, java.lang.String payload, CDEMsg.ExtensionType extType)
static byte[]
parseCdeBody(CDEMsg cdeMsg)
static byte[]
parseConnectionCloseBody(CloseMsg closeMsg)
static byte[]
parseConnectionCloseBody(ConnectionClosePhaseType phase, java.lang.Integer maxTime, ConnectionCloseReasonType reason)
static byte[]
parseSmeHelloBody(ConnectionHelloPhaseType phaseType, java.lang.Integer waitForReady, java.lang.Boolean prolongationReq)
constructs and returns a SME_HELLO message with the given parameters.static byte[]
parseSmeHelloBody(HelloMsg s)
same as the other parseSmeHelloBody but with SmeHello as parameterstatic byte[]
parseSmePinBody(java.lang.String pin)
static byte[]
parseSmePinBody(PinMsg pinMsg)
static byte[]
parseSmePinBody(PinStateType pinState, PinInputPermissionType inputPermission)
static byte[]
parseSmeProtHBody(ProtocolHandshakeMsg ph)
same as the other parseSmeProtHBody method but with ProtocolHandshake Object as parameter for ease of usestatic 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 parametersstatic byte[]
smeHelloMsg(byte[] smeHelloValue)
static byte[]
smePinMsg(byte[] smePinValue)
static byte[]
smeProtMsg(byte[] smeProtHandshakeValue)
-
-
-
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)
-
parseSmePinBody
public static byte[] parseSmePinBody(PinStateType pinState, @Nullable PinInputPermissionType inputPermission)
-
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)
-
parseConnectionCloseBody
public static byte[] parseConnectionCloseBody(ConnectionClosePhaseType phase, @Nullable java.lang.Integer maxTime, @Nullable ConnectionCloseReasonType reason)
-
-