CSV Config Decoder

CSV Config Decoder

We have modified the config decoder, as well as the configurable decoders, so that they now handle CSV formatted SMDR as well as fixed off set SMDR, which was all they could do in the past.  This should mean that instead of me having to write a C++ decoder for CSV SMDR, and have to handle all modifications / fixes required, the support staff will be able to do this just like with the fixed offset decoders at present.

This new decoder will be available in SP4, however could be put on selected sites before this.

When a record is logged that has more than 4 commas in it, the configurable decoder will assume that it is a CSV record, and use the csv decoder to decode it.  

The CSV decoder considers the record to consist of a number of comma separated fields.  Due to this the meaning of the configuration fields is different.   First, the offset in the configuration is now the number of the field that we look at, based at 1. 

For instance, if a record is:

ABC, 567, you, 098767, byt, DEF

An offset of 2 will select 567.  If the offset is 0, it is assumed that this field is not set.

The meaning of the length field differs depending on what field we are looking at.  For the validation fields, this is the number of characters from the start of the selected offset field that are looked at.  For example, if the validation is that at offset 4 length 2 = 42 is valid, and the actual field in the record at offset 4 is 4235, this will be considered to be valid.

For the date time fields, the length is the offset within the field where we look for the corresponding data.  For example, if the date is in field 4 and has an format of ‘dd/mm/yyyy’ we would set the year field to be offset 4, length 6.  In this case, the length starts at offset 0.

For party fields, length is where to start copying in the string.

In all other fields, the length is currently ignored.