initialize
This commit is contained in:
27
interface/samsungdefinition/.classpath
Normal file
27
interface/samsungdefinition/.classpath
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
||||
36
interface/samsungdefinition/.project
Normal file
36
interface/samsungdefinition/.project
Normal file
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>imsinterfaces-samsung-definition</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.validation.validationbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
|
||||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
@@ -0,0 +1,4 @@
|
||||
eclipse.preferences.version=1
|
||||
encoding//src/main/java=UTF-8
|
||||
encoding//src/test/java=UTF-8
|
||||
encoding/<project>=UTF-8
|
||||
@@ -0,0 +1,8 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
||||
@@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
|
||||
<wb-module deploy-name="imsinterfaces-samsung-definition">
|
||||
<wb-resource deploy-path="/" source-path="/src/main/java"/>
|
||||
</wb-module>
|
||||
</project-modules>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<installed facet="java" version="1.8"/>
|
||||
<installed facet="jst.utility" version="1.0"/>
|
||||
</faceted-project>
|
||||
@@ -0,0 +1,2 @@
|
||||
disabled=06target
|
||||
eclipse.preferences.version=1
|
||||
21
interface/samsungdefinition/pom.xml
Normal file
21
interface/samsungdefinition/pom.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.itac.interface.interfaces</groupId>
|
||||
<artifactId>imsinterfaces-samsung-definition</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>imsinterfaces-samsung-definition</name>
|
||||
<version>${mes.interface.version}</version>
|
||||
<parent>
|
||||
<groupId>com.itac.interface</groupId>
|
||||
<artifactId>data-interface</artifactId>
|
||||
<version>${mes.interface.version}</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.itac.interface.interfaces</groupId>
|
||||
<artifactId>data-interface-core-definition</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
BIN
interface/samsungdefinition/site/jacoco.exec
Normal file
BIN
interface/samsungdefinition/site/jacoco.exec
Normal file
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data;
|
||||
|
||||
public class UnknownMessageTypeException extends Exception {
|
||||
|
||||
public UnknownMessageTypeException(String messageName) {
|
||||
super(messageName);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data;
|
||||
|
||||
public class UnsupportedMessageTypeException extends Exception {
|
||||
|
||||
public UnsupportedMessageTypeException(String messageName) {
|
||||
super(messageName);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung;
|
||||
|
||||
import com.itac.mes.datainterface.data.samsung.message.Message;
|
||||
|
||||
public interface MessageSource {
|
||||
|
||||
public String getName();
|
||||
|
||||
public boolean send(Message message);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,220 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved. This software is protected by copyright. Under no
|
||||
* circumstances may any part of this file in any form be copied, printed, edited or otherwise distributed, be stored in
|
||||
* a retrieval system, or be translated into another language without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
|
||||
import com.itac.util.date.DateConvert;
|
||||
|
||||
public class BinaryMessage {
|
||||
|
||||
enum Stuffing {
|
||||
LEFT, RIGHT
|
||||
}
|
||||
|
||||
protected short[] byteData = new short[12];
|
||||
private static Stuffing stuffing = Stuffing.RIGHT;
|
||||
private static char stuffChar = 0;
|
||||
|
||||
// do not allow to create instances directly
|
||||
protected BinaryMessage() {
|
||||
}
|
||||
|
||||
protected void setByteData(short[] data) {
|
||||
if (data == null || data.length == 0) {
|
||||
checkAndIncreaseSize(12);
|
||||
return;
|
||||
}
|
||||
this.byteData = data;
|
||||
checkAndIncreaseSize(data.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Read a value from byte buffer. The buffer is automatically extended to position +3 byte
|
||||
*
|
||||
* @param position
|
||||
* the index of the byte array where the unsigned long should be read from
|
||||
* @return a value between 0x0000 and 0xFFFFFFFF
|
||||
*/
|
||||
protected long readULong(int position) {
|
||||
checkAndIncreaseSize(position + 3);
|
||||
return (byteData[position + 3] << 24) | (byteData[position + 2] << 16) | (byteData[position + 1] << 8)
|
||||
| (byteData[position + 0]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Read a value from byte buffer. The buffer is automatically extended to position +3 byte
|
||||
*
|
||||
* @param position
|
||||
* the index of the byte array where the unsigned long should be read from
|
||||
* @return a value between 0x0000 and 0xFFFF
|
||||
*/
|
||||
protected void writeULong(int position, long ulValue) {
|
||||
if (ulValue < 0L || ulValue > 0xFFFFFFFFL) {
|
||||
throw new IllegalArgumentException("value " + ulValue + " is out of possible range 0x00000000-0xFFFFFFFF");
|
||||
}
|
||||
checkAndIncreaseSize(position + 3);
|
||||
byteData[position + 3] = (short) ((ulValue >> 24) & 0xFF);
|
||||
byteData[position + 2] = (short) ((ulValue >> 16) & 0xFF);
|
||||
byteData[position + 1] = (short) ((ulValue >> 8) & 0xFF);
|
||||
byteData[position + 0] = (short) ((ulValue) & 0xFF);
|
||||
}
|
||||
|
||||
/**
|
||||
* Zusicherung, dass das Array groß genug ist, falls nicht wird das Array vergroessert, bis dieser Index zugreifbar
|
||||
* ist.
|
||||
*
|
||||
* @param size
|
||||
*/
|
||||
protected void checkAndIncreaseSize(int size) {
|
||||
while (size >= byteData.length) {
|
||||
if (byteData.length <= size) {
|
||||
// Groeße verdoppeln, Daten kopieren
|
||||
// System.err.println("increasing");
|
||||
byteData = Arrays.copyOf(byteData, byteData.length * 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// in den body ab der position den Text eintragen.
|
||||
protected void writeString(int position, String newMessage) {
|
||||
if (newMessage == null) {
|
||||
return;
|
||||
}
|
||||
checkAndIncreaseSize(position + newMessage.length() + 1);
|
||||
for (int i = 0; i < newMessage.length(); i++) {
|
||||
byteData[position + i] = (byte) newMessage.charAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Einen String in den Puffer der Nachricht schreiben, eine feste Länge betrachten. Es kann gewählt werden,
|
||||
* auf welcher Seite der String mit welchem Zeichen aufgefüllt werden soll<br>
|
||||
* Ist der Text länger als die max Länge wird der String begrenzt
|
||||
*
|
||||
* @param position
|
||||
* ab welcher Stelle in den Daten der String geschrieben werden soll.
|
||||
* @param newMessage
|
||||
* der Text selbst
|
||||
* @param fixLength
|
||||
* die Länge des Textfelds
|
||||
*/
|
||||
protected void writeString(int position, String newMessage, int fixLength) {
|
||||
if (newMessage == null) {
|
||||
return;
|
||||
}
|
||||
if (newMessage.isEmpty()) {
|
||||
// bisherigen String loeschen
|
||||
for (int i = 0; i < fixLength; i++) {
|
||||
newMessage += stuffChar;
|
||||
}
|
||||
}
|
||||
|
||||
// String auf die Länge begrenzen
|
||||
if (newMessage.length() > fixLength) {
|
||||
newMessage = newMessage.substring(0, fixLength);
|
||||
}
|
||||
|
||||
int stufflength = fixLength - newMessage.length();
|
||||
String stuffedString = "";
|
||||
if (stuffing == Stuffing.LEFT) {
|
||||
// leftStuffing:
|
||||
for (int i = 0; i < stufflength; i++) {
|
||||
stuffedString = stuffedString + stuffChar;
|
||||
}
|
||||
stuffedString = stuffedString + newMessage;
|
||||
} else {
|
||||
// rightStuffing
|
||||
stuffedString = newMessage;
|
||||
for (int i = 0; i < stufflength; i++) {
|
||||
stuffedString = stuffedString + stuffChar;
|
||||
}
|
||||
}
|
||||
writeString(position, stuffedString);
|
||||
}
|
||||
|
||||
protected void writeDate(int position, Date event) {
|
||||
writeULong(position, DateConvert.convertLongDateToInt(event.getTime()));
|
||||
}
|
||||
|
||||
protected Date readDate(int position) {
|
||||
return new Date(readULong(position) * 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
* aus dem DataBuffer den String lesen. Es wird automatisch ausgewertet, ob der String links oder rechts mit einem
|
||||
* Füllzeichen aufgefüllt ist; das Füllzeichen wird automatisch entfernt
|
||||
*/
|
||||
protected String readString(int position, int length) {
|
||||
return readStringBuffer(position, length).toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* aus dem DataBuffer den String lesen. Es wird automatisch ausgewertet, ob der String links oder rechts mit einem
|
||||
* Füllzeichen aufgefüllt ist; das Füllzeichen wird automatisch entfernt
|
||||
*/
|
||||
protected StringBuffer readStringBuffer(int position, int length) {
|
||||
checkAndIncreaseSize(position + length + 1);
|
||||
StringBuffer stb = new StringBuffer();
|
||||
|
||||
switch (stuffing) {
|
||||
case LEFT:
|
||||
for (int i = 0; i < length; i++) {
|
||||
|
||||
char c = (char) byteData[position + i];
|
||||
if (c == stuffChar) {
|
||||
continue;
|
||||
}
|
||||
stb.append(c);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case RIGHT:
|
||||
for (int i = 0; i < length; i++) {
|
||||
char c = (char) byteData[position + i];
|
||||
stb.append(c);
|
||||
}
|
||||
|
||||
int lastIndex = length - 1;
|
||||
while ((char) byteData[position + lastIndex] == stuffChar && lastIndex >= 0) {
|
||||
lastIndex--;
|
||||
}
|
||||
stb.delete(lastIndex + 1, length);
|
||||
|
||||
break;
|
||||
default:
|
||||
// no Stuffing in any other case
|
||||
break;
|
||||
}
|
||||
|
||||
return stb;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the content as a short array.
|
||||
*
|
||||
* @return the short array
|
||||
*/
|
||||
public short[] getData() {
|
||||
return byteData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Die ersten 12 byte einer Nachricht als short-array--> Body Length berechnen.
|
||||
*
|
||||
* @param bytes
|
||||
* @return
|
||||
*/
|
||||
public static long getBodyLength(short[] bytes) {
|
||||
return (bytes[11] << 24) | (bytes[10] << 16) | (bytes[9] << 8) | (bytes[8]);
|
||||
}
|
||||
|
||||
public static void setStuffing(Stuffing stuffing) {
|
||||
BinaryMessage.stuffing = stuffing;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* command = 0x0090<br>
|
||||
* request = 0x0011
|
||||
*
|
||||
* <p>
|
||||
* 1D/2D Barcode is from spec (2016-11-01 and later) the unique barcode only; jobname is the current active name of the
|
||||
* job
|
||||
*
|
||||
* @author frankp
|
||||
*
|
||||
*/
|
||||
public class BoardBarcodeEventMessage extends Message {
|
||||
|
||||
public BoardBarcodeEventMessage(short[] data) {
|
||||
super(Command.BOARD_BARCODE_EVENT);
|
||||
setBodyLength(132);
|
||||
setByteData(data);
|
||||
}
|
||||
|
||||
public BoardBarcodeEventMessage(Date newEventTime, String barcodeId, String jobName) {
|
||||
this(null);
|
||||
setBodyLength(132);
|
||||
setEventTime(newEventTime);
|
||||
setBarcodeId(barcodeId);
|
||||
setJobName(jobName);
|
||||
}
|
||||
|
||||
public Date getEventTime() {
|
||||
return readDate(12);
|
||||
}
|
||||
|
||||
public void setEventTime(Date newEventTime) {
|
||||
writeDate(12, newEventTime);
|
||||
}
|
||||
|
||||
public void setBarcodeId(String barcodeId) {
|
||||
if (barcodeId == null) {
|
||||
return;
|
||||
}
|
||||
writeString(16, barcodeId, 64);
|
||||
}
|
||||
|
||||
public String getBarcodeId() {
|
||||
int length = 64;
|
||||
String resultString = readString(16, length);
|
||||
return resultString;
|
||||
}
|
||||
|
||||
public void setJobName(String jobName) {
|
||||
if (jobName == null) {
|
||||
return;
|
||||
}
|
||||
writeString(80, jobName, 64);
|
||||
}
|
||||
|
||||
public String getJobName() {
|
||||
int length = 64;
|
||||
String resultString = readString(80, length);
|
||||
return resultString;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("EventTime: ").append(getEventTime()).append("\n");
|
||||
stb.append("BarcodeId: ").append(getBarcodeId()).append("\n");
|
||||
stb.append("JobName: ").append(getJobName()).append("\n");
|
||||
return stb;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,110 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import com.itac.mes.datainterface.data.UnknownMessageTypeException;
|
||||
|
||||
// durch den Unit Test ist sichergestellt, dass kein CommandId/RequestId doppelt benutzt wird.
|
||||
public enum Command {
|
||||
REQUEST_CONNECTION(0x0001, 0x0001, ConnectionRequestMessage.class), //
|
||||
REQUEST_CONNECTION_CHECK(0x0001, 0x0002, ConnectionCheckRequestMessage.class), //
|
||||
REQUEST_DISCONNECT(0x0001, 0x0003, ConnectionDisconnectRequestMessage.class), //
|
||||
RESPONSE_CONNECTION(0x0002, 0x0001, ConnectionResponseMessage.class), //
|
||||
RESPONSE_CONNECTION_CHECK(0x0002, 0x0002, ConnectionCheckResponseMessage.class), //
|
||||
RESPONSE_NACK(0x0002, 0x00FF, NackResponseMessage.class), //
|
||||
|
||||
// REQUEST_REAL_TIME_INFO(0x0011, 0x0001), // dieses
|
||||
// REQUEST_PCB_BOARD_INFO(0x0011, 0x0002), //
|
||||
// REQUEST_PCB_PRODUCTION_INFO(0x0011, 0x0003), //
|
||||
// REQUEST_PCB_MACHINE_INFO(0x0011, 0x0004), //
|
||||
// REQUEST_PCB_WORKING_INFO(0x0011, 0x0005), //
|
||||
// REQUEST_PCB_TROUBLE_INFO(0x0011, 0x0006), //
|
||||
// REQUEST_OPERATION_INFORMATION(0x0011, 0x0007), //
|
||||
// REQUEST_TROUBLE_INFORMATION(0x0011, 0x0008), //
|
||||
// REQUEST_PRODUCTION_INFORMATION(0x0011, 0x0009), //
|
||||
// REQUEST_TOTAL_INFORMATION(0x0011, 0x0010), //
|
||||
// REQUEST_ALL_DATA_INFORMATION(0x0011, 0x0011), //
|
||||
// REQUEST_CONVEYOR_INFORMATION(0x0011, 0x0012), //
|
||||
// REQUEST_PART_INFORMATION(0x0011, 0x0014), //
|
||||
|
||||
// RESPONSE_REAL_TIME_INFO(0x0012, 0x0001), //
|
||||
// RESPONSE_PCB_BOARD_INFO(0x0012, 0x0002), //
|
||||
// RESPONSE_PCB_PRODUCTION_INFO(0x0012, 0x0003), //
|
||||
// RESPONSE_PCB_MACHINE_INFO(0x0012, 0x0004), //
|
||||
// RESPONSE_PCB_WORKING_INFO(0x0012, 0x0005), //
|
||||
// RESPONSE_PCB_TROUBLE_INFO(0x0012, 0x0006), //
|
||||
// RESPONSE_OPERATION_INFORMATION(0x0012, 0x0007), //
|
||||
// RESPONSE_TROUBLE_INFORMATION(0x0012, 0x0008), //
|
||||
// RESPONSE_PRODUCTION_INFORMATION(0x0012, 0x0009), //
|
||||
// RESPONSE_TOTAL_INFORMATION(0x0012, 0x0010), //
|
||||
// RESPONSE_ALL_DATA_INFORMATION(0x0012, 0x0011), //
|
||||
// RESPONSE_CONVEYOR_INFORMATION(0x0012, 0x0012), //
|
||||
// RESPONSE_PART_INFORMATION(0x0012, 0x0014), //
|
||||
|
||||
// RESPONSE_MACHINE_STATUS(0x0022, 0x0001), //
|
||||
|
||||
TRACEABILITY_EVENT(0x0090, 0x0010, TraceabilityEventMessage.class), //
|
||||
BOARD_BARCODE_EVENT(0x0090, 0x0011, BoardBarcodeEventMessage.class), //
|
||||
REEL_BARCODE_SCAN(0x0090, 0x0012, ReelBarcodeScanEventMessage.class), //
|
||||
MATERIAL_CONSUMPTION_EVENT(0x0090, 0x0013, MaterialConsumptionEventMessage.class), //
|
||||
MACHINE_STATUS_EVENT(0x0090, 0x0014, MachineStatusEventMessage.class), //
|
||||
PLACEMENT_PROGRAM_VERIFICATION(0x0090, 0x0015, PlacementProgramVerificationMessage.class), //
|
||||
REMAINING_REEL_PART_COUNT_EVENT(0x0090, 0x0016, RemainingReelPartCountMessage.class), //
|
||||
REEL_INFORMATION_REQUEST(0x0091, 0x0021, ReelInformationRequestMessage.class), //
|
||||
REEL_INFORMATION_RESPONSE(0x0092, 0x0021, ReelInformationResponseMessage.class), //
|
||||
/**
|
||||
* command: 0x0091 <br>
|
||||
* requestId: 0x0022.
|
||||
*/
|
||||
PLACEMENT_PROGRAM_CONTROL_REQUEST(0x0091, 0x0022, PlacementProgramControlRequestMessage.class), //
|
||||
PLACEMENT_PROGRAM_CONTROL_RESPONSE(0x0092, 0x0022, PlacementProgramControlResponseMessage.class), //
|
||||
|
||||
INTERLOCKING_REQUEST(0x0091, 0x0020, InterlockingRequestMessage.class), //
|
||||
INTERLOCKING_RESPONSE(0x0092, 0x0020, InterlockingResponseMessage.class), //
|
||||
|
||||
REQUEST_STOP(0x0031, 0x0009, null), //
|
||||
RESPONSE_STOP(0x0032, 0x0009, null),
|
||||
|
||||
UNSUPPORTED_COMMAND(0xCAFF, 0xFFEE, null) // dieses ist auf keinen Fall unterstützt, nur zum Testen
|
||||
;
|
||||
|
||||
private long commandId;
|
||||
private long requestId;
|
||||
private Class<?> clazz;
|
||||
|
||||
private Command(long commandId, long requestId, Class<?> clazz) {
|
||||
this.commandId = commandId;
|
||||
this.requestId = requestId;
|
||||
this.clazz = clazz;
|
||||
}
|
||||
|
||||
public long getCommandId() {
|
||||
return commandId;
|
||||
}
|
||||
|
||||
public long getRequestId() {
|
||||
return requestId;
|
||||
}
|
||||
|
||||
public static Command get(long commandId, long requestId) throws UnknownMessageTypeException {
|
||||
for (Command cmd : Command.values()) {
|
||||
if (cmd.getCommandId() == commandId && cmd.getRequestId() == requestId) {
|
||||
return cmd;
|
||||
}
|
||||
}
|
||||
|
||||
throw new UnknownMessageTypeException(
|
||||
MessageFormat.format("Message with commandId {0,number}, requestId {1,number} is unknown", commandId, requestId));
|
||||
}
|
||||
|
||||
public Class<?> getMessageClass() {
|
||||
return clazz;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
public class ConnectionCheckRequestMessage extends Message {
|
||||
|
||||
public ConnectionCheckRequestMessage() {
|
||||
super(Command.REQUEST_CONNECTION_CHECK);
|
||||
// minimale BodyLength setzen
|
||||
setBodyLength(0);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
public class ConnectionCheckResponseMessage extends Message {
|
||||
|
||||
public ConnectionCheckResponseMessage() {
|
||||
super(Command.RESPONSE_CONNECTION_CHECK);
|
||||
// minimale BodyLength setzen
|
||||
setBodyLength(0);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
public class ConnectionDisconnectRequestMessage extends Message {
|
||||
|
||||
public ConnectionDisconnectRequestMessage() {
|
||||
super(Command.REQUEST_DISCONNECT);
|
||||
// minimale BodyLength setzen
|
||||
setBodyLength(0);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
public class ConnectionRequestMessage extends Message {
|
||||
|
||||
public ConnectionRequestMessage(short[] data) {
|
||||
super(Command.REQUEST_CONNECTION);
|
||||
setByteData(data);
|
||||
}
|
||||
|
||||
public ConnectionRequestMessage(String client, long version) {
|
||||
super(Command.REQUEST_CONNECTION);
|
||||
setBodyLength(36);
|
||||
setVersion(version);
|
||||
setClient(client);
|
||||
}
|
||||
|
||||
public long getVersion() {
|
||||
return readULong(32 + 12);
|
||||
}
|
||||
|
||||
public void setVersion(long version) {
|
||||
writeULong(32 + 12, version);
|
||||
}
|
||||
|
||||
public void setClient(String client) {
|
||||
writeString(12, client, 32);
|
||||
}
|
||||
|
||||
public String getClient() {
|
||||
String resultString = readString(12, 32);
|
||||
return resultString;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("ClientType: ").append(getClient()).append("\n");
|
||||
stb.append("Version: ").append(getVersion()).append("\n");
|
||||
return stb;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
public class ConnectionResponseMessage extends Message {
|
||||
|
||||
public ConnectionResponseMessage(short[] data) {
|
||||
super(Command.RESPONSE_CONNECTION);
|
||||
setByteData(data);
|
||||
}
|
||||
|
||||
public ConnectionResponseMessage(long version) {
|
||||
super(Command.RESPONSE_CONNECTION);
|
||||
setBodyLength(4);
|
||||
setVersion(version);
|
||||
}
|
||||
|
||||
public long getVersion() {
|
||||
return readULong(12);
|
||||
}
|
||||
|
||||
public void setVersion(long version) {
|
||||
writeULong(12, version);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("Version: ").append(getVersion()).append("\n");
|
||||
return stb;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
public class InterlockingRequestMessage extends Message {
|
||||
|
||||
public enum RequestCode {
|
||||
START(0x0100), //
|
||||
STOP(0x0101), //
|
||||
JOB_CHANGE(0x0102), //
|
||||
TRACEABILITY_NG(0x0103), //
|
||||
PLACEMENT_PROGRAM_NG(0x0104);
|
||||
|
||||
private long value;
|
||||
|
||||
private RequestCode(long value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public long getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public static RequestCode getForValue(long value) {
|
||||
for (RequestCode r : RequestCode.values()) {
|
||||
if (r.getValue() == value) {
|
||||
return r;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
private String sBadmarkInfo;
|
||||
private String sErrorMessage;
|
||||
|
||||
public InterlockingRequestMessage(short[] data) {
|
||||
super(Command.INTERLOCKING_REQUEST);
|
||||
setByteData(data);
|
||||
}
|
||||
|
||||
public InterlockingRequestMessage(RequestCode requestCode) {
|
||||
super(Command.INTERLOCKING_REQUEST);
|
||||
setRequestCode(requestCode);
|
||||
}
|
||||
|
||||
public RequestCode getRequestCode() {
|
||||
return RequestCode.getForValue(readULong(12));
|
||||
}
|
||||
|
||||
public void setRequestCode(RequestCode requestCode) {
|
||||
writeULong(12, requestCode.getValue());
|
||||
}
|
||||
|
||||
public String getBarcodeId() {
|
||||
return readString(16, 64);
|
||||
}
|
||||
|
||||
public void setBarcodeId(String fileName) {
|
||||
writeString(16, fileName, 64);
|
||||
}
|
||||
|
||||
public long getBadmarkUse() {
|
||||
return readULong(80);
|
||||
}
|
||||
|
||||
public void setBadmarkUse(long badmarkUse) {
|
||||
writeULong(80, badmarkUse);
|
||||
}
|
||||
|
||||
public long getArrayNo() {
|
||||
return readULong(84);
|
||||
}
|
||||
|
||||
public void setArrayNo(long arrayNo) {
|
||||
writeULong(84, arrayNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the board barcode information.
|
||||
*
|
||||
* @param info
|
||||
* if null simply retur and do not change value
|
||||
*/
|
||||
public void setBadmarkInfo(String info) {
|
||||
if (info == null) {
|
||||
return;
|
||||
}
|
||||
sBadmarkInfo = info;
|
||||
int m = (int) getArrayNo();
|
||||
int n = getErrorMessage().length();
|
||||
writeString(88, info);
|
||||
setBodyLength(76 + m + n);
|
||||
}
|
||||
|
||||
public String getBadmarkInfo() {
|
||||
int m = (int) getArrayNo();
|
||||
return sBadmarkInfo == null ? readString(88, m) : sBadmarkInfo;
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
int m = (int) getArrayNo();
|
||||
return sErrorMessage == null ? readString(88 + m, 64) : sErrorMessage;
|
||||
}
|
||||
|
||||
/**
|
||||
* set an ErrorMessage.
|
||||
*
|
||||
* @param errorMessage
|
||||
* the text to be set to the message; field stream length is set implicitly<br>
|
||||
* alternatively this field could be used as a return value for the placementRecipeName for job change
|
||||
*/
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
sErrorMessage = errorMessage;
|
||||
int m = (int) getArrayNo();
|
||||
int n = getErrorMessage().length();
|
||||
writeString(88 + m, errorMessage);
|
||||
setBodyLength(76 + m + n);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("RequestCode: ").append(getRequestCode().name()).append("\n");
|
||||
stb.append("BarcodeId: ").append(getBarcodeId()).append("\n");
|
||||
stb.append("BadmarkUse: ").append(getBadmarkUse()).append("\n");
|
||||
stb.append("ArrayNo: ").append(getArrayNo()).append("\n");
|
||||
stb.append("BadMarkInfo: ").append(getBadmarkInfo()).append("\n");
|
||||
stb.append("ErrorMessage/PlacementProg: ").append(getErrorMessage()).append("\n");
|
||||
return stb;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
public class InterlockingResponseMessage extends Message {
|
||||
|
||||
public InterlockingResponseMessage(long result) {
|
||||
super(Command.INTERLOCKING_RESPONSE);
|
||||
setResult(result);
|
||||
setBodyLength(4);
|
||||
}
|
||||
|
||||
public InterlockingResponseMessage(short[] data) {
|
||||
super(Command.INTERLOCKING_RESPONSE);
|
||||
setByteData(data);
|
||||
setBodyLength(4);
|
||||
}
|
||||
|
||||
public long getResult() {
|
||||
return readULong(12);
|
||||
}
|
||||
|
||||
public void setResult(long newResult) {
|
||||
writeULong(12, newResult);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved. This software is protected by copyright. Under no
|
||||
* circumstances may any part of this file in any form be copied, printed, edited or otherwise distributed, be stored in
|
||||
* a retrieval system, or be translated into another language without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class MachineStatusEventMessage extends Message {
|
||||
|
||||
public MachineStatusEventMessage(short[] data) {
|
||||
super(Command.MACHINE_STATUS_EVENT);
|
||||
setMessage("");
|
||||
setByteData(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Date.
|
||||
*
|
||||
* @return the date , precision is seconds only, millies part is always ,000
|
||||
*/
|
||||
public Date getEventTime() {
|
||||
return readDate(12);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a Date. The millies part of the message is omitted on writing.
|
||||
*
|
||||
* @param write
|
||||
* a date, precision is seconds only (no millies)
|
||||
*/
|
||||
public void setEventTime(Date date) {
|
||||
writeDate(12, date);
|
||||
}
|
||||
|
||||
public long getMachineStatus() {
|
||||
return readULong(16);
|
||||
}
|
||||
|
||||
public void setMachineStatus(long newStatus) {
|
||||
writeULong(16, newStatus);
|
||||
}
|
||||
|
||||
public long getCode() {
|
||||
return readULong(20);
|
||||
}
|
||||
|
||||
public void setCode(long newCode) {
|
||||
writeULong(20, newCode);
|
||||
}
|
||||
|
||||
public long getLevel() {
|
||||
return readULong(24);
|
||||
}
|
||||
|
||||
public void setLevel(long newLevel) {
|
||||
writeULong(24, newLevel);
|
||||
}
|
||||
|
||||
public void setMessage(String newMessage) {
|
||||
if (newMessage == null) {
|
||||
writeULong(28, 0);
|
||||
setBodyLength(20);
|
||||
return;
|
||||
}
|
||||
|
||||
writeULong(28, newMessage.length());
|
||||
writeString(32, newMessage);
|
||||
|
||||
setBodyLength(20 + newMessage.length());
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
long length = readULong(28);
|
||||
if (length == 0) {
|
||||
return "";
|
||||
}
|
||||
String resultString = readString(32, (int) length);
|
||||
return resultString;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("EventTime: ").append(getEventTime()).append("\n");
|
||||
stb.append("MachineStatus: ").append(getMachineStatus()).append("\n");
|
||||
stb.append("Code: ").append(getCode()).append("\n");
|
||||
stb.append("Level: ").append(getLevel()).append("\n");
|
||||
stb.append("message: ").append(getMessage()).append("\n");
|
||||
return stb;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,248 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved. This software is protected by copyright. Under no
|
||||
* circumstances may any part of this file in any form be copied, printed, edited or otherwise distributed, be stored in
|
||||
* a retrieval system, or be translated into another language without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class MaterialConsumptionEventMessage extends Message {
|
||||
|
||||
public MaterialConsumptionEventMessage(short[] data) {
|
||||
super(Command.MATERIAL_CONSUMPTION_EVENT);
|
||||
setByteData(data);
|
||||
}
|
||||
|
||||
public long getTotalAPickupCount() {
|
||||
return readULong(12);
|
||||
}
|
||||
|
||||
public void setTotalAPickupCount(long value) {
|
||||
writeULong(12, value);
|
||||
}
|
||||
|
||||
public long getTotalAPlaceCount() {
|
||||
return readULong(16);
|
||||
}
|
||||
|
||||
public void setTotalAPlaceCount(long value) {
|
||||
writeULong(16, value);
|
||||
}
|
||||
|
||||
public long getTotalVPickupCount() {
|
||||
return readULong(20);
|
||||
}
|
||||
|
||||
public void setTotalVPickupCount(long value) {
|
||||
writeULong(20, value);
|
||||
}
|
||||
|
||||
public long getTotalVPlaceCount() {
|
||||
return readULong(24);
|
||||
}
|
||||
|
||||
public void setTotalVPlaceCount(long value) {
|
||||
writeULong(24, value);
|
||||
}
|
||||
|
||||
public long getTotalPlaceCount() {
|
||||
return readULong(28);
|
||||
}
|
||||
|
||||
public void setTotalPlaceCount(long value) {
|
||||
writeULong(28, value);
|
||||
}
|
||||
|
||||
public long getTotalPickupCount() {
|
||||
return readULong(32);
|
||||
}
|
||||
|
||||
public void setTotalPickupCount(long value) {
|
||||
writeULong(32, value);
|
||||
}
|
||||
|
||||
public long getVisionFailureCount() {
|
||||
return readULong(36);
|
||||
}
|
||||
|
||||
public void setVisionFailureCount(long value) {
|
||||
writeULong(36, value);
|
||||
}
|
||||
|
||||
public long getPickupErrorCount() {
|
||||
return readULong(40);
|
||||
}
|
||||
|
||||
public void setPickupErrorCount(long value) {
|
||||
writeULong(40, value);
|
||||
}
|
||||
|
||||
public Date getBuildTime() {
|
||||
return readDate(44);
|
||||
}
|
||||
|
||||
public void setBuildTime(Date time) {
|
||||
writeDate(44, time);
|
||||
}
|
||||
|
||||
public Date getTransferTime() {
|
||||
return readDate(48);
|
||||
}
|
||||
|
||||
public void setTransferTime(Date time) {
|
||||
writeDate(48, time);
|
||||
}
|
||||
|
||||
public Date getWaitTime() {
|
||||
return readDate(52);
|
||||
}
|
||||
|
||||
public void setWaitTime(Date time) {
|
||||
writeDate(52, time);
|
||||
}
|
||||
|
||||
public Date getEntryWaitTime() {
|
||||
return readDate(56);
|
||||
}
|
||||
|
||||
public void setEntryWaitTime(Date time) {
|
||||
writeDate(56, time);
|
||||
}
|
||||
|
||||
public Date getExitWaitTime() {
|
||||
return readDate(60);
|
||||
}
|
||||
|
||||
public void setExitWaitTime(Date time) {
|
||||
writeDate(60, time);
|
||||
}
|
||||
|
||||
public Date getStopTime() {
|
||||
return readDate(64);
|
||||
}
|
||||
|
||||
public void setStopTime(Date time) {
|
||||
writeDate(64, time);
|
||||
}
|
||||
|
||||
public Date getIdleTime() {
|
||||
return readDate(68);
|
||||
}
|
||||
|
||||
public void setIdleTime(Date time) {
|
||||
writeDate(68, time);
|
||||
}
|
||||
|
||||
public Date getScheduleStopTime() {
|
||||
return readDate(72);
|
||||
}
|
||||
|
||||
public void setScheduleStopTime(Date time) {
|
||||
writeDate(72, time);
|
||||
}
|
||||
|
||||
public Date getRunningTime() {
|
||||
return readDate(76);
|
||||
}
|
||||
|
||||
public void setRunningTime(Date time) {
|
||||
writeDate(76, time);
|
||||
}
|
||||
|
||||
public long getTotalPickupMiss() {
|
||||
return readULong(80);
|
||||
}
|
||||
|
||||
public void setTotalPickupMiss(int value) {
|
||||
writeULong(80, value);
|
||||
}
|
||||
|
||||
public long getTotalMountMiss() {
|
||||
return readULong(84);
|
||||
}
|
||||
|
||||
public void setTotalMountMiss(long value) {
|
||||
writeULong(84, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Not as the name implies a unique reel number, but the number of reels following in this message.
|
||||
*
|
||||
* @return the number of stored or storeable reels
|
||||
*/
|
||||
public long getReelNumber() {
|
||||
return readULong(88);
|
||||
}
|
||||
|
||||
/**
|
||||
* Not as the name implies a unique reel number, but the number of reels following in this message.
|
||||
*/
|
||||
public void setReelNumber(long value) {
|
||||
writeULong(88, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* get the num'th reel Id stored in the message.
|
||||
*
|
||||
* @param num
|
||||
* from 0 to reelNumber-1
|
||||
* @returns the reelId of the n'th reel in this message
|
||||
* @throws IllegalArgumentException
|
||||
* when num out of range
|
||||
*/
|
||||
public String getReelId(int num) {
|
||||
// num muss kleiner als reelNumber sein
|
||||
long maxIdx = getReelNumber();
|
||||
if (num >= maxIdx) {
|
||||
throw new IllegalArgumentException("parameter num is too big");
|
||||
}
|
||||
int idx = 92 + num * 68;
|
||||
return readString(idx, 64);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the num'th reelId.
|
||||
*
|
||||
* @param num
|
||||
* from 0 to {@link #getReelNumber()}
|
||||
* @param value
|
||||
* value is limited to 64 characters
|
||||
*/
|
||||
public void setReelId(int num, String value) {
|
||||
// num muss kleiner als reelNumber sein
|
||||
long maxIdx = getReelNumber();
|
||||
if (num >= maxIdx) {
|
||||
throw new IllegalArgumentException("parameter num is too big");
|
||||
}
|
||||
int idx = 92 + num * 68;
|
||||
writeString(idx, value, 64);
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the partCount of the num'th reel in this message.
|
||||
*/
|
||||
public long getPartCount(int num) {
|
||||
// num muss kleiner als
|
||||
long maxIdx = getReelNumber();
|
||||
if (num >= maxIdx) {
|
||||
throw new IllegalArgumentException("parameter num is to big");
|
||||
}
|
||||
int idx = 92 + num * 68 + 64;
|
||||
return readULong(idx);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set's the partCount of the num'th reel in the message.
|
||||
*/
|
||||
public void setPartCount(int num, int value) {
|
||||
// num muss kleiner als
|
||||
long maxIdx = getReelNumber();
|
||||
if (num >= maxIdx) {
|
||||
throw new IllegalArgumentException("parameter num is to big");
|
||||
}
|
||||
int idx = 92 + num * 68 + 64;
|
||||
writeULong(idx, value);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved. This software is protected by copyright. Under no
|
||||
* circumstances may any part of this file in any form be copied, printed, edited or otherwise distributed, be stored in
|
||||
* a retrieval system, or be translated into another language without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import com.itac.mes.datainterface.data.samsung.MessageSource;
|
||||
|
||||
public class Message extends MessageHeader {
|
||||
|
||||
public enum Result {
|
||||
OK, NG
|
||||
}
|
||||
|
||||
private MessageSource messageSource;
|
||||
|
||||
public Message(Command command) {
|
||||
super(command);
|
||||
setCommandId(command.getCommandId());
|
||||
setRequestId(command.getRequestId());
|
||||
}
|
||||
|
||||
public StringBuffer getStringBuffer() {
|
||||
final StringBuffer stb = new StringBuffer("");
|
||||
|
||||
// die Byte-Daten aufbereiten
|
||||
// Immer die ersten 12 Byte aus den Bytedaten uebertragen
|
||||
// Anzahl Bytes aus dem Body uebertragen (abhaengig von der Laenge)
|
||||
for (int i = 0; i < 12; i++) {
|
||||
stb.append((char) (byteData[i]));
|
||||
}
|
||||
|
||||
for (int i = 12; i < 12 + getBodyLength(); i++) {
|
||||
stb.append((char) (byteData[i]));
|
||||
}
|
||||
|
||||
return stb;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return getHexDump();
|
||||
}
|
||||
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = new StringBuffer();
|
||||
stb.append("CommandId: 0x").append(String.format("%04X", getCommandId())).append("(").append(getCommandId()).append(")");
|
||||
stb.append(", RequestId: 0x").append(String.format("%04X", getRequestId())).append("(").append(getRequestId()).append(")");
|
||||
stb.append(", BodyLength: 0x").append(String.format("%04X", getBodyLength())).append("(").append(getBodyLength()).append(")");
|
||||
stb.append("\n");
|
||||
return stb;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return die gesamte Nachricht als byte-array, inklusive dem Header.
|
||||
*/
|
||||
public byte[] getDatabytes() {
|
||||
int size = 12 + (int) getBodyLength();
|
||||
byte[] result = new byte[size];
|
||||
for (int i = 0; i < size; i++) {
|
||||
result[i] = (byte) byteData[i];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setMessageSource(MessageSource messageSource) {
|
||||
this.messageSource = messageSource;
|
||||
}
|
||||
|
||||
public MessageSource getMessageSource() {
|
||||
return messageSource;
|
||||
}
|
||||
|
||||
public String getHexDump() {
|
||||
StringBuilder s = new StringBuilder(getClass().getSimpleName());
|
||||
s.append('\n');
|
||||
// Head im HEX-Dump , z.B. : 01 00 00 00 02 00 00 00 03 00 00 00
|
||||
for (int i = 0; i < 12; i++) {
|
||||
s.append(String.format("%02X ", byteData[i]));
|
||||
}
|
||||
s.append('\n');
|
||||
// Body im Hex-Dump. format z.B.: 00 11 22 33 44 55 66 77 | 00 11 22 33 44 55 66 77 | ................ \n
|
||||
int index = 12;
|
||||
int bodyIndex = 0;
|
||||
StringBuilder sLine = new StringBuilder();
|
||||
long maxLength = getBodyLength() + 12;
|
||||
while (index < maxLength && index < byteData.length) {
|
||||
s.append(String.format("%02X", (byteData[index] & 0x00FF)));
|
||||
// druckbare Zeichen als Klartext, nicht druckbare Zeichen als . darstellen
|
||||
if (byteData[index] >= 32 && byteData[index] <= 126) {
|
||||
sLine .append((char) byteData[index]);
|
||||
} else {
|
||||
sLine .append('.');
|
||||
}
|
||||
|
||||
bodyIndex++;
|
||||
if (bodyIndex % 32 == 0) {
|
||||
s.append(" | ").append( sLine ).append("\n");
|
||||
sLine = new StringBuilder();
|
||||
} else {
|
||||
if (bodyIndex % 8 == 0) {
|
||||
s.append( " ");
|
||||
} else {
|
||||
s.append( ' ');
|
||||
}
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
if (bodyIndex % 32 != 0) {
|
||||
s.append("| ").append( sLine);
|
||||
}
|
||||
return s.toString();
|
||||
}
|
||||
|
||||
protected void setResult(int position, Result result) {
|
||||
switch (result) {
|
||||
case OK:
|
||||
writeULong(position, 0);
|
||||
break;
|
||||
default:
|
||||
writeULong(position, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected Result getResult(int position) {
|
||||
return readULong(position) == 0 ? Result.OK : Result.NG;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved. This software is protected by copyright. Under no
|
||||
* circumstances may any part of this file in any form be copied, printed, edited or otherwise distributed, be stored in
|
||||
* a retrieval system, or be translated into another language without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.text.MessageFormat;
|
||||
|
||||
import com.itac.mes.datainterface.data.UnknownMessageTypeException;
|
||||
import com.itac.mes.datainterface.data.UnsupportedMessageTypeException;
|
||||
|
||||
/**
|
||||
* this factory creates Samsung Messages fom a data buffer.
|
||||
*
|
||||
* @author frankp
|
||||
*
|
||||
*/
|
||||
public class MessageFactory {
|
||||
|
||||
/**
|
||||
* Creating a message from the data buffer.
|
||||
*
|
||||
* @param data
|
||||
* a buffer containing all bytes for the message<br>
|
||||
* data must not be null
|
||||
* @return null, if a instance for a registered class could not be called
|
||||
* @throws UnsupportedMessageTypeException
|
||||
* when the message type (commandId, requestId) has no associated class
|
||||
* @throws UnknownMessageTypeException
|
||||
* when the message type (commandId, requestId) is not registered
|
||||
*/
|
||||
public static Message get(short[] data) throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
if (data == null) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
// die ersten Bytes der Message auswerten, die richtigen Messages erzeugen
|
||||
MessageHeader hdr = new MessageHeader(data);
|
||||
// der hdr enthaelt die CommandId und die RequestId
|
||||
Command command = Command.get(hdr.getCommandId(), hdr.getRequestId());
|
||||
|
||||
// am Command ist die zu instanziierende Klasse hinterlegt
|
||||
Class<?> clazz = command.getMessageClass();
|
||||
// wenn die Klasse null ist wird sie nie instanziiert
|
||||
if (clazz == null) {
|
||||
String excText = MessageFormat.format("Message with commandId %04X, requestId %04X is known but NOT supported",
|
||||
command.getCommandId(), command.getRequestId());
|
||||
throw new UnsupportedMessageTypeException(excText);
|
||||
}
|
||||
|
||||
// der Reihe nach 2 mögliche constructoren testen.
|
||||
// 1. den mit den short[] parametern
|
||||
// 2. den ohne Parameter
|
||||
Message message = null;
|
||||
try {
|
||||
Constructor<?> constructor = clazz.getConstructor(new Class[] { short[].class });
|
||||
message = (Message) constructor.newInstance(new Object[] { data });
|
||||
} catch (NoSuchMethodException e) {
|
||||
try {
|
||||
Constructor<?> constructor = clazz.getConstructor(new Class[0]);
|
||||
message = (Message) constructor.newInstance(new Object[0]);
|
||||
} catch (Exception e1) {
|
||||
// ignore this exception
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// ignore this exception
|
||||
}
|
||||
return message;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creating a message from a StringBuffer.
|
||||
*
|
||||
* @see #get(short[])
|
||||
* @param stb
|
||||
* @return
|
||||
* @throws UnsupportedMessageTypeException
|
||||
* @throws UnknownMessageTypeException
|
||||
*/
|
||||
public static Message get(StringBuffer stb) throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
// StringBuffer2shortArray
|
||||
if (stb == null) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
short[] data = new short[stb.length()];
|
||||
for (int i = 0; i < stb.length(); i++) {
|
||||
char c = stb.charAt(i);
|
||||
data[i] = (short) c;
|
||||
if (data[i] < 0) {
|
||||
data[i] = (short) ((65536 - Math.abs(data[i])) & 0x00FF);
|
||||
}
|
||||
}
|
||||
return get(data);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import com.itac.mes.datainterface.data.UnknownMessageTypeException;
|
||||
|
||||
public class MessageHeader extends BinaryMessage {
|
||||
|
||||
// do not allow to create instances directly
|
||||
protected MessageHeader(short[] data) {
|
||||
setByteData(data);
|
||||
}
|
||||
|
||||
public MessageHeader(Command command) {
|
||||
// minimum size 12 bytes
|
||||
super();
|
||||
setCommandId(command.getCommandId());
|
||||
setRequestId(command.getRequestId());
|
||||
setBodyLength(0);
|
||||
}
|
||||
|
||||
public long getCommandId() {
|
||||
return readULong(0);
|
||||
}
|
||||
|
||||
public long getRequestId() {
|
||||
return readULong(4);
|
||||
}
|
||||
|
||||
public void setCommandId(long commandId) {
|
||||
writeULong(0, commandId);
|
||||
}
|
||||
|
||||
public void setRequestId(long requestId) {
|
||||
writeULong(4, requestId);
|
||||
}
|
||||
|
||||
public void setBodyLength(long bodyLength) {
|
||||
writeULong(8, bodyLength);
|
||||
}
|
||||
|
||||
public long getBodyLength() {
|
||||
return readULong(8);
|
||||
}
|
||||
|
||||
public Command getCommand() throws UnknownMessageTypeException {
|
||||
return Command.get(getCommandId(), getRequestId());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
public class NackResponseMessage extends Message {
|
||||
|
||||
public NackResponseMessage(short[] data) {
|
||||
super(Command.RESPONSE_NACK);
|
||||
setByteData(data);
|
||||
setBodyLength(8);
|
||||
}
|
||||
|
||||
public NackResponseMessage(int cid, int rid) {
|
||||
super(Command.RESPONSE_NACK);
|
||||
setBodyLength(8);
|
||||
setRId(rid);
|
||||
setCId(cid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("CID: ").append(getCId()).append('\n');
|
||||
stb.append("RID: ").append(getRId()).append('\n');
|
||||
return stb;
|
||||
}
|
||||
|
||||
public long getCId() {
|
||||
return readULong(12);
|
||||
}
|
||||
|
||||
public long getRId() {
|
||||
return readULong(16);
|
||||
}
|
||||
|
||||
public void setCId(long cid) {
|
||||
writeULong(12, cid);
|
||||
}
|
||||
|
||||
public void setRId(long rid) {
|
||||
writeULong(16, rid);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
public class PlacementProgramControlRequestMessage extends Message {
|
||||
|
||||
/**
|
||||
* Nachricht mit RESULT NG erzeugen, den Text in die Nachricht uebernehmen, und die Laenge automatisch setzen.
|
||||
*
|
||||
* @param errorMessage
|
||||
*/
|
||||
public PlacementProgramControlRequestMessage(String errorMessage) {
|
||||
super(Command.PLACEMENT_PROGRAM_CONTROL_REQUEST);
|
||||
setResult(Result.NG);
|
||||
setErrorMessage(errorMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Nachricht mit RESULT OK erzeugen, und die Laenge automatisch setzen.
|
||||
*
|
||||
* @param resultText
|
||||
*/
|
||||
public PlacementProgramControlRequestMessage(Result result) {
|
||||
super(Command.PLACEMENT_PROGRAM_CONTROL_REQUEST);
|
||||
setResult(result);
|
||||
setBodyLength(4);
|
||||
}
|
||||
|
||||
public PlacementProgramControlRequestMessage(short[] data) {
|
||||
super(Command.PLACEMENT_PROGRAM_CONTROL_REQUEST);
|
||||
setByteData(data);
|
||||
}
|
||||
|
||||
public PlacementProgramControlRequestMessage(Result result, String reason) {
|
||||
super(Command.PLACEMENT_PROGRAM_CONTROL_REQUEST);
|
||||
setResult(result);
|
||||
setErrorMessage(reason);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("ResponseCode:").append(getResult()).append('\n');
|
||||
stb.append(getErrorMessage());
|
||||
return stb;
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
setBodyLength(4);
|
||||
if (errorMessage == null) {
|
||||
return;
|
||||
}
|
||||
setBodyLength(4 + errorMessage.length());
|
||||
writeString(16, errorMessage);
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
long streamLength = getBodyLength() - 4;
|
||||
return readString(16, (int) streamLength);
|
||||
}
|
||||
|
||||
public void setResult(Result result) {
|
||||
setResult(12, result);
|
||||
}
|
||||
|
||||
public Result getResult() {
|
||||
return getResult(12);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved. This software is protected by copyright. Under no
|
||||
* circumstances may any part of this file in any form be copied, printed, edited or otherwise distributed, be stored in
|
||||
* a retrieval system, or be translated into another language without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
/**
|
||||
* A Placement controlResponse Message is sent by the interface to the Samsung Machine.
|
||||
*
|
||||
* @author frankp
|
||||
*
|
||||
*/
|
||||
public class PlacementProgramControlResponseMessage extends Message {
|
||||
|
||||
/**
|
||||
* Create a responseMessage including the response code.
|
||||
*
|
||||
* @param responseCode
|
||||
* this code is in the message
|
||||
*/
|
||||
public PlacementProgramControlResponseMessage(long responseCode) {
|
||||
super(Command.PLACEMENT_PROGRAM_CONTROL_RESPONSE);
|
||||
setBodyLength(4);
|
||||
setResponseCode(responseCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a default response without a specific responseCode.
|
||||
*/
|
||||
public PlacementProgramControlResponseMessage() {
|
||||
super(Command.PLACEMENT_PROGRAM_CONTROL_RESPONSE);
|
||||
setBodyLength(4);
|
||||
}
|
||||
|
||||
public PlacementProgramControlResponseMessage(short[] data) {
|
||||
super(Command.PLACEMENT_PROGRAM_CONTROL_RESPONSE);
|
||||
setByteData(data);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("responseCode: ").append(getResponseCode());
|
||||
return stb;
|
||||
}
|
||||
|
||||
public long getResponseCode() {
|
||||
return readULong(12);
|
||||
}
|
||||
|
||||
public void setResponseCode(long responseCode) {
|
||||
writeULong(12, responseCode);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved. This software is protected by copyright. Under no
|
||||
* circumstances may any part of this file in any form be copied, printed, edited or otherwise distributed, be stored in
|
||||
* a retrieval system, or be translated into another language without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class PlacementProgramVerificationMessage extends Message {
|
||||
|
||||
public PlacementProgramVerificationMessage(short[] data) {
|
||||
super(Command.PLACEMENT_PROGRAM_VERIFICATION);
|
||||
setByteData(data);
|
||||
}
|
||||
|
||||
public PlacementProgramVerificationMessage(String fileName, String content) {
|
||||
super(Command.PLACEMENT_PROGRAM_VERIFICATION);
|
||||
setFileName(fileName);
|
||||
setFileStream(content);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("fileName: ").append(getFileName()).append('\n');
|
||||
stb.append(getFileStream());
|
||||
return stb;
|
||||
}
|
||||
|
||||
public Date getEventTime() {
|
||||
return readDate(12);
|
||||
}
|
||||
|
||||
public void setEventTime(Date eventTime) {
|
||||
writeDate(12, eventTime);
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return readString(16, 64);
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
writeString(16, fileName, 64);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the length of the file stream in this message.
|
||||
*
|
||||
* @return length of the file Stream
|
||||
*/
|
||||
public long getFileLength() {
|
||||
return readULong(16 + 64);
|
||||
}
|
||||
|
||||
public StringBuffer getFileStream() {
|
||||
long streamLength = getFileLength();
|
||||
return readStringBuffer(16 + 64 + 4, (int) streamLength);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting a file content to this message. The length field is set automatically.
|
||||
*
|
||||
* @param fileContent
|
||||
* the text to be set to the message; field stream length is set implicitly
|
||||
*/
|
||||
public void setFileStream(String fileContent) {
|
||||
int streamLength = fileContent.length();
|
||||
|
||||
setBodyLength(72 + streamLength);
|
||||
writeULong(16 + 64, streamLength);
|
||||
writeString(16 + 64 + 4, fileContent);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class ReelBarcodeScanEventMessage extends Message {
|
||||
|
||||
public ReelBarcodeScanEventMessage(Date date, String reelId, String partName, long initialPartCount) {
|
||||
super(Command.REEL_BARCODE_SCAN);
|
||||
setBodyLength(136);
|
||||
setEventTime(date);
|
||||
setReelId(reelId);
|
||||
setPartName(partName);
|
||||
setRemainingPartCount(initialPartCount);
|
||||
}
|
||||
|
||||
public ReelBarcodeScanEventMessage(short[] data) {
|
||||
super(Command.REEL_BARCODE_SCAN);
|
||||
setBodyLength(136);
|
||||
setByteData(data);
|
||||
}
|
||||
|
||||
public Date getEventTime() {
|
||||
return readDate(12);
|
||||
}
|
||||
|
||||
public void setEventTime(Date newEventTime) {
|
||||
writeDate(12, newEventTime);
|
||||
}
|
||||
|
||||
public void setReelId(String reelId) {
|
||||
if (reelId == null) {
|
||||
return;
|
||||
}
|
||||
writeString(16, reelId, 64);
|
||||
}
|
||||
|
||||
public String getReelId() {
|
||||
int length = 64;
|
||||
String resultString = readString(16, length);
|
||||
return resultString;
|
||||
}
|
||||
|
||||
public void setPartName(String partName) {
|
||||
if (partName == null) {
|
||||
return;
|
||||
}
|
||||
writeString(80, partName, 64);
|
||||
}
|
||||
|
||||
public String getPartName() {
|
||||
String resultString = readString(80, 64);
|
||||
return resultString;
|
||||
}
|
||||
|
||||
public long getReminingPartCount() {
|
||||
return readULong(144);
|
||||
}
|
||||
|
||||
public void setRemainingPartCount(long remainingPartCount) {
|
||||
writeULong(144, remainingPartCount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("EventTime: ").append(getEventTime()).append("\n");
|
||||
stb.append("ReelId: ").append(getReelId()).append("\n");
|
||||
stb.append("PartName: ").append(getPartName()).append("\n");
|
||||
stb.append("RemainingPartCount: ").append(getReminingPartCount()).append("\n");
|
||||
return stb;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,135 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved. This software is protected by copyright. Under no
|
||||
* circumstances may any part of this file in any form be copied, printed, edited or otherwise distributed, be stored in
|
||||
* a retrieval system, or be translated into another language without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
public class ReelInformationRequestMessage extends Message {
|
||||
|
||||
public ReelInformationRequestMessage(short[] data) {
|
||||
super(Command.REEL_INFORMATION_REQUEST);
|
||||
setByteData(data);
|
||||
setBodyLength(268);
|
||||
}
|
||||
|
||||
public ReelInformationRequestMessage(String reelId, String partName, long remainingQty, String vendorName, Result result) {
|
||||
this(null);
|
||||
setVendorReelBarcode(reelId);
|
||||
setResult(result);
|
||||
setPartName(partName);
|
||||
setRemainingPartCount(remainingQty);
|
||||
setVendorName(vendorName);
|
||||
}
|
||||
|
||||
public long getReelId() {
|
||||
return readULong(12);
|
||||
}
|
||||
|
||||
public void setReelId(long newReelId) {
|
||||
writeULong(12, newReelId);
|
||||
}
|
||||
|
||||
public void setPartName(String partName) {
|
||||
if (partName == null) {
|
||||
return;
|
||||
}
|
||||
writeString(16, partName, 64);
|
||||
}
|
||||
|
||||
public String getPartName() {
|
||||
String resultString = readString(16, 64);
|
||||
return resultString;
|
||||
}
|
||||
|
||||
public long getRemainingPartCount() {
|
||||
return readULong(80);
|
||||
}
|
||||
|
||||
public void setRemainingPartCount(long newPartCount) {
|
||||
writeULong(80, newPartCount);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setzen des Vendors in diese Nachricht.
|
||||
*
|
||||
* @param vendorName
|
||||
* null ändert den bisherigen Text nicht, alle anderen Texte werden bis zu einer Max Länge gesetzt
|
||||
*/
|
||||
public void setVendorName(String vendorName) {
|
||||
if (vendorName == null) {
|
||||
return;
|
||||
}
|
||||
writeString(84, vendorName, 64);
|
||||
}
|
||||
|
||||
public String getVendorName() {
|
||||
String resultString = readString(84, 64);
|
||||
return resultString;
|
||||
}
|
||||
|
||||
public void setVendorPartName(String vendorName) {
|
||||
if (vendorName == null) {
|
||||
return;
|
||||
}
|
||||
writeString(148, vendorName, 64);
|
||||
}
|
||||
|
||||
public String getVendorPartName() {
|
||||
String resultString = readString(148, 64);
|
||||
return resultString;
|
||||
}
|
||||
|
||||
public void setVendorReelBarcode(String vendorName) {
|
||||
if (vendorName == null) {
|
||||
return;
|
||||
}
|
||||
writeString(212, vendorName, 64);
|
||||
}
|
||||
|
||||
public String getVendorReelBarcode() {
|
||||
String resultString = readString(212, 64);
|
||||
return resultString;
|
||||
}
|
||||
|
||||
public Result getResult() {
|
||||
return getResult(276);
|
||||
}
|
||||
|
||||
public void setResult(Result newResult) {
|
||||
setResult(276, newResult);
|
||||
}
|
||||
|
||||
public void setErrorMessage(String errorMessage) {
|
||||
if (errorMessage == null) {
|
||||
setBodyLength(268);
|
||||
return;
|
||||
}
|
||||
setBodyLength(268 + errorMessage.length());
|
||||
writeString(280, errorMessage);
|
||||
}
|
||||
|
||||
public String getErrorMessage() {
|
||||
int len = (int) (getBodyLength() - 268);
|
||||
if (len == 0) {
|
||||
return "";
|
||||
}
|
||||
String resultString = readString(280, len);
|
||||
return resultString;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("ReelId: ").append(getReelId()).append("\n");
|
||||
stb.append("PartName: ").append(getPartName()).append("\n");
|
||||
stb.append("RemainingPartCount: ").append(getRemainingPartCount()).append("\n");
|
||||
stb.append("VendorName: ").append(getVendorName()).append("\n");
|
||||
stb.append("VendorPartName: ").append(getVendorPartName()).append("\n");
|
||||
stb.append("VendorReelBarcode: ").append(getVendorReelBarcode()).append("\n");
|
||||
stb.append("Result: ").append(getResult()).append("\n");
|
||||
stb.append("ErrorMessage: ").append(getErrorMessage()).append("\n");
|
||||
return stb;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
public class ReelInformationResponseMessage extends Message {
|
||||
|
||||
public ReelInformationResponseMessage(long result) {
|
||||
super(Command.REEL_INFORMATION_RESPONSE);
|
||||
setResult(result);
|
||||
setBodyLength(4);
|
||||
}
|
||||
|
||||
public ReelInformationResponseMessage(short[] data) {
|
||||
super(Command.REEL_INFORMATION_RESPONSE);
|
||||
setByteData(data);
|
||||
setBodyLength(4);
|
||||
}
|
||||
|
||||
public long getResult() {
|
||||
return readULong(12);
|
||||
}
|
||||
|
||||
public void setResult(long newResult) {
|
||||
writeULong(12, newResult);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("result: ").append(getResult());
|
||||
return stb;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class RemainingReelPartCountMessage extends Message {
|
||||
|
||||
public enum FeederStatus {
|
||||
UNKNOWN(0), //
|
||||
CLAMP(1), //
|
||||
UNCLAMP(2), //
|
||||
INSTALL(3), //
|
||||
UNINSTALL(4), //
|
||||
SPLICING(5), //
|
||||
UNSPLICING(6), //
|
||||
CONSUMED(7);
|
||||
|
||||
private long status;
|
||||
|
||||
private FeederStatus(long status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public static FeederStatus getFeederStatus(long status) {
|
||||
if (status < 0 || status >= FeederStatus.values().length) {
|
||||
return FeederStatus.UNKNOWN;
|
||||
}
|
||||
return FeederStatus.values()[(int) status];
|
||||
}
|
||||
|
||||
public long getStatusValue(){
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
public RemainingReelPartCountMessage(short[] data) {
|
||||
super(Command.REMAINING_REEL_PART_COUNT_EVENT);
|
||||
setBodyLength(84);
|
||||
setByteData(data);
|
||||
}
|
||||
|
||||
public RemainingReelPartCountMessage(Date eventTime, String reelId, int feederStatus, long partCount) {
|
||||
this(null);
|
||||
setBodyLength(84);
|
||||
setEventTime(eventTime);
|
||||
setReelId(reelId);
|
||||
setFeederStatus(feederStatus);
|
||||
setPartCount(partCount);
|
||||
}
|
||||
|
||||
public Date getEventTime() {
|
||||
return readDate(12);
|
||||
}
|
||||
|
||||
public void setEventTime(Date newEventTime) {
|
||||
writeDate(12, newEventTime);
|
||||
}
|
||||
|
||||
public void setReelId(String reelId) {
|
||||
if (reelId == null) {
|
||||
return;
|
||||
}
|
||||
writeString(16, reelId, 64);
|
||||
}
|
||||
|
||||
public String getReelId() {
|
||||
int length = 64;
|
||||
String resultString = readString(16, length);
|
||||
return resultString;
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("EventTime: ").append(getEventTime()).append("\n");
|
||||
stb.append("ReelId: ").append(getReelId()).append("\n");
|
||||
stb.append("FeederStatus: ").append(getFeederStatus()).append("\n");
|
||||
stb.append("PartCount: ").append(getPartCount()).append("\n");
|
||||
return stb;
|
||||
}
|
||||
|
||||
public FeederStatus getFeederStatus() {
|
||||
return FeederStatus.getFeederStatus(readULong(80));
|
||||
}
|
||||
|
||||
public void setFeederStatus(long feederStatus) {
|
||||
writeULong(80, feederStatus);
|
||||
}
|
||||
|
||||
public long getPartCount() {
|
||||
return readULong(84);
|
||||
}
|
||||
|
||||
public void setPartCount(long partCount) {
|
||||
writeULong(84, partCount);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved. This software is protected by copyright. Under no
|
||||
* circumstances may any part of this file in any form be copied, printed, edited or otherwise distributed, be stored in
|
||||
* a retrieval system, or be translated into another language without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class TraceabilityEventMessage extends Message {
|
||||
|
||||
public TraceabilityEventMessage(short[] data) {
|
||||
super(Command.TRACEABILITY_EVENT);
|
||||
setByteData(data);
|
||||
}
|
||||
|
||||
public TraceabilityEventMessage(String fileName, String content) {
|
||||
super(Command.TRACEABILITY_EVENT);
|
||||
setFileName(fileName);
|
||||
setFileStream(content);
|
||||
}
|
||||
|
||||
@Override
|
||||
public StringBuffer getReadableString() {
|
||||
StringBuffer stb = super.getReadableString();
|
||||
stb.append("fileName: ").append(getFileName()).append('\n');
|
||||
stb.append(getFileStream());
|
||||
return stb;
|
||||
}
|
||||
|
||||
public Date getEventTime() {
|
||||
return readDate(12);
|
||||
}
|
||||
|
||||
public void setEventTime(Date eventTime) {
|
||||
writeDate(12, eventTime);
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return readString(16, 64);
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
writeString(16, fileName, 64);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine the length of the stored file stream in this message.
|
||||
*
|
||||
* @return length of the file Stream
|
||||
*/
|
||||
public long getFileLength() {
|
||||
return readULong(16 + 64);
|
||||
}
|
||||
|
||||
public String getFileStream() {
|
||||
long streamLength = getFileLength();
|
||||
return readString(16 + 64 + 4, (int) streamLength);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting the file stream content.
|
||||
*
|
||||
* @param fileContent
|
||||
* te text to be set to the message; field stream length is set implicitly
|
||||
*/
|
||||
public void setFileStream(String fileContent) {
|
||||
int streamLength = fileContent.length();
|
||||
|
||||
setBodyLength(72 + streamLength);
|
||||
writeULong(16 + 64, streamLength);
|
||||
writeString(16 + 64 + 4, fileContent);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class UnsupportedMessageTypeExceptionTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
UnsupportedMessageTypeException out = new UnsupportedMessageTypeException("message");
|
||||
assertEquals("message", out.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class BinaryMessageTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
BinaryMessage out = new BinaryMessage();
|
||||
BinaryMessage.setStuffing(BinaryMessage.Stuffing.LEFT);
|
||||
out.writeString(12, "Hallo", 12);
|
||||
// dieser Text linksbündig aufgefüllt bedeutet das o ist an der letzten Stelle
|
||||
short[] byteData = out.byteData;
|
||||
assertEquals(111, byteData[23]);
|
||||
|
||||
assertEquals("Hallo", out.readString(12, 12));
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testWriteBigNumber() {
|
||||
BinaryMessage out = new BinaryMessage();
|
||||
// zu grossen Wert schreiben
|
||||
out.writeULong(12, 0x100000000L);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testWriteNegativeNumber() {
|
||||
BinaryMessage out = new BinaryMessage();
|
||||
// zu grossen Wert schreiben
|
||||
out.writeULong(12, -5L);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLengthLimit() {
|
||||
BinaryMessage out = new BinaryMessage();
|
||||
// zu grossen Wert schreiben
|
||||
out.writeString(12, "Hallo", 4);
|
||||
// wird mehr gelesen als im letzten String der Message enthalten sein kann mit spaces stuffen
|
||||
assertEquals("Hall", out.readString(12, 5));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.itac.mes.datainterface.data.UnknownMessageTypeException;
|
||||
|
||||
public class BoardBarcodeEventMessageTest {
|
||||
|
||||
@Test
|
||||
public void testSimpleMessage() throws UnknownMessageTypeException {
|
||||
BoardBarcodeEventMessage out = new BoardBarcodeEventMessage(null);
|
||||
assertEquals(out.getCommand(), Command.BOARD_BARCODE_EVENT);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetterSetter() throws UnknownMessageTypeException {
|
||||
BoardBarcodeEventMessage out = new BoardBarcodeEventMessage(null);
|
||||
out.setEventTime(new Date(1234000L));
|
||||
out.setBarcodeId("barCode");
|
||||
out.setJobName("pcbFileName");
|
||||
assertEquals("barCode", out.getBarcodeId());
|
||||
assertEquals(1234000L, out.getEventTime().getTime());
|
||||
assertEquals(0x0090, out.getCommandId());
|
||||
assertEquals(0x0011, out.getRequestId());
|
||||
assertEquals(
|
||||
"CommandId: 0x0090(144), RequestId: 0x0011(17), BodyLength: 0x0084(132)\n"
|
||||
+ "EventTime: Thu Jan 01 01:20:34 CET 1970\nBarcodeId: barCode\nJobName: pcbFileName\n",
|
||||
out.getReadableString().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetReelId() throws UnknownMessageTypeException {
|
||||
BoardBarcodeEventMessage out = new BoardBarcodeEventMessage(null);
|
||||
out.setEventTime(new Date(1234000L));
|
||||
out.setBarcodeId("barCode");
|
||||
out.setBarcodeId(null);
|
||||
assertEquals("barCode", out.getBarcodeId());
|
||||
out.setBarcodeId("");
|
||||
assertEquals("", out.getBarcodeId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testalternativeConstructor() throws UnknownMessageTypeException {
|
||||
BoardBarcodeEventMessage out = new BoardBarcodeEventMessage(new Date(1234000L), "barCode", "pcbFileName");
|
||||
assertEquals("barCode", out.getBarcodeId());
|
||||
assertEquals(1234000L, out.getEventTime().getTime());
|
||||
assertEquals("pcbFileName", out.getJobName());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany.<p> All Rights Reserved. This software is protected by copyright. Under
|
||||
* no circumstances may any part of this file in any form be copied, printed, edited or otherwise distributed, be stored
|
||||
* in a retrieval system, or be translated into another language without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.itac.mes.datainterface.data.UnknownMessageTypeException;
|
||||
|
||||
public class CommandTest {
|
||||
|
||||
@Test
|
||||
/**
|
||||
* check that no two commands have the same command Id and Request Id.
|
||||
*/
|
||||
public void testNoDuplicates() {
|
||||
Set<String> cmdset = new HashSet<String>();
|
||||
for (Command command : Command.values()) {
|
||||
String key = "cmd:" + command.getCommandId() + " req:" + command.getRequestId();
|
||||
if (cmdset.contains(key)) {
|
||||
Assert.fail("key is duplicate: " + key);
|
||||
}
|
||||
cmdset.add(key);
|
||||
}
|
||||
}
|
||||
|
||||
@Test(expected = UnknownMessageTypeException.class)
|
||||
public void testUnknownCommandRequestId() throws UnknownMessageTypeException {
|
||||
// command erzeugen, das es nicht gibt
|
||||
Command.get(0xCAFE, 0xCAFE);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class ConnectionRequestMessageTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
ConnectionRequestMessage out = new ConnectionRequestMessage("LM001", 1000);
|
||||
assertEquals(1000, out.getVersion());
|
||||
assertEquals("LM001", out.getClient());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAlternativeConstructor() {
|
||||
ConnectionRequestMessage out = new ConnectionRequestMessage(new short[0]);
|
||||
|
||||
assertEquals(0, out.getVersion());
|
||||
assertEquals("", out.getClient());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetReadableString() {
|
||||
ConnectionRequestMessage out = new ConnectionRequestMessage("LM001", 1000);
|
||||
assertEquals("CommandId: 0x0001(1), RequestId: 0x0001(1), BodyLength: 0x0024(36)\nClientType: LM001\nVersion: 1000\n", out
|
||||
.getReadableString().toString());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class ConnectionResponseMessageTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
ConnectionResponseMessage out = new ConnectionResponseMessage(1000);
|
||||
assertEquals(1000, out.getVersion());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAlternativeConstructor() {
|
||||
ConnectionResponseMessage out = new ConnectionResponseMessage(new short[0]);
|
||||
|
||||
assertEquals(0, out.getVersion());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetReadableString() {
|
||||
ConnectionResponseMessage out = new ConnectionResponseMessage(1000);
|
||||
assertEquals("CommandId: 0x0002(2), RequestId: 0x0001(1), BodyLength: 0x0004(4)\nVersion: 1000\n", out.getReadableString()
|
||||
.toString());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.itac.mes.datainterface.data.samsung.message.InterlockingRequestMessage.RequestCode;
|
||||
|
||||
public class InterlockingRequestMessageTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
InterlockingRequestMessage out = new InterlockingRequestMessage(new short[] {});
|
||||
assertNotNull(out);
|
||||
assertNull(out.getRequestCode());
|
||||
out.setRequestCode(RequestCode.JOB_CHANGE);
|
||||
assertEquals(RequestCode.JOB_CHANGE, out.getRequestCode());
|
||||
|
||||
out.setBarcodeId("barCode");
|
||||
out.setBarcodeId(null);
|
||||
assertEquals("barCode", out.getBarcodeId());
|
||||
out.setBarcodeId("");
|
||||
assertEquals("", out.getBarcodeId());
|
||||
|
||||
assertEquals(0, out.getBadmarkUse());
|
||||
out.setBadmarkUse(33);
|
||||
assertEquals(33, out.getBadmarkUse());
|
||||
|
||||
assertEquals(0, out.getArrayNo());
|
||||
out.setArrayNo(12);
|
||||
assertEquals(12, out.getArrayNo());
|
||||
|
||||
out.setBadmarkInfo("100110");
|
||||
out.setBadmarkInfo(null);
|
||||
assertEquals("100110", out.getBadmarkInfo());
|
||||
out.setBadmarkInfo("");
|
||||
assertEquals("", out.getBadmarkInfo());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setMessageShouldSetBodyLength() {
|
||||
InterlockingRequestMessage out = new InterlockingRequestMessage(new short[] {});
|
||||
out.setErrorMessage(null);
|
||||
out.setBadmarkInfo("1010");
|
||||
assertEquals(76, out.getBodyLength());
|
||||
out.setErrorMessage("");
|
||||
assertEquals(76, out.getBodyLength());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setMessageAlternativeConstructor() {
|
||||
InterlockingRequestMessage out = new InterlockingRequestMessage(RequestCode.TRACEABILITY_NG);
|
||||
assertEquals(RequestCode.TRACEABILITY_NG, out.getRequestCode());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetterSetterBadmarkinfo() {
|
||||
InterlockingRequestMessage out = new InterlockingRequestMessage(RequestCode.TRACEABILITY_NG);
|
||||
assertEquals("", out.getBadmarkInfo());
|
||||
out.setBadmarkInfo("001110");
|
||||
assertEquals("001110", out.getBadmarkInfo());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadableString() {
|
||||
InterlockingRequestMessage out = new InterlockingRequestMessage(RequestCode.START);
|
||||
|
||||
out.setBadmarkInfo("001110");
|
||||
assertEquals("001110", out.getBadmarkInfo());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class InterlockingResponseMessageTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
InterlockingResponseMessage out = new InterlockingResponseMessage(new short[] {});
|
||||
assertNotNull(out);
|
||||
assertEquals(0, out.getResult());
|
||||
out.setResult(1234);
|
||||
assertEquals(1234, out.getResult());
|
||||
|
||||
assertEquals(4, out.getBodyLength());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAlternativeConstructor() {
|
||||
InterlockingResponseMessage out = new InterlockingResponseMessage(12);
|
||||
assertEquals(12, out.getResult());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class MachineStatusEventMessageTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
short[] data = new short[] { 0x21, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
MachineStatusEventMessage out = new MachineStatusEventMessage(data);
|
||||
|
||||
out.setCode(0xFFFF);
|
||||
|
||||
assertEquals(0xFFFF, out.getCode());
|
||||
|
||||
out.setLevel(0x1234);
|
||||
assertEquals(0x1234, out.getLevel());
|
||||
|
||||
out.setEventTime(new Date(1412356000L));
|
||||
assertEquals(1412356000, out.getEventTime().getTime());
|
||||
|
||||
out.setMachineStatus(0xF3F3);
|
||||
assertEquals(0xF3F3, out.getMachineStatus());
|
||||
|
||||
assertEquals("", out.getMessage());
|
||||
out.setMessage("Das ist ein gueltiger Text!");
|
||||
assertEquals("Das ist ein gueltiger Text!", out.getMessage());
|
||||
|
||||
out.setMessage(null);
|
||||
assertEquals("", out.getMessage());
|
||||
|
||||
assertEquals(20, out.getBodyLength());
|
||||
out.setMessage("zwanzigZeichenExtra!");
|
||||
|
||||
assertEquals(40, out.getBodyLength());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test2() {
|
||||
|
||||
MachineStatusEventMessage out = new MachineStatusEventMessage(null);
|
||||
out.setEventTime(new Date(1234000L));
|
||||
out.setMachineStatus(2562);
|
||||
out.setCode(1221);
|
||||
out.setLevel(4);
|
||||
|
||||
assertEquals("CommandId: 0x0090(144), RequestId: 0x0014(20), BodyLength: 0x0014(20)\n"
|
||||
+ "EventTime: Thu Jan 01 01:20:34 CET 1970\n" + "MachineStatus: 2562\n" + "Code: 1221\n" + "Level: 4\n" + "message: \n",
|
||||
out.getReadableString().toString());
|
||||
out.setMessage("abcd");
|
||||
|
||||
assertEquals(
|
||||
"CommandId: 0x0090(144), RequestId: 0x0014(20), BodyLength: 0x0018(24)\n" + "EventTime: Thu Jan 01 01:20:34 CET 1970\n"
|
||||
+ "MachineStatus: 2562\n" + "Code: 1221\n" + "Level: 4\n" + "message: abcd\n", out.getReadableString().toString());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static junit.framework.Assert.assertNotNull;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class MaterialConsumptionEventMessageTest {
|
||||
|
||||
@Test
|
||||
public void testConstructor() {
|
||||
MaterialConsumptionEventMessage out = new MaterialConsumptionEventMessage(new short[] {});
|
||||
assertNotNull(out);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testSetReelIds() {
|
||||
MaterialConsumptionEventMessage out = new MaterialConsumptionEventMessage(new short[] {});
|
||||
|
||||
out.setReelNumber(0);
|
||||
// weder setzen noch lesen von ReelId und PartCount sollte funktionieren
|
||||
out.setReelId(0, "geht nicht");
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testSetPartcount() {
|
||||
MaterialConsumptionEventMessage out = new MaterialConsumptionEventMessage(new short[] {});
|
||||
out.setReelNumber(0);
|
||||
out.setPartCount(0, 3);
|
||||
// weder setzen noch lesen von ReelId und PartCount sollte funktionieren
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testGetReelIds() {
|
||||
MaterialConsumptionEventMessage out = new MaterialConsumptionEventMessage(new short[] {});
|
||||
|
||||
out.setReelNumber(0);
|
||||
// weder setzen noch lesen von ReelId und PartCount sollte funktionieren
|
||||
out.getReelId(0);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void testGetPartcount() {
|
||||
MaterialConsumptionEventMessage out = new MaterialConsumptionEventMessage(new short[] {});
|
||||
|
||||
out.setReelNumber(0);
|
||||
out.getPartCount(0);
|
||||
// weder setzen noch lesen von ReelId und PartCount sollte funktionieren
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetReelIdValid() {
|
||||
MaterialConsumptionEventMessage out = new MaterialConsumptionEventMessage(new short[] {});
|
||||
|
||||
out.setReelNumber(1);
|
||||
// weder setzen noch lesen von ReelId und PartCount sollte funktionieren
|
||||
out.setReelId(0, "geht nicht");
|
||||
out.setPartCount(0, 12);
|
||||
|
||||
assertEquals("geht nicht", out.getReelId(0));
|
||||
assertEquals(12, out.getPartCount(0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetReelIdbiggerValid() {
|
||||
MaterialConsumptionEventMessage out = new MaterialConsumptionEventMessage(new short[] {});
|
||||
|
||||
out.setReelNumber(5);
|
||||
|
||||
out.setReelId(0, "geht nicht");
|
||||
out.setPartCount(0, 12);
|
||||
out.setReelId(1, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
|
||||
out.setPartCount(1, 5555);
|
||||
|
||||
assertEquals("geht nicht", out.getReelId(0));
|
||||
assertEquals(12, out.getPartCount(0));
|
||||
assertEquals("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", out.getReelId(1));
|
||||
assertEquals(5555, out.getPartCount(1));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetLongValues() {
|
||||
MaterialConsumptionEventMessage out = new MaterialConsumptionEventMessage(new short[] {});
|
||||
|
||||
assertEquals(0, out.getTotalAPickupCount());
|
||||
assertEquals(0, out.getTotalAPlaceCount());
|
||||
assertEquals(0, out.getTotalVPickupCount());
|
||||
assertEquals(0, out.getTotalVPlaceCount());
|
||||
assertEquals(0, out.getTotalPlaceCount());
|
||||
assertEquals(0, out.getTotalPickupCount());
|
||||
assertEquals(0, out.getVisionFailureCount());
|
||||
assertEquals(0, out.getPickupErrorCount());
|
||||
assertEquals(0, out.getBuildTime().getTime());
|
||||
assertEquals(0, out.getTransferTime().getTime());
|
||||
assertEquals(0, out.getWaitTime().getTime());
|
||||
assertEquals(0, out.getEntryWaitTime().getTime());
|
||||
assertEquals(0, out.getExitWaitTime().getTime());
|
||||
assertEquals(0, out.getStopTime().getTime());
|
||||
assertEquals(0, out.getIdleTime().getTime());
|
||||
assertEquals(0, out.getScheduleStopTime().getTime());
|
||||
assertEquals(0, out.getRunningTime().getTime());
|
||||
assertEquals(0, out.getTotalPickupMiss());
|
||||
assertEquals(0, out.getTotalMountMiss());
|
||||
|
||||
out.setTotalAPickupCount(1);
|
||||
out.setTotalAPlaceCount(2);
|
||||
out.setTotalVPickupCount(3);
|
||||
out.setTotalVPlaceCount(4);
|
||||
out.setTotalPlaceCount(5);
|
||||
out.setTotalPickupCount(6);
|
||||
out.setVisionFailureCount(7);
|
||||
out.setPickupErrorCount(8);
|
||||
out.setTotalPickupMiss(9);
|
||||
out.setTotalMountMiss(10);
|
||||
|
||||
assertEquals(1, out.getTotalAPickupCount());
|
||||
assertEquals(2, out.getTotalAPlaceCount());
|
||||
assertEquals(3, out.getTotalVPickupCount());
|
||||
assertEquals(4, out.getTotalVPlaceCount());
|
||||
assertEquals(5, out.getTotalPlaceCount());
|
||||
assertEquals(6, out.getTotalPickupCount());
|
||||
assertEquals(7, out.getVisionFailureCount());
|
||||
assertEquals(8, out.getPickupErrorCount());
|
||||
assertEquals(9, out.getTotalPickupMiss());
|
||||
assertEquals(10, out.getTotalMountMiss());
|
||||
|
||||
|
||||
out.setBuildTime(new Date(1000L));
|
||||
out.setTransferTime(new Date(2000L));
|
||||
out.setWaitTime(new Date(3000L));
|
||||
out.setEntryWaitTime(new Date(4000L));
|
||||
out.setExitWaitTime(new Date(5000L));
|
||||
out.setStopTime(new Date(6000L));
|
||||
out.setIdleTime(new Date(7000L));
|
||||
out.setScheduleStopTime(new Date(8000L));
|
||||
out.setRunningTime(new Date(9000L));
|
||||
|
||||
assertEquals(1000, out.getBuildTime().getTime());
|
||||
assertEquals(2000, out.getTransferTime().getTime());
|
||||
assertEquals(3000, out.getWaitTime().getTime());
|
||||
assertEquals(4000, out.getEntryWaitTime().getTime());
|
||||
assertEquals(5000, out.getExitWaitTime().getTime());
|
||||
assertEquals(6000, out.getStopTime().getTime());
|
||||
assertEquals(7000, out.getIdleTime().getTime());
|
||||
assertEquals(8000, out.getScheduleStopTime().getTime());
|
||||
assertEquals(9000, out.getRunningTime().getTime());
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
import com.itac.mes.datainterface.data.UnknownMessageTypeException;
|
||||
import com.itac.mes.datainterface.data.UnsupportedMessageTypeException;
|
||||
|
||||
public class MessageFactoryTest {
|
||||
|
||||
@Test
|
||||
public void testConnectionRequestMessage() throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
short[] data = new short[] { 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
Message msg = MessageFactory.get(data);
|
||||
assertEquals(ConnectionCheckRequestMessage.class, msg.getClass());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConnectionCheckResponseMessage() throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
short[] data = new short[] { 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
Message msg = MessageFactory.get(data);
|
||||
assertEquals(ConnectionCheckResponseMessage.class, msg.getClass());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConnectionDisconnectMessage() throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
short[] data = new short[] { 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
Message msg = MessageFactory.get(data);
|
||||
assertEquals(ConnectionDisconnectRequestMessage.class, msg.getClass());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testNackResponseMessage() throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
short[] data = new short[] { 0x02, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, //
|
||||
0x02, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00 };
|
||||
|
||||
Message msg = MessageFactory.get(data);
|
||||
assertEquals(NackResponseMessage.class, msg.getClass());
|
||||
assertEquals(0x0002, ((NackResponseMessage) msg).getCId());
|
||||
assertEquals(0x00FF, ((NackResponseMessage) msg).getRId());
|
||||
}
|
||||
|
||||
@Test(expected = UnknownMessageTypeException.class)
|
||||
public void testUnknownMessageType() throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
short[] data = new short[] { 0xCA, 0xFF, 0xEE, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x08, //
|
||||
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xFF };
|
||||
MessageFactory.get(data);
|
||||
}
|
||||
|
||||
@Test(expected = UnsupportedMessageTypeException.class)
|
||||
public void testUnsupportedMessageType() throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
short[] data = new short[] { 0xFF, 0xCA, 0x00, 0x00, 0xEE, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
MessageFactory.get(data);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTraceabilityEventMessage() throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
|
||||
short[] data = new short[] { 0x90, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
|
||||
|
||||
TraceabilityEventMessage traceMessage = new TraceabilityEventMessage(data);
|
||||
traceMessage.setEventTime(new Date(1234000L));
|
||||
traceMessage.setFileName("MyFileName");
|
||||
traceMessage.setFileStream("myFileStream");
|
||||
|
||||
short[] rData = traceMessage.getData();
|
||||
|
||||
Message msg = MessageFactory.get(rData);
|
||||
|
||||
assertEquals(TraceabilityEventMessage.class, msg.getClass());
|
||||
assertEquals(new Date(1234000L), ((TraceabilityEventMessage) msg).getEventTime());
|
||||
assertEquals("MyFileName", ((TraceabilityEventMessage) msg).getFileName());
|
||||
assertEquals("myFileStream", ((TraceabilityEventMessage) msg).getFileStream().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testConnectionResponse() throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
ConnectionResponseMessage out = new ConnectionResponseMessage(444);
|
||||
// das ist eigentlich ein clone();
|
||||
Message msg = MessageFactory.get(out.getStringBuffer());
|
||||
assertEquals(msg.getCommandId(), out.getCommandId());
|
||||
assertEquals(msg.getRequestId(), out.getRequestId());
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void shouldExceptPassingNullAsParameter() throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
MessageFactory.get((short[]) null);
|
||||
}
|
||||
|
||||
@Test(expected = IllegalArgumentException.class)
|
||||
public void shouldExceptPassingNullAsBuffer() throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
MessageFactory.get((StringBuffer) null);
|
||||
}
|
||||
|
||||
@Test
|
||||
@Ignore
|
||||
public void shouldNotExcept() throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
|
||||
StringBuffer stb = new StringBuffer();
|
||||
for (int i = -128; i < 128; i++) {
|
||||
|
||||
stb.append((char)i);
|
||||
}
|
||||
|
||||
MessageFactory.get(stb);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertNull;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.itac.mes.datainterface.data.UnknownMessageTypeException;
|
||||
import com.itac.mes.datainterface.data.UnsupportedMessageTypeException;
|
||||
import com.itac.mes.datainterface.data.samsung.MessageSource;
|
||||
import com.itac.mes.datainterface.data.samsung.message.Message.Result;
|
||||
|
||||
public class MessageTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
Message m1 = new Message(Command.REQUEST_CONNECTION);
|
||||
m1.writeULong(0, 0x01020304);
|
||||
long v = m1.readULong(0);
|
||||
assertEquals(0x01020304, v);
|
||||
|
||||
m1.writeULong(4, 0x10203040);
|
||||
v = m1.readULong(4);
|
||||
assertEquals(0x10203040, v);
|
||||
|
||||
// viele verschiedene Bitmuster testen
|
||||
for (byte k = 0; k < 3; k++) {
|
||||
for (byte b = 0; b < 15; b++) {
|
||||
for (int pos = 0; pos < 100000; pos++) {
|
||||
byte pattern = (byte) ((b << 4) | b);
|
||||
|
||||
long value = (pattern << (k * 8)) & 0xFFFFFFFF;
|
||||
if (value < 0) {
|
||||
value = 0xFFFF - value;
|
||||
}
|
||||
|
||||
m1.writeULong(pos, value);
|
||||
long rValue = m1.readULong(pos);
|
||||
assertEquals(value, rValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetMessageSource() {
|
||||
Message out = new Message(Command.REQUEST_CONNECTION);
|
||||
assertNull(out.getMessageSource());
|
||||
out.setMessageSource(null);
|
||||
assertNull(out.getMessageSource());
|
||||
MessageSource msgSource = mock(MessageSource.class);
|
||||
out.setMessageSource(msgSource);
|
||||
assertNotNull(out.getMessageSource());
|
||||
}
|
||||
|
||||
/**
|
||||
* setzen beliebiger Werte; nur der Wert 0 wird als Result OK angesehen, alle anderen Werte als Result NG.
|
||||
*/
|
||||
@Test
|
||||
public void testSetResult() {
|
||||
Message out = new Message(Command.REQUEST_CONNECTION);
|
||||
out.writeULong(12, 0);
|
||||
assertEquals(Result.OK, out.getResult(12));
|
||||
for (int i = 1; i < 0xFFFF; i++) {
|
||||
out.writeULong(12, i);
|
||||
assertEquals(Result.NG, out.getResult(12));
|
||||
}
|
||||
|
||||
out.setResult(12, Result.OK);
|
||||
assertEquals(0, out.readULong(12));
|
||||
out.setResult(12, Result.NG);
|
||||
assertEquals(1, out.readULong(12));
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHexDump() {
|
||||
Message out = new Message(Command.REQUEST_CONNECTION);
|
||||
out.setBodyLength(0);
|
||||
assertEquals("Message\n01 00 00 00 01 00 00 00 00 00 00 00 \n", out.getHexDump());
|
||||
out.setBodyLength(4);
|
||||
out.writeULong(12, 04);
|
||||
assertEquals("Message\n01 00 00 00 01 00 00 00 04 00 00 00 \n04 00 00 00 | ....", out.getHexDump());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testHexDump2() throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
short[] dataBytes = new short[] { 0x90, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x22, 0x00, 0x00,
|
||||
0x00,//
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13,
|
||||
0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x41, 0x80 };
|
||||
|
||||
Message out = MessageFactory.get(dataBytes);
|
||||
assertEquals("TraceabilityEventMessage\n90 00 00 00 10 00 00 00 22 00 00 00 \n00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F"
|
||||
+ " 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F | ................................\n41 80 | A.", out.getHexDump());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testtoString() throws UnsupportedMessageTypeException, UnknownMessageTypeException {
|
||||
short[] dataBytes = new short[] { 0x90, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x21, 0x00, 0x00,
|
||||
0x00,//
|
||||
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x10, 0x11, 0x12, 0x13,
|
||||
0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, 0x41 };
|
||||
|
||||
Message out = MessageFactory.get(dataBytes);
|
||||
assertEquals("TraceabilityEventMessage\n90 00 00 00 10 00 00 00 21 00 00 00 \n00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F"
|
||||
+ " 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F | ................................\n41 | A", out.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetDataBytes() {
|
||||
Message out = new Message(Command.REQUEST_CONNECTION);
|
||||
out.setBodyLength(4);
|
||||
out.writeULong(12, 04);
|
||||
|
||||
byte[] dataBytes = out.getDatabytes();
|
||||
assertEquals(16, dataBytes.length);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBodyLength() {
|
||||
|
||||
short[] dataBytes = new short[] { 0x02, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00,//
|
||||
0x02, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x00 };
|
||||
|
||||
assertEquals(8, BinaryMessage.getBodyLength(dataBytes));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class NackResponseMessageTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
NackResponseMessage out = new NackResponseMessage(22, 55);
|
||||
assertEquals(22, out.getCId());
|
||||
assertEquals(55, out.getRId());
|
||||
assertEquals(8, out.getBodyLength());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadableString() {
|
||||
NackResponseMessage out = new NackResponseMessage(22, 55);
|
||||
assertEquals(22, out.getCId());
|
||||
assertEquals(55, out.getRId());
|
||||
assertEquals("CommandId: 0x0002(2), RequestId: 0x00FF(255), BodyLength: 0x0008(8)\nCID: 22\nRID: 55\n", out.getReadableString()
|
||||
.toString());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied,
|
||||
* printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language
|
||||
* without the written permission of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.itac.mes.datainterface.data.samsung.message.Message.Result;
|
||||
|
||||
public class PlacementProgramControlRequestMessageTest {
|
||||
|
||||
@Test
|
||||
public void testNgMessage() {
|
||||
PlacementProgramControlRequestMessage out = new PlacementProgramControlRequestMessage("mit Fehler");
|
||||
assertEquals(Message.Result.NG, out.getResult());
|
||||
assertEquals("mit Fehler", out.getErrorMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOkMessage() {
|
||||
PlacementProgramControlRequestMessage out = new PlacementProgramControlRequestMessage(Result.OK);
|
||||
assertEquals(Message.Result.OK, out.getResult());
|
||||
assertEquals("", out.getErrorMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSimpleConstructor() {
|
||||
Message out = new PlacementProgramControlRequestMessage(Result.OK);
|
||||
assertEquals("CommandId: 0x0091(145), RequestId: 0x0022(34), BodyLength: 0x0004(4)\nResponseCode:OK\n",
|
||||
out.getReadableString().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetErrorMessage() {
|
||||
PlacementProgramControlRequestMessage out = new PlacementProgramControlRequestMessage(new short[0]);
|
||||
out.setErrorMessage(null);
|
||||
assertEquals("", out.getErrorMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetErrorMessageInConstructor() {
|
||||
PlacementProgramControlRequestMessage out = new PlacementProgramControlRequestMessage(Result.NG, "falsch");
|
||||
assertEquals(Message.Result.NG, out.getResult());
|
||||
assertEquals("falsch", out.getErrorMessage());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class PlacementProgramControlResponseMessageTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
PlacementProgramControlResponseMessage out = new PlacementProgramControlResponseMessage();
|
||||
assertEquals(0, out.getResponseCode());
|
||||
assertEquals(4, out.getBodyLength());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testconstructor() {
|
||||
PlacementProgramControlResponseMessage out = new PlacementProgramControlResponseMessage(123);
|
||||
assertEquals(123, out.getResponseCode());
|
||||
assertEquals(4, out.getBodyLength());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadableString() {
|
||||
PlacementProgramControlResponseMessage out = new PlacementProgramControlResponseMessage(123);
|
||||
assertEquals("CommandId: 0x0092(146), RequestId: 0x0022(34), BodyLength: 0x0004(4)\nresponseCode: 123", out.getReadableString()
|
||||
.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadableString3() {
|
||||
PlacementProgramControlResponseMessage out = new PlacementProgramControlResponseMessage(new short[] { 146, 0, 0, 0, 34, 0, 0,
|
||||
0, 4, 0, 0, 0, 123, 0, 0, 0 });
|
||||
assertEquals("CommandId: 0x0092(146), RequestId: 0x0022(34), BodyLength: 0x0004(4)\nresponseCode: 123", out.getReadableString()
|
||||
.toString());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.itac.mes.datainterface.data.UnknownMessageTypeException;
|
||||
|
||||
public class PlacementProgramVerificationMessageTest {
|
||||
|
||||
@Test
|
||||
public void testSimpleMessage() throws UnknownMessageTypeException {
|
||||
PlacementProgramVerificationMessage out = new PlacementProgramVerificationMessage(null);
|
||||
assertEquals(out.getCommand(), Command.PLACEMENT_PROGRAM_VERIFICATION);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetterSetter() throws UnknownMessageTypeException {
|
||||
PlacementProgramVerificationMessage out = new PlacementProgramVerificationMessage(null);
|
||||
|
||||
out.setEventTime(new Date(1234000L));
|
||||
out.setFileName("fileName");
|
||||
out.setFileStream("fileContent\n");
|
||||
out.setRequestId(4423);
|
||||
|
||||
assertEquals(4423, out.getRequestId());
|
||||
assertEquals("fileContent\n", out.getFileStream().toString());
|
||||
assertEquals("fileName", out.getFileName());
|
||||
assertEquals(new Date(1234000L), out.getEventTime());
|
||||
|
||||
assertEquals("CommandId: 0x0090(144), RequestId: 0x1147(4423), BodyLength: 0x0054(84)\nfileName: fileName\nfileContent\n",
|
||||
out.getReadableString().toString());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testComplexConstructor() throws UnknownMessageTypeException {
|
||||
PlacementProgramVerificationMessage out = new PlacementProgramVerificationMessage("fileName", "fileContent!");
|
||||
assertEquals("fileContent!", out.getFileStream().toString());
|
||||
assertEquals("fileName", out.getFileName());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.itac.mes.datainterface.data.UnknownMessageTypeException;
|
||||
|
||||
public class ReelBarcodeScanEventMessageTest {
|
||||
|
||||
@Test
|
||||
public void testSimpleMessage() throws UnknownMessageTypeException {
|
||||
ReelBarcodeScanEventMessage out = new ReelBarcodeScanEventMessage(null);
|
||||
assertEquals(out.getCommand(), Command.REEL_BARCODE_SCAN);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetterSetter() throws UnknownMessageTypeException {
|
||||
ReelBarcodeScanEventMessage out = new ReelBarcodeScanEventMessage(null);
|
||||
out.setEventTime(new Date(1234000L));
|
||||
out.setReelId("reelId");
|
||||
out.setRemainingPartCount(2000);
|
||||
out.setPartName("partName");
|
||||
assertEquals("reelId", out.getReelId());
|
||||
assertEquals(1234000L, out.getEventTime().getTime());
|
||||
assertEquals(0x0090, out.getCommandId());
|
||||
assertEquals(0x0012, out.getRequestId());
|
||||
assertEquals(
|
||||
"CommandId: 0x0090(144), RequestId: 0x0012(18), BodyLength: 0x0088(136)\n"
|
||||
+ "EventTime: Thu Jan 01 01:20:34 CET 1970\nReelId: reelId\nPartName: partName\nRemainingPartCount: 2000\n",
|
||||
out.getReadableString().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetReelId() throws UnknownMessageTypeException {
|
||||
ReelBarcodeScanEventMessage out = new ReelBarcodeScanEventMessage(null);
|
||||
out.setEventTime(new Date(1234000L));
|
||||
out.setReelId("reelId");
|
||||
out.setReelId(null);
|
||||
assertEquals("reelId", out.getReelId());
|
||||
out.setReelId("");
|
||||
assertEquals("", out.getReelId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testalternativeConstructor() throws UnknownMessageTypeException {
|
||||
ReelBarcodeScanEventMessage out = new ReelBarcodeScanEventMessage(new Date(1234000L), "reelId", "partName", 2000);
|
||||
assertEquals("reelId", out.getReelId());
|
||||
assertEquals(1234000L, out.getEventTime().getTime());
|
||||
assertEquals("partName", out.getPartName());
|
||||
assertEquals(2000, out.getReminingPartCount());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
/*
|
||||
* Copyright (c) 2014 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.itac.mes.datainterface.data.samsung.message.Message.Result;
|
||||
|
||||
public class ReelInformationRequestMessageTest {
|
||||
|
||||
@Test
|
||||
public void testGetterSetter() {
|
||||
ReelInformationRequestMessage out = new ReelInformationRequestMessage(new short[] {});
|
||||
|
||||
assertEquals(268, out.getBodyLength());
|
||||
// keine Message gesetzt, also leer
|
||||
assertEquals("", out.getErrorMessage());
|
||||
out.setErrorMessage("Hallo");
|
||||
assertEquals("Hallo", out.getErrorMessage());
|
||||
assertEquals(273, out.getBodyLength());
|
||||
out.setErrorMessage(null);
|
||||
assertEquals("", out.getErrorMessage());
|
||||
assertEquals(268, out.getBodyLength());
|
||||
|
||||
assertEquals(0, out.getReelId());
|
||||
out.setReelId(1234);
|
||||
assertEquals(1234, out.getReelId());
|
||||
|
||||
assertEquals(0, out.getRemainingPartCount());
|
||||
out.setRemainingPartCount(15);
|
||||
assertEquals(15, out.getRemainingPartCount());
|
||||
|
||||
assertEquals("", out.getPartName());
|
||||
out.setPartName("partName");
|
||||
assertEquals("partName", out.getPartName());
|
||||
out.setPartName(null);
|
||||
assertEquals("partName", out.getPartName());
|
||||
out.setPartName("");
|
||||
assertEquals("", out.getPartName());
|
||||
|
||||
assertEquals("", out.getVendorName());
|
||||
out.setVendorName("vendorName");
|
||||
assertEquals("vendorName", out.getVendorName());
|
||||
out.setVendorName(null);
|
||||
assertEquals("vendorName", out.getVendorName());
|
||||
out.setVendorName("");
|
||||
assertEquals("", out.getVendorName());
|
||||
|
||||
assertEquals("", out.getVendorPartName());
|
||||
out.setVendorPartName("vendorPartName");
|
||||
assertEquals("vendorPartName", out.getVendorPartName());
|
||||
out.setVendorPartName(null);
|
||||
assertEquals("vendorPartName", out.getVendorPartName());
|
||||
out.setVendorPartName("");
|
||||
assertEquals("", out.getVendorPartName());
|
||||
|
||||
assertEquals("", out.getVendorReelBarcode());
|
||||
out.setVendorReelBarcode("vendorReel");
|
||||
assertEquals("vendorReel", out.getVendorReelBarcode());
|
||||
out.setVendorReelBarcode(null);
|
||||
assertEquals("vendorReel", out.getVendorReelBarcode());
|
||||
out.setVendorReelBarcode("");
|
||||
assertEquals("", out.getVendorReelBarcode());
|
||||
|
||||
assertEquals(Result.OK, out.getResult());
|
||||
out.setResult(Result.NG);
|
||||
assertEquals(Result.NG, out.getResult());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetReadableString() {
|
||||
ReelInformationRequestMessage out = new ReelInformationRequestMessage(new short[] {});
|
||||
out.setErrorMessage("Hallo");
|
||||
out.setReelId(1234);
|
||||
out.setRemainingPartCount(15);
|
||||
out.setPartName("partName");
|
||||
out.setVendorName("vendorName");
|
||||
out.setVendorPartName("vendorPartName");
|
||||
out.setVendorReelBarcode("vendorReel");
|
||||
out.setErrorMessage("errorMessage");
|
||||
out.setResult(Result.NG);
|
||||
|
||||
assertEquals(
|
||||
"CommandId: 0x0091(145), RequestId: 0x0021(33), BodyLength: 0x0118(280)\n" + "ReelId: 1234\n" + "PartName: partName\n"
|
||||
+ "RemainingPartCount: 15\n"
|
||||
+ "VendorName: vendorName\n" + "VendorPartName: vendorPartName\n"
|
||||
+ "VendorReelBarcode: vendorReel\n" + "Result: NG\n" + "ErrorMessage: errorMessage\n",
|
||||
out.getReadableString().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testComplexConstructor() {
|
||||
ReelInformationRequestMessage out = new ReelInformationRequestMessage("reelId", "partName", 100, "vendorName", Result.OK);
|
||||
|
||||
assertEquals("partName", out.getPartName());
|
||||
assertEquals("vendorName", out.getVendorName());
|
||||
assertEquals("", out.getVendorPartName());
|
||||
assertEquals(100, out.getRemainingPartCount());
|
||||
assertEquals("reelId", out.getVendorReelBarcode());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class ReelInformationResponseMessageTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
ReelInformationResponseMessage out = new ReelInformationResponseMessage(123);
|
||||
assertEquals(123, out.getResult());
|
||||
assertEquals(4, out.getBodyLength());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadableString() {
|
||||
ReelInformationResponseMessage out = new ReelInformationResponseMessage(123);
|
||||
assertEquals("CommandId: 0x0092(146), RequestId: 0x0021(33), BodyLength: 0x0004(4)\nresult: 123", out.getReadableString()
|
||||
.toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testReadableString3() {
|
||||
ReelInformationResponseMessage out = new ReelInformationResponseMessage(new short[] { 146, 0, 0, 0, 33, 0, 0, 0, 4, 0, 0, 0,
|
||||
123, 0, 0, 0 });
|
||||
assertEquals("CommandId: 0x0092(146), RequestId: 0x0021(33), BodyLength: 0x0004(4)\nresult: 123", out.getReadableString()
|
||||
.toString());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.itac.mes.datainterface.data.samsung.message.RemainingReelPartCountMessage.FeederStatus;
|
||||
|
||||
public class RemainingReelPartCountMessageTest {
|
||||
|
||||
@Test
|
||||
public void test() {
|
||||
RemainingReelPartCountMessage out = new RemainingReelPartCountMessage(new Date(3000000), "reel", 12, 14);
|
||||
assertEquals(3000000, out.getEventTime().getTime());
|
||||
assertEquals("reel", out.getReelId());
|
||||
assertEquals(FeederStatus.UNKNOWN, out.getFeederStatus());
|
||||
assertEquals(14, out.getPartCount());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInvalidToString() {
|
||||
RemainingReelPartCountMessage out = new RemainingReelPartCountMessage(new Date(3000000), "reel", 12, 14);
|
||||
assertEquals("CommandId: 0x0090(144), RequestId: 0x0016(22), BodyLength: 0x0054(84)\n"
|
||||
+ "EventTime: Thu Jan 01 01:50:00 CET 1970\n" + "ReelId: reel\n" + "FeederStatus: UNKNOWN\n" + "PartCount: 14\n",
|
||||
out.getReadableString().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testValidToString() {
|
||||
RemainingReelPartCountMessage out = new RemainingReelPartCountMessage(new Date(3000000), "reel", 1, 14);
|
||||
assertEquals("CommandId: 0x0090(144), RequestId: 0x0016(22), BodyLength: 0x0054(84)\n"
|
||||
+ "EventTime: Thu Jan 01 01:50:00 CET 1970\n" + "ReelId: reel\n" + "FeederStatus: CLAMP\n" + "PartCount: 14\n",
|
||||
out.getReadableString().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void setNullAsNotChangeData() {
|
||||
RemainingReelPartCountMessage out = new RemainingReelPartCountMessage(new Date(3000000), "reel", 12, 14);
|
||||
|
||||
out.setReelId(null);
|
||||
assertEquals("reel", out.getReelId());
|
||||
|
||||
out.setReelId("newReelInfo");
|
||||
assertEquals("newReelInfo", out.getReelId());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Copyright (c) 2015 iTAC Software AG, Germany. All Rights Reserved.
|
||||
*
|
||||
* This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, printed, edited
|
||||
* or otherwise distributed, be stored in a retrieval system, or be translated into another language without the written permission
|
||||
* of iTAC Software AG.
|
||||
*/
|
||||
package com.itac.mes.datainterface.data.samsung.message;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import com.itac.mes.datainterface.data.UnknownMessageTypeException;
|
||||
|
||||
public class TraceabilityEventMessageTest {
|
||||
|
||||
@Test
|
||||
public void testGetterSetter() throws UnknownMessageTypeException {
|
||||
TraceabilityEventMessage out = new TraceabilityEventMessage(null);
|
||||
|
||||
out.setEventTime(new Date(1234000L));
|
||||
out.setFileName("fileName");
|
||||
out.setFileStream("fileContent\n");
|
||||
|
||||
assertEquals("fileContent\n", out.getFileStream().toString());
|
||||
assertEquals("fileName", out.getFileName());
|
||||
assertEquals(new Date(1234000L), out.getEventTime());
|
||||
|
||||
assertEquals("CommandId: 0x0090(144), RequestId: 0x0010(16), BodyLength: 0x0054(84)\nfileName: fileName\nfileContent\n", out
|
||||
.getReadableString().toString());
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
Manifest-Version: 1.0
|
||||
Built-By: frankp
|
||||
Build-Jdk: 1.8.0_111
|
||||
Created-By: Maven Integration for Eclipse
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#Generated by Maven Integration for Eclipse
|
||||
#Tue Oct 13 14:05:19 CEST 2020
|
||||
version=9.10.00beta-DEVELOPER
|
||||
groupId=com.itac.interface.interfaces
|
||||
m2e.projectName=imsinterfaces-samsung-definition
|
||||
m2e.projectLocation=C\:\\projects_jee\\imsinterface\\mainline\\interface\\samsungdefinition
|
||||
artifactId=imsinterfaces-samsung-definition
|
||||
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.itac.interface.interfaces</groupId>
|
||||
<artifactId>imsinterfaces-samsung-definition</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>imsinterfaces-samsung-definition</name>
|
||||
<version>${mes.interface.version}</version>
|
||||
<parent>
|
||||
<groupId>com.itac.interface</groupId>
|
||||
<artifactId>data-interface</artifactId>
|
||||
<version>${mes.interface.version}</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.itac.interface.interfaces</groupId>
|
||||
<artifactId>data-interface-core-definition</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,5 @@
|
||||
#Generated by Maven
|
||||
#Tue Jun 12 15:10:55 CEST 2018
|
||||
version=9.00.01alpha-DEVELOPER
|
||||
groupId=com.itac.interface.interfaces
|
||||
artifactId=imsinterfaces-samsung-definition
|
||||
@@ -0,0 +1,66 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<testsuite tests="1" failures="0" name="com.itac.mes.datainterface.data.UnsupportedMessageTypeExceptionTest" time="0.016" errors="0" skipped="0">
|
||||
<properties>
|
||||
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
|
||||
<property name="sun.boot.library.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\bin"/>
|
||||
<property name="java.vm.version" value="25.111-b14"/>
|
||||
<property name="java.vm.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.multiModuleProjectDirectory" value="C:\projects_jee\imsinterface\mainline"/>
|
||||
<property name="java.vendor.url" value="http://java.oracle.com/"/>
|
||||
<property name="path.separator" value=";"/>
|
||||
<property name="guice.disable.misplaced.annotation.check" value="true"/>
|
||||
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
|
||||
<property name="file.encoding.pkg" value="sun.io"/>
|
||||
<property name="user.script" value=""/>
|
||||
<property name="user.country" value="DE"/>
|
||||
<property name="sun.java.launcher" value="SUN_STANDARD"/>
|
||||
<property name="sun.os.patch.level" value=""/>
|
||||
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
|
||||
<property name="user.dir" value="C:\projects_jee\imsinterface\mainline"/>
|
||||
<property name="java.runtime.version" value="1.8.0_111-b14"/>
|
||||
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
|
||||
<property name="java.endorsed.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\endorsed"/>
|
||||
<property name="os.arch" value="amd64"/>
|
||||
<property name="java.io.tmpdir" value="C:\Users\frankp\AppData\Local\Temp\"/>
|
||||
<property name="line.separator" value="
|
||||
"/>
|
||||
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.variant" value=""/>
|
||||
<property name="os.name" value="Windows 10"/>
|
||||
<property name="classworlds.conf" value="C:\maven\apache-maven-3.3.3\bin\..\bin\m2.conf"/>
|
||||
<property name="sun.jnu.encoding" value="Cp1252"/>
|
||||
<property name="java.library.path" value="C:\Program Files\Java\jdk1.8.0_111\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\MKS\IntegrityClient\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\MKS\Toolkit\mksnt;%USERPROFILE%\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\maven\maven;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\frankp\AppData\Local\Microsoft\WindowsApps;C:\Users\frankp\AppData\Roaming\npm;c:\Program Files\nodejs\;."/>
|
||||
<property name="java.specification.name" value="Java Platform API Specification"/>
|
||||
<property name="java.class.version" value="52.0"/>
|
||||
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
|
||||
<property name="os.version" value="10.0"/>
|
||||
<property name="user.home" value="C:\Users\frankp"/>
|
||||
<property name="user.timezone" value="Europe/Berlin"/>
|
||||
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
|
||||
<property name="java.specification.version" value="1.8"/>
|
||||
<property name="file.encoding" value="Cp1252"/>
|
||||
<property name="user.name" value="frankp"/>
|
||||
<property name="java.class.path" value="C:\maven\apache-maven-3.3.3\bin\..\boot\plexus-classworlds-2.5.2.jar"/>
|
||||
<property name="java.vm.specification.version" value="1.8"/>
|
||||
<property name="sun.arch.data.model" value="64"/>
|
||||
<property name="java.home" value="C:\Program Files\Java\jdk1.8.0_111\jre"/>
|
||||
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean install"/>
|
||||
<property name="java.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.language" value="de"/>
|
||||
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
|
||||
<property name="java.vm.info" value="mixed mode"/>
|
||||
<property name="java.version" value="1.8.0_111"/>
|
||||
<property name="java.ext.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
|
||||
<property name="sun.boot.class.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_111\jre\classes"/>
|
||||
<property name="sun.stderr.encoding" value="cp850"/>
|
||||
<property name="java.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.home" value="C:\maven\apache-maven-3.3.3\bin\.."/>
|
||||
<property name="file.separator" value="\"/>
|
||||
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
|
||||
<property name="sun.cpu.endian" value="little"/>
|
||||
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
|
||||
<property name="sun.desktop" value="windows"/>
|
||||
<property name="sun.cpu.isalist" value="amd64"/>
|
||||
</properties>
|
||||
<testcase classname="com.itac.mes.datainterface.data.UnsupportedMessageTypeExceptionTest" name="test" time="0.016"/>
|
||||
</testsuite>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<testsuite tests="4" failures="0" name="com.itac.mes.datainterface.data.samsung.message.BinaryMessageTest" time="0.016" errors="0" skipped="0">
|
||||
<properties>
|
||||
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
|
||||
<property name="sun.boot.library.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\bin"/>
|
||||
<property name="java.vm.version" value="25.111-b14"/>
|
||||
<property name="java.vm.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.multiModuleProjectDirectory" value="C:\projects_jee\imsinterface\mainline"/>
|
||||
<property name="java.vendor.url" value="http://java.oracle.com/"/>
|
||||
<property name="path.separator" value=";"/>
|
||||
<property name="guice.disable.misplaced.annotation.check" value="true"/>
|
||||
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
|
||||
<property name="file.encoding.pkg" value="sun.io"/>
|
||||
<property name="user.script" value=""/>
|
||||
<property name="user.country" value="DE"/>
|
||||
<property name="sun.java.launcher" value="SUN_STANDARD"/>
|
||||
<property name="sun.os.patch.level" value=""/>
|
||||
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
|
||||
<property name="user.dir" value="C:\projects_jee\imsinterface\mainline"/>
|
||||
<property name="java.runtime.version" value="1.8.0_111-b14"/>
|
||||
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
|
||||
<property name="java.endorsed.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\endorsed"/>
|
||||
<property name="os.arch" value="amd64"/>
|
||||
<property name="java.io.tmpdir" value="C:\Users\frankp\AppData\Local\Temp\"/>
|
||||
<property name="line.separator" value="
|
||||
"/>
|
||||
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.variant" value=""/>
|
||||
<property name="os.name" value="Windows 10"/>
|
||||
<property name="classworlds.conf" value="C:\maven\apache-maven-3.3.3\bin\..\bin\m2.conf"/>
|
||||
<property name="sun.jnu.encoding" value="Cp1252"/>
|
||||
<property name="java.library.path" value="C:\Program Files\Java\jdk1.8.0_111\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\MKS\IntegrityClient\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\MKS\Toolkit\mksnt;%USERPROFILE%\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\maven\maven;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\frankp\AppData\Local\Microsoft\WindowsApps;C:\Users\frankp\AppData\Roaming\npm;c:\Program Files\nodejs\;."/>
|
||||
<property name="java.specification.name" value="Java Platform API Specification"/>
|
||||
<property name="java.class.version" value="52.0"/>
|
||||
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
|
||||
<property name="os.version" value="10.0"/>
|
||||
<property name="user.home" value="C:\Users\frankp"/>
|
||||
<property name="user.timezone" value="Europe/Berlin"/>
|
||||
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
|
||||
<property name="java.specification.version" value="1.8"/>
|
||||
<property name="file.encoding" value="Cp1252"/>
|
||||
<property name="user.name" value="frankp"/>
|
||||
<property name="java.class.path" value="C:\maven\apache-maven-3.3.3\bin\..\boot\plexus-classworlds-2.5.2.jar"/>
|
||||
<property name="java.vm.specification.version" value="1.8"/>
|
||||
<property name="sun.arch.data.model" value="64"/>
|
||||
<property name="java.home" value="C:\Program Files\Java\jdk1.8.0_111\jre"/>
|
||||
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean install"/>
|
||||
<property name="java.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.language" value="de"/>
|
||||
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
|
||||
<property name="java.vm.info" value="mixed mode"/>
|
||||
<property name="java.version" value="1.8.0_111"/>
|
||||
<property name="java.ext.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
|
||||
<property name="sun.boot.class.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_111\jre\classes"/>
|
||||
<property name="sun.stderr.encoding" value="cp850"/>
|
||||
<property name="java.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.home" value="C:\maven\apache-maven-3.3.3\bin\.."/>
|
||||
<property name="file.separator" value="\"/>
|
||||
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
|
||||
<property name="sun.cpu.endian" value="little"/>
|
||||
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
|
||||
<property name="sun.desktop" value="windows"/>
|
||||
<property name="sun.cpu.isalist" value="amd64"/>
|
||||
</properties>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.BinaryMessageTest" name="test" time="0.016"/>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.BinaryMessageTest" name="testLengthLimit" time="0"/>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.BinaryMessageTest" name="testWriteBigNumber" time="0"/>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.BinaryMessageTest" name="testWriteNegativeNumber" time="0"/>
|
||||
</testsuite>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<testsuite tests="4" failures="0" name="com.itac.mes.datainterface.data.samsung.message.BoardBarcodeEventMessageTest" time="0.062" errors="0" skipped="0">
|
||||
<properties>
|
||||
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
|
||||
<property name="sun.boot.library.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\bin"/>
|
||||
<property name="java.vm.version" value="25.111-b14"/>
|
||||
<property name="java.vm.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.multiModuleProjectDirectory" value="C:\projects_jee\imsinterface\mainline"/>
|
||||
<property name="java.vendor.url" value="http://java.oracle.com/"/>
|
||||
<property name="path.separator" value=";"/>
|
||||
<property name="guice.disable.misplaced.annotation.check" value="true"/>
|
||||
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
|
||||
<property name="file.encoding.pkg" value="sun.io"/>
|
||||
<property name="user.script" value=""/>
|
||||
<property name="user.country" value="DE"/>
|
||||
<property name="sun.java.launcher" value="SUN_STANDARD"/>
|
||||
<property name="sun.os.patch.level" value=""/>
|
||||
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
|
||||
<property name="user.dir" value="C:\projects_jee\imsinterface\mainline"/>
|
||||
<property name="java.runtime.version" value="1.8.0_111-b14"/>
|
||||
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
|
||||
<property name="java.endorsed.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\endorsed"/>
|
||||
<property name="os.arch" value="amd64"/>
|
||||
<property name="java.io.tmpdir" value="C:\Users\frankp\AppData\Local\Temp\"/>
|
||||
<property name="line.separator" value="
|
||||
"/>
|
||||
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.variant" value=""/>
|
||||
<property name="os.name" value="Windows 10"/>
|
||||
<property name="classworlds.conf" value="C:\maven\apache-maven-3.3.3\bin\..\bin\m2.conf"/>
|
||||
<property name="sun.jnu.encoding" value="Cp1252"/>
|
||||
<property name="java.library.path" value="C:\Program Files\Java\jdk1.8.0_111\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\MKS\IntegrityClient\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\MKS\Toolkit\mksnt;%USERPROFILE%\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\maven\maven;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\frankp\AppData\Local\Microsoft\WindowsApps;C:\Users\frankp\AppData\Roaming\npm;c:\Program Files\nodejs\;."/>
|
||||
<property name="java.specification.name" value="Java Platform API Specification"/>
|
||||
<property name="java.class.version" value="52.0"/>
|
||||
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
|
||||
<property name="os.version" value="10.0"/>
|
||||
<property name="user.home" value="C:\Users\frankp"/>
|
||||
<property name="user.timezone" value="Europe/Berlin"/>
|
||||
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
|
||||
<property name="java.specification.version" value="1.8"/>
|
||||
<property name="file.encoding" value="Cp1252"/>
|
||||
<property name="user.name" value="frankp"/>
|
||||
<property name="java.class.path" value="C:\maven\apache-maven-3.3.3\bin\..\boot\plexus-classworlds-2.5.2.jar"/>
|
||||
<property name="java.vm.specification.version" value="1.8"/>
|
||||
<property name="sun.arch.data.model" value="64"/>
|
||||
<property name="java.home" value="C:\Program Files\Java\jdk1.8.0_111\jre"/>
|
||||
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean install"/>
|
||||
<property name="java.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.language" value="de"/>
|
||||
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
|
||||
<property name="java.vm.info" value="mixed mode"/>
|
||||
<property name="java.version" value="1.8.0_111"/>
|
||||
<property name="java.ext.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
|
||||
<property name="sun.boot.class.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_111\jre\classes"/>
|
||||
<property name="sun.stderr.encoding" value="cp850"/>
|
||||
<property name="java.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.home" value="C:\maven\apache-maven-3.3.3\bin\.."/>
|
||||
<property name="file.separator" value="\"/>
|
||||
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
|
||||
<property name="sun.cpu.endian" value="little"/>
|
||||
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
|
||||
<property name="sun.desktop" value="windows"/>
|
||||
<property name="sun.cpu.isalist" value="amd64"/>
|
||||
</properties>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.BoardBarcodeEventMessageTest" name="testGetterSetter" time="0.062"/>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.BoardBarcodeEventMessageTest" name="testSetReelId" time="0"/>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.BoardBarcodeEventMessageTest" name="testSimpleMessage" time="0"/>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.BoardBarcodeEventMessageTest" name="testalternativeConstructor" time="0"/>
|
||||
</testsuite>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<testsuite tests="2" failures="0" name="com.itac.mes.datainterface.data.samsung.message.CommandTest" time="0.031" errors="0" skipped="0">
|
||||
<properties>
|
||||
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
|
||||
<property name="sun.boot.library.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\bin"/>
|
||||
<property name="java.vm.version" value="25.111-b14"/>
|
||||
<property name="java.vm.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.multiModuleProjectDirectory" value="C:\projects_jee\imsinterface\mainline"/>
|
||||
<property name="java.vendor.url" value="http://java.oracle.com/"/>
|
||||
<property name="path.separator" value=";"/>
|
||||
<property name="guice.disable.misplaced.annotation.check" value="true"/>
|
||||
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
|
||||
<property name="file.encoding.pkg" value="sun.io"/>
|
||||
<property name="user.script" value=""/>
|
||||
<property name="user.country" value="DE"/>
|
||||
<property name="sun.java.launcher" value="SUN_STANDARD"/>
|
||||
<property name="sun.os.patch.level" value=""/>
|
||||
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
|
||||
<property name="user.dir" value="C:\projects_jee\imsinterface\mainline"/>
|
||||
<property name="java.runtime.version" value="1.8.0_111-b14"/>
|
||||
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
|
||||
<property name="java.endorsed.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\endorsed"/>
|
||||
<property name="os.arch" value="amd64"/>
|
||||
<property name="java.io.tmpdir" value="C:\Users\frankp\AppData\Local\Temp\"/>
|
||||
<property name="line.separator" value="
|
||||
"/>
|
||||
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.variant" value=""/>
|
||||
<property name="os.name" value="Windows 10"/>
|
||||
<property name="classworlds.conf" value="C:\maven\apache-maven-3.3.3\bin\..\bin\m2.conf"/>
|
||||
<property name="sun.jnu.encoding" value="Cp1252"/>
|
||||
<property name="java.library.path" value="C:\Program Files\Java\jdk1.8.0_111\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\MKS\IntegrityClient\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\MKS\Toolkit\mksnt;%USERPROFILE%\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\maven\maven;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\frankp\AppData\Local\Microsoft\WindowsApps;C:\Users\frankp\AppData\Roaming\npm;c:\Program Files\nodejs\;."/>
|
||||
<property name="java.specification.name" value="Java Platform API Specification"/>
|
||||
<property name="java.class.version" value="52.0"/>
|
||||
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
|
||||
<property name="os.version" value="10.0"/>
|
||||
<property name="user.home" value="C:\Users\frankp"/>
|
||||
<property name="user.timezone" value="Europe/Berlin"/>
|
||||
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
|
||||
<property name="java.specification.version" value="1.8"/>
|
||||
<property name="file.encoding" value="Cp1252"/>
|
||||
<property name="user.name" value="frankp"/>
|
||||
<property name="java.class.path" value="C:\maven\apache-maven-3.3.3\bin\..\boot\plexus-classworlds-2.5.2.jar"/>
|
||||
<property name="java.vm.specification.version" value="1.8"/>
|
||||
<property name="sun.arch.data.model" value="64"/>
|
||||
<property name="java.home" value="C:\Program Files\Java\jdk1.8.0_111\jre"/>
|
||||
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean install"/>
|
||||
<property name="java.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.language" value="de"/>
|
||||
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
|
||||
<property name="java.vm.info" value="mixed mode"/>
|
||||
<property name="java.version" value="1.8.0_111"/>
|
||||
<property name="java.ext.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
|
||||
<property name="sun.boot.class.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_111\jre\classes"/>
|
||||
<property name="sun.stderr.encoding" value="cp850"/>
|
||||
<property name="java.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.home" value="C:\maven\apache-maven-3.3.3\bin\.."/>
|
||||
<property name="file.separator" value="\"/>
|
||||
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
|
||||
<property name="sun.cpu.endian" value="little"/>
|
||||
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
|
||||
<property name="sun.desktop" value="windows"/>
|
||||
<property name="sun.cpu.isalist" value="amd64"/>
|
||||
</properties>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.CommandTest" name="testNoDuplicates" time="0.031"/>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.CommandTest" name="testUnknownCommandRequestId" time="0"/>
|
||||
</testsuite>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<testsuite tests="3" failures="0" name="com.itac.mes.datainterface.data.samsung.message.ConnectionRequestMessageTest" time="0.047" errors="0" skipped="0">
|
||||
<properties>
|
||||
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
|
||||
<property name="sun.boot.library.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\bin"/>
|
||||
<property name="java.vm.version" value="25.111-b14"/>
|
||||
<property name="java.vm.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.multiModuleProjectDirectory" value="C:\projects_jee\imsinterface\mainline"/>
|
||||
<property name="java.vendor.url" value="http://java.oracle.com/"/>
|
||||
<property name="path.separator" value=";"/>
|
||||
<property name="guice.disable.misplaced.annotation.check" value="true"/>
|
||||
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
|
||||
<property name="file.encoding.pkg" value="sun.io"/>
|
||||
<property name="user.script" value=""/>
|
||||
<property name="user.country" value="DE"/>
|
||||
<property name="sun.java.launcher" value="SUN_STANDARD"/>
|
||||
<property name="sun.os.patch.level" value=""/>
|
||||
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
|
||||
<property name="user.dir" value="C:\projects_jee\imsinterface\mainline"/>
|
||||
<property name="java.runtime.version" value="1.8.0_111-b14"/>
|
||||
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
|
||||
<property name="java.endorsed.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\endorsed"/>
|
||||
<property name="os.arch" value="amd64"/>
|
||||
<property name="java.io.tmpdir" value="C:\Users\frankp\AppData\Local\Temp\"/>
|
||||
<property name="line.separator" value="
|
||||
"/>
|
||||
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.variant" value=""/>
|
||||
<property name="os.name" value="Windows 10"/>
|
||||
<property name="classworlds.conf" value="C:\maven\apache-maven-3.3.3\bin\..\bin\m2.conf"/>
|
||||
<property name="sun.jnu.encoding" value="Cp1252"/>
|
||||
<property name="java.library.path" value="C:\Program Files\Java\jdk1.8.0_111\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\MKS\IntegrityClient\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\MKS\Toolkit\mksnt;%USERPROFILE%\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\maven\maven;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\frankp\AppData\Local\Microsoft\WindowsApps;C:\Users\frankp\AppData\Roaming\npm;c:\Program Files\nodejs\;."/>
|
||||
<property name="java.specification.name" value="Java Platform API Specification"/>
|
||||
<property name="java.class.version" value="52.0"/>
|
||||
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
|
||||
<property name="os.version" value="10.0"/>
|
||||
<property name="user.home" value="C:\Users\frankp"/>
|
||||
<property name="user.timezone" value="Europe/Berlin"/>
|
||||
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
|
||||
<property name="java.specification.version" value="1.8"/>
|
||||
<property name="file.encoding" value="Cp1252"/>
|
||||
<property name="user.name" value="frankp"/>
|
||||
<property name="java.class.path" value="C:\maven\apache-maven-3.3.3\bin\..\boot\plexus-classworlds-2.5.2.jar"/>
|
||||
<property name="java.vm.specification.version" value="1.8"/>
|
||||
<property name="sun.arch.data.model" value="64"/>
|
||||
<property name="java.home" value="C:\Program Files\Java\jdk1.8.0_111\jre"/>
|
||||
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean install"/>
|
||||
<property name="java.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.language" value="de"/>
|
||||
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
|
||||
<property name="java.vm.info" value="mixed mode"/>
|
||||
<property name="java.version" value="1.8.0_111"/>
|
||||
<property name="java.ext.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
|
||||
<property name="sun.boot.class.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_111\jre\classes"/>
|
||||
<property name="sun.stderr.encoding" value="cp850"/>
|
||||
<property name="java.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.home" value="C:\maven\apache-maven-3.3.3\bin\.."/>
|
||||
<property name="file.separator" value="\"/>
|
||||
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
|
||||
<property name="sun.cpu.endian" value="little"/>
|
||||
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
|
||||
<property name="sun.desktop" value="windows"/>
|
||||
<property name="sun.cpu.isalist" value="amd64"/>
|
||||
</properties>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.ConnectionRequestMessageTest" name="test" time="0.047"/>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.ConnectionRequestMessageTest" name="testAlternativeConstructor" time="0"/>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.ConnectionRequestMessageTest" name="testGetReadableString" time="0"/>
|
||||
</testsuite>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<testsuite tests="3" failures="0" name="com.itac.mes.datainterface.data.samsung.message.ConnectionResponseMessageTest" time="0.047" errors="0" skipped="0">
|
||||
<properties>
|
||||
<property name="java.runtime.name" value="Java(TM) SE Runtime Environment"/>
|
||||
<property name="sun.boot.library.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\bin"/>
|
||||
<property name="java.vm.version" value="25.111-b14"/>
|
||||
<property name="java.vm.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.multiModuleProjectDirectory" value="C:\projects_jee\imsinterface\mainline"/>
|
||||
<property name="java.vendor.url" value="http://java.oracle.com/"/>
|
||||
<property name="path.separator" value=";"/>
|
||||
<property name="guice.disable.misplaced.annotation.check" value="true"/>
|
||||
<property name="java.vm.name" value="Java HotSpot(TM) 64-Bit Server VM"/>
|
||||
<property name="file.encoding.pkg" value="sun.io"/>
|
||||
<property name="user.script" value=""/>
|
||||
<property name="user.country" value="DE"/>
|
||||
<property name="sun.java.launcher" value="SUN_STANDARD"/>
|
||||
<property name="sun.os.patch.level" value=""/>
|
||||
<property name="java.vm.specification.name" value="Java Virtual Machine Specification"/>
|
||||
<property name="user.dir" value="C:\projects_jee\imsinterface\mainline"/>
|
||||
<property name="java.runtime.version" value="1.8.0_111-b14"/>
|
||||
<property name="java.awt.graphicsenv" value="sun.awt.Win32GraphicsEnvironment"/>
|
||||
<property name="java.endorsed.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\endorsed"/>
|
||||
<property name="os.arch" value="amd64"/>
|
||||
<property name="java.io.tmpdir" value="C:\Users\frankp\AppData\Local\Temp\"/>
|
||||
<property name="line.separator" value="
|
||||
"/>
|
||||
<property name="java.vm.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.variant" value=""/>
|
||||
<property name="os.name" value="Windows 10"/>
|
||||
<property name="classworlds.conf" value="C:\maven\apache-maven-3.3.3\bin\..\bin\m2.conf"/>
|
||||
<property name="sun.jnu.encoding" value="Cp1252"/>
|
||||
<property name="java.library.path" value="C:\Program Files\Java\jdk1.8.0_111\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files (x86)\MKS\IntegrityClient\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\ProgramData\Oracle\Java\javapath;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\MKS\Toolkit\mksnt;%USERPROFILE%\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\maven\maven;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Git\cmd;C:\Program Files\nodejs\;C:\Users\frankp\AppData\Local\Microsoft\WindowsApps;C:\Users\frankp\AppData\Roaming\npm;c:\Program Files\nodejs\;."/>
|
||||
<property name="java.specification.name" value="Java Platform API Specification"/>
|
||||
<property name="java.class.version" value="52.0"/>
|
||||
<property name="sun.management.compiler" value="HotSpot 64-Bit Tiered Compilers"/>
|
||||
<property name="os.version" value="10.0"/>
|
||||
<property name="user.home" value="C:\Users\frankp"/>
|
||||
<property name="user.timezone" value="Europe/Berlin"/>
|
||||
<property name="java.awt.printerjob" value="sun.awt.windows.WPrinterJob"/>
|
||||
<property name="java.specification.version" value="1.8"/>
|
||||
<property name="file.encoding" value="Cp1252"/>
|
||||
<property name="user.name" value="frankp"/>
|
||||
<property name="java.class.path" value="C:\maven\apache-maven-3.3.3\bin\..\boot\plexus-classworlds-2.5.2.jar"/>
|
||||
<property name="java.vm.specification.version" value="1.8"/>
|
||||
<property name="sun.arch.data.model" value="64"/>
|
||||
<property name="java.home" value="C:\Program Files\Java\jdk1.8.0_111\jre"/>
|
||||
<property name="sun.java.command" value="org.codehaus.plexus.classworlds.launcher.Launcher clean install"/>
|
||||
<property name="java.specification.vendor" value="Oracle Corporation"/>
|
||||
<property name="user.language" value="de"/>
|
||||
<property name="awt.toolkit" value="sun.awt.windows.WToolkit"/>
|
||||
<property name="java.vm.info" value="mixed mode"/>
|
||||
<property name="java.version" value="1.8.0_111"/>
|
||||
<property name="java.ext.dirs" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\ext;C:\WINDOWS\Sun\Java\lib\ext"/>
|
||||
<property name="sun.boot.class.path" value="C:\Program Files\Java\jdk1.8.0_111\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\rt.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_111\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_111\jre\classes"/>
|
||||
<property name="sun.stderr.encoding" value="cp850"/>
|
||||
<property name="java.vendor" value="Oracle Corporation"/>
|
||||
<property name="maven.home" value="C:\maven\apache-maven-3.3.3\bin\.."/>
|
||||
<property name="file.separator" value="\"/>
|
||||
<property name="java.vendor.url.bug" value="http://bugreport.sun.com/bugreport/"/>
|
||||
<property name="sun.cpu.endian" value="little"/>
|
||||
<property name="sun.io.unicode.encoding" value="UnicodeLittle"/>
|
||||
<property name="sun.desktop" value="windows"/>
|
||||
<property name="sun.cpu.isalist" value="amd64"/>
|
||||
</properties>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.ConnectionResponseMessageTest" name="test" time="0.047"/>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.ConnectionResponseMessageTest" name="testAlternativeConstructor" time="0"/>
|
||||
<testcase classname="com.itac.mes.datainterface.data.samsung.message.ConnectionResponseMessageTest" name="testGetReadableString" time="0"/>
|
||||
</testsuite>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user