mirror of
https://github.com/ftl/tetra-pei.git
synced 2025-04-03 20:27:30 +02:00
create SDSTransfer for a immediate text message
This commit is contained in:
parent
76747bd18c
commit
8557bf3627
1 changed files with 9 additions and 2 deletions
11
sds/sds.go
11
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
|
// 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{
|
return SDSTransfer{
|
||||||
protocol: TextMessaging,
|
protocol: protocol,
|
||||||
MessageReference: messageReference,
|
MessageReference: messageReference,
|
||||||
UserData: TextSDU{
|
UserData: TextSDU{
|
||||||
TextHeader: TextHeader{
|
TextHeader: TextHeader{
|
||||||
|
|
Loading…
Add table
Reference in a new issue