Noctam/DWP/ACS Test Harness/Notes

From The Dreaming
Revision as of 16:41, 7 September 2021 by Stuart (talk | contribs) (Notes on DCI calls to CISSIM)
Jump to navigation Jump to search
ACS Test Harness

Meetings

Existing System

Specifications

Diary
2009:

Notes

Notes

Just a scratchpad to make notes as I'm looking at stuff. Temp stuff - probably be wiped regularly.

CISSIM

  • Reads config provided
  • 'FOLDER' is the folder in which the output files are stored
  • Handling for DCI calls puts together a lookup key from:
    • The 'dialog' - one of:
      • DCI908_R_RPLY
      • DCI913_R_RPLY
      • DCI923_R_RPLY
    • And the 'system id' from the ns1:systemID value of the provided XML.
  • It then uses those values to look up entries in the config for that type of call; the entry is a tuple made up of:
    • A list of search specs, each entry a tuple of made up of: 'searchKey', 'searchValue[;trimlength]'
    • output file
    • A list of replacements, each entry a tuple of 'output xml element name', 'replacement', where 'replacement' is typically @[input xml element name] - i.e. '@' (the value found at...) 'input xml element name' (the xml element with the provided name in the input).
  • It then just goes through through the replacements finding the output xml elements and replacing them with the values specified (reading them from the input XML document if (when) necessary)
  • Finally, it stringifies the XML document object it's been playing with, outputs it (interestingly, using chunked encoding) and goes about its business.

Some observations

OK, this is actually quite flexible, and, although the code is terse and uncommented, it's not that hard to follow. Ultimately, it doesn't do that much (in the above, quite narrow, use case) - I could fairly easily strip out everything that isn't required by a DCI call and just have that as our starting block of code... I might do that, though I want to get PDD and NPS in there too, neither of which are handled in my initial examination above.