Some PGN data for alerts
This commit is contained in:
		
							parent
							
								
									9f509d0c38
								
							
						
					
					
						commit
						cbb5462865
					
				
							
								
								
									
										57
									
								
								parser.py
								
								
								
								
							
							
						
						
									
										57
									
								
								parser.py
								
								
								
								
							| 
						 | 
				
			
			@ -1,5 +1,7 @@
 | 
			
		|||
"""
 | 
			
		||||
PGNs verarbeiten
 | 
			
		||||
Füllt Daten in verschieden Strukturen
 | 
			
		||||
 | 
			
		||||
"""
 | 
			
		||||
 | 
			
		||||
import struct
 | 
			
		||||
| 
						 | 
				
			
			@ -24,6 +26,61 @@ def parse_60928(buf, device):
 | 
			
		|||
    device.sysinstance = buf[7] & 0x0f           # 4bit
 | 
			
		||||
    return struct.unpack_from('>Q', buf, 0)[0]
 | 
			
		||||
 | 
			
		||||
def parse_126983(buf, source):
 | 
			
		||||
    # Alert
 | 
			
		||||
    # PGN 126984 is response
 | 
			
		||||
    print(f"PGN 126983 Alert fom {source} (not yet implemented)")
 | 
			
		||||
    # alertType 4bit
 | 
			
		||||
    # alertCategory 4bit
 | 
			
		||||
    # alertSystem 8bit
 | 
			
		||||
    # alertSubSystem 8bit
 | 
			
		||||
    # alertId 16bit
 | 
			
		||||
    # dataSourceNetworkIdName 64bit
 | 
			
		||||
    # dataSourceInstance 8bit
 | 
			
		||||
    # dataSourceIndexSource 8bit
 | 
			
		||||
    # alertOccurrenceNumber 8bit
 | 
			
		||||
    # temporarySilenceStatus 1bit
 | 
			
		||||
    # acknowledgeStatus 1bit
 | 
			
		||||
    # escalationStatus 1bit
 | 
			
		||||
    # temporarySilenceSupport 1bit
 | 
			
		||||
    # temporarySilenceSupport 1bit
 | 
			
		||||
    # escalationSupport 1bit
 | 
			
		||||
    # reserved 2bit
 | 
			
		||||
    # acknowledgeSourceNetworkIdName 64bit
 | 
			
		||||
    # triggerCondition 4bit
 | 
			
		||||
    # thresholdStatus 4bit
 | 
			
		||||
    # alertPriority 8bit
 | 
			
		||||
    # alertState 8bit
 | 
			
		||||
 | 
			
		||||
def parse_126985(buf, source):
 | 
			
		||||
    # Alert text
 | 
			
		||||
    print(f"PGN 126985 Alert text fom {source} (not yet implemented)")
 | 
			
		||||
    # alertType 4bit
 | 
			
		||||
    # alertCategory 4bit
 | 
			
		||||
    # alertSystem 8bit
 | 
			
		||||
    # alertSubSystem 8bit
 | 
			
		||||
    # alertId 16bit
 | 
			
		||||
    # dataSourceNetworkIdName 64bit
 | 
			
		||||
    # dataSourceInstance 8bit
 | 
			
		||||
    # dataSourceIndexSource 8bit
 | 
			
		||||
    # alertOccurrenceNumber 8bit
 | 
			
		||||
    # languageId 8bit
 | 
			
		||||
    # alertTextDescription String
 | 
			
		||||
    # alertLocationTextDescription String
 | 
			
		||||
   
 | 
			
		||||
 | 
			
		||||
def parse_126986(buf, source):
 | 
			
		||||
    # Alert configuration
 | 
			
		||||
    print(f"PGN 126986 Alert configuration fom {source} (not yet implemented)")
 | 
			
		||||
 | 
			
		||||
def parse_126987(buf, source):
 | 
			
		||||
    # Alert threshold
 | 
			
		||||
    print(f"PGN 126987 Alert threshold fom {source} (not yet implemented)")
 | 
			
		||||
 | 
			
		||||
def parse_126988(buf, source):
 | 
			
		||||
    # Alert value
 | 
			
		||||
    print(f"PGN 126988 Alert value fom {source} (not yet implemented)")
 | 
			
		||||
 | 
			
		||||
def parse_126992(buf, source):
 | 
			
		||||
    # System time
 | 
			
		||||
    print(f"PGN 126992 System time from {source}")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue