136 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			136 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| package models
 | |
| 
 | |
| import (
 | |
| 	"gitea.unprism.ru/KRBL/n9m/v2/pkg/protocol"
 | |
| )
 | |
| 
 | |
| // 3.4.1.3
 | |
| type EventModelGetAlarmStatusInfoResponse struct {
 | |
| 	ErrorCode            uint                        `json:"ERRORCODE"`
 | |
| 	ErrorCause           string                      `json:"ERRORCAUSE"`
 | |
| 	StorageErrors        []StorageErrorStatus        `json:"ST"`
 | |
| 	AnotherStorageErrors []AnotherStorageErrorStatus `json:"VS"`
 | |
| 	VideoLossErrors      []VideoLossErrorStatus      `json:"VL"`
 | |
| 	GPSError             GPSErrorStatus              `json:"GFA"`
 | |
| 	GPSAntennaError      GPSAntennaErrorStatus       `json:"GPSS"`
 | |
| }
 | |
| 
 | |
| // 3.4.1.4.21
 | |
| type StorageErrorStatus struct {
 | |
| 	CameraCovered uint `json:"ISA"`
 | |
| 	ChannelBind   uint `json:"LHC"`
 | |
| }
 | |
| 
 | |
| // 3.4.1.4.4
 | |
| type AnotherStorageErrorStatus struct {
 | |
| }
 | |
| 
 | |
| // 3.4.1.4.5
 | |
| type VideoLossErrorStatus struct {
 | |
| }
 | |
| 
 | |
| // 3.4.1.4.44
 | |
| type GPSErrorStatus struct {
 | |
| }
 | |
| 
 | |
| // 3.4.1.4.46
 | |
| type GPSAntennaErrorStatus struct {
 | |
| }
 | |
| 
 | |
| // 3.4.1.5
 | |
| // Alarm upload
 | |
| type SendAlarmInfoParameters struct {
 | |
| 	AlarmType         protocol.AlarmType   `json:"ALARMTYPE"`
 | |
| 	CommandType       uint                 `json:"CMDTYPE"`
 | |
| 	AlarmUID          uint                 `json:"ALARMUID"`
 | |
| 	NumberOfRestarts  uint                 `json:"RUN"`
 | |
| 	AlarmLevel        protocol.AlarmLevel  `json:"ALARMAS"`
 | |
| 	AlarmCount        uint                 `json:"ALARMCOUNT"`
 | |
| 	TriggerType       protocol.TriggerType `json:"TRIGGERTYPE"`
 | |
| 	ContinueTime      uint                 `json:"CONTINUETIME"`
 | |
| 	CurrentTime       uint                 `json:"CURRENTTIME"`
 | |
| 	Language          protocol.Language    `json:"L"`
 | |
| 	GPSData           protocol.GPSData     `json:"P"`
 | |
| 	RealTimeUpload    uint                 `json:"REAL"`
 | |
| 	InstructionSerial uint                 `json:"CMDNO"`
 | |
| }
 | |
| 
 | |
| // 3.4.1.5
 | |
| // Alarm upload
 | |
| type SendAlarmInfoResponse struct {
 | |
| 	ErrorCode         uint               `json:"ERRORCODE"`
 | |
| 	AlarmType         protocol.AlarmType `json:"ALARMTYPE"`
 | |
| 	ErrorCause        string             `json:"ERRORCAUSE"`
 | |
| 	CommandType       uint               `json:"CMDTYPE"`
 | |
| 	AlarmUID          uint               `json:"ALARMUID"`
 | |
| 	NumberOfRestarts  uint               `json:"RUN"`
 | |
| 	InstructionSerial uint               `json:"CMDNO"`
 | |
| }
 | |
| 
 | |
| // 3.4.1.5.1
 | |
| type SendAlarmInfoCameraParameters struct {
 | |
| 	SendAlarmInfoParameters
 | |
| 
 | |
| 	Channel           uint   `json:"CHANNEL"`
 | |
| 	ChannelMask       uint   `json:"CHANNELMASK"`
 | |
| 	LCH               []uint `json:"LCH"`
 | |
| 	Push              uint   `json:"PUSH"`
 | |
| 	AlarmName         string `json:"ALARMNAME"`
 | |
| 	AlarmAbbreviation string `json:"SER"`
 | |
| }
 | |
| 
 | |
| type EventModelGetAlarmingResponse struct {
 | |
| 	CameraCoveredChannelMask uint `json:"VS_CH"`
 | |
| 	CameraCoveredAlarmMask   uint `json:"VS_AT"`
 | |
| 	CameraCoveredStatusMask  uint `json:"VS_AS"`
 | |
| 
 | |
| 	VideoLossChannelMask uint `json:"VL_CH"`
 | |
| 	VideoLossAlarmMask   uint `json:"VL_AT"`
 | |
| 	VideoLossStatusMask  uint `json:"VL_AS"`
 | |
| }
 | |
| 
 | |
| // 3.4.1.3
 | |
| type EventModelGetAlarmInfoStatusResponse struct {
 | |
| 	ErrorCode            uint                         `json:"ERRORCODE"`
 | |
| 	ErrorCause           string                       `json:"ERRORCAUSE"`
 | |
| 	MotionDetectionAlarm []MotionDetectionAlarmStatus `json:"MD"`
 | |
| 	IOAlarm              []IOAlarmStatus              `json:"IO"`
 | |
| 	StorageAlarm         []StorageAlarmStatus         `json:"ST"`
 | |
| 	CameraCoveredAlarm   []CameraCoveredAlarmStatus   `json:"VS"`
 | |
| 	VideoLossAlarm       []VideoLossAlarmStatus       `json:"VL"`
 | |
| }
 | |
| 
 | |
| // 3.4.1.4.1
 | |
| type MotionDetectionAlarmStatus struct {
 | |
| 	Status uint `json:"ISA"`
 | |
| 	Mask   uint `json:"LCH"`
 | |
| }
 | |
| 
 | |
| // 3.4.1.4.2
 | |
| type IOAlarmStatus struct {
 | |
| 	Status           uint   `json:"ISA"`
 | |
| 	IONumber         uint   `json:"IONO"`
 | |
| 	Mask             uint   `json:"LCH"`
 | |
| 	Name             string `json:"NAME"`
 | |
| 	NameAbbreviation string `json:"NSER"`
 | |
| }
 | |
| 
 | |
| // 3.4.1.4.4
 | |
| type CameraCoveredAlarmStatus struct {
 | |
| 	Status uint `json:"ISA"`
 | |
| 	Mask   uint `json:"LCH"`
 | |
| }
 | |
| 
 | |
| // 3.4.1.4.4
 | |
| type VideoLossAlarmStatus struct {
 | |
| 	Status uint `json:"ISA"`
 | |
| 	Mask   uint `json:"LCH"`
 | |
| }
 | |
| 
 | |
| // 3.4.1.4.21
 | |
| type StorageAlarmStatus struct {
 | |
| 	SID   any  `json:"SID"`
 | |
| 	Type  uint `json:"ST"`
 | |
| 	Error uint `json:"E"`
 | |
| }
 |