public class IMCUtil
extends java.lang.Object
| Constructor and Description |
|---|
IMCUtil() |
| Modifier and Type | Method and Description |
|---|---|
static int |
computeCrc16(byte[] data,
int startPos,
int curCrc) |
static int |
computeCrc16(byte[] data,
int startPos,
long length,
int curCrc) |
static void |
dumpAsHex(IMCMessage msg,
int bytesPerLine) |
static void |
fillWithRandomData(IMCMessage msg) |
static java.lang.String |
getAsHtml(IMCMessage message)
Generate an HTML representation of the given message
|
static IMCFieldType |
getType(java.lang.String typeName) |
static java.lang.Object |
parseString(IMCFieldType type,
java.lang.String text) |
static void |
updateMessage(IMCMessage msg)
Same as
updateMessage(msg, IMCDefinition.getInstance() |
static void |
updateMessage(IMCMessage msg,
IMCDefinition target)
Update the message to a newer IMCDefinition
|
public static java.lang.Object parseString(IMCFieldType type, java.lang.String text)
public static IMCFieldType getType(java.lang.String typeName)
public static int computeCrc16(byte[] data,
int startPos,
long length,
int curCrc)
public static int computeCrc16(byte[] data,
int startPos,
int curCrc)
public static void dumpAsHex(IMCMessage msg, int bytesPerLine)
public static java.lang.String getAsHtml(IMCMessage message)
message - The messagepublic static void updateMessage(IMCMessage msg)
updateMessage(msg, IMCDefinition.getInstance()msg - The message to be updated to latest IMCDefinitionupdateMessage(IMCMessage, IMCDefinition)public static void updateMessage(IMCMessage msg, IMCDefinition target)
msg - The message to be updatedtarget - Target IMC definitions. The version should be newer.public static void fillWithRandomData(IMCMessage msg)