22 lines
916 B
Go
22 lines
916 B
Go
package fields
|
|
|
|
// EmergencyPriorityStatus is the Emergency Priority Status definition
|
|
//
|
|
// Specified in Doc 9871 / Table B-2-97a
|
|
type EmergencyPriorityStatus byte
|
|
|
|
const (
|
|
EPSNoEmergency EmergencyPriorityStatus = iota // No emergency
|
|
EPSGeneralEmergency // General emergency
|
|
EPSLifeguardMedical // Lifeguard/medical emergency
|
|
EPSMinimumFuel // Minimum fuel
|
|
EPSNoCommunication // No communications
|
|
EPSUnlawfulInterference // Unlawful interference
|
|
EPSDownedAircraft // Downed aircraft
|
|
EPSReserved7 // Reserved
|
|
)
|
|
|
|
func ParseEmergencyPriorityStatus(data []byte) EmergencyPriorityStatus {
|
|
return EmergencyPriorityStatus((data[1] & 0xE0) >> 5)
|
|
}
|