types

package
v0.0.0-...-e7f52fa Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2025 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChoiceTagOpenRequest              = 0x100
	ChoiceTagOpenResponse             = 0x101
	ChoiceTagCloseRequest             = 0x200
	ChoiceTagCloseResponse            = 0x201
	ChoiceTagGetProfilePackRequest    = 0x300
	ChoiceTagGetProfilePackResponse   = 0x301
	ChoiceTagGetProfileListRequest    = 0x400
	ChoiceTagGetProfileListResponse   = 0x401
	ChoiceTagGetProcParameterRequest  = 0x500
	ChoiceTagGetProcParameterResponse = 0x501
	ChoiceTagSetProcParameterRequest  = 0x600
	ChoiceTagSetProcParameterResponse = 0x601
	ChoiceTagGetListRequest           = 0x700
	ChoiceTagGetListResponse          = 0x701
	ChoiceTagGetCosemRequest          = 0x800
	ChoiceTagGetCosemResponse         = 0x801
	ChoiceTagSetCosemRequest          = 0x900
	ChoiceTagSetCosemResponse         = 0x901
	ChoiceTagActionCosemRequest       = 0xa00
	ChoiceTagActionCosemResponse      = 0xa01
	ChoiceTagAttentionResponse        = 0xff01
)
View Source
const (
	ChoiceTagSecIndex       = 0x1
	ChoiceTagTimestamp      = 0x2
	ChoiceTagLocalTimestamp = 0x3
)
View Source
const (
	ChoiceTagSMLTime = 0x1
)

Variables

View Source
var (
	UnitDegrees   = SML_Unit(8)
	UnitWatts     = SML_Unit(27)
	UnitWattHours = SML_Unit(30)
	UnitAmperes   = SML_Unit(33)
	UnitVolts     = SML_Unit(35)
	UnitHertz     = SML_Unit(44)
)

Functions

This section is empty.

Types

type Boolean

type Boolean bool

func (*Boolean) DecodeSML

func (b *Boolean) DecodeSML(val tlv.Value) error

type Choice

type Choice struct {
	Tag ChoiceTag
	Val interface{}
}

type ChoiceTag

type ChoiceTag uint32

func (ChoiceTag) MarshalJSON

func (t ChoiceTag) MarshalJSON() ([]byte, error)

type EndOfSmlMsg

type EndOfSmlMsg struct{}

func (*EndOfSmlMsg) DecodeSML

func (e *EndOfSmlMsg) DecodeSML(val tlv.Value) error

type ImplicitChoice

type ImplicitChoice struct {
	Val interface{}
}

type Integer8

type Integer8 int8

func (*Integer8) DecodeSML

func (i *Integer8) DecodeSML(val tlv.Value) error

type Integer16

type Integer16 int16

func (*Integer16) DecodeSML

func (i *Integer16) DecodeSML(val tlv.Value) error

type Integer32

type Integer32 int32

func (*Integer32) DecodeSML

func (i *Integer32) DecodeSML(val tlv.Value) error

type Integer64

type Integer64 int64

func (*Integer64) DecodeSML

func (i *Integer64) DecodeSML(val tlv.Value) error

type OctetString

type OctetString []byte

func (*OctetString) DecodeSML

func (o *OctetString) DecodeSML(val tlv.Value) error

func (OctetString) MarshalJSON

func (o OctetString) MarshalJSON() ([]byte, error)

type Optional

type Optional[T any] struct {
	Valid bool
	Val   T
}

func (*Optional[T]) DecodeSML

func (o *Optional[T]) DecodeSML(val tlv.Value) error

func (Optional[T]) MarshalJSON

func (o Optional[T]) MarshalJSON() ([]byte, error)

type SMLDecoder

type SMLDecoder interface {
	DecodeSML(val tlv.Value) error
}

type SML_GetList_Req

type SML_GetList_Req struct {
	ClientID OctetString
	ServerID Optional[OctetString]
	Username Optional[OctetString]
	Password Optional[OctetString]
	ListName Optional[OctetString]
}

func (*SML_GetList_Req) DecodeSML

func (glr *SML_GetList_Req) DecodeSML(val tlv.Value) error

type SML_GetList_Res

type SML_GetList_Res struct {
	ClientID       Optional[OctetString]
	ServerID       OctetString
	ListName       Optional[OctetString]
	ActSensorTime  Optional[SML_Time]
	ValList        SML_List
	ListSignature  Optional[SML_Signature]
	ActGatewayTime Optional[SML_Time]
}

func (*SML_GetList_Res) DecodeSML

func (glr *SML_GetList_Res) DecodeSML(val tlv.Value) error

type SML_List

type SML_List []SML_ListEntry

func (*SML_List) DecodeSML

func (l *SML_List) DecodeSML(val tlv.Value) error

type SML_ListEntry

type SML_ListEntry struct {
	ObjName        OctetString
	Status         Optional[SML_Status]
	ValTime        Optional[SML_Time]
	Unit           Optional[SML_Unit]
	Scaler         Optional[Integer8]
	Value          SML_Value
	ValueSignature Optional[SML_Signature]
}

func (*SML_ListEntry) DecodeSML

func (le *SML_ListEntry) DecodeSML(val tlv.Value) error

type SML_ListType

type SML_ListType Choice

func (*SML_ListType) DecodeSML

func (lt *SML_ListType) DecodeSML(val tlv.Value) error

type SML_Message

type SML_Message struct {
	TransactionID OctetString
	GroupNo       Unsigned8
	AbortOnError  Unsigned8
	MessageBody   SML_MessageBody
	CRC16         Unsigned16
	EndOfSmlMsg   EndOfSmlMsg
}

func (*SML_Message) DecodeSML

func (m *SML_Message) DecodeSML(val tlv.Value) error

type SML_MessageBody

type SML_MessageBody Choice

func (*SML_MessageBody) DecodeSML

func (m *SML_MessageBody) DecodeSML(val tlv.Value) error

type SML_PublicClose_Req

type SML_PublicClose_Req struct {
	GlobalSignature Optional[SML_Signature]
}

func (*SML_PublicClose_Req) DecodeSML

func (pcr *SML_PublicClose_Req) DecodeSML(val tlv.Value) error

type SML_PublicClose_Res

type SML_PublicClose_Res struct {
	GlobalSignature Optional[SML_Signature]
}

func (*SML_PublicClose_Res) DecodeSML

func (pcr *SML_PublicClose_Res) DecodeSML(val tlv.Value) error

type SML_PublicOpen_Req

type SML_PublicOpen_Req struct {
	CodePage   Optional[OctetString]
	ClientID   OctetString
	ReqFileID  OctetString
	ServerID   Optional[OctetString]
	Username   Optional[OctetString]
	Password   Optional[OctetString]
	SMLVersion Optional[Unsigned8]
}

func (*SML_PublicOpen_Req) DecodeSML

func (por *SML_PublicOpen_Req) DecodeSML(val tlv.Value) error

type SML_PublicOpen_Res

type SML_PublicOpen_Res struct {
	CodePage   Optional[OctetString]
	ClientID   Optional[OctetString]
	ReqFileID  OctetString
	ServerID   OctetString
	RefTime    Optional[SML_Time]
	SMLVersion Optional[Unsigned8]
}

func (*SML_PublicOpen_Res) DecodeSML

func (por *SML_PublicOpen_Res) DecodeSML(val tlv.Value) error

type SML_Signature

type SML_Signature OctetString

func (*SML_Signature) DecodeSML

func (s *SML_Signature) DecodeSML(val tlv.Value) error

func (SML_Signature) MarshalJSON

func (s SML_Signature) MarshalJSON() ([]byte, error)

type SML_Status

type SML_Status ImplicitChoice

func (*SML_Status) DecodeSML

func (s *SML_Status) DecodeSML(val tlv.Value) error

type SML_Time

type SML_Time Choice

func (*SML_Time) DecodeSML

func (t *SML_Time) DecodeSML(val tlv.Value) error

type SML_Timestamp

type SML_Timestamp Unsigned32

func (*SML_Timestamp) DecodeSML

func (ts *SML_Timestamp) DecodeSML(val tlv.Value) error

type SML_TimestampLocal

type SML_TimestampLocal struct {
	Timestamp        SML_Timestamp
	LocalOffset      Integer16
	SeasonTimeOffset Integer16
}

func (*SML_TimestampLocal) DecodeSML

func (tsl *SML_TimestampLocal) DecodeSML(val tlv.Value) error

type SML_Unit

type SML_Unit Unsigned8

func (*SML_Unit) DecodeSML

func (u *SML_Unit) DecodeSML(val tlv.Value) error

type SML_Value

type SML_Value ImplicitChoice

func (*SML_Value) DecodeSML

func (v *SML_Value) DecodeSML(val tlv.Value) error

type Unsigned8

type Unsigned8 uint8

func (*Unsigned8) DecodeSML

func (i *Unsigned8) DecodeSML(val tlv.Value) error

type Unsigned16

type Unsigned16 uint16

func (*Unsigned16) DecodeSML

func (i *Unsigned16) DecodeSML(val tlv.Value) error

type Unsigned32

type Unsigned32 uint32

func (*Unsigned32) DecodeSML

func (i *Unsigned32) DecodeSML(val tlv.Value) error

type Unsigned64

type Unsigned64 uint64

func (*Unsigned64) DecodeSML

func (i *Unsigned64) DecodeSML(val tlv.Value) error

Jump to

Keyboard shortcuts

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