mirror of https://bitbucket.org/ausocean/av.git
psi: added a std template PSI struct for pmt with time and gps descriptors to make things easier
This commit is contained in:
parent
41d98b4dcd
commit
283689ea6c
|
@ -26,8 +26,9 @@ LICENSE
|
|||
|
||||
package psi
|
||||
|
||||
// Std PSI in struct form without descriptor
|
||||
// Some common manifestations of PSI
|
||||
var (
|
||||
// PSI struct to represent basic pat
|
||||
stdPat = PSI{
|
||||
Pf: 0x00,
|
||||
Tid: 0x00,
|
||||
|
@ -47,6 +48,7 @@ var (
|
|||
},
|
||||
}
|
||||
|
||||
// PSI struct to represent basic pmt without descriptors for time and gps
|
||||
stdPmt = PSI{
|
||||
Pf: 0x00,
|
||||
Tid: 0x02,
|
||||
|
@ -69,6 +71,42 @@ var (
|
|||
},
|
||||
},
|
||||
}
|
||||
|
||||
// Std pmt with time and gps descriptors, time and gps fields are zerod out
|
||||
stdPmtTimeGps = PSI{
|
||||
Pf: 0x00,
|
||||
Tid: 0x02,
|
||||
Ssi: true,
|
||||
Sl: uint16(0x12),
|
||||
Tss: &TSS{
|
||||
Tide: uint16(0x01),
|
||||
V: 0,
|
||||
Cni: true,
|
||||
Sn: 0,
|
||||
Lsn: 0,
|
||||
Sd: &PMT{
|
||||
Pcrpid: 0x0100, // wrong
|
||||
Pil: 10,
|
||||
Pd: []Desc{
|
||||
Desc{
|
||||
Dt: byte(timeDescTag),
|
||||
Dl: byte(timeDataSize),
|
||||
Dd: make([]byte, timeDataSize),
|
||||
},
|
||||
Desc{
|
||||
Dt: byte(gpsDescTag),
|
||||
Dl: byte(gpsDataSize),
|
||||
Dd: make([]byte, gpsDataSize),
|
||||
},
|
||||
},
|
||||
Essd: &ESSD{
|
||||
St: 0x1b,
|
||||
Epid: 0x0100,
|
||||
Esil: 0x00,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
// Std PSI in bytes form
|
||||
|
|
Loading…
Reference in New Issue