Decompose the codec, document the session surface and record the review decisions

This commit is contained in:
2026-08-26 22:59:39 +02:00
parent 6d842a8539
commit 435fa42708
10 changed files with 186 additions and 96 deletions
+15
View File
@@ -120,6 +120,21 @@ describe('encoding submit_sm', () => {
);
});
test('encodes a string short_message with the given data_coding instead of a detected one', () => {
const pdu = encode({
cmdName: 'submit_sm',
params: {
data_coding: 0x08,
destination_addr: '46709771337',
short_message: 'hi',
source_addr: '46701113311',
},
seqNr: 12,
});
assert.equal(pdu.subarray(-7).toString('hex'), '08000400680069');
});
test('keeps a UDH-carrying short_message as a buffer', () => {
const message = Buffer.concat([
Buffer.from('050003010101', 'hex'),