mirror of
https://github.com/jwetzell/psn-go.git
synced 2026-08-27 09:59:11 +00:00
move types out of decoders package
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package chunks
|
||||
|
||||
type ChunkHeader struct {
|
||||
Id uint16
|
||||
DataLen uint16
|
||||
HasSubchunks bool
|
||||
}
|
||||
|
||||
type Chunk struct {
|
||||
ChunkData []byte
|
||||
Header ChunkHeader
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package chunks
|
||||
|
||||
type DataPacketChunkData struct {
|
||||
PacketHeader *PacketHeaderChunk
|
||||
TrackerList *DataTrackerListChunk
|
||||
}
|
||||
|
||||
type DataPacketChunk struct {
|
||||
Data DataPacketChunkData
|
||||
Chunk Chunk
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package chunks
|
||||
|
||||
type DataTrackerChunkData struct {
|
||||
Pos *DataTrackerXYZChunk
|
||||
Speed *DataTrackerXYZChunk
|
||||
Ori *DataTrackerXYZChunk
|
||||
Status *DataTrackerStatusChunk
|
||||
Accel *DataTrackerXYZChunk
|
||||
TrgtPos *DataTrackerXYZChunk
|
||||
Timestamp *DataTrackerTimestampChunk
|
||||
}
|
||||
|
||||
type DataTrackerChunk struct {
|
||||
Data DataTrackerChunkData
|
||||
Chunk Chunk
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package chunks
|
||||
|
||||
type DataTrackerListChunkData struct {
|
||||
Trackers []DataTrackerChunk
|
||||
}
|
||||
type DataTrackerListChunk struct {
|
||||
Chunk Chunk
|
||||
Data DataTrackerListChunkData
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package chunks
|
||||
|
||||
type DataTrackerStatusChunkData struct {
|
||||
Validity float32
|
||||
}
|
||||
|
||||
type DataTrackerStatusChunk struct {
|
||||
Chunk Chunk
|
||||
Data DataTrackerStatusChunkData
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package chunks
|
||||
|
||||
type DataTrackerTimestampChunkData struct {
|
||||
Timestamp uint64
|
||||
}
|
||||
|
||||
type DataTrackerTimestampChunk struct {
|
||||
Chunk Chunk
|
||||
Data DataTrackerTimestampChunkData
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package chunks
|
||||
|
||||
type DataTrackerXYZChunkData struct {
|
||||
X float32
|
||||
Y float32
|
||||
Z float32
|
||||
}
|
||||
|
||||
type DataTrackerXYZChunk struct {
|
||||
Chunk Chunk
|
||||
Data DataTrackerXYZChunkData
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package chunks
|
||||
|
||||
type InfoPacketChunkData struct {
|
||||
PacketHeader *PacketHeaderChunk
|
||||
SystemName *InfoSystemNameChunk
|
||||
TrackerList *InfoTrackerListChunk
|
||||
}
|
||||
|
||||
type InfoPacketChunk struct {
|
||||
Data InfoPacketChunkData
|
||||
Chunk Chunk
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package chunks
|
||||
|
||||
type InfoSystemNameChunkData struct {
|
||||
SystemName string
|
||||
}
|
||||
|
||||
type InfoSystemNameChunk struct {
|
||||
Data InfoSystemNameChunkData
|
||||
Chunk Chunk
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package chunks
|
||||
|
||||
type InfoTrackerChunkData struct {
|
||||
TrackerName *InfoTrackerNameChunk
|
||||
}
|
||||
|
||||
type InfoTrackerChunk struct {
|
||||
Data InfoTrackerChunkData
|
||||
Chunk Chunk
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package chunks
|
||||
|
||||
type InfoTrackerListChunkData struct {
|
||||
Trackers []InfoTrackerChunk
|
||||
}
|
||||
|
||||
type InfoTrackerListChunk struct {
|
||||
Chunk Chunk
|
||||
Data InfoTrackerListChunkData
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package chunks
|
||||
|
||||
type InfoTrackerNameChunkData struct {
|
||||
TrackerName string
|
||||
}
|
||||
|
||||
type InfoTrackerNameChunk struct {
|
||||
Data InfoTrackerNameChunkData
|
||||
Chunk Chunk
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package chunks
|
||||
|
||||
type PacketHeaderChunkData struct {
|
||||
PacketTimestamp uint64
|
||||
VersionHigh uint8
|
||||
VersionLow uint8
|
||||
FrameId uint8
|
||||
FramePacketCount uint8
|
||||
}
|
||||
|
||||
type PacketHeaderChunk struct {
|
||||
Chunk Chunk
|
||||
Data PacketHeaderChunkData
|
||||
}
|
||||
Reference in New Issue
Block a user