subrecord

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2021 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SRAccelerationData added in v0.7.1

type SRAccelerationData struct {
	RTM  uint16 `json:"RTM"`  // RTM (Relative Time)
	XAAV int16  `json:"XAAV"` // XAAV (X Axis Acceleration Value)
	YAAV int16  `json:"YAAV"` // YAAV (Y Axis Acceleration Value)
	ZAAV int16  `json:"ZAAV"` // ZAAV (Z Axis Acceleration Value)
}

func (*SRAccelerationData) Decode added in v0.7.1

func (subr *SRAccelerationData) Decode(b []byte) (err error)

Decode Parse array of bytes to EGTS_SR_ACCEL_DATA

func (*SRAccelerationData) Encode added in v0.7.1

func (subr *SRAccelerationData) Encode() (b []byte, err error)

Encode Parse EGTS_SR_ACCEL_DATA to array of bytes

func (*SRAccelerationData) Len added in v0.7.1

func (subr *SRAccelerationData) Len() (l uint16)

Len Returns length of bytes slice

type SRAccelerationHeader added in v0.7.1

type SRAccelerationHeader struct {
	StructuresAmount uint8               `json:"SA"`          // SA - число передаваемых структур данных
	AbsoluteTimeUint uint32              `json:"ATM"`         // ATM - время проведения измерений первой передаваемой структуры
	AbsoluteTime     time.Time           `json:"ATM_RFC3339"` // ATM - время
	AccelerationData SRAccelerationsData `json:"ADS"`         // ADS - структуры данных показаний акселерометра
}

func (*SRAccelerationHeader) Decode added in v0.7.1

func (subr *SRAccelerationHeader) Decode(b []byte) (err error)

Decode Parse array of bytes to EGTS_SR_ACCEL_DATA

func (*SRAccelerationHeader) Encode added in v0.7.1

func (subr *SRAccelerationHeader) Encode() (b []byte, err error)

Encode Parse EGTS_SR_ACCEL_DATA to array of bytes

func (*SRAccelerationHeader) Len added in v0.7.1

func (subr *SRAccelerationHeader) Len() (l uint16)

Len Returns length of bytes slice

type SRAccelerationsData added in v0.7.1

type SRAccelerationsData []*SRAccelerationData

RecordsData Slice of RecordData

type SRAdSensorsData

type SRAdSensorsData struct {
	// Digital Outputs
	DigitalOutputs uint8 `json:"DOUT"`

	// Additional Digital Inputs Octets 1-8
	ADI [8]uint8 `json:"ADI"`
	// Analog Sensors 1-8
	ANS [8]uint32 `json:"ANS"`

	DIOExists []string `json:"DIOE"`
	ANSExists []string `json:"ANSE"`
}

SRAdSensorsData EGTS_SR_AD_SENSORS_DATA

Применяется абонентским терминалом для передачи
на аппаратно-программный комплекс информации о состоянии
дополнительных дискретных и аналоговых входов

func (*SRAdSensorsData) Decode

func (subr *SRAdSensorsData) Decode(b []byte) (err error)

Decode Parse array of bytes to EGTS_SR_AD_SENSORS_DATA

func (*SRAdSensorsData) Encode

func (subr *SRAdSensorsData) Encode() (b []byte, err error)

Encode Parse EGTS_SR_AD_SENSORS_DATA to array of bytes

func (*SRAdSensorsData) Len

func (subr *SRAdSensorsData) Len() (l uint16)

Len Returns length of bytes slice

type SRCountersData

type SRCountersData struct {
	Counters       [8]uint32 `json:"CN"`
	CountersExists []string  `json:"CNE"`
}

SRCountersData EGTS_SR_COUNTERS_DATA

Используется аппаратно-программным комплексом для передачи
на абонентский терминал данных о значении счетных входов

func (*SRCountersData) Decode

func (subr *SRCountersData) Decode(b []byte) (err error)

Decode Parse array of bytes to EGTS_SR_COUNTERS_DATA

func (*SRCountersData) Encode

func (subr *SRCountersData) Encode() (b []byte, err error)

Encode Parse EGTS_SR_COUNTERS_DATA to array of bytes

func (*SRCountersData) Len

func (subr *SRCountersData) Len() (l uint16)

Len Returns length of bytes slice

type SRExPosDataRecord

type SRExPosDataRecord struct {
	VerticalDiluptionOfPrecisionExists   string
	HorizontalDiluptionOfPrecisionExists string
	PositionDiluptionOfPrecisionExists   string
	SatellitesExists                     string
	NavigationSystemExists               string

	VerticalDiluptionOfPrecision   uint16 `json:"VDOP"` /* Vertical Dilution of Precision */
	HorizontalDiluptionOfPrecision uint16 `json:"HDOP"` /* Horizontal Dilution of Precision */
	PositionDiluptionOfPrecision   uint16 `json:"PDOP"` /* Position Dilution of Precision */
	Satellites                     uint8  `json:"SAT"`  /* Satellites */
	NavigationSystem               uint16 `json:"NS"`   /* Navigation System */
}

SRExPosDataRecord EGTS_SR_EXT_POS_DATA

Используется абонентским терминалом
при передаче дополнительных данных
определения местоположения

func (*SRExPosDataRecord) Decode

func (subr *SRExPosDataRecord) Decode(b []byte) (err error)

Decode Parse array of bytes to EGTS_SR_EXT_POS_DATA

func (*SRExPosDataRecord) Encode

func (subr *SRExPosDataRecord) Encode() (b []byte, err error)

Encode Parse EGTS_SR_EXT_POS_DATA to array of bytes

func (*SRExPosDataRecord) Len

func (subr *SRExPosDataRecord) Len() (l uint16)

Len Returns length of bytes slice

type SRLiquidLevelSensor

type SRLiquidLevelSensor struct {
	LiquidLevelSensorNumber    uint8  `json:"LLSN"`  // LLSN Liquid Level Sensor Number
	RawbFlag                   string `json:"RDF"`   // RDF bit 3 флаг, определяющий формат поля LLSD данной подзаписи:
	LiquidLevelSensorValueUnit string `json:"LLSVU"` // LLSVU	bit 4-5 битовый флаг, определяющий единицы измерения показаний ДУЖ:
	LiquidLevelSensorErrorFlag string `json:"LLSEF"` // LLSEF	bit 7	битовый флаг, определяющий наличие ошибок при считывании значения датчика уровня жидкости
	Flags                      uint8
	MADDR                      uint16 `json:"MADDR"` // MAC Address  адрес модуля, данные о показаниях ДУЖ с которого поступили в абонентский терминал
	LiquidLevelSensorb         uint32 `json:"LLSD"`  // LLSD показания ДУЖ в формате, определяемом флагом RDF
}

SRLiquidLevelSensor EGTS_SR_LIQUID_LEVEL_SENSOR

Применяется абонентским терминалом
для передачи на аппаратно-программный комплекс
данных о показаниях ДУЖ

func (*SRLiquidLevelSensor) Decode

func (subr *SRLiquidLevelSensor) Decode(b []byte) (err error)

Decode Parse array of bytes to EGTS_SR_LIQUID_LEVEL_SENSOR

func (*SRLiquidLevelSensor) Encode

func (subr *SRLiquidLevelSensor) Encode() (b []byte, err error)

Encode Parse EGTS_SR_LIQUID_LEVEL_SENSOR to array of bytes

func (*SRLiquidLevelSensor) Len

func (subr *SRLiquidLevelSensor) Len() (l uint16)

Len Returns length of bytes slice

type SRPosData

type SRPosData struct {
	NavigationTimeUint uint32    `json:"NTM"`         // NTM , seconds since 00:00:00 01.01.2010 UTC
	NavigationTime     time.Time `json:"NTM_RFC3339"` // Navigation Time
	Latitude           float64   `json:"LAT"`         // LAT , degree,  (WGS - 84) / 90 * 0xFFFFFFFF
	Longitude          float64   `json:"LONG"`        // LONG , degree,  (WGS - 84) / 180 * 0xFFFFFFFF
	Speed              int       `json:"SPD"`         // SPD , 0.1 miles , 14 bit only
	Direction          uint8     `json:"DIR"`         // DIR Direction
	DirectionValue     uint16    `json:"DIR_value"`
	Odometer           int       `json:"ODM_value"` // ODM Odometer, 3b
	OdometerBytes      []byte    `json:"ODM"`
	DigitalInputs      uint8     `json:"DIN"`       // DIN Digital Inputs
	Source             uint8     `json:"SRC"`       // SRC Source
	Altitude           uint32    `json:"ALT_value"` // ALT Altitude, 3b
	AltitudeBytes      []byte    `json:"ALT"`

	SourceDataExists uint8 `json:"SRCDE"` // SRCD exists
	SourceData       int16 `json:"SRCD"`  // SRDC Source Data

	// Flags
	Valid            string `json:"VLD"`
	CoordinateSystem string `json:"CS"`
	Fix              string `json:"FIX"`
	BlackBox         string `json:"BB"`
	Move             string `json:"MV"`
	LAHS             string `json:"LAHS"`
	LOHS             string `json:"LOHS"`
	AltitudeExists   string `json:"ALTE"`
	AltsFlag         uint8  `json:"ALTS"` //		определяет высоту относительно уровня моря и имеет смысл только при установленном флаге ALTE: 0 - точка выше уровня моря; 1 - ниже уровня моря;
	DirhFlag         uint8  `json:"DIRH"` //	(Direction the Highest bit) старший бит (8) параметра DIR;

}

SRPosData EGTS_SR_POS_DATA

Используется абонентским терминалом при передаче
основных данных определения местоположения

func (*SRPosData) Decode

func (subr *SRPosData) Decode(b []byte) (err error)

Decode Parse array of bytes to EGTS_SR_POS_DATA

func (*SRPosData) Encode

func (subr *SRPosData) Encode() (b []byte, err error)

Encode Parse EGTS_SR_POS_DATA to array of bytes

func (*SRPosData) Len

func (subr *SRPosData) Len() (l uint16)

Len Returns length of bytes slice

type SRRecordResponse

type SRRecordResponse struct {
	ConfirmedRecordNumber uint16 `json:"CRN"`
	RecordStatus          uint8  `json:"RST"`
}

SRRecordResponse EGTS_SR_RECORD_RESPONSE

Применяется для осуществления подтверждения приема и передачи
результатов обработки записи уровня поддержки услуг

func (*SRRecordResponse) Decode

func (subr *SRRecordResponse) Decode(b []byte) (err error)

Decode Parse array of bytes to EGTS_SR_RECORD_RESPONSE

func (*SRRecordResponse) Encode

func (subr *SRRecordResponse) Encode() (b []byte, err error)

Encode Parse EGTS_SR_RECORD_RESPONSE to array of bytes

func (*SRRecordResponse) Len

func (subr *SRRecordResponse) Len() (l uint16)

Len Returns length of bytes slice

type SRResultCode

type SRResultCode struct {
	RCD uint8 `json:"RCD"` // RCD — код, определяющий результат выполнения операции авторизации.
}

SRResultCode - EGTS_SR_RESULT_CODE

Код результата для подзаписей сервиса EGTS_AUTH_SERVICE

func (*SRResultCode) Decode

func (subr *SRResultCode) Decode(b []byte) (err error)

Decode Parse array of bytes to EGTS_SR_RESULT_CODE

func (*SRResultCode) Encode

func (subr *SRResultCode) Encode() (b []byte, err error)

Encode Parse EGTS_SR_RESULT_CODE to array of bytes

func (*SRResultCode) Len

func (subr *SRResultCode) Len() (l uint16)

Len Returns length of bytes slice

type SRStateData

type SRStateData struct {
	/* Header section */
	State     string `json:"ST_value"` /* State (string representation) */
	StateByte uint8  `json:"ST"`       /* State */
	/* Flags section */
	NavigationModuleEnable string `json:"NMS"` /* Navigation Module State */
	InternalBatteryEnable  string `json:"IBU"` /* Internal Battery Used */
	BackupBatteryEnable    string `json:"BBU"` /* Back Up Battery Used */
	/* Data section */
	MainPowerSourceVoltage     float32 `json:"MPSV_value"` /* Main Power Source Voltage, in 0.1V */
	BackupBatteryVoltage       float32 `json:"BBV_value"`  /* Back Up Battery Voltage, in 0.1V */
	InternalBatteryVoltage     float32 `json:"IBV_value"`  /* Internal Battery Voltage, in 0.1V */
	MainPowerSourceVoltageByte uint8   `json:"MPSV"`
	BackupBatteryVoltageByte   uint8   `json:"BBV"`
	InternalBatteryVoltageByte uint8   `json:"IBV"`
}

SRStateData EGTS_SR_STATE_DATA

Используется для передачи на аппаратно-программный комплекс
информации о состоянии абонентского терминала

func (*SRStateData) Decode

func (subr *SRStateData) Decode(b []byte) (err error)

Decode Parse array of bytes to EGTS_SR_STATE_DATA

func (*SRStateData) Encode

func (subr *SRStateData) Encode() (b []byte, err error)

Encode Parse EGTS_SR_STATE_DATA to array of bytes

func (*SRStateData) Len

func (subr *SRStateData) Len() (l uint16)

Len Returns length of bytes slice

type SRTermIdentity

type SRTermIdentity struct {
	TerminalIdentifier uint32 `json:"TID"` // TID (Terminal Identifier)

	/* Flags: MNE, BSE, NIDE, SSRA, LNGCE, IMSIE, IMEIE, HDIDE */
	MNE   string `json:"MNE"`   // MNE
	BSE   string `json:"BSE"`   // BSE
	NIDE  string `json:"NIDE"`  // NIDE
	SSRA  string `json:"SSRA"`  // SSRA
	LNGCE string `json:"LNGCE"` // LNGCE
	IMSIE string `json:"IMSIE"` // IMSIE
	IMEIE string `json:"IMEIE"` // IMEIE
	HDIDE string `json:"HDIDE"` // HDIDE
	/*                                                        */
	HomeDispatcherIdentifier                            uint16 `json:"HDID"`   // HDID (Home Dispatcher Identifier)
	InternationalMobileEquipmentIdentity                string `json:"IMEI"`   // IMEI (International Mobile Equipment Identity)
	InternationalMobileSubscriberIdentity               string `json:"IMSI"`   // IMSI (International Mobile Subscriber Identity)
	LanguageCode                                        string `json:"LNGC"`   // LNGC (Language Code)
	NetworkIdentifier                                   []byte `json:"NID"`    // NID (Network Identifier)
	BufferSize                                          uint16 `json:"BS"`     // BS (Buffer Size)
	MobileStationIntegratedServicesDigitalNetworkNumber string `json:"MSISDN"` // MSISDN (Mobile Station Integrated Services Digital Network Number)
}

SRTermIdentity EGTS_SR_TERM_IDENTITY

func (*SRTermIdentity) Decode

func (subr *SRTermIdentity) Decode(b []byte) (err error)

Decode Parse array of bytes to EGTS_SR_TERM_IDENTITY

func (*SRTermIdentity) Encode

func (subr *SRTermIdentity) Encode() (b []byte, err error)

Encode Parse EGTS_SR_TERM_IDENTITY to array of bytes

func (*SRTermIdentity) Len

func (subr *SRTermIdentity) Len() (l uint16)

Len Returns length of bytes slice

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL