diff options
Diffstat (limited to 'pkg/messages/types/svcUpdateStringTable.go')
| -rw-r--r-- | pkg/messages/types/svcUpdateStringTable.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pkg/messages/types/svcUpdateStringTable.go b/pkg/messages/types/svcUpdateStringTable.go index 11e63d4..7e15cd2 100644 --- a/pkg/messages/types/svcUpdateStringTable.go +++ b/pkg/messages/types/svcUpdateStringTable.go | |||
| @@ -2,17 +2,17 @@ package messages | |||
| 2 | 2 | ||
| 3 | import ( | 3 | import ( |
| 4 | "github.com/pektezol/bitreader" | 4 | "github.com/pektezol/bitreader" |
| 5 | "github.com/pektezol/sdp.go/pkg/writer" | 5 | "github.com/pektezol/sdp.go/pkg/types" |
| 6 | ) | 6 | ) |
| 7 | 7 | ||
| 8 | type SvcUpdateStringTable struct { | 8 | type SvcUpdateStringTable struct { |
| 9 | TableId uint8 | 9 | TableId uint8 `json:"table_id"` |
| 10 | NumChangedEntries uint16 | 10 | NumChangedEntries uint16 `json:"num_changed_entries"` |
| 11 | Length int32 | 11 | Length int32 `json:"length"` |
| 12 | Data []byte | 12 | Data []byte `json:"data"` |
| 13 | } | 13 | } |
| 14 | 14 | ||
| 15 | func ParseSvcUpdateStringTable(reader *bitreader.Reader) SvcUpdateStringTable { | 15 | func ParseSvcUpdateStringTable(reader *bitreader.Reader, demo *types.Demo) SvcUpdateStringTable { |
| 16 | svcUpdateStringTable := SvcUpdateStringTable{ | 16 | svcUpdateStringTable := SvcUpdateStringTable{ |
| 17 | TableId: uint8(reader.TryReadBits(5)), | 17 | TableId: uint8(reader.TryReadBits(5)), |
| 18 | } | 18 | } |
| @@ -21,7 +21,7 @@ func ParseSvcUpdateStringTable(reader *bitreader.Reader) SvcUpdateStringTable { | |||
| 21 | } | 21 | } |
| 22 | svcUpdateStringTable.Length = int32(reader.TryReadBits(20)) | 22 | svcUpdateStringTable.Length = int32(reader.TryReadBits(20)) |
| 23 | svcUpdateStringTable.Data = reader.TryReadBitsToSlice(uint64(svcUpdateStringTable.Length)) | 23 | svcUpdateStringTable.Data = reader.TryReadBitsToSlice(uint64(svcUpdateStringTable.Length)) |
| 24 | writer.TempAppendLine("\t\tTable ID: %d", svcUpdateStringTable.TableId) | 24 | demo.Writer.TempAppendLine("\t\tTable ID: %d", svcUpdateStringTable.TableId) |
| 25 | writer.TempAppendLine("\t\tNumber Of Changed Entries: %d", svcUpdateStringTable.NumChangedEntries) | 25 | demo.Writer.TempAppendLine("\t\tNumber Of Changed Entries: %d", svcUpdateStringTable.NumChangedEntries) |
| 26 | return svcUpdateStringTable | 26 | return svcUpdateStringTable |
| 27 | } | 27 | } |