The CU binding Bundle provides an extension to the Data Mapper that allows to generate control unit information out of input byte arrays and vise versa. For detailed information on the control units, refer to the "Control Unit Admin Bundle" document.
Contents:
The CU Binding Bundle is packed in the datamappercu.jar file, located in the bundles directory of Framework Professional Edition Package.
|
The CU Binding bundle exports the com.prosyst.mbs.services.datamapper.cu package. It provides the CU Binding Service.
The CU Binding bundle provides an extension on top of the Data Mapper bundle allowing it to:
Data conversion rules are described in XMLs with the same principles of function and structure as for the base Data Mapper. For details on creating such XMLs, refer to the "Data Mapper Bundle" document.
There are small extensions to the base data mapper XML DTD to serve the needs of control unit data conversions. They are described in the "CU Binding Extensions to the Data Mapping XML" section.
Generally, you can create control unit data mapping XMLs the same way as basic data mapping XMLs. You can also extend existing data mapping XMLs with control unit binding functionality. In such a case, the scheme of the parent data mapping XML will be common for both the XMLs.
To add functionality for converting byte arrays into control unit related information and vise versa to a data mapping XML, you just have to:
<map name="statevar_1" type="int"> <value><![CDATA[ var.var_1 + cuvar.statevar_3]]></value> </map>
<var name="_cu_actionId"type="String"></var>
<mapper> element to the XML. Its value should be the PID of a base mapping XML which the current one extends with control unit conversion functionality. Bundles providing control unit data mapping XMLs must describe them not only into "Data-Mapping" manifest header, but also in "Data-CUMapping" header, in order to be recognized by the CU Binding component. Here is the format for this header:
Data-CUMapping: pid=<cu_xml_pid> [; expid=<extended_xml_pid>] [,pid=<cu_xml_pid> [; expid=<extended_xml_pid>]]
For example:
Data-CUMapping: pid=cubinding.tc.1, pid=cubinding.tc.2; expid=cubinding.tc.2ext
For details on the "Data-Mapping" manifest header, refer to the "Data Mapper Bundle" document.
The CU Binding service is register under the com.prosyst.mbs.services.datamapper.cu.CUBinding interface. It provides methods for generating control unit related information out of an input byte array and vise versa.
The CU Binging bundle registers a Custom Function Evaluator Service to extend the base Data Mapper with functions allowing it to perform control unit data mapping. It is registered under the com.prosyst.mbs.services.datamapper.CustomFunctionEvaluator interface.