blob: 3a1f5930ccc49b0dc14780b0f977e8fdbdeb56d3 [file] [log] [blame]
<!doctype html>
<html data-n-head-ssr data-n-head="">
<head data-n-head="">
<title data-n-head="true">Eclipse unide - PPMP Use Cases: Simple Transformation with Apache Camel</title><meta data-n-head="true" charset="utf-8"><meta data-n-head="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-n-head="true" data-hid="description" name="description" content="Eclipse Unide: Understand Industry devices"><link data-n-head="true" rel="icon" type="image/x-icon" href="/unide/favicon.ico"><base href="/unide/"><link rel="stylesheet" href="/unide/files/1750fa95f99b26cdec14.css"><link rel="stylesheet" href="/unide/files/08ee945502042ce842dc.css">
</head>
<body data-n-head="">
<div data-server-rendered="true" id="__nuxt"><!----><div id="__layout"><div><header class="nav-header"><div class="container"><nav class="navbar"><div id="navMenu" class="navbar-menu"><div class="navbar-start"><a href="/unide/" class="navbar-item">
Home
</a> <a href="/unide/proposal" class="navbar-item">
Proposal
</a> <a href="/unide/specification" class="navbar-item">
Specification
</a> <a href="/unide/blog" class="navbar-item is-active">
Blog Archives
</a> <a href="/unide/faq" class="navbar-item">
FAQ
</a></div></div> <div class="navbar-brand"><div class="navbar-burger burger"><span></span> <span></span> <span></span></div> <a href="/unide/" class="navbar-item nuxt-link-active"><img src="logo.svg"></a></div></nav></div></header> <div class="container"><div class="header clearfix"></div> <div class="columns"><div class="article column is-8"><h1 class="title is-3">
PPMP Use Cases: Simple Transformation with Apache Camel
</h1> <h2 class="subtitle is-6"><i class="fa fa-calendar"></i>  
02/11/18
</h2> <div class="content"><div><p>The Production Performance Management Protocol (PPMP) is a simple structure to send out machine data. Unide, as its hosting project, is supposed to provide exemplary implementations.</p>
<p>We have already published <a href="https://github.com/eclipse/unide/tree/master/servers/rest">a REST server</a>, <a href="https://github.com/eclipse/unide.java">java-</a> and <a href="https://github.com/eclipse/unide.python">python-</a> bindings and an <a href="https://github.com/eclipse/unide/tree/master/clients/binsa">html5-client</a>. But how are these implementations used in real life?</p>
<h1>The Challenge</h1>
<div class="card figure">
<div class="card-image">
<figure class="image">
<img alt="Welding robots" title="BMW plant, spot welding" src="/unide/images/blog/Transform-PPMP-with-camel-welding.jpg">
</figure>
</div>
<div class="card-content">
BMW plant in Leipzig, Germany: Spot welding <a href="https://creativecommons.org/licenses/by-sa/2.0/de/deed.en">(CC BY-SA 2.0 DE)</a>
</div>
</div>
<p>In the automotive industry, <a href="https://en.wikipedia.org/wiki/Spot_welding">welding spots</a> are crucial for the quality of a car and the security of the passenger. In modern production lines, hundreds of welding spots have to be precisely set in a single shift. In order to reduce product rework, scrap, destructible tests and machine downtime, the quality should be monitored consistently. That's what special welding controller in machines do. Unfortunately, this data is often only used locally, for a short period of time and in proprietary formats. Just enough to determine the immediate process outcome. In that case, further opportunities of analysing the information are not taken. With the continuous increase in complexity, price and time pressure, the demand for further processing and optimization grows. The data could be used to prevent or even predict maintenance or just store the data in long time archives in case of legal disputes.</p>
<p>One prerequisite for such connectivity is the hardware and its connectivity. Older generations of welding controllers can only be accessed with proprietary stacks (like the <a href="https://www.boschrexroth.com/en/xc/products/product-groups/welding-technology/controllers-with-power-section/mf-system-psi6000/index">PSI 6000</a>) whereas newer generations (like the <a href="https://www.boschrexroth.com/en/xc/company/press/index2-29696">PRC 7000</a>) are much more flexible in terms of networking and communication. In general, there are two aspects that make up the communication: the transport protocol and the structure of the payload. This is similar to our daily life: if you want to chat with your friends, you need to use the same messenger or communication technology (phone, email) and you need speak the same language (English, German etc.).</p>
<p>In the following sections, let's assume we need to transform the transport protocol as well as the payload. The data is generated by a welding controller and should be passed to <a href="https://unide.eclipse.org">the unide REST server</a> for persisting it in a dedicated timeseries database.</p>
<h1>The Approach</h1>
<p>We want to find a way to receive the data, transform it into PPMP and store it into a database in our <a href="https://unide.eclipse.org">REST Server</a>.</p>
<p>First, we need to understand which interfaces the controller has, which communication protocol is used, and how the payload would be interpreted. In the case of the PSI 6000, it was configured to publish the quality data to a <a href="https://de.wikipedia.org/wiki/MQTT">mqtt</a> message broker (here: <a href="https://mosquitto.org/">Eclipse mosquitto</a>). We don't have an extensive documentation of the payload, but we can look at samples of it (some Curve data shortened at the end):</p>
<pre class="language-json"><code class="language-json"><span class="token punctuation">{</span>
<span class="token property">"Name"</span><span class="token operator">:</span> <span class="token string">"WeldLog/UIR Testrack 24/"</span><span class="token punctuation">,</span>
<span class="token property">"WeldTimer"</span><span class="token operator">:</span> <span class="token string">"UIR Testrack 24"</span><span class="token punctuation">,</span>
<span class="token property">"TimeStamp"</span><span class="token operator">:</span> <span class="token string">"2018-01-17T10:41:00.0008436+01:00"</span><span class="token punctuation">,</span>
<span class="token property">"OutputFormat"</span><span class="token operator">:</span> <span class="token string">"JSON"</span><span class="token punctuation">,</span>
<span class="token property">"Message"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token property">"WeldLog"</span><span class="token operator">:</span> <span class="token punctuation">{</span>
<span class="token property">"protRecord_ID"</span><span class="token operator">:</span> <span class="token number">734827</span><span class="token punctuation">,</span>
<span class="token property">"dateTime"</span><span class="token operator">:</span> <span class="token string">"2018-01-15T16:52:32.09"</span><span class="token punctuation">,</span>
<span class="token property">"timerName"</span><span class="token operator">:</span> <span class="token string">"UIR Testrack 24"</span><span class="token punctuation">,</span>
<span class="token property">"progNo"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"spotName"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
<span class="token property">"wear"</span><span class="token operator">:</span> <span class="token number">8312480</span><span class="token punctuation">,</span>
<span class="token property">"wearPerCent"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"monitorState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"regulationState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"measureState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"powerState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"sequenceState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"sequenceStateAdd"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"sequenceRepeat"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"monitorMode"</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token property">"iDemandStd"</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">"ilsts"</span><span class="token operator">:</span> <span class="token number">13.14</span><span class="token punctuation">,</span>
<span class="token property">"regulationStd"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"iDemand1"</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">"iActual1"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"regulation1"</span><span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span>
<span class="token property">"iDemand2"</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">"iActual2"</span><span class="token operator">:</span> <span class="token number">13.16</span><span class="token punctuation">,</span>
<span class="token property">"regulation2"</span><span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span>
<span class="token property">"iDemand3"</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>
<span class="token property">"iActual3"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"regulation3"</span><span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span>
<span class="token property">"phaStd"</span><span class="token operator">:</span> <span class="token number">24.96</span><span class="token punctuation">,</span>
<span class="token property">"pha1"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"pha2"</span><span class="token operator">:</span> <span class="token number">24.64</span><span class="token punctuation">,</span>
<span class="token property">"pha3"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"t_iDemandStd"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"tActualStd"</span><span class="token operator">:</span> <span class="token number">878</span><span class="token punctuation">,</span>
<span class="token property">"partIdentString"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>
<span class="token property">"tipDressCounter"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"electrodeNo"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"sgForceSetPoint"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"sgSheetThicknessSetPoint"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"sgSagGpSetPoint"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"sgSpotWithSg"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"sgMotorCurrent"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"sgMotorTemp"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"sgForce"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"sgSheetThickness"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"sgSagGp"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"sgSagGc"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"regUsrUspJunction"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"regUsrUspMax"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"regSpotDiaActual"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"regSpotDiaMinDemand"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"regSplashTime"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"nuggetDiameter"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"usp"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"normingTime"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"regulationStartTime"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"returnToConstantCurrent"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"declineUsp"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"offsetUsp"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"currentFactor"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"triggerTime"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"xqrMeasuringActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"xqrRegulationActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"xqrMonitoringActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"xqrWeldTimeProlongationActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"voltageActualValue"</span><span class="token operator">:</span> <span class="token number">0.03</span><span class="token punctuation">,</span>
<span class="token property">"voltageRefValue"</span><span class="token operator">:</span> <span class="token number">0.03</span><span class="token punctuation">,</span>
<span class="token property">"currentActualValue"</span><span class="token operator">:</span> <span class="token number">13.17</span><span class="token punctuation">,</span>
<span class="token property">"currentReferenceValue"</span><span class="token operator">:</span> <span class="token number">13.95</span><span class="token punctuation">,</span>
<span class="token property">"weldTimeActualValue"</span><span class="token operator">:</span> <span class="token number">876</span><span class="token punctuation">,</span>
<span class="token property">"weldTimeRefValue"</span><span class="token operator">:</span> <span class="token number">760</span><span class="token punctuation">,</span>
<span class="token property">"energyActualValue"</span><span class="token operator">:</span> <span class="token number">395.1261</span><span class="token punctuation">,</span>
<span class="token property">"energyRefValue"</span><span class="token operator">:</span> <span class="token number">342</span><span class="token punctuation">,</span>
<span class="token property">"powerActualValue"</span><span class="token operator">:</span> <span class="token number">395.133</span><span class="token punctuation">,</span>
<span class="token property">"powerRefValue"</span><span class="token operator">:</span> <span class="token number">449.35</span><span class="token punctuation">,</span>
<span class="token property">"resistanceActualValue"</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
<span class="token property">"resistanceRefValue"</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>
<span class="token property">"pulseWidthActualValue"</span><span class="token operator">:</span> <span class="token number">25.02</span><span class="token punctuation">,</span>
<span class="token property">"pulseWidthRefValue"</span><span class="token operator">:</span> <span class="token number">26.19</span><span class="token punctuation">,</span>
<span class="token property">"stabilisationFactorActValue"</span><span class="token operator">:</span> <span class="token number">55</span><span class="token punctuation">,</span>
<span class="token property">"stabilisationFactorRefValue"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"thresholdStabilisationFactor"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"wldEffectStabilisationFactor"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"uipActualValue"</span><span class="token operator">:</span> <span class="token number">126</span><span class="token punctuation">,</span>
<span class="token property">"uipRefValue"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"uirExpulsionTime"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"uirMeasuringActive"</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token property">"uirRegulationActive"</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token property">"uirMonitoringActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"uirWeldTimeProlongationActive"</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>
<span class="token property">"uirQStoppRefCntValue"</span><span class="token operator">:</span> <span class="token number">9</span><span class="token punctuation">,</span>
<span class="token property">"uirQStoppActCntValue"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"uirUipUpperTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"uirUipLowerTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"uirUipCondTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"uirPsfLowerTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"uirPsfCondTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_1"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_2"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_3"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_4"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_5"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP32_6"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_7"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_8"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_9"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_10"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_11"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP32_12"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_13"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_14"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_15"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_16"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP16_17"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"weldSpotCustDataP32_18"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"uipMonCondUpperTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"fqfActualValue"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"fqfRefValue"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"fqfMonUpperTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"fqfMonLowerTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"fqfMonCondUpperTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"fqfMonCondLowerTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>
<span class="token property">"fqfMeasuringActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"xqrModeOff"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"reweldActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>
<span class="token property">"weldspotRefIdent"</span><span class="token operator">:</span> <span class="token string">"UIR_PART"</span><span class="token punctuation">,</span>
<span class="token property">"sg_Torque_Gp"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"sg_Force_Corr"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"sg_Weldspot_Geo_Wear"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"sg_Wear_Length"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"sg_Beam_UpArching"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>
<span class="token property">"CurrentCurve"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token number">11621</span><span class="token punctuation">,</span>
<span class="token number">15434</span><span class="token punctuation">,</span>
...
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token property">"VoltageCurve"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token number">39</span><span class="token punctuation">,</span>
<span class="token number">29</span><span class="token punctuation">,</span>
...
<span class="token punctuation">]</span><span class="token punctuation">,</span>
<span class="token property">"ForceCurve"</span><span class="token operator">:</span> <span class="token punctuation">[</span>
<span class="token number">49</span><span class="token punctuation">,</span>
<span class="token number">49</span><span class="token punctuation">,</span>
...
<span class="token punctuation">]</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre>
<p>That's already very detailed, but it's unclear which device / welding spot the data comes from and what the timing of the curves was. Let's get some more structure in with PPMP!</p>
<p>In PPMP, we have the option to differentiate between discrete manufacturing data (MES - part produced) by using the <a href="/unide/specification/measurement-message">measurement-message</a> and detailed process data by using the <a href="https://www.eclipse.org/unide/specification/process-message">process-message</a>. In the welding payload, that's all combined in one message. So we also want to split this payload into two.</p>
<h2>Introducing Apache Camel</h2>
<div class="card figure is-pulled-left">
<div class="card-image">
<figure class="image">
<img alt="Apache Camel" title="Apache Camel" src="/unide/images/blog/Transform-PPMP-with-camel-camel.png">
</figure>
</div>
<div class="card-content">
Apache Camel, <a href="https://www.apache.org/licenses/LICENSE-2.0">(Apache License 2.0)</a>
</div>
</div>
<p><a href="https://en.wikipedia.org/wiki/Apache_Camel">Apache Camel</a> is a java-based Open Source framework, that can transform and route data. It supports most of the <a href="https://en.wikipedia.org/wiki/Enterprise_Integration_Patterns">Enterprise Integration Patterns</a> and hundreds(!) of <a href="http://camel.apache.org/components.html">connectors / components</a>. Think of it as an extensive transformation and workflow automation engine. In fact, it's so powerful and versatile, that it unfortunately doesn't come with a visual user interface or a plug-and-play installer. Luckily, for everyone who doesn't happen to be a java expert, there's also an xml configuration (via <a href="https://docs.spring.io/spring/docs/4.2.x/spring-framework-reference/html/xsd-configuration.html">spring xml</a>). And that's mostly all we need!</p>
<h2>Transforming the Communication Protocol</h2>
<p>We will use Spring XML to configure Apache Camel. The workflow in Camel are called <code>&lt;routes></code>. So let's create a route that transforms our mqtt to REST protocol:</p>
<pre class="language-xml"><code class="language-xml"><span class="token prolog">&lt;?xml version="1.0" encoding="UTF-8"?></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>beans</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.springframework.org/schema/beans<span class="token punctuation">"</span></span>
<span class="token attr-name"><span class="token namespace">xmlns:</span>xsi</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.w3.org/2001/XMLSchema-instance<span class="token punctuation">"</span></span> <span class="token attr-name"><span class="token namespace">xmlns:</span>camel</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://camel.apache.org/schema/spring<span class="token punctuation">"</span></span>
<span class="token attr-name"><span class="token namespace">xmlns:</span>util</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.springframework.org/schema/util<span class="token punctuation">"</span></span>
<span class="token attr-name"><span class="token namespace">xsi:</span>schemaLocation</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>camelContext</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://camel.apache.org/schema/spring<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>route</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>from</span>
<span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mqtt://psi6000?host=tcp://192.168.123.135:1883<span class="token entity" title="&">&ampamp;</span>subscribeTopicName=PSI6000//PROCESS/PPMP/PROCESS<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>to</span>
<span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>jetty:http://unide.eclipse.org:8080/rest/v2/measurement?bridgeEndpoint=true<span class="token entity" title="&">&ampamp;</span>throwExceptionOnFailure=true<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>route</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>camelContext</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>beans</span><span class="token punctuation">></span></span>
</code></pre>
<p>That's it! A <code>&lt;route></code> that reads<code>&lt;from></code> mqtt and forwards <code>&lt;to></code> http. Not so difficult, is it? We could use many of the other <a href="http://camel.apache.org/components.html">connectors / components</a> in the example above as well to transform from/to different protocols.</p>
<p>But wait! The welding payload above was not PPMP. So we also need to normalize the payload.</p>
<h2>Normalizing the Payload</h2>
<p>Now that we can easily convert protocols, let's address the structure of the payload. Overall, we want to have a workflow that looks as described in the diagram below:</p>
<div class="card figure">
<div class="card-image">
<figure class="image">
<img alt="data workflow" title="data workflow" src="/unide/images/blog/Transform-PPMP-with-camel-1.svg">
</figure>
</div>
<div class="card-content">
Workflow to extract the data from controller, convert it and send the data to the cloud application
</div>
</div>
<p>The extra steps here are:</p>
<ol>
<li>transform the PSI 6000 JSON String payload to a java object</li>
<li>transform the PSI 6000 java object to two PPMP-java objects (<a href="/unide/specification/measurement-message">measurement-message</a> and <a href="https://www.eclipse.org/unide/specification/process-message">process-message</a>)</li>
<li>split up the two PPMP objects</li>
<li>route the objects individually</li>
<li>transform each PPMP object back to a String</li>
</ol>
<h3>Create the PSI 6000 Java Object</h3>
<p>Luckily, there are helpers for transforming json (or xml) to plain old java objects (POJOs). We are using <a href="http://www.jsonschema2pojo.org/">jsonschema2pojo</a> to convert the above json sample to POJOs with Jackson 2.x annotation. I name the resulting data type class <code>PSI6000DataType</code> and organize it in the package <code>org.eclipse.iot.unide.integrators</code>. Based on the given testdata, jsonschema2pojo cannot fully deduct all attribute types correctly. In order to allow floating point values, we would rename all <code>Integer</code> and <code>Object</code> types to <code>Number</code> in the WeldLog.java file. Also in the same file, we would change the type of the <code>dateTime</code> field from String to <code>LocalDateTime</code> to be more accurate:</p>
<pre class="language-java"><code class="language-java"><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token annotation punctuation">@JsonProperty</span><span class="token punctuation">(</span><span class="token string">"dateTime"</span><span class="token punctuation">)</span>
<span class="token annotation punctuation">@JsonSerialize</span><span class="token punctuation">(</span>using <span class="token operator">=</span> LocalDateTimeSerializer<span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span>
<span class="token annotation punctuation">@JsonDeserialize</span><span class="token punctuation">(</span>using <span class="token operator">=</span> LocalDateTimeDeserializer<span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span>
<span class="token keyword">private</span> LocalDateTime dateTime<span class="token punctuation">;</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
</code></pre>
<p>For that, we also need to include the respective imports:</p>
<pre class="language-java"><code class="language-java"><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
<span class="token keyword">import</span> com<span class="token punctuation">.</span>fasterxml<span class="token punctuation">.</span>jackson<span class="token punctuation">.</span>databind<span class="token punctuation">.</span>annotation<span class="token punctuation">.</span>JsonDeserialize<span class="token punctuation">;</span>
<span class="token keyword">import</span> com<span class="token punctuation">.</span>fasterxml<span class="token punctuation">.</span>jackson<span class="token punctuation">.</span>databind<span class="token punctuation">.</span>annotation<span class="token punctuation">.</span>JsonSerialize<span class="token punctuation">;</span>
<span class="token keyword">import</span> com<span class="token punctuation">.</span>fasterxml<span class="token punctuation">.</span>jackson<span class="token punctuation">.</span>datatype<span class="token punctuation">.</span>jsr310<span class="token punctuation">.</span>deser<span class="token punctuation">.</span>LocalDateTimeDeserializer<span class="token punctuation">;</span>
<span class="token keyword">import</span> com<span class="token punctuation">.</span>fasterxml<span class="token punctuation">.</span>jackson<span class="token punctuation">.</span>datatype<span class="token punctuation">.</span>jsr310<span class="token punctuation">.</span>ser<span class="token punctuation">.</span>LocalDateTimeSerializer<span class="token punctuation">;</span>
<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>
</code></pre>
<p>and adjust the getter (<code>getDateTime()</code>), setter (<code>setDateTime()</code>) and the type in the constructor (<code>public WeldLog(...)</code>) accordingly.</p>
<p>Camel will be able to transform ("<em>unmarshal</em>") this datatype from a string to a POJO after adding the definition to the above Spring XML:</p>
<pre class="language-xml"><code class="language-xml">...
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>camelContext</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://camel.apache.org/schema/spring<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dataFormats</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>psi6000<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>
<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.integrators.PSI6000DataType<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dataFormats</span><span class="token punctuation">></span></span>
...
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>camelContext</span><span class="token punctuation">></span></span>
</code></pre>
<h3>Use unide.java binding for PPMP Java Objects</h3>
<p>For eventually transforming the PPMP objects back to String ("<em>marshal</em>"), we can make use of the <a href="https://github.com/eclipse/unide.java">unide PPMP java binding</a>. Just adjust the dataFormats section of the Spring XML so that it reads:</p>
<pre class="language-xml"><code class="language-xml">...
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>camelContext</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://camel.apache.org/schema/spring<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dataFormats</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>psi6000<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>
<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.integrators.PSI6000DataType<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ppmpMeasurementMessage<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>
<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.ppmp.measurements.MeasurementsWrapper<span class="token punctuation">"</span></span>
<span class="token attr-name">moduleClassNames</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>com.fasterxml.jackson.datatype.jsr310.JavaTimeModule<span class="token punctuation">"</span></span>
<span class="token attr-name">disableFeatures</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>WRITE_DATES_AS_TIMESTAMPS<span class="token punctuation">"</span></span>
<span class="token attr-name">include</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>NON_NULL<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ppmpProcessMessage<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>
<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.ppmp.process.ProcessWrapper<span class="token punctuation">"</span></span>
<span class="token attr-name">moduleClassNames</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>com.fasterxml.jackson.datatype.jsr310.JavaTimeModule<span class="token punctuation">"</span></span>
<span class="token attr-name">disableFeatures</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>WRITE_DATES_AS_TIMESTAMPS<span class="token punctuation">"</span></span>
<span class="token attr-name">include</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>NON_NULL<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dataFormats</span><span class="token punctuation">></span></span>
...
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>camelContext</span><span class="token punctuation">></span></span>
</code></pre>
<h3>Create the Workflow</h3>
<p>In order to better structure data flow, we use multiple <code>&lt;route></code>-s: one for retrieving the data and two more after the split of the payload. They are connected via the virtual camel protocol "<em>direct</em>". In the following Spring XML, you can also find some <code>&lt;log></code> points and additional steps to set http header (<code>&lt;setHeader></code>) for posting to the unide server:</p>
<pre class="language-xml"><code class="language-xml"><span class="token prolog">&lt;?xml version="1.0" encoding="UTF-8"?></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>beans</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.springframework.org/schema/beans<span class="token punctuation">"</span></span>
<span class="token attr-name"><span class="token namespace">xmlns:</span>xsi</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.w3.org/2001/XMLSchema-instance<span class="token punctuation">"</span></span> <span class="token attr-name"><span class="token namespace">xmlns:</span>camel</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://camel.apache.org/schema/spring<span class="token punctuation">"</span></span>
<span class="token attr-name"><span class="token namespace">xmlns:</span>util</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.springframework.org/schema/util<span class="token punctuation">"</span></span>
<span class="token attr-name"><span class="token namespace">xsi:</span>schemaLocation</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring
http://camel.apache.org/schema/spring/camel-spring.xsd<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>psi6000-to-ppmp<span class="token punctuation">"</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.integrators.PSI6000<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>bean</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>camelContext</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://camel.apache.org/schema/spring<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dataFormats</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>psi6000<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>
<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.integrators.PSI6000DataType<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ppmpMeasurementMessage<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>
<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.ppmp.measurements.MeasurementsWrapper<span class="token punctuation">"</span></span>
<span class="token attr-name">moduleClassNames</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>com.fasterxml.jackson.datatype.jsr310.JavaTimeModule<span class="token punctuation">"</span></span>
<span class="token attr-name">disableFeatures</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>WRITE_DATES_AS_TIMESTAMPS<span class="token punctuation">"</span></span> <span class="token attr-name">include</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>NON_NULL<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ppmpProcessMessage<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>
<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.ppmp.process.ProcessWrapper<span class="token punctuation">"</span></span>
<span class="token attr-name">moduleClassNames</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>com.fasterxml.jackson.datatype.jsr310.JavaTimeModule<span class="token punctuation">"</span></span>
<span class="token attr-name">disableFeatures</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>WRITE_DATES_AS_TIMESTAMPS<span class="token punctuation">"</span></span> <span class="token attr-name">include</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>NON_NULL<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dataFormats</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>route</span> <span class="token attr-name">autoStartup</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>true<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>from</span>
<span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mqtt://psi6000?host=tcp://192.168.123.135:1883<span class="token entity" title="&">&ampamp;</span>subscribeTopicName=PSI6000//PROCESS/PPMP/PROCESS<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>unmarshal</span> <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>psi6000<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>psi6000-to-ppmp<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setHeader</span> <span class="token attr-name">headerName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Content-Type<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>constant</span><span class="token punctuation">></span></span>application/json; charset=utf-8<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>constant</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setHeader</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setHeader</span> <span class="token attr-name">headerName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>CamelHttpMethod<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>constant</span><span class="token punctuation">></span></span>POST<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>constant</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setHeader</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>multicast</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>to</span> <span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>direct:measurement<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>to</span> <span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>direct:process<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>multicast</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>done<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setBody</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>simple</span><span class="token punctuation">></span></span>{"result": true }<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>simple</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setBody</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>route</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>route</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>from</span> <span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>direct:measurement<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setBody</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>simple</span><span class="token punctuation">></span></span>${body[0]}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>simple</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setBody</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>deviceId measurement: ${body.device.deviceID}<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>marshal</span> <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ppmpMeasurementMessage<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>sending measurement<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setHeader</span> <span class="token attr-name">headerName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Content-Length<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>simple</span><span class="token punctuation">></span></span>body.length<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>simple</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setHeader</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>to</span>
<span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>jetty:http://unide.eclipse.org:8080/rest/v2/measurement?bridgeEndpoint=true<span class="token entity" title="&">&ampamp;</span>throwExceptionOnFailure=true<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>measurement sent<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>route</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>route</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>from</span> <span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>direct:process<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setBody</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>simple</span><span class="token punctuation">></span></span>${body[1]}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>simple</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setBody</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>deviceId process: ${body.device.deviceID}<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>marshal</span> <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ppmpProcessMessage<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>sending process<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setHeader</span> <span class="token attr-name">headerName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Content-Length<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>simple</span><span class="token punctuation">></span></span>body.length<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>simple</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setHeader</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>to</span>
<span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>jetty:http://unide.eclipse.org:8080/rest/v2/process?bridgeEndpoint=true<span class="token entity" title="&">&ampamp;</span>throwExceptionOnFailure=true<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>process sent<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>route</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>camelContext</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>beans</span><span class="token punctuation">></span></span>
</code></pre>
<p>You might have noticed that we have not yet discussed one important item in this workflow: how do we actually transform the payload from one format to another?</p>
<h3>Transforming from PSI 6000 POJO to PPMP POJOs</h3>
<p>One thing that we'll hardwire as java code is the transformation from the source to the target structure. The same functionality could be achieved with scripting components (e.g. <a href="http://camel.apache.org/groovy.html">groovy</a>, but that would be less powerful and worse performance. Since we don't expect the format to change but mostly the workflow or endpoints, implementing a java bean is not too much effort. Here's how:<br>
Apache Camel offers a <code>Processor</code> interface that can be used to override the <code>process()</code> function. This function receives the complete message (<code>exchange</code>) and can modify it in any way. Since we have created the PSI 6000 Java Object already and want to produce PPMP java objects, the logic is mostly about creating the child objects and wiring the suitable getter to corresponding setter.</p>
<pre class="language-java"><code class="language-java"><span class="token keyword">package</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>integrators<span class="token punctuation">;</span>
<span class="token keyword">import</span> java<span class="token punctuation">.</span>time<span class="token punctuation">.</span>OffsetDateTime<span class="token punctuation">;</span>
<span class="token keyword">import</span> java<span class="token punctuation">.</span>time<span class="token punctuation">.</span>ZoneOffset<span class="token punctuation">;</span>
<span class="token keyword">import</span> java<span class="token punctuation">.</span>util<span class="token punctuation">.</span>Arrays<span class="token punctuation">;</span>
<span class="token keyword">import</span> java<span class="token punctuation">.</span>util<span class="token punctuation">.</span>LinkedList<span class="token punctuation">;</span>
<span class="token keyword">import</span> java<span class="token punctuation">.</span>util<span class="token punctuation">.</span>List<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>camel<span class="token punctuation">.</span>Exchange<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>camel<span class="token punctuation">.</span>Message<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>camel<span class="token punctuation">.</span>Processor<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>commons<span class="token punctuation">.</span>Device<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>commons<span class="token punctuation">.</span>MetaData<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>MeasurementsWrapper<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Process<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>ProcessWrapper<span class="token punctuation">;</span>
<span class="token keyword">import</span> com<span class="token punctuation">.</span>fasterxml<span class="token punctuation">.</span>jackson<span class="token punctuation">.</span>core<span class="token punctuation">.</span>JsonProcessingException<span class="token punctuation">;</span>
<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">PSI6000</span> <span class="token keyword">implements</span> <span class="token class-name">Processor</span> <span class="token punctuation">{</span>
<span class="token keyword">public</span> <span class="token function">PSI6000</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>
<span class="token keyword">private</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>SeriesMap <span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>
org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>SeriesMap map<span class="token punctuation">,</span> String name<span class="token punctuation">,</span> Number value<span class="token punctuation">)</span> <span class="token punctuation">{</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span>value <span class="token operator">!=</span> null<span class="token punctuation">)</span> <span class="token punctuation">{</span>
map<span class="token punctuation">.</span><span class="token function">setSeriesValue</span><span class="token punctuation">(</span>name<span class="token punctuation">,</span> Arrays<span class="token punctuation">.</span><span class="token function">asList</span><span class="token punctuation">(</span>value<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">return</span> map<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token annotation punctuation">@Override</span>
<span class="token keyword">public</span> <span class="token keyword">void</span> <span class="token function">process</span><span class="token punctuation">(</span>Exchange exchange<span class="token punctuation">)</span> <span class="token keyword">throws</span> JsonProcessingException<span class="token punctuation">,</span> Exception <span class="token punctuation">{</span>
Message msg <span class="token operator">=</span> exchange<span class="token punctuation">.</span><span class="token function">getIn</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
PSI6000DataType doc <span class="token operator">=</span> msg<span class="token punctuation">.</span><span class="token function">getBody</span><span class="token punctuation">(</span>PSI6000DataType<span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
Object <span class="token punctuation">[</span><span class="token punctuation">]</span>bundle <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Object</span><span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
bundle<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token function">transformMeasurement</span><span class="token punctuation">(</span>doc<span class="token punctuation">)</span><span class="token punctuation">;</span>
bundle<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token function">transformProcess</span><span class="token punctuation">(</span>doc<span class="token punctuation">)</span><span class="token punctuation">;</span>
msg<span class="token punctuation">.</span><span class="token function">setBody</span><span class="token punctuation">(</span>bundle<span class="token punctuation">)</span><span class="token punctuation">;</span>
exchange<span class="token punctuation">.</span><span class="token function">setOut</span><span class="token punctuation">(</span>msg<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">private</span> <span class="token keyword">void</span> <span class="token function">setSpotName</span><span class="token punctuation">(</span>Device device<span class="token punctuation">,</span> WeldLog wl<span class="token punctuation">)</span> <span class="token punctuation">{</span>
String spotName <span class="token operator">=</span> wl<span class="token punctuation">.</span><span class="token function">getSpotName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span>spotName <span class="token operator">!=</span> null <span class="token operator">&&</span> spotName<span class="token punctuation">.</span><span class="token function">length</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">></span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
MetaData md <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">MetaData</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
md<span class="token punctuation">.</span><span class="token function">setMetaDataValue</span><span class="token punctuation">(</span><span class="token string">"spotName"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSpotName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
device<span class="token punctuation">.</span><span class="token function">setMetaData</span><span class="token punctuation">(</span>md<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
<span class="token keyword">private</span> ProcessWrapper <span class="token function">transformProcess</span><span class="token punctuation">(</span>PSI6000DataType doc<span class="token punctuation">)</span> <span class="token punctuation">{</span>
ProcessWrapper wrapper <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">ProcessWrapper</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
WeldLog wl <span class="token operator">=</span> doc<span class="token punctuation">.</span><span class="token function">getMessage</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getWeldLog</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
OffsetDateTime odt <span class="token operator">=</span> OffsetDateTime<span class="token punctuation">.</span><span class="token function">of</span><span class="token punctuation">(</span>wl<span class="token punctuation">.</span><span class="token function">getDateTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> ZoneOffset<span class="token punctuation">.</span>UTC<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// device</span>
Device device <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Device</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
device<span class="token punctuation">.</span><span class="token function">setDeviceID</span><span class="token punctuation">(</span>doc<span class="token punctuation">.</span><span class="token function">getMessage</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getWeldLog</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getTimerName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">setSpotName</span><span class="token punctuation">(</span>device<span class="token punctuation">,</span> wl<span class="token punctuation">)</span><span class="token punctuation">;</span>
wrapper<span class="token punctuation">.</span><span class="token function">setDevice</span><span class="token punctuation">(</span>device<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// part</span>
String partId <span class="token operator">=</span> wl<span class="token punctuation">.</span><span class="token function">getPartIdentString</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span>partId <span class="token operator">!=</span> null <span class="token operator">&&</span> partId<span class="token punctuation">.</span><span class="token function">length</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">></span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Part part <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Part</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
part<span class="token punctuation">.</span><span class="token function">setPartID</span><span class="token punctuation">(</span>partId<span class="token punctuation">)</span><span class="token punctuation">;</span>
wrapper<span class="token punctuation">.</span><span class="token function">setPart</span><span class="token punctuation">(</span>part<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token comment">// process</span>
Process process <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Process</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
process<span class="token punctuation">.</span><span class="token function">setTimestamp</span><span class="token punctuation">(</span>odt<span class="token punctuation">)</span><span class="token punctuation">;</span>
process<span class="token punctuation">.</span><span class="token function">setExternalProcessId</span><span class="token punctuation">(</span>String<span class="token punctuation">.</span><span class="token function">valueOf</span><span class="token punctuation">(</span>wl<span class="token punctuation">.</span><span class="token function">getProtRecordID</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
wrapper<span class="token punctuation">.</span><span class="token function">setProcess</span><span class="token punctuation">(</span>process<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// measurements</span>
List<span class="token operator">&lt;</span>org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Measurements<span class="token operator">></span> measurements <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">LinkedList</span><span class="token operator">&lt;</span>org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Measurements<span class="token operator">></span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Measurements measurement <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Measurements</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
measurement<span class="token punctuation">.</span><span class="token function">setTimestamp</span><span class="token punctuation">(</span>odt<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">//values</span>
org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>SeriesMap seriesMap <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>SeriesMap</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
seriesMap<span class="token punctuation">.</span><span class="token function">setSeriesValue</span><span class="token punctuation">(</span><span class="token string">"curentCurve"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getCurrentCurve</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
seriesMap<span class="token punctuation">.</span><span class="token function">setSeriesValue</span><span class="token punctuation">(</span><span class="token string">"voltageCurve"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getVoltageCurve</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
seriesMap<span class="token punctuation">.</span><span class="token function">setSeriesValue</span><span class="token punctuation">(</span><span class="token string">"forceCurve"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getForceCurve</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
measurement<span class="token punctuation">.</span><span class="token function">setSeriesMap</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">)</span><span class="token punctuation">;</span>
measurements<span class="token punctuation">.</span><span class="token function">add</span><span class="token punctuation">(</span>measurement<span class="token punctuation">)</span><span class="token punctuation">;</span>
wrapper<span class="token punctuation">.</span><span class="token function">setMeasurements</span><span class="token punctuation">(</span>measurements<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">return</span> wrapper<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token keyword">private</span> MeasurementsWrapper <span class="token function">transformMeasurement</span><span class="token punctuation">(</span>PSI6000DataType doc<span class="token punctuation">)</span> <span class="token punctuation">{</span>
MeasurementsWrapper wrapper <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">MeasurementsWrapper</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
WeldLog wl <span class="token operator">=</span> doc<span class="token punctuation">.</span><span class="token function">getMessage</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getWeldLog</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// device</span>
Device device <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Device</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
device<span class="token punctuation">.</span><span class="token function">setDeviceID</span><span class="token punctuation">(</span>doc<span class="token punctuation">.</span><span class="token function">getMessage</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getWeldLog</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getTimerName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">setSpotName</span><span class="token punctuation">(</span>device<span class="token punctuation">,</span> wl<span class="token punctuation">)</span><span class="token punctuation">;</span>
wrapper<span class="token punctuation">.</span><span class="token function">setDevice</span><span class="token punctuation">(</span>device<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// part</span>
String partId <span class="token operator">=</span> wl<span class="token punctuation">.</span><span class="token function">getPartIdentString</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">if</span> <span class="token punctuation">(</span>partId <span class="token operator">!=</span> null <span class="token operator">&&</span> partId<span class="token punctuation">.</span><span class="token function">length</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">></span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>Part part <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>Part</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
part<span class="token punctuation">.</span><span class="token function">setPartID</span><span class="token punctuation">(</span>partId<span class="token punctuation">)</span><span class="token punctuation">;</span>
wrapper<span class="token punctuation">.</span><span class="token function">setPart</span><span class="token punctuation">(</span>part<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token comment">// measurements</span>
List<span class="token operator">&lt;</span>org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>Measurements<span class="token operator">></span> measurements <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">LinkedList</span><span class="token operator">&lt;</span>org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>Measurements<span class="token operator">></span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>Measurements measurement <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>Measurements</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
measurement<span class="token punctuation">.</span><span class="token function">setTimestamp</span><span class="token punctuation">(</span>OffsetDateTime<span class="token punctuation">.</span><span class="token function">of</span><span class="token punctuation">(</span>wl<span class="token punctuation">.</span><span class="token function">getDateTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> ZoneOffset<span class="token punctuation">.</span>UTC<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// values</span>
org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>SeriesMap seriesMap <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>SeriesMap</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
seriesMap<span class="token punctuation">.</span><span class="token function">setSeriesValue</span><span class="token punctuation">(</span><span class="token string">"$_time"</span><span class="token punctuation">,</span> Arrays<span class="token punctuation">.</span><span class="token function">asList</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"wear"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWear</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"wearPerCent"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWearPerCent</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"monitorState"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getMonitorState</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regulationState"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegulationState</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"measureState"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getMeasureState</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"powerState"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPowerState</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sequenceState"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSequenceState</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sequenceStateAdd"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSequenceStateAdd</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sequenceRepeat"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSequenceRepeat</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"monitorMode"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getMonitorMode</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iDemandStd"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIDemandStd</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"ilsts"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIlsts</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regulationStd"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegulationStd</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iDemand1"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIDemand1</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iActual1"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIActual1</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regulation1"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegulation1</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iDemand2"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIDemand2</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iActual2"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIActual2</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regulation2"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegulation2</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iDemand3"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIDemand3</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iActual3"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIActual3</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regulation3"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegulation3</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"phaStd"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPhaStd</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"pha1"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPha1</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"pha2"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPha2</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"pha3"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPha3</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"t_iDemandStd"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIDemandStd</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"tActualStd"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getTActualStd</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// addMeasurementPoint(seriesMap, "partIdentString",</span>
<span class="token comment">// wl.getPartIdentString());</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"tipDressCounter"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getTipDressCounter</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"electrodeNo"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getElectrodeNo</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgForceSetPoint"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgForceSetPoint</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgSheetThicknessSetPoint"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgSheetThicknessSetPoint</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgSagGpSetPoint"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgSagGpSetPoint</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgSpotWithSg"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgSpotWithSg</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgMotorCurrent"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgMotorCurrent</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgMotorTemp"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgMotorTemp</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgForce"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgForce</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgSheetThickness"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgSheetThickness</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgSagGp"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgSagGp</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgSagGc"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgSagGc</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regUsrUspJunction"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegUsrUspJunction</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regUsrUspMax"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegUsrUspMax</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regSpotDiaActual"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegSpotDiaActual</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regSpotDiaMinDemand"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegSpotDiaMinDemand</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regSplashTime"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegSplashTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"nuggetDiameter"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getNuggetDiameter</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"usp"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUsp</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"normingTime"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getNormingTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regulationStartTime"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegulationStartTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"returnToConstantCurrent"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getReturnToConstantCurrent</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"declineUsp"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getDeclineUsp</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"offsetUsp"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getOffsetUsp</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"currentFactor"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getCurrentFactor</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"triggerTime"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getTriggerTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"xqrMeasuringActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getXqrMeasuringActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"xqrRegulationActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getXqrRegulationActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"xqrMonitoringActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getXqrMonitoringActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"xqrWeldTimeProlongationActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getXqrWeldTimeProlongationActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"voltageActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getVoltageActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"voltageRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getVoltageRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"currentActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getCurrentActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"currentReferenceValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getCurrentReferenceValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldTimeActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldTimeActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldTimeRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldTimeRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"energyActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getEnergyActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"energyRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getEnergyRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"powerActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPowerActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"powerRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPowerRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"resistanceActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getResistanceActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"resistanceRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getResistanceRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"pulseWidthActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPulseWidthActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"pulseWidthRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPulseWidthRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"stabilisationFactorActValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getStabilisationFactorActValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"stabilisationFactorRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getStabilisationFactorRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"thresholdStabilisationFactor"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getThresholdStabilisationFactor</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"wldEffectStabilisationFactor"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWldEffectStabilisationFactor</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uipActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUipActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uipRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUipRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirExpulsionTime"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirExpulsionTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirMeasuringActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirMeasuringActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirRegulationActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirRegulationActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirMonitoringActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirMonitoringActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirWeldTimeProlongationActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirWeldTimeProlongationActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirQStoppRefCntValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirQStoppRefCntValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirQStoppActCntValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirQStoppActCntValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirUipUpperTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirUipUpperTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirUipLowerTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirUipLowerTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirUipCondTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirUipCondTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirPsfLowerTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirPsfLowerTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirPsfCondTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirPsfCondTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_1"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP161</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_2"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP162</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_3"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP163</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_4"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP164</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_5"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP165</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP32_6"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP326</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_7"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP167</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_8"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP168</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_9"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP169</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_10"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1610</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_11"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1611</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP32_12"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP3212</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_13"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1613</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_14"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1614</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_15"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1615</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_16"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1616</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_17"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1617</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP32_18"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP3218</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uipMonCondUpperTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUipMonCondUpperTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfMonUpperTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfMonUpperTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfMonLowerTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfMonLowerTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfMonCondUpperTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfMonCondUpperTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfMonCondLowerTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfMonCondLowerTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfMeasuringActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfMeasuringActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"xqrModeOff"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getXqrModeOff</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"reweldActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getReweldActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token comment">// addMeasurementPoint(seriesMap, "weldspotRefIdent",</span>
<span class="token comment">// wl.getWeldspotRefIdent());</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sg_Torque_Gp"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgTorqueGp</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sg_Force_Corr"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgForceCorr</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sg_Weldspot_Geo_Wear"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgWeldspotGeoWear</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sg_Wear_Length"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgWearLength</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sg_Beam_UpArching"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgBeamUpArching</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
measurement<span class="token punctuation">.</span><span class="token function">setSeriesMap</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">)</span><span class="token punctuation">;</span>
measurements<span class="token punctuation">.</span><span class="token function">add</span><span class="token punctuation">(</span>measurement<span class="token punctuation">)</span><span class="token punctuation">;</span>
wrapper<span class="token punctuation">.</span><span class="token function">setMeasurements</span><span class="token punctuation">(</span>measurements<span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token keyword">return</span> wrapper<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre>
<h1>Summary</h1>
<p>It takes a while to understand the involved software components. Yet, once the set up is running, it gets much easier to adapt it to another Use Case. And another. The pattern of wiring protocols and transforming the payload is very similar. The involved frameworks are powerful enough to support many Use Cases. This article is supposed to show that there are simple possibilities to transform transport protocols and payloads, so that you can focus on addressing functional challenges.</p>
</div></div> <div class="columns pageNav"><div class="column"><a href="/unide/blog/2018/1/26/New-website" class="button is-fullwidth"><span class="icon"><i class="fa fa-chevron-left"></i></span> <span>Updated Website</span></a></div> <div class="column"><a href="/unide/blog/2018/2/13/grinding-machine-scenario" class="button is-fullwidth"><span>PPMP Use Cases: Unide and the Eclipse Production Performance Management Testbed</span> <span class="icon"><i class="fa fa-chevron-right"></i></span></a></div></div></div> <div class="sidebar column is-3 is-offset-1"><div class="recentPosts"><h4 class="subtitle is-5">
Recent Posts
</h4> <ul><li><a href="/unide/blog/2019/3/1/Version-3">
PPMP Version 3 release candidate
</a></li><li><a href="/unide/blog/2018/9/4/Template-for-PPMP-transformation">
PPMP Use Cases: Template for PPMP transformation
</a></li><li><a href="/unide/blog/2018/3/26/Release-0.2.0">
Unide 0.2.0 released
</a></li><li><a href="/unide/blog/2018/2/13/grinding-machine-scenario">
PPMP Use Cases: Unide and the Eclipse Production Performance Management Testbed
</a></li><li><a href="/unide/blog/2018/2/11/Transform-PPMP-with-camel" class="nuxt-link-exact-active nuxt-link-active">
PPMP Use Cases: Simple Transformation with Apache Camel
</a></li></ul></div> <div class="blogArchives"><h4 class="subtitle is-5">
Blog Archives
</h4> <ul><li><a href="/unide/blog/2019/3">
April 2019
</a>
(1)
</li><li><a href="/unide/blog/2018/9">
October 2018
</a>
(1)
</li><li><a href="/unide/blog/2018/3">
April 2018
</a>
(1)
</li><li><a href="/unide/blog/2018/2" class="nuxt-link-active">
March 2018
</a>
(2)
</li><li><a href="/unide/blog/2018/1">
February 2018
</a>
(1)
</li><li><a href="/unide/blog/2017/10">
November 2017
</a>
(2)
</li><li><a href="/unide/blog/2017/6">
July 2017
</a>
(2)
</li><li><a href="/unide/blog/2017/3">
April 2017
</a>
(1)
</li><li><a href="/unide/blog/2016/9">
October 2016
</a>
(4)
</li></ul></div></div></div></div> <footer class="footer"><div class="container"><div class="columns is-mobile is-multiline is-centered"><div class="column is-narrow"><a href="http://www.eclipse.org">Eclipse Foundation</a></div> <div class="column is-narrow"><a href="http://www.eclipse.org/legal/privacy.php">Privacy Policy</a></div> <div class="column is-narrow"><a href="http://www.eclipse.org/legal/termsofuse.php">Terms of Use</a></div> <div class="column is-narrow"><a href="http://www.eclipse.org/legal/copyright.php">Copyright Agent</a></div> <div class="column is-narrow"><a href="https://eclipse.org/security/">Security reports</a></div> <div class="column is-narrow"><a href="http://www.eclipse.org/legal/">Legal</a></div></div></div></footer></div></div></div><script>window.__NUXT__={layout:"sidebar",data:[{post:{name:"Transform-PPMP-with-camel",content:'<p>The Production Performance Management Protocol (PPMP) is a simple structure to send out machine data. Unide, as its hosting project, is supposed to provide exemplary implementations.</p>\n<p>We have already published <a href="https://github.com/eclipse/unide/tree/master/servers/rest">a REST server</a>, <a href="https://github.com/eclipse/unide.java">java-</a> and <a href="https://github.com/eclipse/unide.python">python-</a> bindings and an <a href="https://github.com/eclipse/unide/tree/master/clients/binsa">html5-client</a>. But how are these implementations used in real life?</p>\n<h1>The Challenge</h1>\n<div class="card figure">\n\t<div class="card-image">\n\t\t<figure class="image">\n\t\t\t<img alt="Welding robots" title="BMW plant, spot welding" src="/unide/images/blog/Transform-PPMP-with-camel-welding.jpg"></img>\n\t\t</figure>\n\t</div>\n\t<div class="card-content">\n\t\tBMW plant in Leipzig, Germany: Spot welding <a href="https://creativecommons.org/licenses/by-sa/2.0/de/deed.en">(CC BY-SA 2.0 DE)</a>\n\t</div>\n</div>\n<p>In the automotive industry, <a href="https://en.wikipedia.org/wiki/Spot_welding">welding spots</a> are crucial for the quality of a car and the security of the passenger. In modern production lines, hundreds of welding spots have to be precisely set in a single shift. In order to reduce product rework, scrap, destructible tests and machine downtime, the quality should be monitored consistently. That\'s what special welding controller in machines do. Unfortunately, this data is often only used locally, for a short period of time and in proprietary formats. Just enough to determine the immediate process outcome. In that case, further opportunities of analysing the information are not taken. With the continuous increase in complexity, price and time pressure, the demand for further processing and optimization grows. The data could be used to prevent or even predict maintenance or just store the data in long time archives in case of legal disputes.</p>\n<p>One prerequisite for such connectivity is the hardware and its connectivity. Older generations of welding controllers can only be accessed with proprietary stacks (like the <a href="https://www.boschrexroth.com/en/xc/products/product-groups/welding-technology/controllers-with-power-section/mf-system-psi6000/index">PSI 6000</a>) whereas newer generations (like the <a href="https://www.boschrexroth.com/en/xc/company/press/index2-29696">PRC 7000</a>) are much more flexible in terms of networking and communication. In general, there are two aspects that make up the communication: the transport protocol and the structure of the payload. This is similar to our daily life: if you want to chat with your friends, you need to use the same messenger or communication technology (phone, email) and you need speak the same language (English, German etc.).</p>\n<p>In the following sections, let\'s assume we need to transform the transport protocol as well as the payload. The data is generated by a welding controller and should be passed to <a href="https://unide.eclipse.org">the unide REST server</a> for persisting it in a dedicated timeseries database.</p>\n<h1>The Approach</h1>\n<p>We want to find a way to receive the data, transform it into PPMP and store it into a database in our <a href="https://unide.eclipse.org">REST Server</a>.</p>\n<p>First, we need to understand which interfaces the controller has, which communication protocol is used, and how the payload would be interpreted. In the case of the PSI 6000, it was configured to publish the quality data to a <a href="https://de.wikipedia.org/wiki/MQTT">mqtt</a> message broker (here: <a href="https://mosquitto.org/">Eclipse mosquitto</a>). We don\'t have an extensive documentation of the payload, but we can look at samples of it (some Curve data shortened at the end):</p>\n<pre class="language-json"><code class="language-json"><span class="token punctuation">{</span>\n <span class="token property">"Name"</span><span class="token operator">:</span> <span class="token string">"WeldLog/UIR Testrack 24/"</span><span class="token punctuation">,</span>\n <span class="token property">"WeldTimer"</span><span class="token operator">:</span> <span class="token string">"UIR Testrack 24"</span><span class="token punctuation">,</span>\n <span class="token property">"TimeStamp"</span><span class="token operator">:</span> <span class="token string">"2018-01-17T10:41:00.0008436+01:00"</span><span class="token punctuation">,</span>\n <span class="token property">"OutputFormat"</span><span class="token operator">:</span> <span class="token string">"JSON"</span><span class="token punctuation">,</span>\n <span class="token property">"Message"</span><span class="token operator">:</span> <span class="token punctuation">{</span>\n <span class="token property">"WeldLog"</span><span class="token operator">:</span> <span class="token punctuation">{</span>\n <span class="token property">"protRecord_ID"</span><span class="token operator">:</span> <span class="token number">734827</span><span class="token punctuation">,</span>\n <span class="token property">"dateTime"</span><span class="token operator">:</span> <span class="token string">"2018-01-15T16:52:32.09"</span><span class="token punctuation">,</span>\n <span class="token property">"timerName"</span><span class="token operator">:</span> <span class="token string">"UIR Testrack 24"</span><span class="token punctuation">,</span>\n <span class="token property">"progNo"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"spotName"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>\n <span class="token property">"wear"</span><span class="token operator">:</span> <span class="token number">8312480</span><span class="token punctuation">,</span>\n <span class="token property">"wearPerCent"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"monitorState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"regulationState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"measureState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"powerState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"sequenceState"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"sequenceStateAdd"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"sequenceRepeat"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"monitorMode"</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>\n <span class="token property">"iDemandStd"</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>\n <span class="token property">"ilsts"</span><span class="token operator">:</span> <span class="token number">13.14</span><span class="token punctuation">,</span>\n <span class="token property">"regulationStd"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"iDemand1"</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>\n <span class="token property">"iActual1"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"regulation1"</span><span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span>\n <span class="token property">"iDemand2"</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>\n <span class="token property">"iActual2"</span><span class="token operator">:</span> <span class="token number">13.16</span><span class="token punctuation">,</span>\n <span class="token property">"regulation2"</span><span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span>\n <span class="token property">"iDemand3"</span><span class="token operator">:</span> <span class="token number">3</span><span class="token punctuation">,</span>\n <span class="token property">"iActual3"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"regulation3"</span><span class="token operator">:</span> <span class="token number">4</span><span class="token punctuation">,</span>\n <span class="token property">"phaStd"</span><span class="token operator">:</span> <span class="token number">24.96</span><span class="token punctuation">,</span>\n <span class="token property">"pha1"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"pha2"</span><span class="token operator">:</span> <span class="token number">24.64</span><span class="token punctuation">,</span>\n <span class="token property">"pha3"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"t_iDemandStd"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"tActualStd"</span><span class="token operator">:</span> <span class="token number">878</span><span class="token punctuation">,</span>\n <span class="token property">"partIdentString"</span><span class="token operator">:</span> <span class="token string">""</span><span class="token punctuation">,</span>\n <span class="token property">"tipDressCounter"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"electrodeNo"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"sgForceSetPoint"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"sgSheetThicknessSetPoint"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"sgSagGpSetPoint"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"sgSpotWithSg"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"sgMotorCurrent"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"sgMotorTemp"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"sgForce"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"sgSheetThickness"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"sgSagGp"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"sgSagGc"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"regUsrUspJunction"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"regUsrUspMax"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"regSpotDiaActual"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"regSpotDiaMinDemand"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"regSplashTime"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"nuggetDiameter"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"usp"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"normingTime"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"regulationStartTime"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"returnToConstantCurrent"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"declineUsp"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"offsetUsp"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"currentFactor"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"triggerTime"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"xqrMeasuringActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"xqrRegulationActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"xqrMonitoringActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"xqrWeldTimeProlongationActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"voltageActualValue"</span><span class="token operator">:</span> <span class="token number">0.03</span><span class="token punctuation">,</span>\n <span class="token property">"voltageRefValue"</span><span class="token operator">:</span> <span class="token number">0.03</span><span class="token punctuation">,</span>\n <span class="token property">"currentActualValue"</span><span class="token operator">:</span> <span class="token number">13.17</span><span class="token punctuation">,</span>\n <span class="token property">"currentReferenceValue"</span><span class="token operator">:</span> <span class="token number">13.95</span><span class="token punctuation">,</span>\n <span class="token property">"weldTimeActualValue"</span><span class="token operator">:</span> <span class="token number">876</span><span class="token punctuation">,</span>\n <span class="token property">"weldTimeRefValue"</span><span class="token operator">:</span> <span class="token number">760</span><span class="token punctuation">,</span>\n <span class="token property">"energyActualValue"</span><span class="token operator">:</span> <span class="token number">395.1261</span><span class="token punctuation">,</span>\n <span class="token property">"energyRefValue"</span><span class="token operator">:</span> <span class="token number">342</span><span class="token punctuation">,</span>\n <span class="token property">"powerActualValue"</span><span class="token operator">:</span> <span class="token number">395.133</span><span class="token punctuation">,</span>\n <span class="token property">"powerRefValue"</span><span class="token operator">:</span> <span class="token number">449.35</span><span class="token punctuation">,</span>\n <span class="token property">"resistanceActualValue"</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>\n <span class="token property">"resistanceRefValue"</span><span class="token operator">:</span> <span class="token number">2</span><span class="token punctuation">,</span>\n <span class="token property">"pulseWidthActualValue"</span><span class="token operator">:</span> <span class="token number">25.02</span><span class="token punctuation">,</span>\n <span class="token property">"pulseWidthRefValue"</span><span class="token operator">:</span> <span class="token number">26.19</span><span class="token punctuation">,</span>\n <span class="token property">"stabilisationFactorActValue"</span><span class="token operator">:</span> <span class="token number">55</span><span class="token punctuation">,</span>\n <span class="token property">"stabilisationFactorRefValue"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"thresholdStabilisationFactor"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"wldEffectStabilisationFactor"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"uipActualValue"</span><span class="token operator">:</span> <span class="token number">126</span><span class="token punctuation">,</span>\n <span class="token property">"uipRefValue"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"uirExpulsionTime"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"uirMeasuringActive"</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>\n <span class="token property">"uirRegulationActive"</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>\n <span class="token property">"uirMonitoringActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"uirWeldTimeProlongationActive"</span><span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">,</span>\n <span class="token property">"uirQStoppRefCntValue"</span><span class="token operator">:</span> <span class="token number">9</span><span class="token punctuation">,</span>\n <span class="token property">"uirQStoppActCntValue"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"uirUipUpperTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"uirUipLowerTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"uirUipCondTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"uirPsfLowerTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"uirPsfCondTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_1"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_2"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_3"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_4"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_5"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP32_6"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_7"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_8"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_9"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_10"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_11"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP32_12"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_13"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_14"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_15"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_16"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP16_17"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"weldSpotCustDataP32_18"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"uipMonCondUpperTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"fqfActualValue"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"fqfRefValue"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"fqfMonUpperTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"fqfMonLowerTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"fqfMonCondUpperTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"fqfMonCondLowerTol"</span><span class="token operator">:</span> <span class="token number">100</span><span class="token punctuation">,</span>\n <span class="token property">"fqfMeasuringActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"xqrModeOff"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"reweldActive"</span><span class="token operator">:</span> <span class="token number">0</span><span class="token punctuation">,</span>\n <span class="token property">"weldspotRefIdent"</span><span class="token operator">:</span> <span class="token string">"UIR_PART"</span><span class="token punctuation">,</span>\n <span class="token property">"sg_Torque_Gp"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"sg_Force_Corr"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"sg_Weldspot_Geo_Wear"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"sg_Wear_Length"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"sg_Beam_UpArching"</span><span class="token operator">:</span> <span class="token null">null</span><span class="token punctuation">,</span>\n <span class="token property">"CurrentCurve"</span><span class="token operator">:</span> <span class="token punctuation">[</span>\n <span class="token number">11621</span><span class="token punctuation">,</span>\n <span class="token number">15434</span><span class="token punctuation">,</span>\n ...\n <span class="token punctuation">]</span><span class="token punctuation">,</span>\n <span class="token property">"VoltageCurve"</span><span class="token operator">:</span> <span class="token punctuation">[</span>\n <span class="token number">39</span><span class="token punctuation">,</span>\n <span class="token number">29</span><span class="token punctuation">,</span>\n ...\n <span class="token punctuation">]</span><span class="token punctuation">,</span>\n <span class="token property">"ForceCurve"</span><span class="token operator">:</span> <span class="token punctuation">[</span>\n <span class="token number">49</span><span class="token punctuation">,</span>\n <span class="token number">49</span><span class="token punctuation">,</span>\n ...\n <span class="token punctuation">]</span>\n <span class="token punctuation">}</span>\n <span class="token punctuation">}</span>\n<span class="token punctuation">}</span>\n</code></pre>\n<p>That\'s already very detailed, but it\'s unclear which device / welding spot the data comes from and what the timing of the curves was. Let\'s get some more structure in with PPMP!</p>\n<p>In PPMP, we have the option to differentiate between discrete manufacturing data (MES - part produced) by using the <a href="/unide/specification/measurement-message">measurement-message</a> and detailed process data by using the <a href="https://www.eclipse.org/unide/specification/process-message">process-message</a>. In the welding payload, that\'s all combined in one message. So we also want to split this payload into two.</p>\n<h2>Introducing Apache Camel</h2>\n<div class="card figure is-pulled-left">\n\t<div class="card-image">\n\t\t<figure class="image">\n\t\t\t<img alt="Apache Camel" title="Apache Camel" src="/unide/images/blog/Transform-PPMP-with-camel-camel.png"></img>\n\t\t</figure>\n\t</div>\n\t<div class="card-content">\n\t\tApache Camel, <a href="https://www.apache.org/licenses/LICENSE-2.0">(Apache&nbsp;License&nbsp;2.0)</a>\n\t</div>\n</div>\n<p><a href="https://en.wikipedia.org/wiki/Apache_Camel">Apache Camel</a> is a java-based Open Source framework, that can transform and route data. It supports most of the <a href="https://en.wikipedia.org/wiki/Enterprise_Integration_Patterns">Enterprise Integration Patterns</a> and hundreds(!) of <a href="http://camel.apache.org/components.html">connectors / components</a>. Think of it as an extensive transformation and workflow automation engine. In fact, it\'s so powerful and versatile, that it unfortunately doesn\'t come with a visual user interface or a plug-and-play installer. Luckily, for everyone who doesn\'t happen to be a java expert, there\'s also an xml configuration (via <a href="https://docs.spring.io/spring/docs/4.2.x/spring-framework-reference/html/xsd-configuration.html">spring xml</a>). And that\'s mostly all we need!</p>\n<h2>Transforming the Communication Protocol</h2>\n<p>We will use Spring XML to configure Apache Camel. The workflow in Camel are called <code>&lt;routes&gt;</code>. So let\'s create a route that transforms our mqtt to REST protocol:</p>\n<pre class="language-xml"><code class="language-xml"><span class="token prolog">&lt;?xml version="1.0" encoding="UTF-8"?></span>\n<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>beans</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.springframework.org/schema/beans<span class="token punctuation">"</span></span>\n\t<span class="token attr-name"><span class="token namespace">xmlns:</span>xsi</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.w3.org/2001/XMLSchema-instance<span class="token punctuation">"</span></span> <span class="token attr-name"><span class="token namespace">xmlns:</span>camel</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://camel.apache.org/schema/spring<span class="token punctuation">"</span></span>\n\t<span class="token attr-name"><span class="token namespace">xmlns:</span>util</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.springframework.org/schema/util<span class="token punctuation">"</span></span>\n\t<span class="token attr-name"><span class="token namespace">xsi:</span>schemaLocation</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.springframework.org/schema/util\n\thttp://www.springframework.org/schema/util/spring-util.xsd \n\thttp://www.springframework.org/schema/beans\n http://www.springframework.org/schema/beans/spring-beans.xsd\n http://camel.apache.org/schema/spring\n http://camel.apache.org/schema/spring/camel-spring.xsd<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>camelContext</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://camel.apache.org/schema/spring<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>route</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>from</span>\n\t\t\t\t<span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mqtt://psi6000?host=tcp://192.168.123.135:1883<span class="token entity" title="&amp;">&amp;amp;</span>subscribeTopicName=PSI6000//PROCESS/PPMP/PROCESS<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>to</span>\n\t\t\t\t<span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>jetty:http://unide.eclipse.org:8080/rest/v2/measurement?bridgeEndpoint=true<span class="token entity" title="&amp;">&amp;amp;</span>throwExceptionOnFailure=true<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>route</span><span class="token punctuation">></span></span>\n\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>camelContext</span><span class="token punctuation">></span></span>\n<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>beans</span><span class="token punctuation">></span></span>\n</code></pre>\n<p>That\'s it! A <code>&lt;route&gt;</code> that reads<code>&lt;from&gt;</code> mqtt and forwards <code>&lt;to&gt;</code> http. Not so difficult, is it? We could use many of the other <a href="http://camel.apache.org/components.html">connectors / components</a> in the example above as well to transform from/to different protocols.</p>\n<p>But wait! The welding payload above was not PPMP. So we also need to normalize the payload.</p>\n<h2>Normalizing the Payload</h2>\n<p>Now that we can easily convert protocols, let\'s address the structure of the payload. Overall, we want to have a workflow that looks as described in the diagram below:</p>\n<div class="card figure">\n\t<div class="card-image">\n\t\t<figure class="image">\n\t\t\t<img alt="data workflow" title="data workflow" src="/unide/images/blog/Transform-PPMP-with-camel-1.svg"></img>\n\t\t</figure>\n\t</div>\n\t<div class="card-content">\n\t\tWorkflow to extract the data from controller, convert it and send the data to the cloud application\n\t</div>\n</div>\n<p>The extra steps here are:</p>\n<ol>\n<li>transform the PSI 6000 JSON String payload to a java object</li>\n<li>transform the PSI 6000 java object to two PPMP-java objects (<a href="/unide/specification/measurement-message">measurement-message</a> and <a href="https://www.eclipse.org/unide/specification/process-message">process-message</a>)</li>\n<li>split up the two PPMP objects</li>\n<li>route the objects individually</li>\n<li>transform each PPMP object back to a String</li>\n</ol>\n<h3>Create the PSI 6000 Java Object</h3>\n<p>Luckily, there are helpers for transforming json (or xml) to plain old java objects (POJOs). We are using <a href="http://www.jsonschema2pojo.org/">jsonschema2pojo</a> to convert the above json sample to POJOs with Jackson 2.x annotation. I name the resulting data type class <code>PSI6000DataType</code> and organize it in the package <code>org.eclipse.iot.unide.integrators</code>. Based on the given testdata, jsonschema2pojo cannot fully deduct all attribute types correctly. In order to allow floating point values, we would rename all <code>Integer</code> and <code>Object</code> types to <code>Number</code> in the WeldLog.java file. Also in the same file, we would change the type of the <code>dateTime</code> field from String to <code>LocalDateTime</code> to be more accurate:</p>\n<pre class="language-java"><code class="language-java"><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>\n<span class="token annotation punctuation">@JsonProperty</span><span class="token punctuation">(</span><span class="token string">"dateTime"</span><span class="token punctuation">)</span>\n<span class="token annotation punctuation">@JsonSerialize</span><span class="token punctuation">(</span>using <span class="token operator">=</span> LocalDateTimeSerializer<span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span>\n<span class="token annotation punctuation">@JsonDeserialize</span><span class="token punctuation">(</span>using <span class="token operator">=</span> LocalDateTimeDeserializer<span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span>\n<span class="token keyword">private</span> LocalDateTime dateTime<span class="token punctuation">;</span>\n<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>\n</code></pre>\n<p>For that, we also need to include the respective imports:</p>\n<pre class="language-java"><code class="language-java"><span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>\n<span class="token keyword">import</span> com<span class="token punctuation">.</span>fasterxml<span class="token punctuation">.</span>jackson<span class="token punctuation">.</span>databind<span class="token punctuation">.</span>annotation<span class="token punctuation">.</span>JsonDeserialize<span class="token punctuation">;</span>\n<span class="token keyword">import</span> com<span class="token punctuation">.</span>fasterxml<span class="token punctuation">.</span>jackson<span class="token punctuation">.</span>databind<span class="token punctuation">.</span>annotation<span class="token punctuation">.</span>JsonSerialize<span class="token punctuation">;</span>\n<span class="token keyword">import</span> com<span class="token punctuation">.</span>fasterxml<span class="token punctuation">.</span>jackson<span class="token punctuation">.</span>datatype<span class="token punctuation">.</span>jsr310<span class="token punctuation">.</span>deser<span class="token punctuation">.</span>LocalDateTimeDeserializer<span class="token punctuation">;</span>\n<span class="token keyword">import</span> com<span class="token punctuation">.</span>fasterxml<span class="token punctuation">.</span>jackson<span class="token punctuation">.</span>datatype<span class="token punctuation">.</span>jsr310<span class="token punctuation">.</span>ser<span class="token punctuation">.</span>LocalDateTimeSerializer<span class="token punctuation">;</span>\n<span class="token punctuation">.</span><span class="token punctuation">.</span><span class="token punctuation">.</span>\n</code></pre>\n<p>and adjust the getter (<code>getDateTime()</code>), setter (<code>setDateTime()</code>) and the type in the constructor (<code>public WeldLog(...)</code>) accordingly.</p>\n<p>Camel will be able to transform (&quot;<em>unmarshal</em>&quot;) this datatype from a string to a POJO after adding the definition to the above Spring XML:</p>\n<pre class="language-xml"><code class="language-xml">...\n<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>camelContext</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://camel.apache.org/schema/spring<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dataFormats</span><span class="token punctuation">></span></span>\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>psi6000<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>\n\t\t\t<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.integrators.PSI6000DataType<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dataFormats</span><span class="token punctuation">></span></span>\n\t...\n<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>camelContext</span><span class="token punctuation">></span></span>\n</code></pre>\n<h3>Use unide.java binding for PPMP Java Objects</h3>\n<p>For eventually transforming the PPMP objects back to String (&quot;<em>marshal</em>&quot;), we can make use of the <a href="https://github.com/eclipse/unide.java">unide PPMP java binding</a>. Just adjust the dataFormats section of the Spring XML so that it reads:</p>\n<pre class="language-xml"><code class="language-xml">...\n<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>camelContext</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://camel.apache.org/schema/spring<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dataFormats</span><span class="token punctuation">></span></span>\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>psi6000<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>\n\t\t\t<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.integrators.PSI6000DataType<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ppmpMeasurementMessage<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>\n\t\t\t<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.ppmp.measurements.MeasurementsWrapper<span class="token punctuation">"</span></span>\n\t\t\t<span class="token attr-name">moduleClassNames</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>com.fasterxml.jackson.datatype.jsr310.JavaTimeModule<span class="token punctuation">"</span></span>\n\t\t\t<span class="token attr-name">disableFeatures</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>WRITE_DATES_AS_TIMESTAMPS<span class="token punctuation">"</span></span> \n\t\t\t<span class="token attr-name">include</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>NON_NULL<span class="token punctuation">"</span></span><span class="token punctuation">/></span></span>\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ppmpProcessMessage<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>\n\t\t\t<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.ppmp.process.ProcessWrapper<span class="token punctuation">"</span></span>\n\t\t\t<span class="token attr-name">moduleClassNames</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>com.fasterxml.jackson.datatype.jsr310.JavaTimeModule<span class="token punctuation">"</span></span>\n\t\t\t<span class="token attr-name">disableFeatures</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>WRITE_DATES_AS_TIMESTAMPS<span class="token punctuation">"</span></span>\n\t\t\t<span class="token attr-name">include</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>NON_NULL<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dataFormats</span><span class="token punctuation">></span></span>\n\t...\n<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>camelContext</span><span class="token punctuation">></span></span>\n</code></pre>\n<h3>Create the Workflow</h3>\n<p>In order to better structure data flow, we use multiple <code>&lt;route&gt;</code>-s: one for retrieving the data and two more after the split of the payload. They are connected via the virtual camel protocol &quot;<em>direct</em>&quot;. In the following Spring XML, you can also find some <code>&lt;log&gt;</code> points and additional steps to set http header (<code>&lt;setHeader&gt;</code>) for posting to the unide server:</p>\n<pre class="language-xml"><code class="language-xml"><span class="token prolog">&lt;?xml version="1.0" encoding="UTF-8"?></span>\n<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>beans</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.springframework.org/schema/beans<span class="token punctuation">"</span></span>\n\t<span class="token attr-name"><span class="token namespace">xmlns:</span>xsi</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.w3.org/2001/XMLSchema-instance<span class="token punctuation">"</span></span> <span class="token attr-name"><span class="token namespace">xmlns:</span>camel</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://camel.apache.org/schema/spring<span class="token punctuation">"</span></span>\n\t<span class="token attr-name"><span class="token namespace">xmlns:</span>util</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.springframework.org/schema/util<span class="token punctuation">"</span></span>\n\t<span class="token attr-name"><span class="token namespace">xsi:</span>schemaLocation</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://www.springframework.org/schema/util\n\thttp://www.springframework.org/schema/util/spring-util.xsd \n\thttp://www.springframework.org/schema/beans\n http://www.springframework.org/schema/beans/spring-beans.xsd\n http://camel.apache.org/schema/spring\n http://camel.apache.org/schema/spring/camel-spring.xsd<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n\n\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>psi6000-to-ppmp<span class="token punctuation">"</span></span> <span class="token attr-name">class</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.integrators.PSI6000<span class="token punctuation">"</span></span><span class="token punctuation">></span></span><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>bean</span><span class="token punctuation">></span></span>\n\n\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>camelContext</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>http://camel.apache.org/schema/spring<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dataFormats</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>psi6000<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>\n\t\t\t\t<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.integrators.PSI6000DataType<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ppmpMeasurementMessage<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>\n\t\t\t\t<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.ppmp.measurements.MeasurementsWrapper<span class="token punctuation">"</span></span>\n\t\t\t\t<span class="token attr-name">moduleClassNames</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>com.fasterxml.jackson.datatype.jsr310.JavaTimeModule<span class="token punctuation">"</span></span>\n\t\t\t\t<span class="token attr-name">disableFeatures</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>WRITE_DATES_AS_TIMESTAMPS<span class="token punctuation">"</span></span> <span class="token attr-name">include</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>NON_NULL<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>json</span> <span class="token attr-name">id</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ppmpProcessMessage<span class="token punctuation">"</span></span> <span class="token attr-name">library</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Jackson<span class="token punctuation">"</span></span>\n\t\t\t\t<span class="token attr-name">unmarshalTypeName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>org.eclipse.iot.unide.ppmp.process.ProcessWrapper<span class="token punctuation">"</span></span>\n\t\t\t\t<span class="token attr-name">moduleClassNames</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>com.fasterxml.jackson.datatype.jsr310.JavaTimeModule<span class="token punctuation">"</span></span>\n\t\t\t\t<span class="token attr-name">disableFeatures</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>WRITE_DATES_AS_TIMESTAMPS<span class="token punctuation">"</span></span> <span class="token attr-name">include</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>NON_NULL<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dataFormats</span><span class="token punctuation">></span></span>\n\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>route</span> <span class="token attr-name">autoStartup</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>true<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>from</span>\n\t\t\t\t<span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>mqtt://psi6000?host=tcp://192.168.123.135:1883<span class="token entity" title="&amp;">&amp;amp;</span>subscribeTopicName=PSI6000//PROCESS/PPMP/PROCESS<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>unmarshal</span> <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>psi6000<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>bean</span> <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>psi6000-to-ppmp<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setHeader</span> <span class="token attr-name">headerName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Content-Type<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n\t\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>constant</span><span class="token punctuation">></span></span>application/json; charset=utf-8<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>constant</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setHeader</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setHeader</span> <span class="token attr-name">headerName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>CamelHttpMethod<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n\t\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>constant</span><span class="token punctuation">></span></span>POST<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>constant</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setHeader</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>multicast</span><span class="token punctuation">></span></span>\n\t\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>to</span> <span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>direct:measurement<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>to</span> <span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>direct:process<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>multicast</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>done<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setBody</span><span class="token punctuation">></span></span>\n\t\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>simple</span><span class="token punctuation">></span></span>{"result": true }<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>simple</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setBody</span><span class="token punctuation">></span></span>\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>route</span><span class="token punctuation">></span></span>\n\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>route</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>from</span> <span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>direct:measurement<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setBody</span><span class="token punctuation">></span></span>\n\t\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>simple</span><span class="token punctuation">></span></span>${body[0]}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>simple</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setBody</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>deviceId measurement: ${body.device.deviceID}<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>marshal</span> <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ppmpMeasurementMessage<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>sending measurement<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setHeader</span> <span class="token attr-name">headerName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Content-Length<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n\t\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>simple</span><span class="token punctuation">></span></span>body.length<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>simple</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setHeader</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>to</span>\n\t\t\t\t<span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>jetty:http://unide.eclipse.org:8080/rest/v2/measurement?bridgeEndpoint=true<span class="token entity" title="&amp;">&amp;amp;</span>throwExceptionOnFailure=true<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>measurement sent<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>route</span><span class="token punctuation">></span></span>\n\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>route</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>from</span> <span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>direct:process<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setBody</span><span class="token punctuation">></span></span>\n\t\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>simple</span><span class="token punctuation">></span></span>${body[1]}<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>simple</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setBody</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>deviceId process: ${body.device.deviceID}<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>marshal</span> <span class="token attr-name">ref</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>ppmpProcessMessage<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>sending process<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>setHeader</span> <span class="token attr-name">headerName</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>Content-Length<span class="token punctuation">"</span></span><span class="token punctuation">></span></span>\n\t\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>simple</span><span class="token punctuation">></span></span>body.length<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>simple</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>setHeader</span><span class="token punctuation">></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>to</span>\n\t\t\t\t<span class="token attr-name">uri</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>jetty:http://unide.eclipse.org:8080/rest/v2/process?bridgeEndpoint=true<span class="token entity" title="&amp;">&amp;amp;</span>throwExceptionOnFailure=true<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>log</span> <span class="token attr-name">message</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">"</span>process sent<span class="token punctuation">"</span></span> <span class="token punctuation">/></span></span>\n\t\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>route</span><span class="token punctuation">></span></span>\n\t<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>camelContext</span><span class="token punctuation">></span></span>\n<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>beans</span><span class="token punctuation">></span></span>\n</code></pre>\n<p>You might have noticed that we have not yet discussed one important item in this workflow: how do we actually transform the payload from one format to another?</p>\n<h3>Transforming from PSI 6000 POJO to PPMP POJOs</h3>\n<p>One thing that we\'ll hardwire as java code is the transformation from the source to the target structure. The same functionality could be achieved with scripting components (e.g. <a href="http://camel.apache.org/groovy.html">groovy</a>, but that would be less powerful and worse performance. Since we don\'t expect the format to change but mostly the workflow or endpoints, implementing a java bean is not too much effort. Here\'s how:<br>\nApache Camel offers a <code>Processor</code> interface that can be used to override the <code>process()</code> function. This function receives the complete message (<code>exchange</code>) and can modify it in any way. Since we have created the PSI 6000 Java Object already and want to produce PPMP java objects, the logic is mostly about creating the child objects and wiring the suitable getter to corresponding setter.</p>\n<pre class="language-java"><code class="language-java"><span class="token keyword">package</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>integrators<span class="token punctuation">;</span>\n\n<span class="token keyword">import</span> java<span class="token punctuation">.</span>time<span class="token punctuation">.</span>OffsetDateTime<span class="token punctuation">;</span>\n<span class="token keyword">import</span> java<span class="token punctuation">.</span>time<span class="token punctuation">.</span>ZoneOffset<span class="token punctuation">;</span>\n<span class="token keyword">import</span> java<span class="token punctuation">.</span>util<span class="token punctuation">.</span>Arrays<span class="token punctuation">;</span>\n<span class="token keyword">import</span> java<span class="token punctuation">.</span>util<span class="token punctuation">.</span>LinkedList<span class="token punctuation">;</span>\n<span class="token keyword">import</span> java<span class="token punctuation">.</span>util<span class="token punctuation">.</span>List<span class="token punctuation">;</span>\n\n<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>camel<span class="token punctuation">.</span>Exchange<span class="token punctuation">;</span>\n<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>camel<span class="token punctuation">.</span>Message<span class="token punctuation">;</span>\n<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>camel<span class="token punctuation">.</span>Processor<span class="token punctuation">;</span>\n<span class="token keyword">import</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>commons<span class="token punctuation">.</span>Device<span class="token punctuation">;</span>\n<span class="token keyword">import</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>commons<span class="token punctuation">.</span>MetaData<span class="token punctuation">;</span>\n<span class="token keyword">import</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>MeasurementsWrapper<span class="token punctuation">;</span>\n<span class="token keyword">import</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Process<span class="token punctuation">;</span>\n<span class="token keyword">import</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>ProcessWrapper<span class="token punctuation">;</span>\n\n<span class="token keyword">import</span> com<span class="token punctuation">.</span>fasterxml<span class="token punctuation">.</span>jackson<span class="token punctuation">.</span>core<span class="token punctuation">.</span>JsonProcessingException<span class="token punctuation">;</span>\n\n<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">PSI6000</span> <span class="token keyword">implements</span> <span class="token class-name">Processor</span> <span class="token punctuation">{</span>\n\n\t<span class="token keyword">public</span> <span class="token function">PSI6000</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span><span class="token punctuation">}</span>\n\n\t<span class="token keyword">private</span> org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>SeriesMap <span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>\n\t\t\torg<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>SeriesMap map<span class="token punctuation">,</span> String name<span class="token punctuation">,</span> Number value<span class="token punctuation">)</span> <span class="token punctuation">{</span>\n\t\t<span class="token keyword">if</span> <span class="token punctuation">(</span>value <span class="token operator">!=</span> null<span class="token punctuation">)</span> <span class="token punctuation">{</span>\n\t\t\tmap<span class="token punctuation">.</span><span class="token function">setSeriesValue</span><span class="token punctuation">(</span>name<span class="token punctuation">,</span> Arrays<span class="token punctuation">.</span><span class="token function">asList</span><span class="token punctuation">(</span>value<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token punctuation">}</span>\n\t\t<span class="token keyword">return</span> map<span class="token punctuation">;</span>\n\t<span class="token punctuation">}</span>\n\n\t<span class="token annotation punctuation">@Override</span>\n\t<span class="token keyword">public</span> <span class="token keyword">void</span> <span class="token function">process</span><span class="token punctuation">(</span>Exchange exchange<span class="token punctuation">)</span> <span class="token keyword">throws</span> JsonProcessingException<span class="token punctuation">,</span> Exception <span class="token punctuation">{</span>\n\t\tMessage msg <span class="token operator">=</span> exchange<span class="token punctuation">.</span><span class="token function">getIn</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tPSI6000DataType doc <span class="token operator">=</span> msg<span class="token punctuation">.</span><span class="token function">getBody</span><span class="token punctuation">(</span>PSI6000DataType<span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n\t\tObject <span class="token punctuation">[</span><span class="token punctuation">]</span>bundle <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Object</span><span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span><span class="token punctuation">;</span>\n\t\tbundle<span class="token punctuation">[</span><span class="token number">0</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token function">transformMeasurement</span><span class="token punctuation">(</span>doc<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tbundle<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span> <span class="token operator">=</span> <span class="token function">transformProcess</span><span class="token punctuation">(</span>doc<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tmsg<span class="token punctuation">.</span><span class="token function">setBody</span><span class="token punctuation">(</span>bundle<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\texchange<span class="token punctuation">.</span><span class="token function">setOut</span><span class="token punctuation">(</span>msg<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t<span class="token punctuation">}</span>\n\n\t<span class="token keyword">private</span> <span class="token keyword">void</span> <span class="token function">setSpotName</span><span class="token punctuation">(</span>Device device<span class="token punctuation">,</span> WeldLog wl<span class="token punctuation">)</span> <span class="token punctuation">{</span>\n\t\tString spotName <span class="token operator">=</span> wl<span class="token punctuation">.</span><span class="token function">getSpotName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token keyword">if</span> <span class="token punctuation">(</span>spotName <span class="token operator">!=</span> null <span class="token operator">&amp;&amp;</span> spotName<span class="token punctuation">.</span><span class="token function">length</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">></span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n\t\t\tMetaData md <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">MetaData</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t\tmd<span class="token punctuation">.</span><span class="token function">setMetaDataValue</span><span class="token punctuation">(</span><span class="token string">"spotName"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSpotName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t\tdevice<span class="token punctuation">.</span><span class="token function">setMetaData</span><span class="token punctuation">(</span>md<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token punctuation">}</span>\n\t<span class="token punctuation">}</span>\n\n\t<span class="token keyword">private</span> ProcessWrapper <span class="token function">transformProcess</span><span class="token punctuation">(</span>PSI6000DataType doc<span class="token punctuation">)</span> <span class="token punctuation">{</span>\n\t\tProcessWrapper wrapper <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">ProcessWrapper</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tWeldLog wl <span class="token operator">=</span> doc<span class="token punctuation">.</span><span class="token function">getMessage</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getWeldLog</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tOffsetDateTime odt <span class="token operator">=</span> OffsetDateTime<span class="token punctuation">.</span><span class="token function">of</span><span class="token punctuation">(</span>wl<span class="token punctuation">.</span><span class="token function">getDateTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> ZoneOffset<span class="token punctuation">.</span>UTC<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n\t\t<span class="token comment">// device</span>\n\t\tDevice device <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Device</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tdevice<span class="token punctuation">.</span><span class="token function">setDeviceID</span><span class="token punctuation">(</span>doc<span class="token punctuation">.</span><span class="token function">getMessage</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getWeldLog</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getTimerName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">setSpotName</span><span class="token punctuation">(</span>device<span class="token punctuation">,</span> wl<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\twrapper<span class="token punctuation">.</span><span class="token function">setDevice</span><span class="token punctuation">(</span>device<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n\t\t<span class="token comment">// part</span>\n\t\tString partId <span class="token operator">=</span> wl<span class="token punctuation">.</span><span class="token function">getPartIdentString</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token keyword">if</span> <span class="token punctuation">(</span>partId <span class="token operator">!=</span> null <span class="token operator">&amp;&amp;</span> partId<span class="token punctuation">.</span><span class="token function">length</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">></span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n\t\t\torg<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Part part <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Part</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t\tpart<span class="token punctuation">.</span><span class="token function">setPartID</span><span class="token punctuation">(</span>partId<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t\twrapper<span class="token punctuation">.</span><span class="token function">setPart</span><span class="token punctuation">(</span>part<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token punctuation">}</span>\n\n\t\t<span class="token comment">// process</span>\n\t\tProcess process <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Process</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tprocess<span class="token punctuation">.</span><span class="token function">setTimestamp</span><span class="token punctuation">(</span>odt<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tprocess<span class="token punctuation">.</span><span class="token function">setExternalProcessId</span><span class="token punctuation">(</span>String<span class="token punctuation">.</span><span class="token function">valueOf</span><span class="token punctuation">(</span>wl<span class="token punctuation">.</span><span class="token function">getProtRecordID</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\twrapper<span class="token punctuation">.</span><span class="token function">setProcess</span><span class="token punctuation">(</span>process<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n\t\t<span class="token comment">// measurements</span>\n\t\tList<span class="token operator">&lt;</span>org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Measurements<span class="token operator">></span> measurements <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">LinkedList</span><span class="token operator">&lt;</span>org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Measurements<span class="token operator">></span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\torg<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Measurements measurement <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>Measurements</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t\n\t\tmeasurement<span class="token punctuation">.</span><span class="token function">setTimestamp</span><span class="token punctuation">(</span>odt<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n\t\t<span class="token comment">//values</span>\n\t\torg<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>SeriesMap seriesMap <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>process<span class="token punctuation">.</span>SeriesMap</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tseriesMap<span class="token punctuation">.</span><span class="token function">setSeriesValue</span><span class="token punctuation">(</span><span class="token string">"curentCurve"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getCurrentCurve</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tseriesMap<span class="token punctuation">.</span><span class="token function">setSeriesValue</span><span class="token punctuation">(</span><span class="token string">"voltageCurve"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getVoltageCurve</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tseriesMap<span class="token punctuation">.</span><span class="token function">setSeriesValue</span><span class="token punctuation">(</span><span class="token string">"forceCurve"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getForceCurve</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t\n\t\tmeasurement<span class="token punctuation">.</span><span class="token function">setSeriesMap</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tmeasurements<span class="token punctuation">.</span><span class="token function">add</span><span class="token punctuation">(</span>measurement<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\twrapper<span class="token punctuation">.</span><span class="token function">setMeasurements</span><span class="token punctuation">(</span>measurements<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t\n\t\t<span class="token keyword">return</span> wrapper<span class="token punctuation">;</span>\n\t<span class="token punctuation">}</span>\n\n\t<span class="token keyword">private</span> MeasurementsWrapper <span class="token function">transformMeasurement</span><span class="token punctuation">(</span>PSI6000DataType doc<span class="token punctuation">)</span> <span class="token punctuation">{</span>\n\t\tMeasurementsWrapper wrapper <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">MeasurementsWrapper</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tWeldLog wl <span class="token operator">=</span> doc<span class="token punctuation">.</span><span class="token function">getMessage</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getWeldLog</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n\t\t<span class="token comment">// device</span>\n\t\tDevice device <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Device</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tdevice<span class="token punctuation">.</span><span class="token function">setDeviceID</span><span class="token punctuation">(</span>doc<span class="token punctuation">.</span><span class="token function">getMessage</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getWeldLog</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">.</span><span class="token function">getTimerName</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">setSpotName</span><span class="token punctuation">(</span>device<span class="token punctuation">,</span> wl<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\twrapper<span class="token punctuation">.</span><span class="token function">setDevice</span><span class="token punctuation">(</span>device<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n\t\t<span class="token comment">// part</span>\n\t\tString partId <span class="token operator">=</span> wl<span class="token punctuation">.</span><span class="token function">getPartIdentString</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token keyword">if</span> <span class="token punctuation">(</span>partId <span class="token operator">!=</span> null <span class="token operator">&amp;&amp;</span> partId<span class="token punctuation">.</span><span class="token function">length</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token operator">></span> <span class="token number">0</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>\n\t\t\torg<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>Part part <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>Part</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t\tpart<span class="token punctuation">.</span><span class="token function">setPartID</span><span class="token punctuation">(</span>partId<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t\twrapper<span class="token punctuation">.</span><span class="token function">setPart</span><span class="token punctuation">(</span>part<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token punctuation">}</span>\n\n\t\t<span class="token comment">// measurements</span>\n\t\tList<span class="token operator">&lt;</span>org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>Measurements<span class="token operator">></span> measurements <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">LinkedList</span><span class="token operator">&lt;</span>org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>Measurements<span class="token operator">></span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\torg<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>Measurements measurement <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>Measurements</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n\t\tmeasurement<span class="token punctuation">.</span><span class="token function">setTimestamp</span><span class="token punctuation">(</span>OffsetDateTime<span class="token punctuation">.</span><span class="token function">of</span><span class="token punctuation">(</span>wl<span class="token punctuation">.</span><span class="token function">getDateTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> ZoneOffset<span class="token punctuation">.</span>UTC<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n\t\t<span class="token comment">// values</span>\n\t\torg<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>SeriesMap seriesMap <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">org<span class="token punctuation">.</span>eclipse<span class="token punctuation">.</span>iot<span class="token punctuation">.</span>unide<span class="token punctuation">.</span>ppmp<span class="token punctuation">.</span>measurements<span class="token punctuation">.</span>SeriesMap</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tseriesMap<span class="token punctuation">.</span><span class="token function">setSeriesValue</span><span class="token punctuation">(</span><span class="token string">"$_time"</span><span class="token punctuation">,</span> Arrays<span class="token punctuation">.</span><span class="token function">asList</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"wear"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWear</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"wearPerCent"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWearPerCent</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"monitorState"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getMonitorState</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regulationState"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegulationState</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"measureState"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getMeasureState</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"powerState"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPowerState</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sequenceState"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSequenceState</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sequenceStateAdd"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSequenceStateAdd</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sequenceRepeat"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSequenceRepeat</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"monitorMode"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getMonitorMode</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iDemandStd"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIDemandStd</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"ilsts"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIlsts</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regulationStd"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegulationStd</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iDemand1"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIDemand1</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iActual1"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIActual1</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regulation1"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegulation1</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iDemand2"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIDemand2</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iActual2"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIActual2</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regulation2"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegulation2</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iDemand3"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIDemand3</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"iActual3"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIActual3</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regulation3"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegulation3</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"phaStd"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPhaStd</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"pha1"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPha1</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"pha2"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPha2</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"pha3"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPha3</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"t_iDemandStd"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getIDemandStd</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"tActualStd"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getTActualStd</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token comment">// addMeasurementPoint(seriesMap, "partIdentString",</span>\n\t\t<span class="token comment">// wl.getPartIdentString());</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"tipDressCounter"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getTipDressCounter</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"electrodeNo"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getElectrodeNo</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgForceSetPoint"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgForceSetPoint</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgSheetThicknessSetPoint"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgSheetThicknessSetPoint</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgSagGpSetPoint"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgSagGpSetPoint</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgSpotWithSg"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgSpotWithSg</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgMotorCurrent"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgMotorCurrent</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgMotorTemp"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgMotorTemp</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgForce"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgForce</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgSheetThickness"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgSheetThickness</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgSagGp"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgSagGp</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sgSagGc"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgSagGc</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regUsrUspJunction"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegUsrUspJunction</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regUsrUspMax"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegUsrUspMax</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regSpotDiaActual"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegSpotDiaActual</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regSpotDiaMinDemand"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegSpotDiaMinDemand</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regSplashTime"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegSplashTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"nuggetDiameter"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getNuggetDiameter</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"usp"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUsp</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"normingTime"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getNormingTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"regulationStartTime"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getRegulationStartTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"returnToConstantCurrent"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getReturnToConstantCurrent</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"declineUsp"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getDeclineUsp</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"offsetUsp"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getOffsetUsp</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"currentFactor"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getCurrentFactor</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"triggerTime"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getTriggerTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"xqrMeasuringActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getXqrMeasuringActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"xqrRegulationActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getXqrRegulationActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"xqrMonitoringActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getXqrMonitoringActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"xqrWeldTimeProlongationActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getXqrWeldTimeProlongationActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"voltageActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getVoltageActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"voltageRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getVoltageRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"currentActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getCurrentActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"currentReferenceValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getCurrentReferenceValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldTimeActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldTimeActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldTimeRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldTimeRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"energyActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getEnergyActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"energyRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getEnergyRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"powerActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPowerActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"powerRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPowerRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"resistanceActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getResistanceActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"resistanceRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getResistanceRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"pulseWidthActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPulseWidthActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"pulseWidthRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getPulseWidthRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"stabilisationFactorActValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getStabilisationFactorActValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"stabilisationFactorRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getStabilisationFactorRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"thresholdStabilisationFactor"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getThresholdStabilisationFactor</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"wldEffectStabilisationFactor"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWldEffectStabilisationFactor</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uipActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUipActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uipRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUipRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirExpulsionTime"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirExpulsionTime</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirMeasuringActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirMeasuringActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirRegulationActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirRegulationActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirMonitoringActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirMonitoringActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirWeldTimeProlongationActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirWeldTimeProlongationActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirQStoppRefCntValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirQStoppRefCntValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirQStoppActCntValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirQStoppActCntValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirUipUpperTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirUipUpperTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirUipLowerTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirUipLowerTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirUipCondTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirUipCondTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirPsfLowerTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirPsfLowerTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uirPsfCondTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUirPsfCondTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_1"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP161</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_2"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP162</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_3"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP163</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_4"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP164</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_5"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP165</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP32_6"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP326</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_7"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP167</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_8"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP168</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_9"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP169</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_10"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1610</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_11"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1611</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP32_12"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP3212</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_13"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1613</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_14"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1614</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_15"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1615</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_16"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1616</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP16_17"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP1617</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"weldSpotCustDataP32_18"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getWeldSpotCustDataP3218</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"uipMonCondUpperTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getUipMonCondUpperTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfActualValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfActualValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfRefValue"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfRefValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfMonUpperTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfMonUpperTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfMonLowerTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfMonLowerTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfMonCondUpperTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfMonCondUpperTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfMonCondLowerTol"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfMonCondLowerTol</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"fqfMeasuringActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getFqfMeasuringActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"xqrModeOff"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getXqrModeOff</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"reweldActive"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getReweldActive</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token comment">// addMeasurementPoint(seriesMap, "weldspotRefIdent",</span>\n\t\t<span class="token comment">// wl.getWeldspotRefIdent());</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sg_Torque_Gp"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgTorqueGp</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sg_Force_Corr"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgForceCorr</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sg_Weldspot_Geo_Wear"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgWeldspotGeoWear</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sg_Wear_Length"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgWearLength</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\t<span class="token function">addMeasurementPoint</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">,</span> <span class="token string">"sg_Beam_UpArching"</span><span class="token punctuation">,</span> wl<span class="token punctuation">.</span><span class="token function">getSgBeamUpArching</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n\t\tmeasurement<span class="token punctuation">.</span><span class="token function">setSeriesMap</span><span class="token punctuation">(</span>seriesMap<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\tmeasurements<span class="token punctuation">.</span><span class="token function">add</span><span class="token punctuation">(</span>measurement<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\t\twrapper<span class="token punctuation">.</span><span class="token function">setMeasurements</span><span class="token punctuation">(</span>measurements<span class="token punctuation">)</span><span class="token punctuation">;</span>\n\n\t\t<span class="token keyword">return</span> wrapper<span class="token punctuation">;</span>\n\t<span class="token punctuation">}</span>\n<span class="token punctuation">}</span>\n</code></pre>\n<h1>Summary</h1>\n<p>It takes a while to understand the involved software components. Yet, once the set up is running, it gets much easier to adapt it to another Use Case. And another. The pattern of wiring protocols and transforming the payload is very similar. The involved frameworks are powerful enough to support many Use Cases. This article is supposed to show that there are simple possibilities to transform transport protocols and payloads, so that you can focus on addressing functional challenges.</p>\n',url:"/blog/2018/2/11/Transform-PPMP-with-camel",title:"PPMP Use Cases: Simple Transformation with Apache Camel",date:new Date(15183072e5),tags:["use cases"],prev:{url:"/blog/2018/1/26/New-website",title:"Updated Website"},next:{url:"/blog/2018/2/13/grinding-machine-scenario",title:"PPMP Use Cases: Unide and the Eclipse Production Performance Management Testbed"}}}],error:null,serverRendered:!0}</script><script src="/unide/files/7447eb2d782ee1ca48cd.js" defer></script><script src="/unide/files/c3e469380ccd51a92bb6.js" defer></script><script src="/unide/files/c01c4654e10f48ab3d43.js" defer></script><script src="/unide/files/77dcc0254c88ffffb5bd.js" defer></script>
</body>
</html>