Table of contents

 

The fields with no defined operator perform only the encoded value extract and perform no other operation on the extracted value.
The following diagram illustrates this decoding process:

NoOperator fields decoding algorithm

Picture 3.8 - "NoOperator fields decoding algorithm"

Here is a java example implementing the above algorithm: 

public int decode(byte[] encodedData, int offset,
                  PresenceMap presenceMap, OutputMessage message) {
    if (presenceMap.isNextPMapBitSet()) {
        offset = dataTypeDecoder.decode(encodedData, offset, templateField);
        Object decodedValue = getFieldValue();
        if (decodedValue != null) {
            message.addValue(tagId, decodedValue);
            setPreviousValue(decodedValue);
        } else {
            if (isMandatory) {
                throw new RuntimeException(
                    "Mandatory field decoded value can not be NULL");
            } else {
                setPreviousValue(null);
            }
        }
     } else {
        // there is no undefinite status for the previous value
        Object prevValue = getPreviousValue();
        if (prevValue != null) {
            // add field into the message
            message.addValue(tagId, prevValue);
        } else {
            if (isMandatory) {
                throw new RuntimeException(
                    "Mandatory field decoded value can not be NULL");
            }
        }
    }
    return offset;
}
 
public void reset() {
    // the field delivers previous value from the undefinite status
    setPreviousValue(getInitialValue());
}
 
public boolean isPMapBitExist() {
    // Copy fields require presence map bit
    return true;
}
 
public boolean isFieldNullable() {
    // If isMandatory false the Copy field could has the null representation
    //of field value and does not apear in the output FIX message
    return !isMandatory;
}