Framework Professional Edition Package


com.prosyst.mbs.services.datamapper.cu
Interface CUBinding


public interface CUBinding

CUBinding service is a extention of the DataMapper service and used for converting byte array to state variables values in one direction, and converting control unit actions to byte array in the opposite direction base on the mapping xml.

Author:
Niki Dimitrov

Method Summary
 byte[] generateRawData(java.lang.String actionId, java.lang.Object actionArgs, java.lang.String xmlID, ControlUnitModel model)
          Generates a byte array coresponds to the given actionID and action arguments based on the given xmlID (the pid of the mapping XML).
 void processRawData(byte[] data, java.lang.String xmlID, ControlUnitModel model)
          Converts the given byte array in Objects placed in Dictionary using the DataMapper service.
 

Method Detail

processRawData

void processRawData(byte[] data,
                    java.lang.String xmlID,
                    ControlUnitModel model)
                    throws java.lang.Exception
Converts the given byte array in Objects placed in Dictionary using the DataMapper service. DataMapper service uses the given xmlID (the pid of the mapping XML) to create a table of the mapping Objects. All Objects in the final output table are considered as a state variables and the given ControlUnitModel is used to update there values in the ContolUnit. Based on the mapping xml there are two options: 1. The mapping xml has an extended pid. In this case extended mapping xml is processed first with the given byte array. The extended mapping xml MUST have defined scheme mappings. The return output table (Dictionary with mapping objects) is used for processing the cu mapping xml with the given xmlID pid. The keys in the output table is considered as a state variables which values should be updated in the ControlUnit. 2. The mapping xml has not an extended pid. The mapping xml with the given xmlID pid MUST have defined scheme mappings. The keys in the output table is considered as a state variables which values should be updated in the ControlUnit.

Parameters:
data - byte array to be processed
xmlID - the mapping xml pid
model - the cu model updates the state variables values
Throws:
java.lang.Exception

generateRawData

byte[] generateRawData(java.lang.String actionId,
                       java.lang.Object actionArgs,
                       java.lang.String xmlID,
                       ControlUnitModel model)
                       throws java.lang.Exception
Generates a byte array coresponds to the given actionID and action arguments based on the given xmlID (the pid of the mapping XML).

Parameters:
actionId -
actionArgs -
xmlID -
model -
Returns:
Throws:
java.lang.Exception

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved