ts_102_222: Set number of records when creating linear files

This information is mandatory for linear files as per TS 102 221 V15
section 11.1.1.4.3. This might not have been spotted earlier because
cards of type sysmoISIM-SJA2 accept creation without it as well.

Change-Id: I8aeb869c601ee5d1c8b02da6d72eb3c50e347982
This commit is contained in:
Christian Amsüss 2022-04-19 10:29:09 +02:00 committed by laforge
parent e6b86872ce
commit e17e277a24
1 changed files with 3 additions and 0 deletions

View File

@ -139,6 +139,9 @@ class Ts102222Commands(CommandSet):
self._cmd.perror("you must specify the --record-length for linear fixed EF")
return
file_descriptor['record_len'] = opts.record_length
file_descriptor['num_of_rec'] = opts.file_size // opts.record_length
if file_descriptor['num_of_rec'] * file_descriptor['record_len'] != opts.file_size:
raise ValueError("File size not evenly divisible by record length")
elif opts.structure == 'ber_tlv':
self._cmd.perror("BER-TLV creation not yet fully supported, sorry")
return