diff options
| author | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-16 20:39:02 +0300 |
|---|---|---|
| committer | Arda Serdar Pektezol <1669855+pektezol@users.noreply.github.com> | 2023-09-16 21:39:43 +0300 |
| commit | 81f365e99636104ff81151370048a51e8ae8027a (patch) | |
| tree | 0bd2781ad73fdc982abdcb70f9f44c551ac76bcf /pkg/messages/types/svcVoiceData.go | |
| parent | update CI workflow for go 1.21.0 (diff) | |
| download | sdp.go-81f365e99636104ff81151370048a51e8ae8027a.tar.gz sdp.go-81f365e99636104ff81151370048a51e8ae8027a.tar.bz2 sdp.go-81f365e99636104ff81151370048a51e8ae8027a.zip | |
feat: parsing sar custom data (#4)
Diffstat (limited to 'pkg/messages/types/svcVoiceData.go')
| -rw-r--r-- | pkg/messages/types/svcVoiceData.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/messages/types/svcVoiceData.go b/pkg/messages/types/svcVoiceData.go index b6c81d4..9609d80 100644 --- a/pkg/messages/types/svcVoiceData.go +++ b/pkg/messages/types/svcVoiceData.go | |||
| @@ -9,12 +9,12 @@ type SvcVoiceData struct { | |||
| 9 | Data []byte | 9 | Data []byte |
| 10 | } | 10 | } |
| 11 | 11 | ||
| 12 | func ParseSvcVoiceData(reader *bitreader.ReaderType) SvcVoiceData { | 12 | func ParseSvcVoiceData(reader *bitreader.Reader) SvcVoiceData { |
| 13 | svcVoiceData := SvcVoiceData{ | 13 | svcVoiceData := SvcVoiceData{ |
| 14 | Client: int8(reader.TryReadBits(8)), | 14 | Client: int8(reader.TryReadBits(8)), |
| 15 | Proximity: int8(reader.TryReadBits(8)), | 15 | Proximity: int8(reader.TryReadBits(8)), |
| 16 | Length: int16(reader.TryReadBits(16)), | 16 | Length: int16(reader.TryReadBits(16)), |
| 17 | } | 17 | } |
| 18 | svcVoiceData.Data = reader.TryReadBitsToSlice(int(svcVoiceData.Length)) | 18 | svcVoiceData.Data = reader.TryReadBitsToSlice(uint64(svcVoiceData.Length)) |
| 19 | return svcVoiceData | 19 | return svcVoiceData |
| 20 | } | 20 | } |