diff options
| author | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-05-02 10:43:02 +0300 |
|---|---|---|
| committer | Roy Ben-Shabat <Roy@Twine-s.com> | 2019-05-02 10:43:02 +0300 |
| commit | f21b51571dd65e5c30c9709f4e84009d90b27154 (patch) | |
| tree | 42fad9a68093e152de2fa66f713a7a2edf7fabe2 /Software/Android_Studio | |
| parent | bbd8cdc57a73af12d1dcccab11ceb268a49257bb (diff) | |
| download | Tango-f21b51571dd65e5c30c9709f4e84009d90b27154.tar.gz Tango-f21b51571dd65e5c30c9709f4e84009d90b27154.zip | |
MERGE.
Diffstat (limited to 'Software/Android_Studio')
8 files changed, 1588 insertions, 109 deletions
diff --git a/Software/Android_Studio/ColorCapture/app/build.gradle b/Software/Android_Studio/ColorCapture/app/build.gradle index f21c20695..be070a573 100644 --- a/Software/Android_Studio/ColorCapture/app/build.gradle +++ b/Software/Android_Studio/ColorCapture/app/build.gradle @@ -23,7 +23,7 @@ android { buildTypes { debug { - buildConfigField "String", "WEB_SERVICE_ADDRESS", "\"http://192.168.1.86:45455/api/\"" + buildConfigField "String", "WEB_SERVICE_ADDRESS", "\"http://10.100.102.46:45455/api/\"" buildConfigField "String", "WEB_SERVICE_APP_ID", "\"Tdf793i4ughsiduf8749509237885ehgfdlkghlT\"" } @@ -96,6 +96,6 @@ task createPMR(type: Exec, description: 'Update all PMR files') { } } -//tasks.withType(JavaCompile) { -// compileTask -> compileTask.dependsOn createPMR -//} +tasks.withType(JavaCompile) { + compileTask -> compileTask.dependsOn createPMR +} diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeClient.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeClient.java new file mode 100644 index 000000000..3d4d80ccf --- /dev/null +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeClient.java @@ -0,0 +1,109 @@ +package com.twine.colorcapture.integration; + +import com.google.protobuf.ByteString; +import com.twine.colorcapture.core.IAction; +import com.twine.colorcapture.core.IAction1; +import com.twine.colorcapture.web.messages.DetectionColor; +import com.twine.tango.pmr.common.MessageContainerOuterClass.MessageContainer; +import com.twine.tango.pmr.common.MessageTypeOuterClass; +import com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest; +import com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse; +import com.twine.tango.pmr.tcc.DetectionColorOuterClass; + +import java.io.InputStream; +import java.net.InetSocketAddress; +import java.net.Socket; +import java.net.SocketException; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; +import java.util.Arrays; +import java.util.UUID; + +public class ExternalBridgeClient +{ + private static final int EXTERNAL_BRIDGE_PORT = 1984; + + public void sendColorProfile(ExternalBridgeMachine machine, DetectionColor detectionColor, IAction success, IAction1<Exception> error) + { + try + { + Socket tcpClient = new Socket(); + tcpClient.connect(new InetSocketAddress(machine.getIpAddress(), EXTERNAL_BRIDGE_PORT), 2000); + + //Create detection color + DetectionColorOuterClass.DetectionColor.Builder color = DetectionColorOuterClass.DetectionColor.newBuilder(); + color.setR(detectionColor.getR()); + color.setG(detectionColor.getG()); + color.setB(detectionColor.getB()); + + //Create Message + ColorProfileRequest.Builder message = ColorProfileRequest.newBuilder(); + message.setAppID("SnapMatch"); + message.setDetectionColor(color); + + //Create container + MessageContainer.Builder container = MessageContainer.newBuilder(); + container.setToken(UUID.randomUUID().toString()); + container.setType(MessageTypeOuterClass.MessageType.ColorProfileRequest); + container.setData(ByteString.copyFrom(message.build().toByteArray())); + + //Create data + byte[] data = container.build().toByteArray(); + byte[] size = ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(data.length).array(); + byte[] packet = concatByteArrays(size, data); + + //Write data + tcpClient.getOutputStream().write(packet); + + //Wait for response... + InputStream stream = tcpClient.getInputStream(); + + //Initializing expected message size. + size = new byte[4]; + + //Block reading from socket. + int read = stream.read(size, 0, size.length); + if (read == -1) + { + throw new SocketException("Error reading from TCP adapter."); + } + + //Get expected size. + int expectedSize = ByteBuffer.wrap(size).order(ByteOrder.LITTLE_ENDIAN).getInt(); + + //Init response message size. + data = new byte[expectedSize]; + read = 0; + + //Read the whole message. + while (read < expectedSize) + { + read += stream.read(data, read, Math.min(stream.available(), expectedSize - read)); + } + + //Init response container and message. + MessageContainer responseContainer = MessageContainer.parseFrom(data); + ColorProfileResponse response = ColorProfileResponse.parseFrom(responseContainer.getData()); + + if (response.getApproved()) + { + //Approved !!! + } + + tcpClient.close(); + + success.invoke(); + } + catch (Exception ex) + { + error.invoke(ex); + } + } + + private byte[] concatByteArrays(byte[] first, byte[] second) + { + byte[] result = Arrays.copyOf(first, first.length + second.length); + System.arraycopy(second, 0, result, first.length, second.length); + return result; + } +} diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeScanner.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeScanner.java index 390ccab3b..9c87987bd 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeScanner.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/integration/ExternalBridgeScanner.java @@ -6,13 +6,10 @@ import com.twine.colorcapture.core.Event; import com.twine.colorcapture.core.IEventHandler; import com.twine.tango.pmr.integration.ExternalBridgeUdpDiscoveryPacketOuterClass.ExternalBridgeUdpDiscoveryPacket; -import org.joda.time.DateTime; -import org.joda.time.Seconds; -import org.joda.time.format.DateTimeFormat; -import org.joda.time.format.DateTimeFormatter; - import java.net.DatagramPacket; import java.net.DatagramSocket; +import java.net.InetSocketAddress; +import java.net.Socket; import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; @@ -24,12 +21,15 @@ public class ExternalBridgeScanner private Thread udpDiscoveryThread; private boolean isStarted; private List<ExternalBridgeMachine> machines; - private Event<ExternalBridgeMachine> newMachineEvent; + private Event<ExternalBridgeMachine> machineDiscoveredEvent; + private Event<ExternalBridgeMachine> machineDisconnectedEvent; + private static final int EXTERNAL_BRIDGE_DISCOVERY_PORT = 8888; public ExternalBridgeScanner() { machines = new ArrayList<>(); - newMachineEvent = new Event<>(); + machineDiscoveredEvent = new Event<>(); + machineDisconnectedEvent = new Event<>(); } public void start() @@ -51,9 +51,14 @@ public class ExternalBridgeScanner } } - public void addNewMachineEventHandler(IEventHandler<ExternalBridgeMachine> handler) + public void addMachineDiscoveredEventHandler(IEventHandler<ExternalBridgeMachine> handler) + { + machineDiscoveredEvent.addListener(handler); + } + + public void addMachineDisconnectedEventHandler(IEventHandler<ExternalBridgeMachine> handler) { - newMachineEvent.addListener(handler); + machineDisconnectedEvent.addListener(handler); } private void udpDiscoveryMethod() @@ -79,25 +84,36 @@ public class ExternalBridgeScanner ByteBuffer wrapper = ByteBuffer.wrap(message); wrapper.put(buffer, 0, message.length); - ExternalBridgeUdpDiscoveryPacket discoveryMessage = ExternalBridgeUdpDiscoveryPacket.parseFrom(message); - boolean hasTime = !discoveryMessage.getTime().equals(""); - - DateTimeFormatter formatter = DateTimeFormat.forPattern("dd/MM/yyyy HH:mm:ss"); - DateTime time = hasTime ? formatter.parseDateTime(discoveryMessage.getTime()) : DateTime.now(); + String address = packet.getAddress().toString().replaceAll("/", ""); - String address = packet.getAddress().toString().replaceAll("/",""); - - if (!hasTime || Seconds.secondsBetween(DateTime.now(), time).getSeconds() < 6) + try { - if (!stream(machines).any(x -> x.getSerialNumber().equals(discoveryMessage.getSerialNumber()) && x.getIpAddress().equals(address))) + Socket tcpClient = new Socket(); + tcpClient.connect(new InetSocketAddress(address, EXTERNAL_BRIDGE_DISCOVERY_PORT), 2000); + tcpClient.close(); + } + catch (Exception ex) + { + ExternalBridgeMachine disconnectedMachine = stream(machines).firstOrNull(x -> x.getSerialNumber().equals(discoveryMessage.getSerialNumber()) && x.getIpAddress().equals(address)); + + if (disconnectedMachine != null) { - ExternalBridgeMachine newMachine = new ExternalBridgeMachine(address, discoveryMessage.getSerialNumber()); - machines.add(0, newMachine); - newMachineEvent.invoke(this, newMachine); + machines.remove(disconnectedMachine); + machineDisconnectedEvent.invoke(this, disconnectedMachine); } + + continue; } + + if (!stream(machines).any(x -> x.getSerialNumber().equals(discoveryMessage.getSerialNumber()) && x.getIpAddress().equals(address))) + { + ExternalBridgeMachine newMachine = new ExternalBridgeMachine(address, discoveryMessage.getSerialNumber()); + machines.add(0, newMachine); + machineDiscoveredEvent.invoke(this, newMachine); + } + } catch (Exception e) { diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtomachine/SendToMachineFragmentVM.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtomachine/SendToMachineFragmentVM.java index c77e93a20..b89b3cdb9 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtomachine/SendToMachineFragmentVM.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/colorcapture/views/sendtomachine/SendToMachineFragmentVM.java @@ -1,11 +1,9 @@ package com.twine.colorcapture.views.sendtomachine; import android.databinding.ObservableArrayList; -import android.databinding.ObservableField; import android.databinding.ObservableList; import android.os.Handler; import android.os.Looper; -import android.util.Log; import android.view.View; import android.widget.AdapterView; @@ -37,10 +35,21 @@ public class SendToMachineFragmentVM extends ViewModelBase<ISendToMachineFragmen scanner = new ExternalBridgeScanner(); machineBinding = ItemBinding.of(BR.machine, R.layout.external_machine_item); - scanner.addNewMachineEventHandler(this::onNewMachine); + scanner.addMachineDiscoveredEventHandler(this::onMachineDiscovered); + scanner.addMachineDisconnectedEventHandler(this::onMachineDisconnected); } - private void onNewMachine(Object o, ExternalBridgeMachine machine) + private void onMachineDisconnected(Object o, ExternalBridgeMachine machine) + { + Handler handler = new Handler(Looper.getMainLooper()); + handler.post(new Runnable() { + public void run() { + machines.remove(machine); + } + }); + } + + private void onMachineDiscovered(Object o, ExternalBridgeMachine machine) { Handler handler = new Handler(Looper.getMainLooper()); handler.post(new Runnable() { diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/common/MessageTypeOuterClass.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/common/MessageTypeOuterClass.java index 4a4af0a1c..47eea883d 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/common/MessageTypeOuterClass.java +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/common/MessageTypeOuterClass.java @@ -508,6 +508,14 @@ public final class MessageTypeOuterClass { */ StopApplicationLogsResponse(1012), /** + * <code>ColorProfileRequest = 1013;</code> + */ + ColorProfileRequest(1013), + /** + * <code>ColorProfileResponse = 1014;</code> + */ + ColorProfileResponse(1014), + /** * <pre> *Diagnostics * </pre> @@ -883,6 +891,18 @@ public final class MessageTypeOuterClass { * <code>ActivateVersionResponse = 7023;</code> */ ActivateVersionResponse(7023), + /** + * <pre> + *EmbeddedParameters + * </pre> + * + * <code>DispenserDataRequest = 8000;</code> + */ + DispenserDataRequest(8000), + /** + * <code>DispenserDataResponse = 8001;</code> + */ + DispenserDataResponse(8001), UNRECOGNIZED(-1), ; @@ -1375,6 +1395,14 @@ public final class MessageTypeOuterClass { */ public static final int StopApplicationLogsResponse_VALUE = 1012; /** + * <code>ColorProfileRequest = 1013;</code> + */ + public static final int ColorProfileRequest_VALUE = 1013; + /** + * <code>ColorProfileResponse = 1014;</code> + */ + public static final int ColorProfileResponse_VALUE = 1014; + /** * <pre> *Diagnostics * </pre> @@ -1750,6 +1778,18 @@ public final class MessageTypeOuterClass { * <code>ActivateVersionResponse = 7023;</code> */ public static final int ActivateVersionResponse_VALUE = 7023; + /** + * <pre> + *EmbeddedParameters + * </pre> + * + * <code>DispenserDataRequest = 8000;</code> + */ + public static final int DispenserDataRequest_VALUE = 8000; + /** + * <code>DispenserDataResponse = 8001;</code> + */ + public static final int DispenserDataResponse_VALUE = 8001; public final int getNumber() { @@ -1887,6 +1927,8 @@ public final class MessageTypeOuterClass { case 1010: return StartApplicationLogsResponse; case 1011: return StopApplicationLogsRequest; case 1012: return StopApplicationLogsResponse; + case 1013: return ColorProfileRequest; + case 1014: return ColorProfileResponse; case 2000: return StartDiagnosticsRequest; case 2001: return StartDiagnosticsResponse; case 2002: return MotorAbortHomingRequest; @@ -1975,6 +2017,8 @@ public final class MessageTypeOuterClass { case 7021: return ValidateVersionResponse; case 7022: return ActivateVersionRequest; case 7023: return ActivateVersionResponse; + case 8000: return DispenserDataRequest; + case 8001: return DispenserDataResponse; default: return null; } } @@ -2036,7 +2080,7 @@ public final class MessageTypeOuterClass { descriptor; static { java.lang.String[] descriptorData = { - "\n\021MessageType.proto\022\020Tango.PMR.Common*\236." + + "\n\021MessageType.proto\022\020Tango.PMR.Common*\212/" + "\n\013MessageType\022\010\n\004None\020\000\022\021\n\rErrorResponse" + "\020\001\022\024\n\020CalculateRequest\020\003\022\025\n\021CalculateRes" + "ponse\020\004\022\023\n\017ProgressRequest\020\005\022\024\n\020Progress" + @@ -2122,70 +2166,73 @@ public final class MessageTypeOuterClass { "nse\020\360\007\022 \n\033StartApplicationLogsRequest\020\361\007" + "\022!\n\034StartApplicationLogsResponse\020\362\007\022\037\n\032S" + "topApplicationLogsRequest\020\363\007\022 \n\033StopAppl" + - "icationLogsResponse\020\364\007\022\034\n\027StartDiagnosti" + - "csRequest\020\320\017\022\035\n\030StartDiagnosticsResponse" + - "\020\321\017\022\034\n\027MotorAbortHomingRequest\020\322\017\022\035\n\030Mot" + - "orAbortHomingResponse\020\323\017\022\027\n\022MotorHomingR", - "equest\020\324\017\022\030\n\023MotorHomingResponse\020\325\017\022\030\n\023M" + - "otorJoggingRequest\020\326\017\022\031\n\024MotorJoggingRes" + - "ponse\020\327\017\022\035\n\030MotorAbortJoggingRequest\020\330\017\022" + - "\036\n\031MotorAbortJoggingResponse\020\331\017\022 \n\033Dispe" + - "nserAbortHomingRequest\020\332\017\022!\n\034DispenserAb" + - "ortHomingResponse\020\333\017\022\033\n\026DispenserHomingR" + - "equest\020\334\017\022\034\n\027DispenserHomingResponse\020\335\017\022" + - "\034\n\027DispenserJoggingRequest\020\336\017\022\035\n\030Dispens" + - "erJoggingResponse\020\337\017\022!\n\034DispenserAbortJo" + - "ggingRequest\020\340\017\022\"\n\035DispenserAbortJogging", - "Response\020\341\017\022\031\n\024SetDigitalOutRequest\020\342\017\022\032" + - "\n\025SetDigitalOutResponse\020\343\017\022\031\n\024ThreadJogg" + - "ingRequest\020\344\017\022\032\n\025ThreadJoggingResponse\020\345" + - "\017\022\036\n\031ThreadAbortJoggingRequest\020\346\017\022\037\n\032Thr" + - "eadAbortJoggingResponse\020\347\017\022\035\n\030SetCompone" + - "ntValueRequest\020\350\017\022\036\n\031SetComponentValueRe" + - "sponse\020\351\017\022\030\n\023ResolveEventRequest\020\352\017\022\031\n\024R" + - "esolveEventResponse\020\353\017\022\033\n\026StopDiagnostic" + - "sRequest\020\354\017\022\034\n\027StopDiagnosticsResponse\020\355" + - "\017\022#\n\036StartEventsNotificationRequest\020\356\017\022$", - "\n\037StartEventsNotificationResponse\020\357\017\022\"\n\035" + - "StopEventsNotificationRequest\020\360\017\022#\n\036Stop" + - "EventsNotificationResponse\020\361\017\022\032\n\025SetHeat" + - "erStateRequest\020\362\017\022\033\n\026SetHeaterStateRespo" + - "nse\020\363\017\022\032\n\025SetBlowerStateRequest\020\364\017\022\033\n\026Se" + - "tBlowerStateResponse\020\365\017\022\031\n\024SetValveState" + - "Request\020\366\017\022\032\n\025SetValveStateResponse\020\367\017\022\017" + - "\n\nJobRequest\020\270\027\022\020\n\013JobResponse\020\271\027\022\024\n\017Abo" + - "rtJobRequest\020\272\027\022\025\n\020AbortJobResponse\020\273\027\022#" + - "\n\036UploadProcessParametersRequest\020\274\027\022$\n\037U", - "ploadProcessParametersResponse\020\275\027\022\026\n\021Cur" + - "rentJobRequest\020\276\027\022\027\n\022CurrentJobResponse\020" + - "\277\027\022\034\n\027ResumeCurrentJobRequest\020\300\027\022\035\n\030Resu" + - "meCurrentJobResponse\020\301\027\022\031\n\024StartDebugLog" + - "Request\020\240\037\022\032\n\025StartDebugLogResponse\020\241\037\022\030" + - "\n\023StopDebugLogRequest\020\242\037\022\031\n\024StopDebugLog" + - "Response\020\243\037\022\'\n\"UploadHardwareConfigurati" + - "onRequest\020\210\'\022(\n#UploadHardwareConfigurat" + - "ionResponse\020\211\'\022\027\n\022SystemResetRequest\020\212\'\022" + - "\030\n\023SystemResetResponse\020\213\'\022\025\n\020KeepAliveRe", - "quest\020\360.\022\026\n\021KeepAliveResponse\020\361.\022\023\n\016Conn" + - "ectRequest\020\362.\022\024\n\017ConnectResponse\020\363.\022\026\n\021D" + - "isconnectRequest\020\364.\022\027\n\022DisconnectRespons" + - "e\020\365.\022\026\n\021FileUploadRequest\020\3306\022\027\n\022FileUplo" + - "adResponse\020\3316\022\033\n\026FileChunkUploadRequest\020" + - "\3326\022\034\n\027FileChunkUploadResponse\020\3336\022\032\n\025Exec" + - "uteProcessRequest\020\3346\022\033\n\026ExecuteProcessRe" + - "sponse\020\3356\022\027\n\022KillProcessRequest\020\3366\022\030\n\023Ki" + - "llProcessResponse\020\3376\022\022\n\rCreateRequest\020\3406" + - "\022\023\n\016CreateResponse\020\3416\022\022\n\rDeleteRequest\020\342", - "6\022\023\n\016DeleteResponse\020\3436\022\032\n\025GetStorageInfo" + - "Request\020\3446\022\033\n\026GetStorageInfoResponse\020\3456\022" + - "\024\n\017GetFilesRequest\020\3466\022\025\n\020GetFilesRespons" + - "e\020\3476\022\030\n\023FileDownloadRequest\020\3506\022\031\n\024FileDo" + - "wnloadResponse\020\3516\022\035\n\030FileChunkDownloadRe" + - "quest\020\3526\022\036\n\031FileChunkDownloadResponse\020\3536" + - "\022\033\n\026ValidateVersionRequest\020\3546\022\034\n\027Validat" + - "eVersionResponse\020\3556\022\033\n\026ActivateVersionRe" + - "quest\020\3566\022\034\n\027ActivateVersionResponse\020\3576B\034" + - "\n\032com.twine.tango.pmr.commonb\006proto3" + "icationLogsResponse\020\364\007\022\030\n\023ColorProfileRe" + + "quest\020\365\007\022\031\n\024ColorProfileResponse\020\366\007\022\034\n\027S" + + "tartDiagnosticsRequest\020\320\017\022\035\n\030StartDiagno" + + "sticsResponse\020\321\017\022\034\n\027MotorAbortHomingRequ", + "est\020\322\017\022\035\n\030MotorAbortHomingResponse\020\323\017\022\027\n" + + "\022MotorHomingRequest\020\324\017\022\030\n\023MotorHomingRes" + + "ponse\020\325\017\022\030\n\023MotorJoggingRequest\020\326\017\022\031\n\024Mo" + + "torJoggingResponse\020\327\017\022\035\n\030MotorAbortJoggi" + + "ngRequest\020\330\017\022\036\n\031MotorAbortJoggingRespons" + + "e\020\331\017\022 \n\033DispenserAbortHomingRequest\020\332\017\022!" + + "\n\034DispenserAbortHomingResponse\020\333\017\022\033\n\026Dis" + + "penserHomingRequest\020\334\017\022\034\n\027DispenserHomin" + + "gResponse\020\335\017\022\034\n\027DispenserJoggingRequest\020" + + "\336\017\022\035\n\030DispenserJoggingResponse\020\337\017\022!\n\034Dis", + "penserAbortJoggingRequest\020\340\017\022\"\n\035Dispense" + + "rAbortJoggingResponse\020\341\017\022\031\n\024SetDigitalOu" + + "tRequest\020\342\017\022\032\n\025SetDigitalOutResponse\020\343\017\022" + + "\031\n\024ThreadJoggingRequest\020\344\017\022\032\n\025ThreadJogg" + + "ingResponse\020\345\017\022\036\n\031ThreadAbortJoggingRequ" + + "est\020\346\017\022\037\n\032ThreadAbortJoggingResponse\020\347\017\022" + + "\035\n\030SetComponentValueRequest\020\350\017\022\036\n\031SetCom" + + "ponentValueResponse\020\351\017\022\030\n\023ResolveEventRe" + + "quest\020\352\017\022\031\n\024ResolveEventResponse\020\353\017\022\033\n\026S" + + "topDiagnosticsRequest\020\354\017\022\034\n\027StopDiagnost", + "icsResponse\020\355\017\022#\n\036StartEventsNotificatio" + + "nRequest\020\356\017\022$\n\037StartEventsNotificationRe" + + "sponse\020\357\017\022\"\n\035StopEventsNotificationReque" + + "st\020\360\017\022#\n\036StopEventsNotificationResponse\020" + + "\361\017\022\032\n\025SetHeaterStateRequest\020\362\017\022\033\n\026SetHea" + + "terStateResponse\020\363\017\022\032\n\025SetBlowerStateReq" + + "uest\020\364\017\022\033\n\026SetBlowerStateResponse\020\365\017\022\031\n\024" + + "SetValveStateRequest\020\366\017\022\032\n\025SetValveState" + + "Response\020\367\017\022\017\n\nJobRequest\020\270\027\022\020\n\013JobRespo" + + "nse\020\271\027\022\024\n\017AbortJobRequest\020\272\027\022\025\n\020AbortJob", + "Response\020\273\027\022#\n\036UploadProcessParametersRe" + + "quest\020\274\027\022$\n\037UploadProcessParametersRespo" + + "nse\020\275\027\022\026\n\021CurrentJobRequest\020\276\027\022\027\n\022Curren" + + "tJobResponse\020\277\027\022\034\n\027ResumeCurrentJobReque" + + "st\020\300\027\022\035\n\030ResumeCurrentJobResponse\020\301\027\022\031\n\024" + + "StartDebugLogRequest\020\240\037\022\032\n\025StartDebugLog" + + "Response\020\241\037\022\030\n\023StopDebugLogRequest\020\242\037\022\031\n" + + "\024StopDebugLogResponse\020\243\037\022\'\n\"UploadHardwa" + + "reConfigurationRequest\020\210\'\022(\n#UploadHardw" + + "areConfigurationResponse\020\211\'\022\027\n\022SystemRes", + "etRequest\020\212\'\022\030\n\023SystemResetResponse\020\213\'\022\025" + + "\n\020KeepAliveRequest\020\360.\022\026\n\021KeepAliveRespon" + + "se\020\361.\022\023\n\016ConnectRequest\020\362.\022\024\n\017ConnectRes" + + "ponse\020\363.\022\026\n\021DisconnectRequest\020\364.\022\027\n\022Disc" + + "onnectResponse\020\365.\022\026\n\021FileUploadRequest\020\330" + + "6\022\027\n\022FileUploadResponse\020\3316\022\033\n\026FileChunkU" + + "ploadRequest\020\3326\022\034\n\027FileChunkUploadRespon" + + "se\020\3336\022\032\n\025ExecuteProcessRequest\020\3346\022\033\n\026Exe" + + "cuteProcessResponse\020\3356\022\027\n\022KillProcessReq" + + "uest\020\3366\022\030\n\023KillProcessResponse\020\3376\022\022\n\rCre", + "ateRequest\020\3406\022\023\n\016CreateResponse\020\3416\022\022\n\rDe" + + "leteRequest\020\3426\022\023\n\016DeleteResponse\020\3436\022\032\n\025G" + + "etStorageInfoRequest\020\3446\022\033\n\026GetStorageInf" + + "oResponse\020\3456\022\024\n\017GetFilesRequest\020\3466\022\025\n\020Ge" + + "tFilesResponse\020\3476\022\030\n\023FileDownloadRequest" + + "\020\3506\022\031\n\024FileDownloadResponse\020\3516\022\035\n\030FileCh" + + "unkDownloadRequest\020\3526\022\036\n\031FileChunkDownlo" + + "adResponse\020\3536\022\033\n\026ValidateVersionRequest\020" + + "\3546\022\034\n\027ValidateVersionResponse\020\3556\022\033\n\026Acti" + + "vateVersionRequest\020\3566\022\034\n\027ActivateVersion", + "Response\020\3576\022\031\n\024DispenserDataRequest\020\300>\022\032" + + "\n\025DispenserDataResponse\020\301>B\034\n\032com.twine." + + "tango.pmr.commonb\006proto3" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileRequestOuterClass.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileRequestOuterClass.java new file mode 100644 index 000000000..659695a13 --- /dev/null +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileRequestOuterClass.java @@ -0,0 +1,777 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ColorProfileRequest.proto + +package com.twine.tango.pmr.integration; + +public final class ColorProfileRequestOuterClass { + private ColorProfileRequestOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ColorProfileRequestOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Integration.ColorProfileRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>string AppID = 1;</code> + */ + java.lang.String getAppID(); + /** + * <code>string AppID = 1;</code> + */ + com.google.protobuf.ByteString + getAppIDBytes(); + + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + boolean hasDetectionColor(); + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor getDetectionColor(); + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColorOrBuilder getDetectionColorOrBuilder(); + } + /** + * Protobuf type {@code Tango.PMR.Integration.ColorProfileRequest} + */ + public static final class ColorProfileRequest extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Integration.ColorProfileRequest) + ColorProfileRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ColorProfileRequest.newBuilder() to construct. + private ColorProfileRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private ColorProfileRequest() { + appID_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ColorProfileRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 10: { + java.lang.String s = input.readStringRequireUtf8(); + + appID_ = s; + break; + } + case 18: { + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.Builder subBuilder = null; + if (detectionColor_ != null) { + subBuilder = detectionColor_.toBuilder(); + } + detectionColor_ = input.readMessage(com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(detectionColor_); + detectionColor_ = subBuilder.buildPartial(); + } + + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.internal_static_Tango_PMR_Integration_ColorProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.internal_static_Tango_PMR_Integration_ColorProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.class, com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.Builder.class); + } + + public static final int APPID_FIELD_NUMBER = 1; + private volatile java.lang.Object appID_; + /** + * <code>string AppID = 1;</code> + */ + public java.lang.String getAppID() { + java.lang.Object ref = appID_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appID_ = s; + return s; + } + } + /** + * <code>string AppID = 1;</code> + */ + public com.google.protobuf.ByteString + getAppIDBytes() { + java.lang.Object ref = appID_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DETECTIONCOLOR_FIELD_NUMBER = 2; + private com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor detectionColor_; + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + public boolean hasDetectionColor() { + return detectionColor_ != null; + } + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + public com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor getDetectionColor() { + return detectionColor_ == null ? com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.getDefaultInstance() : detectionColor_; + } + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + public com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColorOrBuilder getDetectionColorOrBuilder() { + return getDetectionColor(); + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (!getAppIDBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, appID_); + } + if (detectionColor_ != null) { + output.writeMessage(2, getDetectionColor()); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAppIDBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, appID_); + } + if (detectionColor_ != null) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(2, getDetectionColor()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest)) { + return super.equals(obj); + } + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest other = (com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest) obj; + + boolean result = true; + result = result && getAppID() + .equals(other.getAppID()); + result = result && (hasDetectionColor() == other.hasDetectionColor()); + if (hasDetectionColor()) { + result = result && getDetectionColor() + .equals(other.getDetectionColor()); + } + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + APPID_FIELD_NUMBER; + hash = (53 * hash) + getAppID().hashCode(); + if (hasDetectionColor()) { + hash = (37 * hash) + DETECTIONCOLOR_FIELD_NUMBER; + hash = (53 * hash) + getDetectionColor().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Tango.PMR.Integration.ColorProfileRequest} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Integration.ColorProfileRequest) + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.internal_static_Tango_PMR_Integration_ColorProfileRequest_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.internal_static_Tango_PMR_Integration_ColorProfileRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.class, com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.Builder.class); + } + + // Construct using com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + appID_ = ""; + + if (detectionColorBuilder_ == null) { + detectionColor_ = null; + } else { + detectionColor_ = null; + detectionColorBuilder_ = null; + } + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.internal_static_Tango_PMR_Integration_ColorProfileRequest_descriptor; + } + + public com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest getDefaultInstanceForType() { + return com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.getDefaultInstance(); + } + + public com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest build() { + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest buildPartial() { + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest result = new com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest(this); + result.appID_ = appID_; + if (detectionColorBuilder_ == null) { + result.detectionColor_ = detectionColor_; + } else { + result.detectionColor_ = detectionColorBuilder_.build(); + } + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest) { + return mergeFrom((com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest other) { + if (other == com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest.getDefaultInstance()) return this; + if (!other.getAppID().isEmpty()) { + appID_ = other.appID_; + onChanged(); + } + if (other.hasDetectionColor()) { + mergeDetectionColor(other.getDetectionColor()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object appID_ = ""; + /** + * <code>string AppID = 1;</code> + */ + public java.lang.String getAppID() { + java.lang.Object ref = appID_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = + (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + appID_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * <code>string AppID = 1;</code> + */ + public com.google.protobuf.ByteString + getAppIDBytes() { + java.lang.Object ref = appID_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8( + (java.lang.String) ref); + appID_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * <code>string AppID = 1;</code> + */ + public Builder setAppID( + java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + appID_ = value; + onChanged(); + return this; + } + /** + * <code>string AppID = 1;</code> + */ + public Builder clearAppID() { + + appID_ = getDefaultInstance().getAppID(); + onChanged(); + return this; + } + /** + * <code>string AppID = 1;</code> + */ + public Builder setAppIDBytes( + com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + appID_ = value; + onChanged(); + return this; + } + + private com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor detectionColor_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor, com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.Builder, com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColorOrBuilder> detectionColorBuilder_; + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + public boolean hasDetectionColor() { + return detectionColorBuilder_ != null || detectionColor_ != null; + } + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + public com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor getDetectionColor() { + if (detectionColorBuilder_ == null) { + return detectionColor_ == null ? com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.getDefaultInstance() : detectionColor_; + } else { + return detectionColorBuilder_.getMessage(); + } + } + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + public Builder setDetectionColor(com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor value) { + if (detectionColorBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + detectionColor_ = value; + onChanged(); + } else { + detectionColorBuilder_.setMessage(value); + } + + return this; + } + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + public Builder setDetectionColor( + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.Builder builderForValue) { + if (detectionColorBuilder_ == null) { + detectionColor_ = builderForValue.build(); + onChanged(); + } else { + detectionColorBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + public Builder mergeDetectionColor(com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor value) { + if (detectionColorBuilder_ == null) { + if (detectionColor_ != null) { + detectionColor_ = + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.newBuilder(detectionColor_).mergeFrom(value).buildPartial(); + } else { + detectionColor_ = value; + } + onChanged(); + } else { + detectionColorBuilder_.mergeFrom(value); + } + + return this; + } + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + public Builder clearDetectionColor() { + if (detectionColorBuilder_ == null) { + detectionColor_ = null; + onChanged(); + } else { + detectionColor_ = null; + detectionColorBuilder_ = null; + } + + return this; + } + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + public com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.Builder getDetectionColorBuilder() { + + onChanged(); + return getDetectionColorFieldBuilder().getBuilder(); + } + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + public com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColorOrBuilder getDetectionColorOrBuilder() { + if (detectionColorBuilder_ != null) { + return detectionColorBuilder_.getMessageOrBuilder(); + } else { + return detectionColor_ == null ? + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.getDefaultInstance() : detectionColor_; + } + } + /** + * <code>.Tango.PMR.TCC.DetectionColor DetectionColor = 2;</code> + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor, com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.Builder, com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColorOrBuilder> + getDetectionColorFieldBuilder() { + if (detectionColorBuilder_ == null) { + detectionColorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< + com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor, com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColor.Builder, com.twine.tango.pmr.tcc.DetectionColorOuterClass.DetectionColorOrBuilder>( + getDetectionColor(), + getParentForChildren(), + isClean()); + detectionColor_ = null; + } + return detectionColorBuilder_; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Tango.PMR.Integration.ColorProfileRequest) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Integration.ColorProfileRequest) + private static final com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest(); + } + + public static com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<ColorProfileRequest> + PARSER = new com.google.protobuf.AbstractParser<ColorProfileRequest>() { + public ColorProfileRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ColorProfileRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<ColorProfileRequest> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<ColorProfileRequest> getParserForType() { + return PARSER; + } + + public com.twine.tango.pmr.integration.ColorProfileRequestOuterClass.ColorProfileRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Integration_ColorProfileRequest_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Integration_ColorProfileRequest_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\031ColorProfileRequest.proto\022\025Tango.PMR.I" + + "ntegration\032\024DetectionColor.proto\"[\n\023Colo" + + "rProfileRequest\022\r\n\005AppID\030\001 \001(\t\0225\n\016Detect" + + "ionColor\030\002 \001(\0132\035.Tango.PMR.TCC.Detection" + + "ColorB!\n\037com.twine.tango.pmr.integration" + + "b\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.twine.tango.pmr.tcc.DetectionColorOuterClass.getDescriptor(), + }, assigner); + internal_static_Tango_PMR_Integration_ColorProfileRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Integration_ColorProfileRequest_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Integration_ColorProfileRequest_descriptor, + new java.lang.String[] { "AppID", "DetectionColor", }); + com.twine.tango.pmr.tcc.DetectionColorOuterClass.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileResponseOuterClass.java b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileResponseOuterClass.java new file mode 100644 index 000000000..53e36224f --- /dev/null +++ b/Software/Android_Studio/ColorCapture/app/src/main/java/com/twine/tango/pmr/integration/ColorProfileResponseOuterClass.java @@ -0,0 +1,506 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: ColorProfileResponse.proto + +package com.twine.tango.pmr.integration; + +public final class ColorProfileResponseOuterClass { + private ColorProfileResponseOuterClass() {} + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistryLite registry) { + } + + public static void registerAllExtensions( + com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions( + (com.google.protobuf.ExtensionRegistryLite) registry); + } + public interface ColorProfileResponseOrBuilder extends + // @@protoc_insertion_point(interface_extends:Tango.PMR.Integration.ColorProfileResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * <code>bool Approved = 1;</code> + */ + boolean getApproved(); + } + /** + * Protobuf type {@code Tango.PMR.Integration.ColorProfileResponse} + */ + public static final class ColorProfileResponse extends + com.google.protobuf.GeneratedMessageV3 implements + // @@protoc_insertion_point(message_implements:Tango.PMR.Integration.ColorProfileResponse) + ColorProfileResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ColorProfileResponse.newBuilder() to construct. + private ColorProfileResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { + super(builder); + } + private ColorProfileResponse() { + approved_ = false; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet + getUnknownFields() { + return this.unknownFields; + } + private ColorProfileResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: { + if (!parseUnknownFieldProto3( + input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + case 8: { + + approved_ = input.readBool(); + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException( + e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.internal_static_Tango_PMR_Integration_ColorProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.internal_static_Tango_PMR_Integration_ColorProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.class, com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.Builder.class); + } + + public static final int APPROVED_FIELD_NUMBER = 1; + private boolean approved_; + /** + * <code>bool Approved = 1;</code> + */ + public boolean getApproved() { + return approved_; + } + + private byte memoizedIsInitialized = -1; + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + public void writeTo(com.google.protobuf.CodedOutputStream output) + throws java.io.IOException { + if (approved_ != false) { + output.writeBool(1, approved_); + } + unknownFields.writeTo(output); + } + + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (approved_ != false) { + size += com.google.protobuf.CodedOutputStream + .computeBoolSize(1, approved_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse)) { + return super.equals(obj); + } + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse other = (com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse) obj; + + boolean result = true; + result = result && (getApproved() + == other.getApproved()); + result = result && unknownFields.equals(other.unknownFields); + return result; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + APPROVED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( + getApproved()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + java.nio.ByteBuffer data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + byte[] data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseDelimitedFrom( + java.io.InputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseDelimitedWithIOException(PARSER, input, extensionRegistry); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input); + } + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3 + .parseWithIOException(PARSER, input, extensionRegistry); + } + + public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + public static Builder newBuilder(com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * Protobuf type {@code Tango.PMR.Integration.ColorProfileResponse} + */ + public static final class Builder extends + com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements + // @@protoc_insertion_point(builder_implements:Tango.PMR.Integration.ColorProfileResponse) + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor + getDescriptor() { + return com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.internal_static_Tango_PMR_Integration_ColorProfileResponse_descriptor; + } + + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.internal_static_Tango_PMR_Integration_ColorProfileResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.class, com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.Builder.class); + } + + // Construct using com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3 + .alwaysUseFieldBuilders) { + } + } + public Builder clear() { + super.clear(); + approved_ = false; + + return this; + } + + public com.google.protobuf.Descriptors.Descriptor + getDescriptorForType() { + return com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.internal_static_Tango_PMR_Integration_ColorProfileResponse_descriptor; + } + + public com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse getDefaultInstanceForType() { + return com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.getDefaultInstance(); + } + + public com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse build() { + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + public com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse buildPartial() { + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse result = new com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse(this); + result.approved_ = approved_; + onBuilt(); + return result; + } + + public Builder clone() { + return (Builder) super.clone(); + } + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.setField(field, value); + } + public Builder clearField( + com.google.protobuf.Descriptors.FieldDescriptor field) { + return (Builder) super.clearField(field); + } + public Builder clearOneof( + com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return (Builder) super.clearOneof(oneof); + } + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, java.lang.Object value) { + return (Builder) super.setRepeatedField(field, index, value); + } + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + java.lang.Object value) { + return (Builder) super.addRepeatedField(field, value); + } + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse) { + return mergeFrom((com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse)other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse other) { + if (other == com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse.getDefaultInstance()) return this; + if (other.getApproved() != false) { + setApproved(other.getApproved()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + public final boolean isInitialized() { + return true; + } + + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean approved_ ; + /** + * <code>bool Approved = 1;</code> + */ + public boolean getApproved() { + return approved_; + } + /** + * <code>bool Approved = 1;</code> + */ + public Builder setApproved(boolean value) { + + approved_ = value; + onChanged(); + return this; + } + /** + * <code>bool Approved = 1;</code> + */ + public Builder clearApproved() { + + approved_ = false; + onChanged(); + return this; + } + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFieldsProto3(unknownFields); + } + + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + + // @@protoc_insertion_point(builder_scope:Tango.PMR.Integration.ColorProfileResponse) + } + + // @@protoc_insertion_point(class_scope:Tango.PMR.Integration.ColorProfileResponse) + private static final com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse(); + } + + public static com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<ColorProfileResponse> + PARSER = new com.google.protobuf.AbstractParser<ColorProfileResponse>() { + public ColorProfileResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ColorProfileResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser<ColorProfileResponse> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<ColorProfileResponse> getParserForType() { + return PARSER; + } + + public com.twine.tango.pmr.integration.ColorProfileResponseOuterClass.ColorProfileResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_Tango_PMR_Integration_ColorProfileResponse_descriptor; + private static final + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_Tango_PMR_Integration_ColorProfileResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor + getDescriptor() { + return descriptor; + } + private static com.google.protobuf.Descriptors.FileDescriptor + descriptor; + static { + java.lang.String[] descriptorData = { + "\n\032ColorProfileResponse.proto\022\025Tango.PMR." + + "Integration\"(\n\024ColorProfileResponse\022\020\n\010A" + + "pproved\030\001 \001(\010B!\n\037com.twine.tango.pmr.int" + + "egrationb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor + .internalBuildGeneratedFileFrom(descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + }, assigner); + internal_static_Tango_PMR_Integration_ColorProfileResponse_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_Tango_PMR_Integration_ColorProfileResponse_fieldAccessorTable = new + com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_Tango_PMR_Integration_ColorProfileResponse_descriptor, + new java.lang.String[] { "Approved", }); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/external_machine_item.xml b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/external_machine_item.xml index c13fdaaef..24b2c0f7e 100644 --- a/Software/Android_Studio/ColorCapture/app/src/main/res/layout/external_machine_item.xml +++ b/Software/Android_Studio/ColorCapture/app/src/main/res/layout/external_machine_item.xml @@ -4,30 +4,45 @@ xmlns:tools="http://schemas.android.com/tools"> <data> + <variable name="machine" - type="com.twine.colorcapture.integration.ExternalBridgeMachine"/> + type="com.twine.colorcapture.integration.ExternalBridgeMachine" /> </data> <LinearLayout android:layout_width="match_parent" - android:layout_height="match_parent" - android:orientation="vertical" - android:background="@drawable/list_view_selectable" - android:padding="5dp"> + android:layout_height="wrap_content" + android:orientation="horizontal"> - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@{machine.serialNumber}" - tools:text="Serial Number" - android:textSize="18sp" /> + <ImageView + android:id="@+id/imageView2" + android:layout_width="60dp" + android:layout_height="60dp" + android:scaleType="fitCenter" + android:layout_marginRight="10dp" + android:src="@drawable/icon" /> - <TextView + <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@{machine.ipAddress}" - tools:text="IP Address" - android:layout_marginTop="10dp" /> + android:background="@drawable/list_view_selectable" + android:orientation="vertical" + android:padding="5dp"> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:text="@{machine.serialNumber}" + android:textSize="18sp" + tools:text="Serial Number" /> + + <TextView + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="10dp" + android:text="@{machine.ipAddress}" + tools:text="IP Address" /> + </LinearLayout> </LinearLayout> </layout>
\ No newline at end of file |
