From 8557bf36270d5689a78584ac13e71880a64cab28 Mon Sep 17 00:00:00 2001 From: Florian Thienel Date: Sat, 25 Sep 2021 13:33:23 +0200 Subject: [PATCH] create SDSTransfer for a immediate text message --- sds/sds.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sds/sds.go b/sds/sds.go index 60bff2d..e4fb3b4 100644 --- a/sds/sds.go +++ b/sds/sds.go @@ -360,9 +360,16 @@ func ParseSDSTransfer(bytes []byte) (SDSTransfer, error) { } // NewTextMessageTransfer returns a new SDS-TRANSFER PDU for text messaging with the given parameters -func NewTextMessageTransfer(messageReference MessageReference, text string) SDSTransfer { +func NewTextMessageTransfer(messageReference MessageReference, immediate bool, text string) SDSTransfer { + var protocol ProtocolIdentifier + if immediate { + protocol = ImmediateTextMessaging + } else { + protocol = TextMessaging + } + return SDSTransfer{ - protocol: TextMessaging, + protocol: protocol, MessageReference: messageReference, UserData: TextSDU{ TextHeader: TextHeader{