diff --git a/content/research/decoding-fast.md b/content/research/decoding-fast.md index 036175b..709d669 100644 --- a/content/research/decoding-fast.md +++ b/content/research/decoding-fast.md @@ -459,6 +459,52 @@ Map, [according to JetTek](https://jettekfix.com/education/fix-fast-tutorial/): +# Template Versioning + +I didn't mentioned this before, but now that I explained some things about the +types and some information about the template, I can point that the template +file allows multiple versions of the same message types. + +For example + +```xml + + + + + + +``` + +The first thing you may notice is that there are two templates defined, one +with ID "1" and another with ID "2". Both have the same name and the same +constant value in the same field ID, but the initial data in the incoming block +defines which one should be used. + +The incoming data starts with a Presence Map. The first bit on this is the +"Template ID". With that Template ID, the decoder can find the list of fields +that should be processed. This Presence Map also contains the map for the +fields in the root sequence -- in our example, if the Template ID decodes to +"2", the other bit in the Presence Map is the indication of the +"SomeOtherField". + +{% note() %} +So far, I didn't find any data that didn't had the bit set for the template ID, +so I'm not actually sure what would happen if the bit is unset. +{% end %} # Anomalies @@ -542,3 +588,4 @@ mandatory sequences. ### Changelog: 2022-01-10: First release. +2022-01-10: Added information about the template versioning. diff --git a/content/research/decoding-fast.pt.md b/content/research/decoding-fast.pt.md index f771f69..69f531d 100644 --- a/content/research/decoding-fast.pt.md +++ b/content/research/decoding-fast.pt.md @@ -471,6 +471,53 @@ Presença, [de acordo com a JetTek](https://jettekfix.com/education/fix-fast-tut +# Versionamento de Templates + +Eu não mencionei isso antes, mas agora que eu expliquei algumas coisas sobre os +tipos e algumas informações sobre o template, eu posso dizer que o arquivo de +template permite que existam múltiplas versões das mesmas mensagens. + +Por exemplo + +```xml + + + + + + +``` + +Uma coisa que você pode notar é que existem dois templates definidos, um com ID +"1" e outro com ID "2". Ambos tem o mesmo nome e o mesmo campo com um valor +constante, mas a informação inicial dos dados de entrada indica qual destes +dois deve ser usada. + +Os dados de entrada começam com um Mapa de Presença. O primeiro bit deste mapa +é o "Template ID". Com este Template ID, o decodificador pode encontrar a lista +de campos que devem ser processados. Este mapa também tem os campos da +sequência inicial -- no nosso exemplo, se o Template ID for "2", o outro bit no +Mapa de Presença é o indicador do "SomeOtherField". + +{% note() %} +Até agora, eu não vi dados de entrada que não tivessem o bit indicador do +template ID ligado, então eu não tenho muita certeza do que fazer caso isso +aconteça. +{% end %} + # Anomalias Eu chamo "anomalia" qualquer coisa que eu levei muito tempo para entender. @@ -553,7 +600,8 @@ sequências mandatórias e opcionais. Changelog: -2021-01-10: Primeira versão. +2022-01-10: Primeira versão. +2o22-01-10: Adicionada informações sobre o versionamento de templates.