objects

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: GPL-2.0 Imports: 29 Imported by: 0

Documentation

Overview

--------------------------------------------------------------------------

Gurux Ltd

Filename: $HeadURL$

Version: $Revision$,

$Date$
$Author$

---------------------------------------------------------------------------

DESCRIPTION

This file is a part of Gurux Device Framework.

Gurux Device Framework is Open Source software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. Gurux Device Framework is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

More information of Gurux products: https://www.gurux.org

This code is licensed under the GNU General Public License v2. Full text may be retrieved at http://www.gnu.org/licenses/gpl-2.0.txt ---------------------------------------------------------------------------

Package objects implements all DLMS/COSEM classes and their behaviour required by the protocol. Each file in this package corresponds to a COSEM interface class (e.g. Association, Clock, ActivityCalendar, etc.). Types defined here provide helpers for encoding/decoding attribute and method values, handling actions, and serialising object instances to/from byte streams.

Consumers of the higher‑level client and server APIs generally work with these types indirectly; however the package is public to allow advanced users to construct custom objects, extend the library with vendor‑specific classes, or inspect values at a low level.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateLogicalName

func ValidateLogicalName(ln string) error

ValidateLogicalName returns the validate logical name. ln: Logical name to validate.

Returns:
    Error if logical name is invalid.

Types

type AdjacentCell added in v1.0.3

type AdjacentCell struct {
	// CellID os Cell ID in hex format.
	CellID uint32

	// SignalQuality defines signal quality.
	SignalQuality uint8
}

type GXApplicationContextName

type GXApplicationContextName struct {
	JointIsoCtt uint8

	Country uint8

	CountryName uint16

	IdentifiedOrganization uint8

	DlmsUA uint8

	ApplicationContext uint8

	ContextID enums.ApplicationContextName
}

func (*GXApplicationContextName) String

func (g *GXApplicationContextName) String() string

type GXAuthenticationMechanismName

type GXAuthenticationMechanismName struct {
	JointIsoCtt uint8

	Country uint8

	CountryName uint16

	IdentifiedOrganization uint8

	DlmsUA uint8

	AuthenticationMechanismName uint8

	MechanismID enums.Authentication
}

func (*GXAuthenticationMechanismName) String

String returns string presentation of GXAuthenticationMechanismName struct.

type GXBroadcastFrameCounter added in v1.0.8

type GXBroadcastFrameCounter struct {
	// Client ID.
	ClientID uint8

	// Counter.
	Counter uint32

	// Time stamp.
	TimeStamp types.GXDateTime
}

GXBroadcastFrameCounter contains information from the kast received frame counter and client identification.

type GXCaptureTime added in v1.0.8

type GXCaptureTime struct {
	// Attribute ID.
	AttributeID uint8
	// Time stamp.
	TimeStamp types.GXDateTime
}

GXCaptureTime is the last changed value.

type GXChargePerUnitScaling added in v1.0.6

type GXChargePerUnitScaling struct {
	// CommodityScale contains commodity scale.
	CommodityScale int8
	// PriceScale contains price scale.
	PriceScale int8
}

GXChargePerUnitScaling contains information from charge per unit scaling.

type GXChargeTable added in v1.0.6

type GXChargeTable struct {
	// Index.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	Index string

	// Charge per unit.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	ChargePerUnit int16
}

GXChargeTable contains charge table information. Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge

type GXCoapBtCounter added in v1.0.8

type GXCoapBtCounter struct {
	BlockWiseTransferStarted   uint32
	BlockWiseTransferCompleted uint32
	BlockWiseTransferTimeout   uint32
}

GXCoapBtCounter contains block transfer counters.

type GXCoapCaptureTime added in v1.0.8

type GXCoapCaptureTime struct {
	AttributeID uint8
	TimeStamp   types.GXDateTime
}

GXCoapCaptureTime contains capture timestamp and source attribute ID.

type GXCoapMessagesCounter added in v1.0.8

type GXCoapMessagesCounter struct {
	Tx               uint32
	Rx               uint32
	TxResend         uint32
	TxReset          uint32
	RxReset          uint32
	TxAck            uint32
	RxAck            uint32
	RxDrop           uint32
	TxNonPiggybacked uint32
	MaxRtxExceeded   uint32
}

GXCoapMessagesCounter contains CoAP message counters.

type GXCoapRequestResponseCounter added in v1.0.8

type GXCoapRequestResponseCounter struct {
	RxRequests    uint32
	TxRequests    uint32
	RxResponse    uint32
	TxResponse    uint32
	TxClientError uint32
	RxClientError uint32
	TxServerError uint32
	RxServerError uint32
}

GXCoapRequestResponseCounter contains CoAP request/response counters.

type GXCommodity added in v1.0.6

type GXCommodity struct {
	// Executed object
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	Target IGXDLMSBase

	// Attribute index.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	Index int8
}

Commodity. Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge

type GXCreditChargeConfiguration added in v1.0.3

type GXCreditChargeConfiguration struct {
	CreditReference string

	ChargeReference string

	CollectionConfiguration enums.CreditCollectionConfiguration
}

type GXCurrency added in v1.0.3

type GXCurrency struct {
	// Currency name.
	Name string

	// Currency scale.
	Scale int8

	// Currency unit.
	Unit enums.Currency
}

GXCurrency includes information from the used currency.

type GXDLMSAccount added in v1.0.3

type GXDLMSAccount struct {
	GXDLMSObject
	// Payment mode.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	PaymentMode enums.PaymentMode

	// Account status.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	AccountStatus enums.AccountStatus

	// Index into the credit reference list indicating which Credit object is In use
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	CurrentCreditInUse uint8

	// Current credit status.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	CurrentCreditStatus enums.AccountCreditStatus

	// The available_credit attribute is the sum of the positive current credit amount values in the instances of the Credit class.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	AvailableCredit int32

	// Amount to clear.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	AmountToClear int32

	// Conjunction with the amount to clear, and is included in the description of that attribute.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	ClearanceThreshold int32

	// Simple sum of total_amount_remaining of all the Charge objects which are listed in the Account object.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	AggregatedDebt int32

	// Credit references.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	CreditReferences []string

	// Charge references.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	ChargeReferences []string

	// Credit charge configurations
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	CreditChargeConfigurations []GXCreditChargeConfiguration

	// Token gateway configurations.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	TokenGatewayConfigurations []GXTokenGatewayConfiguration

	// Account activation time.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	AccountActivationTime types.GXDateTime

	// Account closure time.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	AccountClosureTime types.GXDateTime

	// Currency settings.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	Currency GXCurrency

	// Low credit threshold.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	LowCreditThreshold int32

	// Next credit available threshold.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	NextCreditAvailableThreshold int32

	// Max provision.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	MaxProvision uint16

	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount
	MaxProvisionPeriod int32
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAccount

func NewGXDLMSAccount added in v1.0.3

func NewGXDLMSAccount(ln string, sn int16) (*GXDLMSAccount, error)

NewGXDLMSAccount creates a new Account object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSAccount) Activate added in v1.0.3

func (g *GXDLMSAccount) Activate(client IGXDLMSClient) ([][]uint8, error)

Activate returns the activate account.

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSAccount) Base added in v1.0.3

func (g *GXDLMSAccount) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSAccount) Close added in v1.0.3

func (g *GXDLMSAccount) Close(client IGXDLMSClient) ([][]uint8, error)

Close returns the close account.

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSAccount) GetAttributeCount added in v1.0.3

func (g *GXDLMSAccount) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSAccount) GetAttributeIndexToRead added in v1.0.3

func (g *GXDLMSAccount) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSAccount) GetDataType added in v1.0.3

func (g *GXDLMSAccount) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSAccount) GetMethodCount added in v1.0.3

func (g *GXDLMSAccount) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSAccount) GetMethodNames added in v1.0.3

func (g *GXDLMSAccount) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSAccount) GetNames added in v1.0.3

func (g *GXDLMSAccount) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSAccount) GetUIDataType added in v1.0.3

func (g *GXDLMSAccount) GetUIDataType(index int) enums.DataType

GetUIDataType returns the UI data type of selected index.

Parameters:

index: Attribute index of the object.

Returns:

UI data type of the object.

func (*GXDLMSAccount) GetValue added in v1.0.3

func (g *GXDLMSAccount) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSAccount) GetValues added in v1.0.3

func (g *GXDLMSAccount) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSAccount) Invoke added in v1.0.3

func (g *GXDLMSAccount) Invoke(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) ([]byte, error)

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSAccount) Load added in v1.0.3

func (g *GXDLMSAccount) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSAccount) LoadCreditChargeConfigurations added in v1.0.3

func (g *GXDLMSAccount) LoadCreditChargeConfigurations(reader *GXXmlReader, list []GXCreditChargeConfiguration) error

func (*GXDLMSAccount) LoadReferences added in v1.0.3

func (g *GXDLMSAccount) LoadReferences(reader *GXXmlReader, name string, list []string) error

func (*GXDLMSAccount) LoadTokenGatewayConfigurations added in v1.0.3

func (g *GXDLMSAccount) LoadTokenGatewayConfigurations(reader *GXXmlReader, list []GXTokenGatewayConfiguration) error

func (*GXDLMSAccount) PostLoad added in v1.0.3

func (g *GXDLMSAccount) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSAccount) Reset added in v1.0.3

func (g *GXDLMSAccount) Reset(client IGXDLMSClient) ([][]uint8, error)

Reset returns the reset account.

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSAccount) Save added in v1.0.3

func (g *GXDLMSAccount) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSAccount) SaveCreditChargeConfigurations added in v1.0.3

func (g *GXDLMSAccount) SaveCreditChargeConfigurations(writer *GXXmlWriter, list []GXCreditChargeConfiguration) error

func (*GXDLMSAccount) SaveReferences added in v1.0.3

func (g *GXDLMSAccount) SaveReferences(writer *GXXmlWriter, list []string, name string) error

func (*GXDLMSAccount) SaveTokenGatewayConfigurations added in v1.0.3

func (g *GXDLMSAccount) SaveTokenGatewayConfigurations(writer *GXXmlWriter, list []GXTokenGatewayConfiguration) error

func (*GXDLMSAccount) SetValue added in v1.0.3

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSActionItem

type GXDLMSActionItem struct {
	// Script logical name.
	LogicalName string

	// Script selector.
	ScriptSelector uint16
}

func (*GXDLMSActionItem) String

func (g *GXDLMSActionItem) String() string

type GXDLMSActionSchedule

type GXDLMSActionSchedule struct {
	GXDLMSObject
	// Script to execute.
	Target *GXDLMSScriptTable

	ExecutedScriptLogicalName string

	// Zero based script index to execute.
	ExecutedScriptSelector uint16

	Type enums.SingleActionScheduleType

	ExecutionTime []types.GXDateTime
}

GXDLMSActionSchedule represents the DLMS Action Schedule object. Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSActionSchedule

func NewGXDLMSActionSchedule

func NewGXDLMSActionSchedule(ln string, sn int16) (*GXDLMSActionSchedule, error)

NewGXDLMSActionSchedule creates a new Action Schedule object instance.

The var attributes []int` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSActionSchedule) Base

Base returns the base GXDLMSObject of the object.

func (*GXDLMSActionSchedule) GetAttributeCount

func (g *GXDLMSActionSchedule) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSActionSchedule) GetAttributeIndexToRead

func (g *GXDLMSActionSchedule) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSActionSchedule) GetDataType

func (g *GXDLMSActionSchedule) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSActionSchedule) GetMethodCount

func (g *GXDLMSActionSchedule) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSActionSchedule) GetMethodNames

func (g *GXDLMSActionSchedule) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSActionSchedule) GetNames

func (g *GXDLMSActionSchedule) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSActionSchedule) GetValue

func (*GXDLMSActionSchedule) GetValues

func (g *GXDLMSActionSchedule) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSActionSchedule) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSActionSchedule) Load

func (g *GXDLMSActionSchedule) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSActionSchedule) PostLoad

func (g *GXDLMSActionSchedule) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSActionSchedule) Save

func (g *GXDLMSActionSchedule) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSActionSchedule) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSActionSet added in v1.0.2

type GXDLMSActionSet struct {
	ActionUp GXDLMSActionItem

	ActionDown GXDLMSActionItem
}

type GXDLMSActivityCalendar

type GXDLMSActivityCalendar struct {
	GXDLMSObject
	CalendarNameActive string

	SeasonProfileActive []GXDLMSSeasonProfile

	WeekProfileTableActive []GXDLMSWeekProfile

	DayProfileTableActive []GXDLMSDayProfile

	CalendarNamePassive string

	SeasonProfilePassive []GXDLMSSeasonProfile

	WeekProfileTablePassive []GXDLMSWeekProfile

	DayProfileTablePassive []GXDLMSDayProfile

	// Activate Passive Calendar Time.
	Time types.GXDateTime
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSActivityCalendar

func NewGXDLMSActivityCalendar

func NewGXDLMSActivityCalendar(ln string, sn int16) (*GXDLMSActivityCalendar, error)

NewGXDLMSActivityCalendar creates a new activity calendar object instance.

`ln` is the Logical Name and `sn` is the Short Name of the object. The function validates `ln` before creating the object and an error is returned if the logical name is invalid per COSEM rules.

func (*GXDLMSActivityCalendar) ActivatePassiveCalendar

func (g *GXDLMSActivityCalendar) ActivatePassiveCalendar(client IGXDLMSClient) ([][]byte, error)

ActivatePassiveCalendar returns the this method copies all passive parameter to the active parameter.

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSActivityCalendar) Base

Base returns the base GXDLMSObject of the object.

func (*GXDLMSActivityCalendar) GetAttributeCount

func (g *GXDLMSActivityCalendar) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSActivityCalendar) GetAttributeIndexToRead

func (g *GXDLMSActivityCalendar) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSActivityCalendar) GetDataType

func (g *GXDLMSActivityCalendar) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSActivityCalendar) GetDayProfileTable

func (g *GXDLMSActivityCalendar) GetDayProfileTable(settings *settings.GXDLMSSettings, target []GXDLMSDayProfile) ([]byte, error)

func (*GXDLMSActivityCalendar) GetMethodCount

func (g *GXDLMSActivityCalendar) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSActivityCalendar) GetMethodNames

func (g *GXDLMSActivityCalendar) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSActivityCalendar) GetNames

func (g *GXDLMSActivityCalendar) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSActivityCalendar) GetSeasonProfile

func (g *GXDLMSActivityCalendar) GetSeasonProfile(settings *settings.GXDLMSSettings, target []GXDLMSSeasonProfile, useOctetString bool) (any, error)

GetSeasonProfile returns the get season profile bytes.

Parameters:

settings: DLMS settings.
target: Season profile array.
useOctetString: Is date time send as octet string.

func (*GXDLMSActivityCalendar) GetUIDataType

func (g *GXDLMSActivityCalendar) GetUIDataType(index int) enums.DataType

GetUIDataType returns the UI data type of selected index.

Parameters:

index: Attribute index of the object.

Returns:

UI data type of the object.

func (*GXDLMSActivityCalendar) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSActivityCalendar) GetValues

func (g *GXDLMSActivityCalendar) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSActivityCalendar) GetWeekProfileTable

func (g *GXDLMSActivityCalendar) GetWeekProfileTable(settings *settings.GXDLMSSettings, target []GXDLMSWeekProfile) ([]byte, error)

func (*GXDLMSActivityCalendar) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSActivityCalendar) Load

func (g *GXDLMSActivityCalendar) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSActivityCalendar) LoadDayProfileTable

func (g *GXDLMSActivityCalendar) LoadDayProfileTable(reader *GXXmlReader, name string) ([]GXDLMSDayProfile, error)

func (*GXDLMSActivityCalendar) LoadSeasonProfile

func (g *GXDLMSActivityCalendar) LoadSeasonProfile(reader *GXXmlReader, name string) ([]GXDLMSSeasonProfile, error)

func (*GXDLMSActivityCalendar) LoadWeekProfileTable

func (g *GXDLMSActivityCalendar) LoadWeekProfileTable(reader *GXXmlReader, name string) ([]GXDLMSWeekProfile, error)

func (*GXDLMSActivityCalendar) PostLoad

func (g *GXDLMSActivityCalendar) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSActivityCalendar) Save

func (g *GXDLMSActivityCalendar) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSActivityCalendar) SaveDayProfileTable

func (g *GXDLMSActivityCalendar) SaveDayProfileTable(writer *GXXmlWriter, list []GXDLMSDayProfile, name string) error

func (*GXDLMSActivityCalendar) SaveSeasonProfile

func (g *GXDLMSActivityCalendar) SaveSeasonProfile(writer *GXXmlWriter, list []GXDLMSSeasonProfile, name string) error

func (*GXDLMSActivityCalendar) SaveWeekProfileTable

func (g *GXDLMSActivityCalendar) SaveWeekProfileTable(writer *GXXmlWriter, list []GXDLMSWeekProfile, name string) error

func (*GXDLMSActivityCalendar) SetDayProfileTable

func (g *GXDLMSActivityCalendar) SetDayProfileTable(settings *settings.GXDLMSSettings, value any) ([]GXDLMSDayProfile, error)

func (*GXDLMSActivityCalendar) SetSeasonProfile

func (g *GXDLMSActivityCalendar) SetSeasonProfile(settings *settings.GXDLMSSettings, value any) ([]GXDLMSSeasonProfile, error)

func (*GXDLMSActivityCalendar) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

func (*GXDLMSActivityCalendar) SetWeekProfileTable

func (g *GXDLMSActivityCalendar) SetWeekProfileTable(settings *settings.GXDLMSSettings, value any) ([]GXDLMSWeekProfile, error)

type GXDLMSArbitrator added in v1.0.8

type GXDLMSArbitrator struct {
	GXDLMSObject
	Actions                 []GXDLMSActionItem
	PermissionsTable        []string
	WeightingsTable         [][]uint16
	MostRecentRequestsTable []string
	LastOutcome             uint8
}

GXDLMSArbitrator represents DLMS arbitrator object.

func NewGXDLMSArbitrator added in v1.0.8

func NewGXDLMSArbitrator(ln string, sn int16) (*GXDLMSArbitrator, error)

NewGXDLMSArbitrator creates a new arbitrator object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSArbitrator) Base added in v1.0.8

func (g *GXDLMSArbitrator) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSArbitrator) GetAttributeCount added in v1.0.8

func (g *GXDLMSArbitrator) GetAttributeCount() int

func (*GXDLMSArbitrator) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSArbitrator) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSArbitrator) GetDataType added in v1.0.8

func (g *GXDLMSArbitrator) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSArbitrator) GetMethodCount added in v1.0.8

func (g *GXDLMSArbitrator) GetMethodCount() int

func (*GXDLMSArbitrator) GetMethodNames added in v1.0.8

func (g *GXDLMSArbitrator) GetMethodNames() []string

func (*GXDLMSArbitrator) GetNames added in v1.0.8

func (g *GXDLMSArbitrator) GetNames() []string

func (*GXDLMSArbitrator) GetValue added in v1.0.8

func (*GXDLMSArbitrator) GetValues added in v1.0.8

func (g *GXDLMSArbitrator) GetValues() []any

func (*GXDLMSArbitrator) Invoke added in v1.0.8

func (*GXDLMSArbitrator) Load added in v1.0.8

func (g *GXDLMSArbitrator) Load(reader *GXXmlReader) error

func (*GXDLMSArbitrator) PostLoad added in v1.0.8

func (g *GXDLMSArbitrator) PostLoad(reader *GXXmlReader) error

func (*GXDLMSArbitrator) RequestAction added in v1.0.8

func (g *GXDLMSArbitrator) RequestAction(client IGXDLMSClient, actor uint8, actions string) ([][]byte, error)

func (*GXDLMSArbitrator) Reset added in v1.0.8

func (g *GXDLMSArbitrator) Reset(client IGXDLMSClient) ([][]byte, error)

func (*GXDLMSArbitrator) Save added in v1.0.8

func (g *GXDLMSArbitrator) Save(writer *GXXmlWriter) error

func (*GXDLMSArbitrator) SetValue added in v1.0.8

type GXDLMSArrayManager added in v1.0.8

type GXDLMSArrayManager struct {
	GXDLMSObject
	Elements []GXDLMSArrayManagerItem
}

GXDLMSArrayManager controls managed array objects.

func NewGXDLMSArrayManager added in v1.0.8

func NewGXDLMSArrayManager(ln string, sn int16) (*GXDLMSArrayManager, error)

NewGXDLMSArrayManager creates a new array manager object instance.

func (*GXDLMSArrayManager) Base added in v1.0.8

func (g *GXDLMSArrayManager) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSArrayManager) GetAttributeCount added in v1.0.8

func (g *GXDLMSArrayManager) GetAttributeCount() int

func (*GXDLMSArrayManager) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSArrayManager) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSArrayManager) GetDataType added in v1.0.8

func (g *GXDLMSArrayManager) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSArrayManager) GetMethodCount added in v1.0.8

func (g *GXDLMSArrayManager) GetMethodCount() int

func (*GXDLMSArrayManager) GetMethodNames added in v1.0.8

func (g *GXDLMSArrayManager) GetMethodNames() []string

func (*GXDLMSArrayManager) GetNames added in v1.0.8

func (g *GXDLMSArrayManager) GetNames() []string

func (*GXDLMSArrayManager) GetValue added in v1.0.8

func (*GXDLMSArrayManager) GetValues added in v1.0.8

func (g *GXDLMSArrayManager) GetValues() []any

func (*GXDLMSArrayManager) InsertEntry added in v1.0.8

func (g *GXDLMSArrayManager) InsertEntry(client IGXDLMSClient, id uint8, index uint16, entry any) ([][]byte, error)

InsertEntry inserts a new entry.

func (*GXDLMSArrayManager) Invoke added in v1.0.8

func (*GXDLMSArrayManager) Load added in v1.0.8

func (g *GXDLMSArrayManager) Load(reader *GXXmlReader) error

func (*GXDLMSArrayManager) NumberOfEntries added in v1.0.8

func (g *GXDLMSArrayManager) NumberOfEntries(client IGXDLMSClient, id uint8) ([][]byte, error)

NumberOfEntries returns the number of entries in the target array.

func (*GXDLMSArrayManager) ParseEntries added in v1.0.8

func (g *GXDLMSArrayManager) ParseEntries(reply *types.GXByteBuffer) (types.GXArray, error)

ParseEntries parses entries from meter reply.

func (*GXDLMSArrayManager) ParseNumberOfEntries added in v1.0.8

func (g *GXDLMSArrayManager) ParseNumberOfEntries(reply []byte) (int, error)

ParseNumberOfEntries parses entry count from meter reply.

func (*GXDLMSArrayManager) ParseNumberOfEntriesFromBuffer added in v1.0.8

func (g *GXDLMSArrayManager) ParseNumberOfEntriesFromBuffer(reply *types.GXByteBuffer) (int, error)

ParseNumberOfEntriesFromBuffer parses entry count from meter reply buffer.

func (*GXDLMSArrayManager) PostLoad added in v1.0.8

func (g *GXDLMSArrayManager) PostLoad(reader *GXXmlReader) error

func (*GXDLMSArrayManager) RemoveEntries added in v1.0.8

func (g *GXDLMSArrayManager) RemoveEntries(client IGXDLMSClient, id uint8, from uint16, to uint16) ([][]byte, error)

RemoveEntries removes entries from the given range.

func (*GXDLMSArrayManager) RetrieveEntries added in v1.0.8

func (g *GXDLMSArrayManager) RetrieveEntries(client IGXDLMSClient, id uint8, from uint16, to uint16) ([][]byte, error)

RetrieveEntries returns entries from the given range.

func (*GXDLMSArrayManager) Save added in v1.0.8

func (g *GXDLMSArrayManager) Save(writer *GXXmlWriter) error

func (*GXDLMSArrayManager) SetValue added in v1.0.8

func (*GXDLMSArrayManager) UpdateEntry added in v1.0.8

func (g *GXDLMSArrayManager) UpdateEntry(client IGXDLMSClient, id uint8, index uint16, entry any) ([][]byte, error)

UpdateEntry updates an entry.

type GXDLMSArrayManagerItem added in v1.0.8

type GXDLMSArrayManagerItem struct {
	ID      uint8
	Element *GXDLMSTargetObject
}

GXDLMSArrayManagerItem maps an ID to an array target.

type GXDLMSAssociationLogicalName

type GXDLMSAssociationLogicalName struct {
	GXDLMSObject

	// Is this association including other association views.
	MultipleAssociationViews bool

	ObjectList GXDLMSObjectCollection

	// Contains the identifiers of the COSEM client APs within the physical devices hosting these APs,
	// which belong to the AA modelled by the Association LN object.
	ClientSAP int8

	// Contains the identifiers of the COSEM server (logical device) APs within the physical
	// devices hosting these APs, which belong to the AA modelled by the Association LN object.
	ServerSAP uint16

	ApplicationContextName GXApplicationContextName

	XDLMSContextInfo GXxDLMSContextType

	AuthenticationMechanismName GXAuthenticationMechanismName

	// Low Level Security secret.
	Secret []byte

	AssociationStatus enums.AssociationStatus

	SecuritySetupReference string

	UserList []*types.GXKeyValuePair[byte, string]

	CurrentUser *types.GXKeyValuePair[byte, string]
	// contains filtered or unexported fields
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAssociationLogicalName

func NewGXDLMSAssociationLogicalName

func NewGXDLMSAssociationLogicalName(ln string, sn int16) (*GXDLMSAssociationLogicalName, error)

NewGXDLMSAssociationLogicalName creates a new association logical name object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSAssociationLogicalName) AddObject

func (g *GXDLMSAssociationLogicalName) AddObject(client IGXDLMSClient, obj IGXDLMSBase) ([][]byte, error)

AddObject returns the add object to object list.

Parameters:

client: DLMS client.
obj: COSEM object.

Returns:

Action bytes.

func (*GXDLMSAssociationLogicalName) AddUser

func (g *GXDLMSAssociationLogicalName) AddUser(client IGXDLMSClient, id uint8, name string) ([][]byte, error)

AddUser returns the add user to user list.

Parameters:

client: DLMS client.
id: User ID.
name: User name.

Returns:

Action bytes.

func (*GXDLMSAssociationLogicalName) Base

Base returns the base GXDLMSObject of the object.

func (*GXDLMSAssociationLogicalName) GetAccessRights

func (*GXDLMSAssociationLogicalName) GetAttributeAccess

func (g *GXDLMSAssociationLogicalName) GetAttributeAccess(target IGXDLMSBase, attributeIndex int) int

GetAttributeAccess returns the default attribute access mode for the selected object.

Parameters:

target: target object.
attributeIndex: Attribute index.

Returns:

Default access mode.

func (*GXDLMSAssociationLogicalName) GetAttributeCount

func (g *GXDLMSAssociationLogicalName) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSAssociationLogicalName) GetAttributeIndexToRead

func (g *GXDLMSAssociationLogicalName) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSAssociationLogicalName) GetDataType

func (g *GXDLMSAssociationLogicalName) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type_ of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type_ of the object.

func (*GXDLMSAssociationLogicalName) GetMethodCount

func (g *GXDLMSAssociationLogicalName) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSAssociationLogicalName) GetMethodNames

func (g *GXDLMSAssociationLogicalName) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSAssociationLogicalName) GetNames

func (g *GXDLMSAssociationLogicalName) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSAssociationLogicalName) GetObjectAccess

func (g *GXDLMSAssociationLogicalName) GetObjectAccess(target IGXDLMSBase, index int) enums.AccessMode

GetObjectAccess returns the access mode for given object.

Parameters:

target: COSEM object.
index: Attribute index.

Returns:

Access mode.

func (*GXDLMSAssociationLogicalName) GetObjectAccess3

func (g *GXDLMSAssociationLogicalName) GetObjectAccess3(target IGXDLMSBase, index int) enums.AccessMode3

GetAccess3 returns the access mode for given object.

Parameters:

target: COSEM object.
index: Attribute index.

Returns:

Access mode.

func (*GXDLMSAssociationLogicalName) GetObjectMethodAccess

func (g *GXDLMSAssociationLogicalName) GetObjectMethodAccess(target IGXDLMSBase, index int) enums.MethodAccessMode

GetMethodAccess returns the method access mode for given object.

Parameters:

target: COSEM object.
index: Attribute index.

Returns:

Method access mode.

func (*GXDLMSAssociationLogicalName) GetObjectMethodAccess3

func (g *GXDLMSAssociationLogicalName) GetObjectMethodAccess3(target IGXDLMSBase, index int) enums.MethodAccessMode3

GetMethodAccess3 returns the method access mode for given object.

Parameters:

target: COSEM object.
index: Attribute index.

Returns:

Method access mode.

func (*GXDLMSAssociationLogicalName) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSAssociationLogicalName) GetValues

func (g *GXDLMSAssociationLogicalName) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSAssociationLogicalName) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSAssociationLogicalName) IsAccessRightSet

func (g *GXDLMSAssociationLogicalName) IsAccessRightSet(target IGXDLMSBase) bool

IsAccessRightSet returns the are access right sets for the given object.

Parameters:

target: Target object.

func (*GXDLMSAssociationLogicalName) Load

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSAssociationLogicalName) PostLoad

func (g *GXDLMSAssociationLogicalName) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSAssociationLogicalName) RemoveObject

func (g *GXDLMSAssociationLogicalName) RemoveObject(client IGXDLMSClient, obj IGXDLMSBase) ([][]byte, error)

RemoveObject returns the remove object from object list.

Parameters:

client: DLMS client.
obj: COSEM object.

Returns:

Action bytes.

func (*GXDLMSAssociationLogicalName) RemoveUser

func (g *GXDLMSAssociationLogicalName) RemoveUser(client IGXDLMSClient, id uint8, name string) ([][]byte, error)

RemoveUser returns the remove user from user list.

Parameters:

client: DLMS client.
id: User ID.
name: User name.

Returns:

Action bytes.

func (*GXDLMSAssociationLogicalName) Save

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSAssociationLogicalName) SetAccess

func (g *GXDLMSAssociationLogicalName) SetAccess(target IGXDLMSBase, index int, access enums.AccessMode)

SetAccess returns the sets access mode for given object.

Parameters:

target: COSEM object.
index: Attribute index.
access: Access mode.

func (*GXDLMSAssociationLogicalName) SetAccess3

func (g *GXDLMSAssociationLogicalName) SetAccess3(target IGXDLMSBase, index int, access enums.AccessMode3)

SetAccess3 returns the sets access mode for given object.

Parameters:

target: COSEM object.
index: Attribute index.
access: Access mode.

func (*GXDLMSAssociationLogicalName) SetAccess3Array

func (g *GXDLMSAssociationLogicalName) SetAccess3Array(target IGXDLMSBase, access []enums.AccessMode3) error

SetAccess3 returns the sets access mode for given object.

Parameters:

target: COSEM object.
access: Access modes.

func (*GXDLMSAssociationLogicalName) SetAccessArray

func (g *GXDLMSAssociationLogicalName) SetAccessArray(target IGXDLMSBase, access []enums.AccessMode) error

SetAccessArray returns the sets access mode for given object.

Parameters:

target: COSEM object.
access: Access modes.

func (*GXDLMSAssociationLogicalName) SetDefaultAccess

func (g *GXDLMSAssociationLogicalName) SetDefaultAccess(mode enums.AccessMode) error

SetDefaultAccess returns the update default access mode for all objects in the association view. Server can use this to set default access mode for all the objects.

Parameters:

mode: Defaule method access mode.

func (*GXDLMSAssociationLogicalName) SetDefaultAccess3

func (g *GXDLMSAssociationLogicalName) SetDefaultAccess3(mode enums.AccessMode3) error

SetDefaultAccess3 returns the update default access mode for all objects in the association view. Server can use this to set default access mode for all the objects.

Parameters:

mode: Defaule method access mode.

func (*GXDLMSAssociationLogicalName) SetDefaultMethodAccess

func (g *GXDLMSAssociationLogicalName) SetDefaultMethodAccess(mode enums.MethodAccessMode) error

SetDefaultMethodAccess returns the update default method access mode for all objects. Server can use this to set default access mode for all the objects.

Parameters:

mode: Defaule method access mode.

func (*GXDLMSAssociationLogicalName) SetDefaultMethodAccess3

func (g *GXDLMSAssociationLogicalName) SetDefaultMethodAccess3(mode enums.MethodAccessMode3) error

SetDefaultMethodAccess3 returns the update default method access mode for all objects. Server can use this to set default access mode for all the objects.

Parameters:

mode: Defaule method access mode.

func (*GXDLMSAssociationLogicalName) SetMethodAccess3

func (g *GXDLMSAssociationLogicalName) SetMethodAccess3(target IGXDLMSBase, access []enums.MethodAccessMode3) error

SetMethodAccess3 returns the sets method access mode for given object.

Parameters:

target: COSEM object.
access: Method access modes.

func (*GXDLMSAssociationLogicalName) SetMethodAccessArray

func (g *GXDLMSAssociationLogicalName) SetMethodAccessArray(target IGXDLMSBase, access []enums.MethodAccessMode) error

SetMethodAccess returns the sets method access mode for given object.

Parameters:

target: COSEM object.
access: Method access modes.

func (*GXDLMSAssociationLogicalName) SetObjectMethodAccess

func (g *GXDLMSAssociationLogicalName) SetObjectMethodAccess(target IGXDLMSBase, index int, access enums.MethodAccessMode)

SetMethodAccess returns the sets method access mode for given object.

Parameters:

target: COSEM object.
index: Attribute index.
access: Method access mode.

func (*GXDLMSAssociationLogicalName) SetObjectMethodAccess3

func (g *GXDLMSAssociationLogicalName) SetObjectMethodAccess3(target IGXDLMSBase, index int, access enums.MethodAccessMode3) error

SetMethodAccess3 returns the sets method access mode for given object.

Parameters:

target: COSEM object.
index: Attribute index.
access: Method access mode.

func (*GXDLMSAssociationLogicalName) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

func (*GXDLMSAssociationLogicalName) String

String produces logical or Short Name of DLMS object.

func (*GXDLMSAssociationLogicalName) UpdateAccessRights

func (g *GXDLMSAssociationLogicalName) UpdateAccessRights(obj IGXDLMSBase, buff types.GXStructure)

func (*GXDLMSAssociationLogicalName) UpdateObjectList

func (g *GXDLMSAssociationLogicalName) UpdateObjectList(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs)

func (*GXDLMSAssociationLogicalName) UpdateSecret

func (g *GXDLMSAssociationLogicalName) UpdateSecret(client IGXDLMSClient) ([][]byte, error)

UpdateSecret returns the updates secret.

Parameters:

client: DLMS client.

Returns:

Action bytes.

type GXDLMSAssociationShortName

type GXDLMSAssociationShortName struct {
	GXDLMSObject
	// Secret used in Authentication
	Secret []byte

	// List of available objects in short name referencing.
	ObjectList GXDLMSObjectCollection

	// Security setup reference.
	SecuritySetupReference string
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAssociationShortName

func NewGXDLMSAssociationShortName

func NewGXDLMSAssociationShortName(ln string, sn int16) (*GXDLMSAssociationShortName, error)

NewGXDLMSAssociationShortName creates a new association short name object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSAssociationShortName) Base

Base returns the base GXDLMSObject of the object.

func (*GXDLMSAssociationShortName) GetAttributeCount

func (g *GXDLMSAssociationShortName) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSAssociationShortName) GetAttributeIndexToRead

func (g *GXDLMSAssociationShortName) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSAssociationShortName) GetDataType

func (g *GXDLMSAssociationShortName) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type_ of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type_ of the object.

func (*GXDLMSAssociationShortName) GetMethodCount

func (g *GXDLMSAssociationShortName) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSAssociationShortName) GetMethodNames

func (g *GXDLMSAssociationShortName) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSAssociationShortName) GetNames

func (g *GXDLMSAssociationShortName) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSAssociationShortName) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSAssociationShortName) GetValues

func (g *GXDLMSAssociationShortName) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSAssociationShortName) Invoke

func (*GXDLMSAssociationShortName) Load

func (g *GXDLMSAssociationShortName) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSAssociationShortName) PostLoad

func (g *GXDLMSAssociationShortName) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSAssociationShortName) Save

func (g *GXDLMSAssociationShortName) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSAssociationShortName) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSAutoAnswer

type GXDLMSAutoAnswer struct {
	GXDLMSObject
	Mode enums.AutoAnswerMode

	ListeningWindow []types.GXKeyValuePair[types.GXDateTime, types.GXDateTime]

	Status enums.AutoAnswerStatus

	NumberOfCalls uint8

	// Number of rings within the window defined by ListeningWindow.
	NumberOfRingsInListeningWindow uint8

	// Number of rings outside the window defined by ListeningWindow.
	NumberOfRingsOutListeningWindow uint8

	// Number of rings outside the window defined by ListeningWindow.
	AllowedCallers []types.GXKeyValuePair[string, enums.CallType]
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAutoAnswer

func NewGXDLMSAutoAnswer

func NewGXDLMSAutoAnswer(ln string, sn int16) (*GXDLMSAutoAnswer, error)

NewGXDLMSAutoAnswer creates a new auto answer object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSAutoAnswer) Base

func (g *GXDLMSAutoAnswer) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSAutoAnswer) GetAttributeCount

func (g *GXDLMSAutoAnswer) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSAutoAnswer) GetAttributeIndexToRead

func (g *GXDLMSAutoAnswer) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSAutoAnswer) GetDataType

func (g *GXDLMSAutoAnswer) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSAutoAnswer) GetMethodCount

func (g *GXDLMSAutoAnswer) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSAutoAnswer) GetMethodNames

func (g *GXDLMSAutoAnswer) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSAutoAnswer) GetNames

func (g *GXDLMSAutoAnswer) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSAutoAnswer) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSAutoAnswer) GetValues

func (g *GXDLMSAutoAnswer) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSAutoAnswer) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSAutoAnswer) Load

func (g *GXDLMSAutoAnswer) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSAutoAnswer) PostLoad

func (g *GXDLMSAutoAnswer) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSAutoAnswer) Save

func (g *GXDLMSAutoAnswer) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSAutoAnswer) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSAutoConnect

type GXDLMSAutoConnect struct {
	GXDLMSObject

	// Defines the mode controlling the auto dial functionality concerning the
	// timing, the message type to be sent and the infrastructure to be used.
	Mode enums.AutoConnectMode

	// The maximum number of trials in the case of unsuccessful dialling attempts.
	Repetitions uint8

	// The time delay, expressed in seconds until an unsuccessful dial attempt can be repeated.
	RepetitionDelay uint16

	// Contains the start and end date/time stamp when the window becomes active.
	CallingWindow []types.GXKeyValuePair[types.GXDateTime, types.GXDateTime]

	// Contains the list of destinations (for example phone numbers, email
	// addresses or their combinations) where the message(s) have to be sent
	// under certain conditions. The conditions and their link to the elements of
	// the array are not defined here.
	Destinations []string
	// contains filtered or unexported fields
}

Auto Connect implements data transfer from the device to one or several destinations. Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSAutoConnect

func NewGXDLMSAutoConnect

func NewGXDLMSAutoConnect(ln string, sn int16) (*GXDLMSAutoConnect, error)

NewGXDLMSAutoConnect creates a new auto connect object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSAutoConnect) Base

func (g *GXDLMSAutoConnect) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSAutoConnect) Connect

func (g *GXDLMSAutoConnect) Connect(client IGXDLMSClient) ([][]byte, error)

Connect returns the initiates the connection process.

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSAutoConnect) GetAttributeCount

func (g *GXDLMSAutoConnect) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSAutoConnect) GetAttributeIndexToRead

func (g *GXDLMSAutoConnect) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSAutoConnect) GetDataType

func (g *GXDLMSAutoConnect) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSAutoConnect) GetMethodCount

func (g *GXDLMSAutoConnect) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSAutoConnect) GetMethodNames

func (g *GXDLMSAutoConnect) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSAutoConnect) GetNames

func (g *GXDLMSAutoConnect) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSAutoConnect) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSAutoConnect) GetValues

func (g *GXDLMSAutoConnect) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSAutoConnect) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSAutoConnect) Load

func (g *GXDLMSAutoConnect) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSAutoConnect) PostLoad

func (g *GXDLMSAutoConnect) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSAutoConnect) Save

func (g *GXDLMSAutoConnect) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSAutoConnect) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSBroadcastLogTable added in v1.0.8

type GXDLMSBroadcastLogTable struct {
	SourceAddress  uint16
	SequenceNumber uint8
	ValidTime      uint16
}

type GXDLMSCaptureObject

type GXDLMSCaptureObject struct {
	// Attribute Index of DLMS object in the profile generic table.
	AttributeIndex int

	// Data index of DLMS object in the profile generic table.
	DataIndex uint16

	// Restriction element for compact or push data.
	Restriction GXDLMSRestriction

	// Push data columns.
	Columns []types.GXKeyValuePair[IGXDLMSBase, GXDLMSCaptureObject]
}

func NewGXDLMSCaptureObject

func NewGXDLMSCaptureObject(attributeIndex int, dataIndex uint16) *GXDLMSCaptureObject

NewGXDLMSCaptureObject creates a new instance of GXDLMSCaptureObject.

type GXDLMSCertificateCollection

type GXDLMSCertificateCollection []*GXDLMSCertificateInfo

Certificate info.

func (*GXDLMSCertificateCollection) Clear

func (g *GXDLMSCertificateCollection) Clear()

Clear removes all certificates from the collection.

func (*GXDLMSCertificateCollection) Find

Find returns the find certificate with given parameters.

Parameters:

entity: Certificate entity.
type: Certificate type.
systemtitle: System title.

type GXDLMSCertificateInfo

type GXDLMSCertificateInfo struct {

	// Used certificate entity.
	Entity enums.CertificateEntity

	// Used certificate type.
	Type enums.CertificateType

	// Certificate serial number.
	SerialNumber *big.Int

	// Certificate issuer.
	Issuer string

	// Certificate subject.
	Subject string

	// Certificate subject alt name.
	SubjectAltName string
	// contains filtered or unexported fields
}

Certificate info.

type GXDLMSCharge added in v1.0.6

type GXDLMSCharge struct {
	GXDLMSObject
	// Total amount paid
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	TotalAmountPaid int32

	// Charge type.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	ChargeType enums.ChargeType

	// Priority.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	Priority uint8

	// Unit charge active.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	UnitChargeActive GXUnitCharge

	// Unit charge passive.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	UnitChargePassive GXUnitCharge

	// Unit charge activation time.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	UnitChargeActivationTime types.GXDateTime

	// Period.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	Period uint32

	// Charge configuration,
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	ChargeConfiguration enums.ChargeConfiguration

	// Last collection time.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	LastCollectionTime types.GXDateTime

	// Last collection amount.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	LastCollectionAmount int32

	// Total amount remaining.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	TotalAmountRemaining int32

	// Proportion.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	Proportion uint16
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge

func NewGXDLMSCharge added in v1.0.6

func NewGXDLMSCharge(ln string, sn int16) (*GXDLMSCharge, error)

NewGXDLMSCharge creates a new Charge object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSCharge) Base added in v1.0.6

func (g *GXDLMSCharge) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSCharge) GetAttributeCount added in v1.0.6

func (g *GXDLMSCharge) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSCharge) GetAttributeIndexToRead added in v1.0.6

func (g *GXDLMSCharge) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSCharge) GetDataType added in v1.0.6

func (g *GXDLMSCharge) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSCharge) GetMethodCount added in v1.0.6

func (g *GXDLMSCharge) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSCharge) GetMethodNames added in v1.0.6

func (g *GXDLMSCharge) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSCharge) GetNames added in v1.0.6

func (g *GXDLMSCharge) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSCharge) GetUIDataType added in v1.0.6

func (g *GXDLMSCharge) GetUIDataType(index int) enums.DataType

GetUIDataType returns the UI data type of selected index.

Parameters:

index: Attribute index of the object.

Returns:

UI data type of the object.

func (*GXDLMSCharge) GetUnitCharge added in v1.0.6

func (g *GXDLMSCharge) GetUnitCharge(settings *settings.GXDLMSSettings, charge *GXUnitCharge) ([]byte, error)

func (*GXDLMSCharge) GetValue added in v1.0.6

func (g *GXDLMSCharge) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSCharge) GetValues added in v1.0.6

func (g *GXDLMSCharge) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSCharge) Invoke added in v1.0.6

func (g *GXDLMSCharge) Invoke(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) ([]byte, error)

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSCharge) Load added in v1.0.6

func (g *GXDLMSCharge) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSCharge) LoadUnitChargeActive added in v1.0.6

func (g *GXDLMSCharge) LoadUnitChargeActive(reader *GXXmlReader,
	name string,
	charge *GXUnitCharge) error

func (*GXDLMSCharge) PostLoad added in v1.0.6

func (g *GXDLMSCharge) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSCharge) Save added in v1.0.6

func (g *GXDLMSCharge) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSCharge) SaveUnitCharge added in v1.0.6

func (g *GXDLMSCharge) SaveUnitCharge(writer *GXXmlWriter, name string, charge *GXUnitCharge) error

func (*GXDLMSCharge) SetUnitCharge added in v1.0.6

func (g *GXDLMSCharge) SetUnitCharge(charge *GXUnitCharge, value any, objects *GXDLMSObjectCollection) error

func (*GXDLMSCharge) SetValue added in v1.0.6

func (g *GXDLMSCharge) SetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) error

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSClock

type GXDLMSClock struct {
	GXDLMSObject
	// Time of COSEM Clock object.
	Time types.GXDateTime

	// TimeZone of COSEM Clock object.
	TimeZone int16

	// Status of COSEM Clock object.
	Status enums.ClockStatus

	Begin types.GXDateTime

	End types.GXDateTime

	Deviation int8

	// Is summer time enabled.
	Enabled bool

	// Clock base of COSEM Clock object.
	ClockBase enums.ClockBase
}

Online help: https://www.gurux.fi/Gurux.types.Objects.GXDLMSClock

func NewGXDLMSClock

func NewGXDLMSClock(ln string, sn int16) (*GXDLMSClock, error)

NewGXDLMSClock creates a new clock object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSClock) AdjustToMeasuringPeriod

func (g *GXDLMSClock) AdjustToMeasuringPeriod(client IGXDLMSClient) ([][]byte, error)

AdjustToMeasuringPeriod returns the sets the meter's time to the nearest (+/-) starting point of a measuring period.

func (*GXDLMSClock) AdjustToMinute

func (g *GXDLMSClock) AdjustToMinute(client IGXDLMSClient) ([][]byte, error)

AdjustToMinute returns the sets the meter's time to the nearest minute. If second_counter lower 30 s, so second_counter is set to 0. If second_counter higher 30 s, so second_counter is set to 0, and minute_counter and all depending clock values are incremented if necessary.

func (*GXDLMSClock) AdjustToPresetTime

func (g *GXDLMSClock) AdjustToPresetTime(client IGXDLMSClient) ([][]byte, error)

AdjustToPresetTime returns the this Method is used in conjunction with the preset_adjusting_time Method. If the meter's time lies between validity_interval_start and validity_interval_end, then time is set to preset_time.

func (*GXDLMSClock) AdjustToQuarter

func (g *GXDLMSClock) AdjustToQuarter(client IGXDLMSClient) ([][]byte, error)

AdjustToQuarter returns the sets the meter's time to the nearest (+/-) quarter of an hour value (*:00, *:15, *:30, *:45).

func (*GXDLMSClock) Base

func (g *GXDLMSClock) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSClock) GetAttributeCount

func (g *GXDLMSClock) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSClock) GetAttributeIndexToRead

func (g *GXDLMSClock) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSClock) GetDataType

func (g *GXDLMSClock) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSClock) GetMethodCount

func (g *GXDLMSClock) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSClock) GetMethodNames

func (g *GXDLMSClock) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSClock) GetNames

func (g *GXDLMSClock) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSClock) GetUIDataType

func (g *GXDLMSClock) GetUIDataType(index int) enums.DataType

GetUIDataType returns the UI data type of selected index.

Parameters:

index: Attribute index of the object.

Returns:

UI data type of the object.

func (*GXDLMSClock) GetValue

func (g *GXDLMSClock) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSClock) GetValues

func (g *GXDLMSClock) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSClock) Invoke

func (g *GXDLMSClock) Invoke(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) ([]byte, error)

func (*GXDLMSClock) Load

func (g *GXDLMSClock) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSClock) PostLoad

func (g *GXDLMSClock) PostLoad(reader *GXXmlReader) error

func (*GXDLMSClock) PresetAdjustingTime

func (g *GXDLMSClock) PresetAdjustingTime(client IGXDLMSClient, presetTime *time.Time, validityIntervalStart *time.Time, validityIntervalEnd *time.Time) ([][]byte, error)

PresetAdjustingTime returns the presets the time to a new value (preset_time) and defines a validity_interval within which the new time can be activated.

func (*GXDLMSClock) Save

func (g *GXDLMSClock) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSClock) SetValue

func (g *GXDLMSClock) SetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) error

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

func (*GXDLMSClock) ShiftTime

func (g *GXDLMSClock) ShiftTime(client IGXDLMSClient, time int) ([][]byte, error)

ShiftTime returns the shifts the time by n (-900 <= n <= 900) s.

type GXDLMSCoAPDiagnostic added in v1.0.8

type GXDLMSCoAPDiagnostic struct {
	GXDLMSObject
	MessagesCounter        GXCoapMessagesCounter
	RequestResponseCounter GXCoapRequestResponseCounter
	BtCounter              GXCoapBtCounter
	CaptureTime            GXCoapCaptureTime
}

GXDLMSCoAPDiagnostic contains CoAP diagnostic counters.

func NewGXDLMSCoAPDiagnostic added in v1.0.8

func NewGXDLMSCoAPDiagnostic(ln string, sn int16) (*GXDLMSCoAPDiagnostic, error)

NewGXDLMSCoAPDiagnostic creates a new CoAP diagnostic object instance.

func (*GXDLMSCoAPDiagnostic) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSCoAPDiagnostic) GetAttributeCount added in v1.0.8

func (g *GXDLMSCoAPDiagnostic) GetAttributeCount() int

func (*GXDLMSCoAPDiagnostic) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSCoAPDiagnostic) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSCoAPDiagnostic) GetDataType added in v1.0.8

func (g *GXDLMSCoAPDiagnostic) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSCoAPDiagnostic) GetMethodCount added in v1.0.8

func (g *GXDLMSCoAPDiagnostic) GetMethodCount() int

func (*GXDLMSCoAPDiagnostic) GetMethodNames added in v1.0.8

func (g *GXDLMSCoAPDiagnostic) GetMethodNames() []string

func (*GXDLMSCoAPDiagnostic) GetNames added in v1.0.8

func (g *GXDLMSCoAPDiagnostic) GetNames() []string

func (*GXDLMSCoAPDiagnostic) GetValue added in v1.0.8

func (*GXDLMSCoAPDiagnostic) GetValues added in v1.0.8

func (g *GXDLMSCoAPDiagnostic) GetValues() []any

func (*GXDLMSCoAPDiagnostic) Invoke added in v1.0.8

func (*GXDLMSCoAPDiagnostic) Load added in v1.0.8

func (g *GXDLMSCoAPDiagnostic) Load(reader *GXXmlReader) error

func (*GXDLMSCoAPDiagnostic) PostLoad added in v1.0.8

func (g *GXDLMSCoAPDiagnostic) PostLoad(reader *GXXmlReader) error

func (*GXDLMSCoAPDiagnostic) Reset added in v1.0.8

func (g *GXDLMSCoAPDiagnostic) Reset(client IGXDLMSClient) ([][]byte, error)

Reset resets diagnostic values in the server.

func (*GXDLMSCoAPDiagnostic) Save added in v1.0.8

func (g *GXDLMSCoAPDiagnostic) Save(writer *GXXmlWriter) error

func (*GXDLMSCoAPDiagnostic) SetValue added in v1.0.8

type GXDLMSCoAPSetup added in v1.0.8

type GXDLMSCoAPSetup struct {
	GXDLMSObject
	UdpReference       *GXDLMSTcpUdpSetup
	AckTimeout         uint16
	AckRandomFactor    uint16
	MaxRetransmit      uint16
	NStart             uint16
	DelayAckTimeout    uint16
	ExponentialBackOff uint16
	ProbingRate        uint16
	CoAPUriPath        string
	TransportMode      enums.TransportMode
	WrapperVersion     any
	TokenLength        uint8
}

GXDLMSCoAPSetup contains CoAP setup parameters.

func NewGXDLMSCoAPSetup added in v1.0.8

func NewGXDLMSCoAPSetup(ln string, sn int16) (*GXDLMSCoAPSetup, error)

NewGXDLMSCoAPSetup creates a new CoAP setup object instance.

func (*GXDLMSCoAPSetup) Base added in v1.0.8

func (g *GXDLMSCoAPSetup) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSCoAPSetup) GetAttributeCount added in v1.0.8

func (g *GXDLMSCoAPSetup) GetAttributeCount() int

func (*GXDLMSCoAPSetup) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSCoAPSetup) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSCoAPSetup) GetDataType added in v1.0.8

func (g *GXDLMSCoAPSetup) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSCoAPSetup) GetMethodCount added in v1.0.8

func (g *GXDLMSCoAPSetup) GetMethodCount() int

func (*GXDLMSCoAPSetup) GetMethodNames added in v1.0.8

func (g *GXDLMSCoAPSetup) GetMethodNames() []string

func (*GXDLMSCoAPSetup) GetNames added in v1.0.8

func (g *GXDLMSCoAPSetup) GetNames() []string

func (*GXDLMSCoAPSetup) GetValue added in v1.0.8

func (g *GXDLMSCoAPSetup) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

func (*GXDLMSCoAPSetup) GetValues added in v1.0.8

func (g *GXDLMSCoAPSetup) GetValues() []any

func (*GXDLMSCoAPSetup) Invoke added in v1.0.8

func (*GXDLMSCoAPSetup) Load added in v1.0.8

func (g *GXDLMSCoAPSetup) Load(reader *GXXmlReader) error

func (*GXDLMSCoAPSetup) PostLoad added in v1.0.8

func (g *GXDLMSCoAPSetup) PostLoad(reader *GXXmlReader) error

func (*GXDLMSCoAPSetup) Save added in v1.0.8

func (g *GXDLMSCoAPSetup) Save(writer *GXXmlWriter) error

func (*GXDLMSCoAPSetup) SetValue added in v1.0.8

type GXDLMSCommunicationPortProtection

type GXDLMSCommunicationPortProtection struct {
	GXDLMSObject
	// Controls the protection mode.
	ProtectionMode enums.ProtectionMode

	// Number of allowed failed communication attempts before port is disabled.
	AllowedFailedAttempts uint16

	// The lockout time.
	InitialLockoutTime uint32

	// Holds a factor that controls how the lockout time is increased with
	// each failed attempt.
	SteepnessFactor uint8

	// The lockout time.
	MaxLockoutTime uint32

	// The communication port being protected
	Port IGXDLMSBase

	// Current protection status.
	ProtectionStatus enums.ProtectionStatus

	// Failed attempts.
	FailedAttempts uint32

	// Total failed attempts.
	CumulativeFailedAttempts uint32
}

Represents a DLMS/COSEM Communication Port Protection object that manages access control and lockout mechanisms for a communication port based on failed authentication attempts. This class provides configuration and status information for communication port protection, including lockout timing, allowed failed attempts, and the current protection status. It is typically used in metering or device management scenarios to prevent unauthorized access by disabling the port after a configurable number of failed attempts. The protection behavior can be customized using properties such as ProtectionMode, AllowedFailedAttempts, and SteepnessFactor. The associated port is referenced via the Port property. Online help: https://www.gurux.fi/Gurux.internal.Objects.GXDLMSCommunicationPortProtection

func NewGXDLMSCommunicationPortProtection

func NewGXDLMSCommunicationPortProtection(ln string, sn int16) (*GXDLMSCommunicationPortProtection, error)

NewGXDLMSCommunicationPortProtection creates a new communication port protection object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSCommunicationPortProtection) Base

Base returns the base GXDLMSObject of the object.

func (*GXDLMSCommunicationPortProtection) GetAttributeCount

func (g *GXDLMSCommunicationPortProtection) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSCommunicationPortProtection) GetAttributeIndexToRead

func (g *GXDLMSCommunicationPortProtection) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSCommunicationPortProtection) GetDataType

func (g *GXDLMSCommunicationPortProtection) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSCommunicationPortProtection) GetMethodCount

func (g *GXDLMSCommunicationPortProtection) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSCommunicationPortProtection) GetMethodNames

func (g *GXDLMSCommunicationPortProtection) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSCommunicationPortProtection) GetNames

func (g *GXDLMSCommunicationPortProtection) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSCommunicationPortProtection) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSCommunicationPortProtection) GetValues

func (g *GXDLMSCommunicationPortProtection) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSCommunicationPortProtection) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSCommunicationPortProtection) Load

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSCommunicationPortProtection) PostLoad

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSCommunicationPortProtection) Reset

Reset returns the resets failed attempts and current lockout time to zero. Protection status is set to unlocked.

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSCommunicationPortProtection) Save

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSCommunicationPortProtection) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSContextInformationTable added in v1.0.8

type GXDLMSContextInformationTable struct {
	CID           string
	Context       []byte
	Compression   bool
	ValidLifetime uint16
}

type GXDLMSCredit added in v1.0.6

type GXDLMSCredit struct {
	GXDLMSObject
	// Current credit amount.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCredit
	CurrentCreditAmount int32

	// Type.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCredit
	Type enums.CreditType

	// Priority.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCredit
	Priority uint8

	// Warning threshold.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCredit
	WarningThreshold int32

	// Limit.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCredit
	Limit int32

	// Credit configuration.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCredit
	CreditConfiguration enums.CreditConfiguration

	// Status.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCredit
	Status enums.CreditStatus

	// Preset credit amount.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCredit
	PresetCreditAmount int32

	// Credit available threshold.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCredit
	CreditAvailableThreshold int32

	// Period.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCredit
	Period types.GXDateTime
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCredit

func NewGXDLMSCredit added in v1.0.6

func NewGXDLMSCredit(ln string, sn int16) (*GXDLMSCredit, error)

NewGXDLMSGXDLMSCredit creates a new Credit object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSCredit) Base added in v1.0.6

func (g *GXDLMSCredit) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSCredit) GetAttributeCount added in v1.0.6

func (g *GXDLMSCredit) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSCredit) GetAttributeIndexToRead added in v1.0.6

func (g *GXDLMSCredit) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSCredit) GetDataType added in v1.0.6

func (g *GXDLMSCredit) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSCredit) GetMethodCount added in v1.0.6

func (g *GXDLMSCredit) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSCredit) GetMethodNames added in v1.0.6

func (g *GXDLMSCredit) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSCredit) GetNames added in v1.0.6

func (g *GXDLMSCredit) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSCredit) GetUIDataType added in v1.0.6

func (g *GXDLMSCredit) GetUIDataType(index int) enums.DataType

GetUIDataType returns the UI data type of selected index.

Parameters:

index: Attribute index of the object.

Returns:

UI data type of the object.

func (*GXDLMSCredit) GetValue added in v1.0.6

func (g *GXDLMSCredit) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSCredit) GetValues added in v1.0.6

func (g *GXDLMSCredit) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSCredit) Invoke added in v1.0.6

func (g *GXDLMSCredit) Invoke(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) ([]byte, error)

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSCredit) InvokeCredit added in v1.0.6

func (g *GXDLMSCredit) InvokeCredit(client IGXDLMSClient, value enums.CreditStatus) ([][]uint8, error)

InvokeCredit returns the sets the value of the current credit amount attribute.

Parameters:

client: DLMS client.
value: Current credit amount

Returns:

Action bytes.

func (*GXDLMSCredit) Load added in v1.0.6

func (g *GXDLMSCredit) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSCredit) PostLoad added in v1.0.6

func (g *GXDLMSCredit) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSCredit) Save added in v1.0.6

func (g *GXDLMSCredit) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSCredit) SetAmountToValue added in v1.0.6

func (g *GXDLMSCredit) SetAmountToValue(client IGXDLMSClient, value int32) ([][]uint8, error)

SetAmountToValue returns the sets the value of the current credit amount attribute.

Parameters:

client: DLMS client.
value: Current credit amount

Returns:

Action bytes.

func (*GXDLMSCredit) SetValue added in v1.0.6

func (g *GXDLMSCredit) SetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) error

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

func (*GXDLMSCredit) UpdateAmount added in v1.0.6

func (g *GXDLMSCredit) UpdateAmount(client IGXDLMSClient, value int32) ([][]uint8, error)

UpdateAmount returns the adjusts the value of the current credit amount attribute.

Parameters:

client: DLMS client.
value: Current credit amount

Returns:

Action bytes.

type GXDLMSData

type GXDLMSData struct {
	GXDLMSObject
	// Value of COSEM Data object.
	Value any
}

GXDLMSData Online is available at:

https://www.gurux.fi/Gurux.internal.Objects.GXDLMSData

func NewGXDLMSData

func NewGXDLMSData(ln string, sn int16) (*GXDLMSData, error)

NewGXDLMSData creates a new data object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSData) Base

func (g *GXDLMSData) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSData) GetAttributeCount

func (g *GXDLMSData) GetAttributeCount() int

GetAttributeCount returns the returns amount of attributes.

Returns:
    Count of attributes.

func (*GXDLMSData) GetAttributeIndexToRead

func (g *GXDLMSData) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the returns collection of attributes to read.all: All items are returned even if they are read already.

Returns:
    Collection of attributes to read.

func (*GXDLMSData) GetDataType

func (g *GXDLMSData) GetDataType(index int) (enums.DataType, error)

GetDataType returns the returns device data type of selected attribute index.index: Attribute index of the object.

Returns:
    Device data type of the object.

func (*GXDLMSData) GetMethodCount

func (g *GXDLMSData) GetMethodCount() int

GetMethodCount returns the returns amount of methods.

Returns:

func (*GXDLMSData) GetMethodNames

func (g *GXDLMSData) GetMethodNames() []string

getMethodNames returns the returns names of method indexes.

func (*GXDLMSData) GetNames

func (g *GXDLMSData) GetNames() []string

GetNames returns the returns names of attribute indexes.

Returns:

func (*GXDLMSData) GetUIDataType

func (g *GXDLMSData) GetUIDataType(index int) enums.DataType

GetUIDataType returns UI data type of selected index. index: Attribute index of the object.

Returns:
    UseUI data type of the object.

func (*GXDLMSData) GetValue

func (g *GXDLMSData) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

GetValue returns the returns value of given attribute. settings: DLMS settings. e: Get parameters.

Returns:
    Value of the attribute index.

func (*GXDLMSData) GetValues

func (g *GXDLMSData) GetValues() []any

GetValues returns the returns attributes as an array.

Returns:
    Collection of COSEM object values.

func (*GXDLMSData) Invoke

func (g *GXDLMSData) Invoke(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) ([]byte, error)

func (*GXDLMSData) Load

func (g *GXDLMSData) Load(reader *GXXmlReader) error

Load returns the load object content from XML. reader: XML reader.

func (*GXDLMSData) PostLoad

func (g *GXDLMSData) PostLoad(reader *GXXmlReader) error

func (*GXDLMSData) Save

func (g *GXDLMSData) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.writer: XML writer.

func (*GXDLMSData) SetValue

func (g *GXDLMSData) SetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) error

setValue returns the set value of given attribute.settings: DLMS settings. e: Set parameters.

type GXDLMSDataProtectionAgreedKey added in v1.0.3

type GXDLMSDataProtectionAgreedKey struct {
	// Parameters includes key parameters.
	Parameters []byte
	// Data includes Key ciphered data.
	Data []byte
}

GXDLMSDataProtectionAgreedKey included data protection agreed key.

type GXDLMSDataProtectionIdentifiedKey added in v1.0.3

type GXDLMSDataProtectionIdentifiedKey struct {
	// Data protectionKey type.
	KeyType enums.DataProtectionIdentifiedKeyType
}

Data protection identified key.

type GXDLMSDataProtectionKey added in v1.0.3

type GXDLMSDataProtectionKey struct {
	// Data protection key type.
	DataProtectionKeyType enums.DataProtectionKeyType

	// Identified key parameters.
	IdentifiedKey GXDLMSDataProtectionIdentifiedKey

	// Wrapped key parameters.
	WrappedKey GXDLMSDataProtectionWrappeddKey

	// Agreed key parameters.
	AgreedKey GXDLMSDataProtectionAgreedKey
}

Data protection Key.

type GXDLMSDataProtectionWrappeddKey added in v1.0.3

type GXDLMSDataProtectionWrappeddKey struct {
	// Data protectionKey type.
	KeyType enums.DataProtectionWrappedKeyType
	// Key ciphered data.
	Key []byte
}

Data protection wrapped key.

type GXDLMSDayProfile

type GXDLMSDayProfile struct {
	// User defined identifier, identifying the currentday_profile.
	DayID uint8

	DaySchedules []GXDLMSDayProfileAction
}

Activity Calendar's Day profile is defined on the standard.

func (*GXDLMSDayProfile) String

func (g *GXDLMSDayProfile) String() string

type GXDLMSDayProfileAction

type GXDLMSDayProfileAction struct {
	// Defines the time when the script is to be executed.
	StartTime types.GXTime

	// Defines the logical name of the “Script table” object
	ScriptLogicalName string

	// Defines the script_identifier of the script to be executed.
	ScriptSelector uint16
}

Activity Calendar's Day Profile Action is defined on the standard.

func (*GXDLMSDayProfileAction) String

func (g *GXDLMSDayProfileAction) String() string

type GXDLMSDemandRegister

type GXDLMSDemandRegister struct {
	GXDLMSObject

	// Current average value of COSEM Data object.
	CurrentAverageValue any

	// Last average value of COSEM Data object.
	LastAverageValue any

	// Unit of COSEM Register object.
	Unit enums.Unit

	// Provides Demand register specific status information.
	Status any

	// Capture time of COSEM Register object.
	CaptureTime *types.GXDateTime

	// Current start time of COSEM Register object.
	StartTimeCurrent *types.GXDateTime

	// Period is the interval between two successive updates of the Last Average Value.
	// (NumberOfPeriods * Period is the denominator for the calculation of the demand).
	Period uint32

	// The number of periods used to calculate the LastAverageValue.
	// NumberOfPeriods >= 1 NumberOfPeriods > 1 indicates that the LastAverageValue represents �sliding demand�.
	// NumberOfPeriods = 1 indicates that the LastAverageValue represents "block demand".
	// The behaviour of the meter after writing a new value to this attribute shall be
	// specified by the manufacturer.
	NumberOfPeriods uint16
	// contains filtered or unexported fields
}

Online help: https://www.gurux.fi/Gurux.types.Objects.GXDLMSDemandRegister

func NewGXDLMSDemandRegister

func NewGXDLMSDemandRegister(ln string, sn int16) (*GXDLMSDemandRegister, error)

NewGXDLMSDemandRegister creates a new demand register object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSDemandRegister) Base

Base returns the base GXDLMSObject of the object.

func (*GXDLMSDemandRegister) GetAttributeCount

func (g *GXDLMSDemandRegister) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSDemandRegister) GetAttributeIndexToRead

func (g *GXDLMSDemandRegister) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSDemandRegister) GetDataType

func (g *GXDLMSDemandRegister) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSDemandRegister) GetMethodCount

func (g *GXDLMSDemandRegister) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSDemandRegister) GetMethodNames

func (g *GXDLMSDemandRegister) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSDemandRegister) GetNames

func (g *GXDLMSDemandRegister) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSDemandRegister) GetUIDataType

func (g *GXDLMSDemandRegister) GetUIDataType(index int) enums.DataType

GetUIDataType returns the UI data type of selected index.

Parameters:

index: Attribute index of the object.

Returns:

UI data type of the object.

func (*GXDLMSDemandRegister) GetValue

GetValue returns the returns value of given attribute. settings: DLMS settings. e: Get parameters.

Returns:
    Value of the attribute index.

func (*GXDLMSDemandRegister) GetValues

func (g *GXDLMSDemandRegister) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSDemandRegister) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSDemandRegister) IsRead

func (g *GXDLMSDemandRegister) IsRead(index int) bool

IsRead returns the is attribute read.

Parameters:

index: Attribute index to read.

Returns:

Returns true if attribute is read.

func (*GXDLMSDemandRegister) Load

func (g *GXDLMSDemandRegister) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSDemandRegister) NextPeriod

func (g *GXDLMSDemandRegister) NextPeriod(client IGXDLMSClient) ([][]uint8, error)

NextPeriod returns the closes the current period and starts a new one.

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSDemandRegister) PostLoad

func (g *GXDLMSDemandRegister) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSDemandRegister) Reset

func (g *GXDLMSDemandRegister) Reset(client IGXDLMSClient) ([][]uint8, error)

Reset returns the reset value.

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSDemandRegister) Save

func (g *GXDLMSDemandRegister) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSDemandRegister) Scaler

func (g *GXDLMSDemandRegister) Scaler() float64

Scaler returns the scaler of COSEM Register object.

func (*GXDLMSDemandRegister) SetScaler

func (g *GXDLMSDemandRegister) SetScaler(value float64)

SetScaler sets the scaler of COSEM Register object.

func (*GXDLMSDemandRegister) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSDisconnectControl

type GXDLMSDisconnectControl struct {
	GXDLMSObject
	// Output state of COSEM Disconnect Control object.
	OutputState bool

	// Output state of COSEM Disconnect Control object.
	ControlState enums.ControlState

	// Control mode of COSEM Disconnect Control object.
	ControlMode enums.ControlMode
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSDisconnectControl

func NewGXDLMSDisconnectControl

func NewGXDLMSDisconnectControl(ln string, sn int16) (*GXDLMSDisconnectControl, error)

NewGXDLMSDisconnectControl creates a new disconnect control object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSDisconnectControl) Base

Base returns the base GXDLMSObject of the object.

func (*GXDLMSDisconnectControl) GetAttributeCount

func (g *GXDLMSDisconnectControl) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSDisconnectControl) GetAttributeIndexToRead

func (g *GXDLMSDisconnectControl) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSDisconnectControl) GetDataType

func (g *GXDLMSDisconnectControl) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSDisconnectControl) GetMethodCount

func (g *GXDLMSDisconnectControl) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSDisconnectControl) GetMethodNames

func (g *GXDLMSDisconnectControl) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSDisconnectControl) GetNames

func (g *GXDLMSDisconnectControl) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSDisconnectControl) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSDisconnectControl) GetValues

func (g *GXDLMSDisconnectControl) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSDisconnectControl) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSDisconnectControl) Load

func (g *GXDLMSDisconnectControl) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSDisconnectControl) PostLoad

func (g *GXDLMSDisconnectControl) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSDisconnectControl) RemoteDisconnect

func (g *GXDLMSDisconnectControl) RemoteDisconnect(client IGXDLMSClient) ([][]uint8, error)

RemoteDisconnect returns the forces the disconnect control object into 'disconnected' state if remote disconnection is enabled(control mode > 0).

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSDisconnectControl) RemoteReconnect

func (g *GXDLMSDisconnectControl) RemoteReconnect(client IGXDLMSClient) ([][]uint8, error)

RemoteReconnect returns the forces the disconnect control object into the 'ready_for_reconnection' state if a direct remote reconnection is disabled(control_mode = 1, 3, 5, 6). Forces the disconnect control object into the 'connected' state if a direct remote reconnection is enabled(control_mode = 2, 4).

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSDisconnectControl) Save

func (g *GXDLMSDisconnectControl) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSDisconnectControl) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSEmergencyProfile

type GXDLMSEmergencyProfile struct {
	ID uint16

	ActivationTime types.GXDateTime

	Duration uint32
}

func (*GXDLMSEmergencyProfile) String

func (g *GXDLMSEmergencyProfile) String() string

type GXDLMSExtendedRegister

type GXDLMSExtendedRegister struct {
	GXDLMSObject

	// Unit of COSEM Register object.
	Unit enums.Unit

	// Value of COSEM Register object.
	Value any
	// Status
	Status any

	// Capture time.
	CaptureTime time.Time
	// contains filtered or unexported fields
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSExtendedRegister

func NewGXDLMSExtendedRegister added in v1.0.3

func NewGXDLMSExtendedRegister(ln string, sn int16) (*GXDLMSExtendedRegister, error)

NewGXDLMSExtendedRegister creates a new extended register object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSExtendedRegister) Base added in v1.0.10

Base returns the base GXDLMSObject of the object.

func (*GXDLMSExtendedRegister) GetAttributeCount

func (g *GXDLMSExtendedRegister) GetAttributeCount() int

func (*GXDLMSExtendedRegister) GetAttributeIndexToRead

func (g *GXDLMSExtendedRegister) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSExtendedRegister) GetDataType

func (g *GXDLMSExtendedRegister) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSExtendedRegister) GetMethodCount added in v1.0.10

func (g *GXDLMSExtendedRegister) GetMethodCount() int

GetMethodCount returns the returns amount of methods.

func (*GXDLMSExtendedRegister) GetMethodNames added in v1.0.10

func (g *GXDLMSExtendedRegister) GetMethodNames() []string

GetMethodNames returns the returns names of method indexes.

func (*GXDLMSExtendedRegister) GetNames

func (g *GXDLMSExtendedRegister) GetNames() []string

func (*GXDLMSExtendedRegister) GetUIDataType

func (g *GXDLMSExtendedRegister) GetUIDataType(index int) enums.DataType

func (*GXDLMSExtendedRegister) GetValue

func (*GXDLMSExtendedRegister) GetValues

func (g *GXDLMSExtendedRegister) GetValues() []any

func (*GXDLMSExtendedRegister) Invoke

func (*GXDLMSExtendedRegister) IsRead

func (g *GXDLMSExtendedRegister) IsRead(index int) bool

func (*GXDLMSExtendedRegister) Load

func (g *GXDLMSExtendedRegister) Load(reader *GXXmlReader) error

func (*GXDLMSExtendedRegister) PostLoad

func (g *GXDLMSExtendedRegister) PostLoad(reader *GXXmlReader) error

func (*GXDLMSExtendedRegister) Save

func (g *GXDLMSExtendedRegister) Save(writer *GXXmlWriter) error

func (*GXDLMSExtendedRegister) Scaler added in v1.0.10

func (g *GXDLMSExtendedRegister) Scaler() float64

Scaler returns the scaler of COSEM Register object.

func (*GXDLMSExtendedRegister) SetScaler added in v1.0.10

func (g *GXDLMSExtendedRegister) SetScaler(value float64)

SetScaler sets the scaler of COSEM Register object.

func (*GXDLMSExtendedRegister) SetValue

type GXDLMSFunctionControl added in v1.0.8

type GXDLMSFunctionControl struct {
	GXDLMSObject
	ActivationStatus []types.GXKeyValuePair[string, bool]
	FunctionList     []GXDLMSFunctionSpec
}

GXDLMSFunctionControl models Function control object.

func NewGXDLMSFunctionControl added in v1.0.8

func NewGXDLMSFunctionControl(ln string, sn int16) (*GXDLMSFunctionControl, error)

NewGXDLMSFunctionControl creates a new Function control object.

func (*GXDLMSFunctionControl) AddFunction added in v1.0.8

func (g *GXDLMSFunctionControl) AddFunction(client IGXDLMSClient, name string, objects []IGXDLMSBase) ([][]byte, error)

AddFunction adds or replaces a function definition.

func (*GXDLMSFunctionControl) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSFunctionControl) GetAttributeCount added in v1.0.8

func (g *GXDLMSFunctionControl) GetAttributeCount() int

func (*GXDLMSFunctionControl) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSFunctionControl) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSFunctionControl) GetDataType added in v1.0.8

func (g *GXDLMSFunctionControl) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSFunctionControl) GetMethodCount added in v1.0.8

func (g *GXDLMSFunctionControl) GetMethodCount() int

func (*GXDLMSFunctionControl) GetMethodNames added in v1.0.8

func (g *GXDLMSFunctionControl) GetMethodNames() []string

func (*GXDLMSFunctionControl) GetNames added in v1.0.8

func (g *GXDLMSFunctionControl) GetNames() []string

func (*GXDLMSFunctionControl) GetValue added in v1.0.8

func (*GXDLMSFunctionControl) GetValues added in v1.0.8

func (g *GXDLMSFunctionControl) GetValues() []any

func (*GXDLMSFunctionControl) Invoke added in v1.0.8

func (*GXDLMSFunctionControl) Load added in v1.0.8

func (g *GXDLMSFunctionControl) Load(reader *GXXmlReader) error

func (*GXDLMSFunctionControl) PostLoad added in v1.0.8

func (g *GXDLMSFunctionControl) PostLoad(reader *GXXmlReader) error

func (*GXDLMSFunctionControl) RemoveFunction added in v1.0.8

func (g *GXDLMSFunctionControl) RemoveFunction(client IGXDLMSClient, name string) ([][]byte, error)

RemoveFunction removes a function definition by name.

func (*GXDLMSFunctionControl) Save added in v1.0.8

func (g *GXDLMSFunctionControl) Save(writer *GXXmlWriter) error

func (*GXDLMSFunctionControl) SetFunctionStatus added in v1.0.8

func (g *GXDLMSFunctionControl) SetFunctionStatus(client IGXDLMSClient, functions []types.GXKeyValuePair[string, bool]) ([][]byte, error)

SetFunctionStatus sets activation status values for known function blocks.

func (*GXDLMSFunctionControl) SetValue added in v1.0.8

type GXDLMSFunctionSpec added in v1.0.8

type GXDLMSFunctionSpec struct {
	Name    string
	Objects []IGXDLMSBase
}

GXDLMSFunctionSpec maps a function name to a set of related COSEM objects.

type GXDLMSG3Plc6LoWPan added in v1.0.8

type GXDLMSG3Plc6LoWPan struct {
	GXDLMSObject
	MaxHops, WeakLqiValue, SecurityLevel uint8
	PrefixTable                          []uint8
	RoutingConfiguration                 []GXDLMSRoutingConfiguration
	BroadcastLogTableTtl                 uint16
	RoutingTable                         []GXDLMSRoutingTable
	ContextInformation                   []GXDLMSContextInformationTable
	BlacklistTable                       []types.GXKeyValuePair[uint16, uint16]
	BroadcastLogTable                    []GXDLMSBroadcastLogTable
	GroupTable                           []uint16
	MaxJoinWaitTime                      uint16
	PathDiscoveryTime, ActiveKeyIndex    uint8
	MetricType                           uint8
	CoordShortAddress                    uint16
	DisableDefaultRouting                bool
	DeviceType                           enums.DeviceType
	DefaultCoordRoute                    bool
	DestinationAddress                   []uint16
	LowLQI, HighLQI                      uint8
}

GXDLMSG3Plc6LoWPan models G3-PLC 6LoWPAN adaptation layer setup.

func NewGXDLMSG3Plc6LoWPan added in v1.0.8

func NewGXDLMSG3Plc6LoWPan(ln string, sn int16) (*GXDLMSG3Plc6LoWPan, error)

NewGXDLMSG3Plc6LoWPan creates a new G3-PLC 6LoWPAN setup object.

func (*GXDLMSG3Plc6LoWPan) Base added in v1.0.8

func (g *GXDLMSG3Plc6LoWPan) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSG3Plc6LoWPan) GetAttributeCount added in v1.0.8

func (g *GXDLMSG3Plc6LoWPan) GetAttributeCount() int

func (*GXDLMSG3Plc6LoWPan) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSG3Plc6LoWPan) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSG3Plc6LoWPan) GetDataType added in v1.0.8

func (g *GXDLMSG3Plc6LoWPan) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSG3Plc6LoWPan) GetMethodCount added in v1.0.8

func (g *GXDLMSG3Plc6LoWPan) GetMethodCount() int

func (*GXDLMSG3Plc6LoWPan) GetMethodNames added in v1.0.8

func (g *GXDLMSG3Plc6LoWPan) GetMethodNames() []string

func (*GXDLMSG3Plc6LoWPan) GetNames added in v1.0.8

func (g *GXDLMSG3Plc6LoWPan) GetNames() []string

func (*GXDLMSG3Plc6LoWPan) GetValue added in v1.0.8

func (*GXDLMSG3Plc6LoWPan) GetValues added in v1.0.8

func (g *GXDLMSG3Plc6LoWPan) GetValues() []any

func (*GXDLMSG3Plc6LoWPan) Invoke added in v1.0.8

func (*GXDLMSG3Plc6LoWPan) Load added in v1.0.8

func (g *GXDLMSG3Plc6LoWPan) Load(reader *GXXmlReader) error

func (*GXDLMSG3Plc6LoWPan) PostLoad added in v1.0.8

func (g *GXDLMSG3Plc6LoWPan) PostLoad(reader *GXXmlReader) error

func (*GXDLMSG3Plc6LoWPan) Save added in v1.0.8

func (g *GXDLMSG3Plc6LoWPan) Save(writer *GXXmlWriter) error

func (*GXDLMSG3Plc6LoWPan) SetValue added in v1.0.8

type GXDLMSG3PlcMacLayerCounters added in v1.0.8

type GXDLMSG3PlcMacLayerCounters struct {
	GXDLMSObject
	TxDataPacketCount    uint32
	RxDataPacketCount    uint32
	TxCmdPacketCount     uint32
	RxCmdPacketCount     uint32
	CSMAFailCount        uint32
	CSMANoAckCount       uint32
	BadCrcCount          uint32
	TxDataBroadcastCount uint32
	RxDataBroadcastCount uint32
}

GXDLMSG3PlcMacLayerCounters contains G3-PLC MAC layer statistic counters.

func NewGXDLMSG3PlcMacLayerCounters added in v1.0.8

func NewGXDLMSG3PlcMacLayerCounters(ln string, sn int16) (*GXDLMSG3PlcMacLayerCounters, error)

NewGXDLMSG3PlcMacLayerCounters creates a new G3-PLC MAC layer counters object.

func (*GXDLMSG3PlcMacLayerCounters) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSG3PlcMacLayerCounters) GetAttributeCount added in v1.0.8

func (g *GXDLMSG3PlcMacLayerCounters) GetAttributeCount() int

func (*GXDLMSG3PlcMacLayerCounters) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSG3PlcMacLayerCounters) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSG3PlcMacLayerCounters) GetDataType added in v1.0.8

func (g *GXDLMSG3PlcMacLayerCounters) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSG3PlcMacLayerCounters) GetMethodCount added in v1.0.8

func (g *GXDLMSG3PlcMacLayerCounters) GetMethodCount() int

func (*GXDLMSG3PlcMacLayerCounters) GetMethodNames added in v1.0.8

func (g *GXDLMSG3PlcMacLayerCounters) GetMethodNames() []string

func (*GXDLMSG3PlcMacLayerCounters) GetNames added in v1.0.8

func (g *GXDLMSG3PlcMacLayerCounters) GetNames() []string

func (*GXDLMSG3PlcMacLayerCounters) GetValue added in v1.0.8

func (*GXDLMSG3PlcMacLayerCounters) GetValues added in v1.0.8

func (g *GXDLMSG3PlcMacLayerCounters) GetValues() []any

func (*GXDLMSG3PlcMacLayerCounters) Invoke added in v1.0.8

func (*GXDLMSG3PlcMacLayerCounters) Load added in v1.0.8

func (*GXDLMSG3PlcMacLayerCounters) PostLoad added in v1.0.8

func (g *GXDLMSG3PlcMacLayerCounters) PostLoad(reader *GXXmlReader) error

func (*GXDLMSG3PlcMacLayerCounters) Reset added in v1.0.8

func (g *GXDLMSG3PlcMacLayerCounters) Reset(client IGXDLMSClient) ([][]byte, error)

Reset resets all MAC layer counters.

func (*GXDLMSG3PlcMacLayerCounters) Save added in v1.0.8

func (*GXDLMSG3PlcMacLayerCounters) SetValue added in v1.0.8

type GXDLMSG3PlcMacSetup added in v1.0.8

type GXDLMSG3PlcMacSetup struct {
	GXDLMSObject
	ShortAddress                 uint16
	RcCoord                      uint16
	PANId                        uint16
	KeyTable                     []types.GXKeyValuePair[byte, []byte]
	FrameCounter                 uint32
	ToneMask                     string
	TmrTtl                       uint8
	MaxFrameRetries              uint8
	NeighbourTableEntryTtl       uint8
	NeighbourTable               []GXDLMSNeighbourTable
	HighPriorityWindowSize       uint8
	CscmFairnessLimit            uint8
	BeaconRandomizationWindowLen uint8
	A                            uint8
	K                            uint8
	MinCwAttempts                uint8
	CenelecLegacyMode            uint8
	FccLegacyMode                uint8
	MaxBe                        uint8
	MaxCsmaBackoffs              uint8
	MinBe                        uint8
	MacBroadcastMaxCwEnabled     bool
	MacTransmitAtten             uint8
	MacPosTable                  []GXDLMSMacPosTable
	MacDuplicateDetectionTtl     uint8
}

GXDLMSG3PlcMacSetup models G3-PLC MAC setup.

func NewGXDLMSG3PlcMacSetup added in v1.0.8

func NewGXDLMSG3PlcMacSetup(ln string, sn int16) (*GXDLMSG3PlcMacSetup, error)

NewGXDLMSG3PlcMacSetup creates a new G3-PLC MAC setup object.

func (*GXDLMSG3PlcMacSetup) Base added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSG3PlcMacSetup) GetAttributeCount added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) GetAttributeCount() int

func (*GXDLMSG3PlcMacSetup) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSG3PlcMacSetup) GetDataType added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSG3PlcMacSetup) GetMethodCount added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) GetMethodCount() int

func (*GXDLMSG3PlcMacSetup) GetMethodNames added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) GetMethodNames() []string

func (*GXDLMSG3PlcMacSetup) GetNames added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) GetNames() []string

func (*GXDLMSG3PlcMacSetup) GetNeighbourTableEntry added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) GetNeighbourTableEntry(client IGXDLMSClient, address uint16) ([][]byte, error)

GetNeighbourTableEntry requests a neighbour table entry by short address.

func (*GXDLMSG3PlcMacSetup) GetPosTableEntry added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) GetPosTableEntry(client IGXDLMSClient, address uint16) ([][]byte, error)

GetPosTableEntry requests a POS table entry by short address.

func (*GXDLMSG3PlcMacSetup) GetValue added in v1.0.8

func (*GXDLMSG3PlcMacSetup) GetValues added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) GetValues() []any

func (*GXDLMSG3PlcMacSetup) Invoke added in v1.0.8

func (*GXDLMSG3PlcMacSetup) Load added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) Load(reader *GXXmlReader) error

func (*GXDLMSG3PlcMacSetup) ParseNeighbourTableEntry added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) ParseNeighbourTableEntry(reply *types.GXByteBuffer) ([]GXDLMSNeighbourTable, error)

ParseNeighbourTableEntry parses a raw method reply to neighbour table entries.

func (*GXDLMSG3PlcMacSetup) ParsePosTableEntry added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) ParsePosTableEntry(reply *types.GXByteBuffer) ([]GXDLMSMacPosTable, error)

ParsePosTableEntry parses a raw method reply to POS table entries.

func (*GXDLMSG3PlcMacSetup) PostLoad added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) PostLoad(reader *GXXmlReader) error

func (*GXDLMSG3PlcMacSetup) Save added in v1.0.8

func (g *GXDLMSG3PlcMacSetup) Save(writer *GXXmlWriter) error

func (*GXDLMSG3PlcMacSetup) SetValue added in v1.0.8

type GXDLMSGSMCellInfo added in v1.0.3

type GXDLMSGSMCellInfo struct {
	// Four byte cell ID.
	CellId uint32

	// Two byte location area code (LAC).
	LocationId uint16

	// Signal quality.
	SignalQuality uint8

	// Bit Error Rate.
	Ber uint8

	// Mobile Country Code.
	MobileCountryCode uint16

	// Mobile Network Code.
	MobileNetworkCode uint16

	// Absolute radio frequency channel number.
	ChannelNumber uint32
}

type GXDLMSGSMDiagnostic added in v1.0.3

type GXDLMSGSMDiagnostic struct {
	GXDLMSObject
	// Name of network operator.
	Operator string

	// Registration status of the modem.
	Status enums.GsmStatus

	// Registration status of the modem.
	CircuitSwitchStatus enums.GsmCircuitSwitchStatus

	// Registration status of the modem.
	PacketSwitchStatus enums.GsmPacketSwitchStatus

	// Registration status of the modem.
	CellInfo GXDLMSGSMCellInfo

	// Registration status of the modem.
	AdjacentCells []AdjacentCell

	// Date and time when the data have been last captured.
	CaptureTime types.GXDateTime
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSGSMDiagnostic

func NewGXDLMSGSMDiagnostic added in v1.0.3

func NewGXDLMSGSMDiagnostic(ln string, sn int16) (*GXDLMSGSMDiagnostic, error)

NewGXDLMGSMDiagnostic creates a new G S M Diagnostic object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSGSMDiagnostic) Base added in v1.0.3

func (g *GXDLMSGSMDiagnostic) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSGSMDiagnostic) GetAttributeCount added in v1.0.3

func (g *GXDLMSGSMDiagnostic) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSGSMDiagnostic) GetAttributeIndexToRead added in v1.0.3

func (g *GXDLMSGSMDiagnostic) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSGSMDiagnostic) GetDataType added in v1.0.3

func (g *GXDLMSGSMDiagnostic) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSGSMDiagnostic) GetMethodCount added in v1.0.3

func (g *GXDLMSGSMDiagnostic) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSGSMDiagnostic) GetMethodNames added in v1.0.3

func (g *GXDLMSGSMDiagnostic) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSGSMDiagnostic) GetNames added in v1.0.3

func (g *GXDLMSGSMDiagnostic) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSGSMDiagnostic) GetValue added in v1.0.3

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSGSMDiagnostic) GetValues added in v1.0.3

func (g *GXDLMSGSMDiagnostic) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSGSMDiagnostic) Invoke added in v1.0.3

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSGSMDiagnostic) Load added in v1.0.3

func (g *GXDLMSGSMDiagnostic) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSGSMDiagnostic) PostLoad added in v1.0.3

func (g *GXDLMSGSMDiagnostic) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSGSMDiagnostic) Save added in v1.0.3

func (g *GXDLMSGSMDiagnostic) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSGSMDiagnostic) SetValue added in v1.0.3

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSGprsSetup

type GXDLMSGprsSetup struct {
	GXDLMSObject
	APN string

	PINCode uint16

	DefaultQualityOfService GXDLMSQosElement

	RequestedQualityOfService GXDLMSQosElement
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSGprsSetup

func NewGXDLMSGprsSetup

func NewGXDLMSGprsSetup(ln string, sn int16) (*GXDLMSGprsSetup, error)

NewGXDLMSGprsSetup creates a new GPRS setup object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSGprsSetup) Base

func (g *GXDLMSGprsSetup) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSGprsSetup) GetAttributeCount

func (g *GXDLMSGprsSetup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSGprsSetup) GetAttributeIndexToRead

func (g *GXDLMSGprsSetup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSGprsSetup) GetDataType

func (g *GXDLMSGprsSetup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSGprsSetup) GetMethodCount

func (g *GXDLMSGprsSetup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSGprsSetup) GetMethodNames

func (g *GXDLMSGprsSetup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSGprsSetup) GetNames

func (g *GXDLMSGprsSetup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSGprsSetup) GetUIDataType

func (g *GXDLMSGprsSetup) GetUIDataType(index int) enums.DataType

GetUIDataType returns the UI data type of selected index.

Parameters:

index: Attribute index of the object.

Returns:

UI data type of the object.

func (*GXDLMSGprsSetup) GetValue

func (g *GXDLMSGprsSetup) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSGprsSetup) GetValues

func (g *GXDLMSGprsSetup) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSGprsSetup) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSGprsSetup) Load

func (g *GXDLMSGprsSetup) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSGprsSetup) PostLoad

func (g *GXDLMSGprsSetup) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSGprsSetup) Save

func (g *GXDLMSGprsSetup) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSGprsSetup) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSHdlcSetup

type GXDLMSHdlcSetup struct {
	GXDLMSObject

	CommunicationSpeed     enums.BaudRate
	InterCharachterTimeout uint16
	InactivityTimeout      uint16
	DeviceAddress          uint16
	// contains filtered or unexported fields
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSHdlcSetup

func NewGXDLMSHdlcSetup

func NewGXDLMSHdlcSetup(ln string, sn int16) (*GXDLMSHdlcSetup, error)

NewGXDLMSHdlcSetup creates a new HDLC setup object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSHdlcSetup) Base

func (g *GXDLMSHdlcSetup) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSHdlcSetup) GetAttributeCount

func (g *GXDLMSHdlcSetup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSHdlcSetup) GetAttributeIndexToRead

func (g *GXDLMSHdlcSetup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSHdlcSetup) GetDataType

func (g *GXDLMSHdlcSetup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSHdlcSetup) GetMethodCount

func (g *GXDLMSHdlcSetup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSHdlcSetup) GetMethodNames

func (g *GXDLMSHdlcSetup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSHdlcSetup) GetNames

func (g *GXDLMSHdlcSetup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSHdlcSetup) GetValue

func (g *GXDLMSHdlcSetup) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSHdlcSetup) GetValues

func (g *GXDLMSHdlcSetup) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSHdlcSetup) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSHdlcSetup) Load

func (g *GXDLMSHdlcSetup) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSHdlcSetup) MaximumInfoLengthReceive

func (g *GXDLMSHdlcSetup) MaximumInfoLengthReceive() uint16

func (*GXDLMSHdlcSetup) MaximumInfoLengthTransmit

func (g *GXDLMSHdlcSetup) MaximumInfoLengthTransmit() uint16

func (*GXDLMSHdlcSetup) PostLoad

func (g *GXDLMSHdlcSetup) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSHdlcSetup) Save

func (g *GXDLMSHdlcSetup) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSHdlcSetup) SetMaximumInfoLengthReceive

func (g *GXDLMSHdlcSetup) SetMaximumInfoLengthReceive(value uint16) error

func (*GXDLMSHdlcSetup) SetMaximumInfoLengthTransmit

func (g *GXDLMSHdlcSetup) SetMaximumInfoLengthTransmit(value uint16) error

func (*GXDLMSHdlcSetup) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

func (*GXDLMSHdlcSetup) SetWindowSizeReceive

func (g *GXDLMSHdlcSetup) SetWindowSizeReceive(value uint8) error

func (*GXDLMSHdlcSetup) SetWindowSizeTransmit

func (g *GXDLMSHdlcSetup) SetWindowSizeTransmit(value uint8) error

func (*GXDLMSHdlcSetup) WindowSizeReceive

func (g *GXDLMSHdlcSetup) WindowSizeReceive() uint8

func (*GXDLMSHdlcSetup) WindowSizeTransmit

func (g *GXDLMSHdlcSetup) WindowSizeTransmit() uint8

type GXDLMSIECLocalPortSetup

type GXDLMSIECLocalPortSetup struct {
	GXDLMSObject
	// Start communication mode.
	DefaultMode enums.OpticalProtocolMode

	// Default Baudrate.
	DefaultBaudrate enums.BaudRate

	// Proposed Baudrate.
	ProposedBaudrate enums.BaudRate

	// Defines the minimum time between the reception of a request
	// (end of request telegram) and the transmission of the response (begin of response telegram).
	ResponseTime enums.LocalPortResponseTime

	// Device address according to IEC 62056-21.
	DeviceAddress string

	// Password 1 according to IEC 62056-21.
	Password1 string

	// Password 2 according to IEC 62056-21.
	Password2 string

	// Password W5 reserved for national applications.
	Password5 string
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSIECLocalPortSetup

func NewGXDLMSIECLocalPortSetup

func NewGXDLMSIECLocalPortSetup(ln string, sn int16) (*GXDLMSIECLocalPortSetup, error)

NewGXDLMSIECLocalPortSetup creates a new IEC local port setup object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSIECLocalPortSetup) Base

Base returns the base GXDLMSObject of the object.

func (*GXDLMSIECLocalPortSetup) GetAttributeCount

func (g *GXDLMSIECLocalPortSetup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSIECLocalPortSetup) GetAttributeIndexToRead

func (g *GXDLMSIECLocalPortSetup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSIECLocalPortSetup) GetDataType

func (g *GXDLMSIECLocalPortSetup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSIECLocalPortSetup) GetMethodCount

func (g *GXDLMSIECLocalPortSetup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSIECLocalPortSetup) GetMethodNames

func (g *GXDLMSIECLocalPortSetup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSIECLocalPortSetup) GetNames

func (g *GXDLMSIECLocalPortSetup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSIECLocalPortSetup) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSIECLocalPortSetup) GetValues

func (g *GXDLMSIECLocalPortSetup) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSIECLocalPortSetup) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSIECLocalPortSetup) Load

func (g *GXDLMSIECLocalPortSetup) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSIECLocalPortSetup) PostLoad

func (g *GXDLMSIECLocalPortSetup) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSIECLocalPortSetup) Save

func (g *GXDLMSIECLocalPortSetup) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSIECLocalPortSetup) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSIec8802LlcType1Setup added in v1.0.8

type GXDLMSIec8802LlcType1Setup struct {
	GXDLMSObject
	MaximumOctetsUiPdu uint16
}

GXDLMSIec8802LlcType1Setup represents ISO/IEC 8802-2 LLC type 1 setup.

func NewGXDLMSIec8802LlcType1Setup added in v1.0.8

func NewGXDLMSIec8802LlcType1Setup(ln string, sn int16) (*GXDLMSIec8802LlcType1Setup, error)

func (*GXDLMSIec8802LlcType1Setup) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSIec8802LlcType1Setup) GetAttributeCount added in v1.0.8

func (g *GXDLMSIec8802LlcType1Setup) GetAttributeCount() int

func (*GXDLMSIec8802LlcType1Setup) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSIec8802LlcType1Setup) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSIec8802LlcType1Setup) GetDataType added in v1.0.8

func (g *GXDLMSIec8802LlcType1Setup) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSIec8802LlcType1Setup) GetMethodCount added in v1.0.8

func (g *GXDLMSIec8802LlcType1Setup) GetMethodCount() int

func (*GXDLMSIec8802LlcType1Setup) GetMethodNames added in v1.0.8

func (g *GXDLMSIec8802LlcType1Setup) GetMethodNames() []string

func (*GXDLMSIec8802LlcType1Setup) GetNames added in v1.0.8

func (g *GXDLMSIec8802LlcType1Setup) GetNames() []string

func (*GXDLMSIec8802LlcType1Setup) GetValue added in v1.0.8

func (*GXDLMSIec8802LlcType1Setup) GetValues added in v1.0.8

func (g *GXDLMSIec8802LlcType1Setup) GetValues() []any

func (*GXDLMSIec8802LlcType1Setup) Invoke added in v1.0.8

func (*GXDLMSIec8802LlcType1Setup) Load added in v1.0.8

func (g *GXDLMSIec8802LlcType1Setup) Load(reader *GXXmlReader) error

func (*GXDLMSIec8802LlcType1Setup) PostLoad added in v1.0.8

func (g *GXDLMSIec8802LlcType1Setup) PostLoad(reader *GXXmlReader) error

func (*GXDLMSIec8802LlcType1Setup) Save added in v1.0.8

func (g *GXDLMSIec8802LlcType1Setup) Save(writer *GXXmlWriter) error

func (*GXDLMSIec8802LlcType1Setup) SetValue added in v1.0.8

type GXDLMSIec8802LlcType2Setup added in v1.0.8

type GXDLMSIec8802LlcType2Setup struct {
	GXDLMSObject
	TransmitWindowSizeK        uint8
	TransmitWindowSizeRW       uint8
	MaximumOctetsPdu           uint16
	MaximumNumberTransmissions uint8
	AcknowledgementTimer       uint16
	BitTimer                   uint16
	RejectTimer                uint16
	BusyStateTimer             uint16
}

GXDLMSIec8802LlcType2Setup represents ISO/IEC 8802-2 LLC type 2 setup.

func NewGXDLMSIec8802LlcType2Setup added in v1.0.8

func NewGXDLMSIec8802LlcType2Setup(ln string, sn int16) (*GXDLMSIec8802LlcType2Setup, error)

func (*GXDLMSIec8802LlcType2Setup) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSIec8802LlcType2Setup) GetAttributeCount added in v1.0.8

func (g *GXDLMSIec8802LlcType2Setup) GetAttributeCount() int

func (*GXDLMSIec8802LlcType2Setup) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSIec8802LlcType2Setup) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSIec8802LlcType2Setup) GetDataType added in v1.0.8

func (g *GXDLMSIec8802LlcType2Setup) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSIec8802LlcType2Setup) GetMethodCount added in v1.0.8

func (g *GXDLMSIec8802LlcType2Setup) GetMethodCount() int

func (*GXDLMSIec8802LlcType2Setup) GetMethodNames added in v1.0.8

func (g *GXDLMSIec8802LlcType2Setup) GetMethodNames() []string

func (*GXDLMSIec8802LlcType2Setup) GetNames added in v1.0.8

func (g *GXDLMSIec8802LlcType2Setup) GetNames() []string

func (*GXDLMSIec8802LlcType2Setup) GetValue added in v1.0.8

func (*GXDLMSIec8802LlcType2Setup) GetValues added in v1.0.8

func (g *GXDLMSIec8802LlcType2Setup) GetValues() []any

func (*GXDLMSIec8802LlcType2Setup) Invoke added in v1.0.8

func (*GXDLMSIec8802LlcType2Setup) Load added in v1.0.8

func (g *GXDLMSIec8802LlcType2Setup) Load(reader *GXXmlReader) error

func (*GXDLMSIec8802LlcType2Setup) PostLoad added in v1.0.8

func (g *GXDLMSIec8802LlcType2Setup) PostLoad(reader *GXXmlReader) error

func (*GXDLMSIec8802LlcType2Setup) Save added in v1.0.8

func (g *GXDLMSIec8802LlcType2Setup) Save(writer *GXXmlWriter) error

func (*GXDLMSIec8802LlcType2Setup) SetValue added in v1.0.8

type GXDLMSIec8802LlcType3Setup added in v1.0.8

type GXDLMSIec8802LlcType3Setup struct {
	GXDLMSObject
	MaximumOctetsACnPdu  uint16
	MaximumTransmissions uint8
	AcknowledgementTime  uint16
	ReceiveLifetime      uint16
	TransmitLifetime     uint16
}

GXDLMSIec8802LlcType3Setup represents ISO/IEC 8802-2 LLC type 3 setup.

func NewGXDLMSIec8802LlcType3Setup added in v1.0.8

func NewGXDLMSIec8802LlcType3Setup(ln string, sn int16) (*GXDLMSIec8802LlcType3Setup, error)

func (*GXDLMSIec8802LlcType3Setup) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSIec8802LlcType3Setup) GetAttributeCount added in v1.0.8

func (g *GXDLMSIec8802LlcType3Setup) GetAttributeCount() int

func (*GXDLMSIec8802LlcType3Setup) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSIec8802LlcType3Setup) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSIec8802LlcType3Setup) GetDataType added in v1.0.8

func (g *GXDLMSIec8802LlcType3Setup) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSIec8802LlcType3Setup) GetMethodCount added in v1.0.8

func (g *GXDLMSIec8802LlcType3Setup) GetMethodCount() int

func (*GXDLMSIec8802LlcType3Setup) GetMethodNames added in v1.0.8

func (g *GXDLMSIec8802LlcType3Setup) GetMethodNames() []string

func (*GXDLMSIec8802LlcType3Setup) GetNames added in v1.0.8

func (g *GXDLMSIec8802LlcType3Setup) GetNames() []string

func (*GXDLMSIec8802LlcType3Setup) GetValue added in v1.0.8

func (*GXDLMSIec8802LlcType3Setup) GetValues added in v1.0.8

func (g *GXDLMSIec8802LlcType3Setup) GetValues() []any

func (*GXDLMSIec8802LlcType3Setup) Invoke added in v1.0.8

func (*GXDLMSIec8802LlcType3Setup) Load added in v1.0.8

func (g *GXDLMSIec8802LlcType3Setup) Load(reader *GXXmlReader) error

func (*GXDLMSIec8802LlcType3Setup) PostLoad added in v1.0.8

func (g *GXDLMSIec8802LlcType3Setup) PostLoad(reader *GXXmlReader) error

func (*GXDLMSIec8802LlcType3Setup) Save added in v1.0.8

func (g *GXDLMSIec8802LlcType3Setup) Save(writer *GXXmlWriter) error

func (*GXDLMSIec8802LlcType3Setup) SetValue added in v1.0.8

type GXDLMSIec6205541Attributes added in v1.0.8

type GXDLMSIec6205541Attributes struct {
	GXDLMSObject
	MeterPan            GXDLMSMeterPrimaryAccountNumber
	Commodity           string
	TokenCarrierTypes   []byte
	EncryptionAlgorithm uint8
	SupplyGroupCode     uint32
	TariffIndex         uint8
	KeyRevisionNumber   uint8
	KeyType             uint8
	KeyExpiryNumber     uint8
	KctSupported        uint8
	StsCertificate      string
}

GXDLMSIec6205541Attributes contains IEC 62055-41 related attributes.

func NewGXDLMSIec6205541Attributes added in v1.0.8

func NewGXDLMSIec6205541Attributes(ln string, sn int16) (*GXDLMSIec6205541Attributes, error)

NewGXDLMSIec6205541Attributes creates a new IEC 62055-41 attributes object instance.

func (*GXDLMSIec6205541Attributes) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSIec6205541Attributes) GetAttributeCount added in v1.0.8

func (g *GXDLMSIec6205541Attributes) GetAttributeCount() int

func (*GXDLMSIec6205541Attributes) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSIec6205541Attributes) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSIec6205541Attributes) GetDataType added in v1.0.8

func (g *GXDLMSIec6205541Attributes) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSIec6205541Attributes) GetMethodCount added in v1.0.8

func (g *GXDLMSIec6205541Attributes) GetMethodCount() int

func (*GXDLMSIec6205541Attributes) GetMethodNames added in v1.0.8

func (g *GXDLMSIec6205541Attributes) GetMethodNames() []string

func (*GXDLMSIec6205541Attributes) GetNames added in v1.0.8

func (g *GXDLMSIec6205541Attributes) GetNames() []string

func (*GXDLMSIec6205541Attributes) GetValue added in v1.0.8

func (*GXDLMSIec6205541Attributes) GetValues added in v1.0.8

func (g *GXDLMSIec6205541Attributes) GetValues() []any

func (*GXDLMSIec6205541Attributes) Invoke added in v1.0.8

func (*GXDLMSIec6205541Attributes) Load added in v1.0.8

func (g *GXDLMSIec6205541Attributes) Load(reader *GXXmlReader) error

func (*GXDLMSIec6205541Attributes) PostLoad added in v1.0.8

func (g *GXDLMSIec6205541Attributes) PostLoad(reader *GXXmlReader) error

func (*GXDLMSIec6205541Attributes) Save added in v1.0.8

func (g *GXDLMSIec6205541Attributes) Save(writer *GXXmlWriter) error

func (*GXDLMSIec6205541Attributes) SetValue added in v1.0.8

type GXDLMSIecTwistedPairSetup

type GXDLMSIecTwistedPairSetup struct {
	GXDLMSObject
	// Working mode.
	Mode enums.IecTwistedPairSetupMode

	// Communication speed.
	Speed enums.BaudRate

	// List of Primary Station Addresses.
	PrimaryAddresses []byte

	// List of the TAB(i) for which the real equipment has been programmed
	// in the case of forgotten station call.
	Tabis []int8
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSIecTwistedPairSetup

func NewGXDLMSIecTwistedPairSetup

func NewGXDLMSIecTwistedPairSetup(ln string, sn int16) (*GXDLMSIecTwistedPairSetup, error)

NewGXDLMSIecTwistedPairSetup creates a new Iec twisted pair setup object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSIecTwistedPairSetup) Base

Base returns the base GXDLMSObject of the object.

func (*GXDLMSIecTwistedPairSetup) GetAttributeCount

func (g *GXDLMSIecTwistedPairSetup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSIecTwistedPairSetup) GetAttributeIndexToRead

func (g *GXDLMSIecTwistedPairSetup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSIecTwistedPairSetup) GetDataType

func (g *GXDLMSIecTwistedPairSetup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSIecTwistedPairSetup) GetMethodCount

func (g *GXDLMSIecTwistedPairSetup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSIecTwistedPairSetup) GetMethodNames

func (g *GXDLMSIecTwistedPairSetup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSIecTwistedPairSetup) GetNames

func (g *GXDLMSIecTwistedPairSetup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSIecTwistedPairSetup) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSIecTwistedPairSetup) GetValues

func (g *GXDLMSIecTwistedPairSetup) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSIecTwistedPairSetup) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSIecTwistedPairSetup) Load

func (g *GXDLMSIecTwistedPairSetup) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSIecTwistedPairSetup) PostLoad

func (g *GXDLMSIecTwistedPairSetup) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSIecTwistedPairSetup) Save

func (g *GXDLMSIecTwistedPairSetup) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSIecTwistedPairSetup) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSImageActivateInfo added in v1.0.8

type GXDLMSImageActivateInfo struct {
	Size           uint32
	Identification []byte
	Signature      []byte
}

GXDLMSImageActivateInfo holds image metadata used by GXDLMSImageTransfer.

type GXDLMSImageTransfer added in v1.0.8

type GXDLMSImageTransfer struct {
	GXDLMSObject

	ImageBlockSize                   uint32
	ImageTransferredBlocksStatus     string
	ImageFirstNotTransferredBlockNum uint32
	ImageTransferEnabled             bool
	ImageTransferStatus              enums.ImageTransferStatus
	ImageActivateInfo                []GXDLMSImageActivateInfo
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSImageTransfer

func NewGXDLMSImageTransfer added in v1.0.8

func NewGXDLMSImageTransfer(ln string, sn int16) (*GXDLMSImageTransfer, error)

NewGXDLMSImageTransfer creates a new Image transfer object instance.

func (*GXDLMSImageTransfer) Base added in v1.0.8

func (g *GXDLMSImageTransfer) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSImageTransfer) GetAttributeCount added in v1.0.8

func (g *GXDLMSImageTransfer) GetAttributeCount() int

GetAttributeCount returns amount of attributes.

func (*GXDLMSImageTransfer) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSImageTransfer) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns collection of attributes to read.

func (*GXDLMSImageTransfer) GetDataType added in v1.0.8

func (g *GXDLMSImageTransfer) GetDataType(index int) (enums.DataType, error)

GetDataType returns data type of selected attribute index.

func (*GXDLMSImageTransfer) GetImageBlocks added in v1.0.8

func (g *GXDLMSImageTransfer) GetImageBlocks(image []byte) ([][]byte, error)

GetImageBlocks splits image to transfer blocks using ImageBlockSize.

func (*GXDLMSImageTransfer) GetMethodCount added in v1.0.8

func (g *GXDLMSImageTransfer) GetMethodCount() int

GetMethodCount returns amount of methods.

func (*GXDLMSImageTransfer) GetMethodNames added in v1.0.8

func (g *GXDLMSImageTransfer) GetMethodNames() []string

GetMethodNames returns names of method indexes.

func (*GXDLMSImageTransfer) GetNames added in v1.0.8

func (g *GXDLMSImageTransfer) GetNames() []string

GetNames returns names of attribute indexes.

func (*GXDLMSImageTransfer) GetValue added in v1.0.8

GetValue returns value of given attribute.

func (*GXDLMSImageTransfer) GetValues added in v1.0.8

func (g *GXDLMSImageTransfer) GetValues() []any

GetValues returns attributes as an array.

func (*GXDLMSImageTransfer) ImageActivate added in v1.0.8

func (g *GXDLMSImageTransfer) ImageActivate(client IGXDLMSClient) ([][]byte, error)

ImageActivate activates verified image in the meter.

func (*GXDLMSImageTransfer) ImageBlockTransfer added in v1.0.8

func (g *GXDLMSImageTransfer) ImageBlockTransfer(client IGXDLMSClient, image []byte) ([][]byte, int, error)

ImageBlockTransfer transfers image blocks from start index.

func (*GXDLMSImageTransfer) ImageBlockTransferByStatus added in v1.0.8

func (g *GXDLMSImageTransfer) ImageBlockTransferByStatus(client IGXDLMSClient, image []byte, blocksStatus string) ([][]byte, int, error)

ImageBlockTransferByStatus transfers only missing blocks from a block-status bitstring.

func (*GXDLMSImageTransfer) ImageBlockTransferFromIndex added in v1.0.8

func (g *GXDLMSImageTransfer) ImageBlockTransferFromIndex(client IGXDLMSClient, image []byte, index int) ([][]byte, int, error)

ImageBlockTransferFromIndex transfers image blocks from a block index.

func (*GXDLMSImageTransfer) ImageTransferInitiate added in v1.0.8

func (g *GXDLMSImageTransfer) ImageTransferInitiate(client IGXDLMSClient, imageIdentifier []byte, imageSize uint32) ([][]byte, error)

ImageTransferInitiate starts image transfer procedure.

func (*GXDLMSImageTransfer) ImageTransferInitiateByString added in v1.0.8

func (g *GXDLMSImageTransfer) ImageTransferInitiateByString(client IGXDLMSClient, imageIdentifier string, imageSize uint32) ([][]byte, error)

ImageTransferInitiateByString starts image transfer using an ASCII identifier.

func (*GXDLMSImageTransfer) ImageVerify added in v1.0.8

func (g *GXDLMSImageTransfer) ImageVerify(client IGXDLMSClient) ([][]byte, error)

ImageVerify verifies image in the meter.

func (*GXDLMSImageTransfer) Invoke added in v1.0.8

Invoke invokes object methods.

func (*GXDLMSImageTransfer) Load added in v1.0.8

func (g *GXDLMSImageTransfer) Load(reader *GXXmlReader) error

Load loads object content from XML.

func (*GXDLMSImageTransfer) PostLoad added in v1.0.8

func (g *GXDLMSImageTransfer) PostLoad(reader *GXXmlReader) error

PostLoad handles actions after Load.

func (*GXDLMSImageTransfer) Save added in v1.0.8

func (g *GXDLMSImageTransfer) Save(writer *GXXmlWriter) error

Save saves object content to XML.

func (*GXDLMSImageTransfer) SetValue added in v1.0.8

SetValue sets value of given attribute.

type GXDLMSIp4Setup added in v1.0.8

type GXDLMSIp4Setup struct {
	GXDLMSObject

	DataLinkLayerReference string
	IPAddress              net.IP
	MulticastIPAddress     []net.IP
	IPOptions              []GXDLMSIp4SetupIpOption
	SubnetMask             net.IP
	GatewayIPAddress       net.IP
	UseDHCP                bool
	PrimaryDNSAddress      net.IP
	SecondaryDNSAddress    net.IP
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSIp4Setup

func NewGXDLMSIp4Setup added in v1.0.8

func NewGXDLMSIp4Setup(ln string, sn int16) (*GXDLMSIp4Setup, error)

NewGXDLMSIp4Setup creates a new Ip4 setup object instance.

func (*GXDLMSIp4Setup) Base added in v1.0.8

func (g *GXDLMSIp4Setup) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSIp4Setup) GetAttributeCount added in v1.0.8

func (g *GXDLMSIp4Setup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

func (*GXDLMSIp4Setup) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSIp4Setup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read.

func (*GXDLMSIp4Setup) GetDataType added in v1.0.8

func (g *GXDLMSIp4Setup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the data type of selected attribute index.

func (*GXDLMSIp4Setup) GetMethodCount added in v1.0.8

func (g *GXDLMSIp4Setup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSIp4Setup) GetMethodNames added in v1.0.8

func (g *GXDLMSIp4Setup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSIp4Setup) GetNames added in v1.0.8

func (g *GXDLMSIp4Setup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSIp4Setup) GetValue added in v1.0.8

func (g *GXDLMSIp4Setup) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

GetValue returns the value of given attribute.

func (*GXDLMSIp4Setup) GetValues added in v1.0.8

func (g *GXDLMSIp4Setup) GetValues() []any

GetValues returns an array containing the COSEM object's attribute values.

func (*GXDLMSIp4Setup) Invoke added in v1.0.8

func (g *GXDLMSIp4Setup) Invoke(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) ([]byte, error)

Invoke invokes method.

func (*GXDLMSIp4Setup) Load added in v1.0.8

func (g *GXDLMSIp4Setup) Load(reader *GXXmlReader) error

Load loads object content from XML.

func (*GXDLMSIp4Setup) PostLoad added in v1.0.8

func (g *GXDLMSIp4Setup) PostLoad(reader *GXXmlReader) error

PostLoad handles actions after Load.

func (*GXDLMSIp4Setup) Save added in v1.0.8

func (g *GXDLMSIp4Setup) Save(writer *GXXmlWriter) error

Save saves object content to XML.

func (*GXDLMSIp4Setup) SetValue added in v1.0.8

SetValue sets value of given attribute.

type GXDLMSIp4SetupIpOption

type GXDLMSIp4SetupIpOption struct {
	Length uint8

	Data []byte
	// contains filtered or unexported fields
}

func (*GXDLMSIp4SetupIpOption) SetType

func (*GXDLMSIp4SetupIpOption) Type

type GXDLMSIp6Setup added in v1.0.8

type GXDLMSIp6Setup struct {
	GXDLMSObject

	DataLinkLayerReference string
	AddressConfigMode      enums.AddressConfigMode
	UnicastIPAddress       []net.IP
	MulticastIPAddress     []net.IP
	GatewayIPAddress       []net.IP
	PrimaryDNSAddress      net.IP
	SecondaryDNSAddress    net.IP
	TrafficClass           uint8
	NeighborDiscoverySetup []GXNeighborDiscoverySetup
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSIp6Setup

func NewGXDLMSIp6Setup added in v1.0.8

func NewGXDLMSIp6Setup(ln string, sn int16) (*GXDLMSIp6Setup, error)

NewGXDLMSIp6Setup creates a new Ip6 setup object instance.

func (*GXDLMSIp6Setup) AddAddress added in v1.0.8

func (g *GXDLMSIp6Setup) AddAddress(client IGXDLMSClient, addressType enums.IPv6AddressType, address net.IP) ([][]byte, error)

AddAddress adds IP v6 address to the meter.

func (*GXDLMSIp6Setup) Base added in v1.0.8

func (g *GXDLMSIp6Setup) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSIp6Setup) GetAttributeCount added in v1.0.8

func (g *GXDLMSIp6Setup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

func (*GXDLMSIp6Setup) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSIp6Setup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read.

func (*GXDLMSIp6Setup) GetDataType added in v1.0.8

func (g *GXDLMSIp6Setup) GetDataType(index int) (enums.DataType, error)

GetDataType returns data type of selected attribute index.

func (*GXDLMSIp6Setup) GetMethodCount added in v1.0.8

func (g *GXDLMSIp6Setup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSIp6Setup) GetMethodNames added in v1.0.8

func (g *GXDLMSIp6Setup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSIp6Setup) GetNames added in v1.0.8

func (g *GXDLMSIp6Setup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSIp6Setup) GetUIDataType added in v1.0.8

func (g *GXDLMSIp6Setup) GetUIDataType(index int) enums.DataType

GetUIDataType returns UI data type for selected index.

func (*GXDLMSIp6Setup) GetValue added in v1.0.8

func (g *GXDLMSIp6Setup) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

GetValue returns value of given attribute.

func (*GXDLMSIp6Setup) GetValues added in v1.0.8

func (g *GXDLMSIp6Setup) GetValues() []any

GetValues returns an array containing the COSEM object's attribute values.

func (*GXDLMSIp6Setup) Invoke added in v1.0.8

func (g *GXDLMSIp6Setup) Invoke(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) ([]byte, error)

Invoke invokes object method.

func (*GXDLMSIp6Setup) Load added in v1.0.8

func (g *GXDLMSIp6Setup) Load(reader *GXXmlReader) error

Load loads object content from XML.

func (*GXDLMSIp6Setup) PostLoad added in v1.0.8

func (g *GXDLMSIp6Setup) PostLoad(reader *GXXmlReader) error

PostLoad handles actions after Load.

func (*GXDLMSIp6Setup) RemoveAddress added in v1.0.8

func (g *GXDLMSIp6Setup) RemoveAddress(client IGXDLMSClient, addressType enums.IPv6AddressType, address net.IP) ([][]byte, error)

RemoveAddress removes IP v6 address from the meter.

func (*GXDLMSIp6Setup) Save added in v1.0.8

func (g *GXDLMSIp6Setup) Save(writer *GXXmlWriter) error

Save saves object content to XML.

func (*GXDLMSIp6Setup) SetValue added in v1.0.8

SetValue sets value of given attribute.

type GXDLMSLimiter

type GXDLMSLimiter struct {
	GXDLMSObject
	// Defines an attribute of an object to be monitored.
	MonitoredValue IGXDLMSBase

	// Attribute index of monitored value.
	MonitoredAttributeIndex int8

	// Provides the active threshold value to which the attribute monitored is compared.
	ThresholdActive any

	// Provides the threshold value to which the attribute monitored
	// is compared when in normal operation.
	ThresholdNormal any

	// Provides the threshold value to which the attribute monitored
	// is compared when an emergency profile is active.
	ThresholdEmergency any

	// Defines minimal over threshold duration in seconds required
	// to execute the over threshold action.
	MinOverThresholdDuration uint32

	// Defines minimal under threshold duration in seconds required to
	// execute the under threshold action.
	MinUnderThresholdDuration uint32

	EmergencyProfile GXDLMSEmergencyProfile

	EmergencyProfileGroupIDs []uint16

	// Is Emergency Profile active.
	EmergencyProfileActive bool

	// Defines the scripts to be executed when the monitored value
	// crosses the threshold for minimal duration time.
	ActionOverThreshold GXDLMSActionItem

	// Defines the scripts to be executed when the monitored value
	// crosses the threshold for minimal duration time.
	ActionUnderThreshold GXDLMSActionItem
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSLimiter

func NewGXDLMSLimiter

func NewGXDLMSLimiter(ln string, sn int16) (*GXDLMSLimiter, error)

NewGXDLMSLimiter creates a new limiter object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSLimiter) Base

func (g *GXDLMSLimiter) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSLimiter) GetAttributeCount

func (g *GXDLMSLimiter) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSLimiter) GetAttributeIndexToRead

func (g *GXDLMSLimiter) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSLimiter) GetDataType

func (g *GXDLMSLimiter) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSLimiter) GetMethodCount

func (g *GXDLMSLimiter) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSLimiter) GetMethodNames

func (g *GXDLMSLimiter) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSLimiter) GetNames

func (g *GXDLMSLimiter) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSLimiter) GetValue

func (g *GXDLMSLimiter) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSLimiter) GetValues

func (g *GXDLMSLimiter) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSLimiter) Invoke

func (g *GXDLMSLimiter) Invoke(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) ([]byte, error)

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSLimiter) Load

func (g *GXDLMSLimiter) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSLimiter) PostLoad

func (g *GXDLMSLimiter) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSLimiter) Save

func (g *GXDLMSLimiter) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSLimiter) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSLlcSscsSetup added in v1.0.6

type GXDLMSLlcSscsSetup struct {
	GXDLMSObject
	// Address assigned to the service node during its registration by the base node.
	ServiceNodeAddress uint16

	// Base node address to which the service node is registered.
	BaseNodeAddress uint16
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSLlcSscsSetup

func NewGXDLMSLlcSscsSetup added in v1.0.6

func NewGXDLMSLlcSscsSetup(ln string, sn int16) (*GXDLMSLlcSscsSetup, error)

NewGXDLMSLlcSscsSetup creates a new Llc Sscs Setup object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSLlcSscsSetup) Base added in v1.0.6

func (g *GXDLMSLlcSscsSetup) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSLlcSscsSetup) GetAttributeCount added in v1.0.6

func (g *GXDLMSLlcSscsSetup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSLlcSscsSetup) GetAttributeIndexToRead added in v1.0.6

func (g *GXDLMSLlcSscsSetup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSLlcSscsSetup) GetDataType added in v1.0.6

func (g *GXDLMSLlcSscsSetup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSLlcSscsSetup) GetMethodCount added in v1.0.6

func (g *GXDLMSLlcSscsSetup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSLlcSscsSetup) GetMethodNames added in v1.0.6

func (g *GXDLMSLlcSscsSetup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSLlcSscsSetup) GetNames added in v1.0.6

func (g *GXDLMSLlcSscsSetup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSLlcSscsSetup) GetValue added in v1.0.6

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSLlcSscsSetup) GetValues added in v1.0.6

func (g *GXDLMSLlcSscsSetup) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSLlcSscsSetup) Invoke added in v1.0.6

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSLlcSscsSetup) Load added in v1.0.6

func (g *GXDLMSLlcSscsSetup) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSLlcSscsSetup) PostLoad added in v1.0.6

func (g *GXDLMSLlcSscsSetup) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSLlcSscsSetup) Reset added in v1.0.6

func (g *GXDLMSLlcSscsSetup) Reset(client IGXDLMSClient) ([][]uint8, error)

Reset returns the deallocating the service node address. The value of the ServiceNodeAddress becomes NEW and the value of the BaseNodeAddress becomes 0.

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSLlcSscsSetup) Save added in v1.0.6

func (g *GXDLMSLlcSscsSetup) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSLlcSscsSetup) SetValue added in v1.0.6

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSLteMonitoring added in v1.0.8

type GXDLMSLteMonitoring struct {
	GXDLMSObject

	// Network parameters for the LTE network.
	NetworkParameters GXLteNetworkParameters

	// Quality of service of the LTE network.
	QualityOfService GXLteQualityOfService
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSLteMonitoring

func NewGXDLMSLteMonitoring added in v1.0.8

func NewGXDLMSLteMonitoring(ln string, sn int16) (*GXDLMSLteMonitoring, error)

NewGXDLMSLteMonitoring creates a new LTE Monitoring object instance.

func (*GXDLMSLteMonitoring) Base added in v1.0.8

func (g *GXDLMSLteMonitoring) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSLteMonitoring) GetAttributeCount added in v1.0.8

func (g *GXDLMSLteMonitoring) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

func (*GXDLMSLteMonitoring) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSLteMonitoring) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read.

func (*GXDLMSLteMonitoring) GetDataType added in v1.0.8

func (g *GXDLMSLteMonitoring) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

func (*GXDLMSLteMonitoring) GetMethodCount added in v1.0.8

func (g *GXDLMSLteMonitoring) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSLteMonitoring) GetMethodNames added in v1.0.8

func (g *GXDLMSLteMonitoring) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSLteMonitoring) GetNames added in v1.0.8

func (g *GXDLMSLteMonitoring) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSLteMonitoring) GetValue added in v1.0.8

GetValue returns the value of given attribute.

func (*GXDLMSLteMonitoring) GetValues added in v1.0.8

func (g *GXDLMSLteMonitoring) GetValues() []any

GetValues returns the object attribute values.

func (*GXDLMSLteMonitoring) Invoke added in v1.0.8

Invoke invokes method.

func (*GXDLMSLteMonitoring) Load added in v1.0.8

func (g *GXDLMSLteMonitoring) Load(reader *GXXmlReader) error

Load loads object content from XML.

func (*GXDLMSLteMonitoring) PostLoad added in v1.0.8

func (g *GXDLMSLteMonitoring) PostLoad(reader *GXXmlReader) error

PostLoad handles actions after Load.

func (*GXDLMSLteMonitoring) Save added in v1.0.8

func (g *GXDLMSLteMonitoring) Save(writer *GXXmlWriter) error

Save saves object content to XML.

func (*GXDLMSLteMonitoring) SetValue added in v1.0.8

SetValue sets value of given attribute.

type GXDLMSMBusClient

type GXDLMSMBusClient struct {
	GXDLMSObject
	// Provides reference to an M-Bus master port setup object, used to configure
	// an M-Bus port, each interface allowing to exchange data with one or more
	// M-Bus slave devices
	MBusPortReference string

	CaptureDefinition []types.GXKeyValuePair[string, string]

	CapturePeriod uint32

	PrimaryAddress uint8

	IdentificationNumber uint32

	ManufacturerID uint16

	// Carries the Version element of the data header as specified in
	// EN 13757-3 sub-clause 5.6.
	DataHeaderVersion uint8

	DeviceType enums.MBusDeviceType

	AccessNumber uint8

	Status uint8

	Alarm uint8

	Configuration uint16

	EncryptionKeyStatus enums.MBusEncryptionKeyStatus
}

Use this class to setup M-Bus slave devices and to exchange data with them. Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSMBusClient

func NewGXDLMSMBusClient

func NewGXDLMSMBusClient(ln string, sn int16) (*GXDLMSMBusClient, error)

NewGXDLMSMBusClient creates a new M-Bus client object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSMBusClient) Base

func (g *GXDLMSMBusClient) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSMBusClient) Capture

func (g *GXDLMSMBusClient) Capture(client IGXDLMSClient) ([][]uint8, error)

Capture returns the captures values.

Parameters:

client: DLMS client settings.

Returns:

Generated DLMS data.

func (*GXDLMSMBusClient) GetAttributeCount

func (g *GXDLMSMBusClient) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSMBusClient) GetAttributeIndexToRead

func (g *GXDLMSMBusClient) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSMBusClient) GetDataType

func (g *GXDLMSMBusClient) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSMBusClient) GetManufacturerName

func (g *GXDLMSMBusClient) GetManufacturerName(value uint16) string

GetManufacturerName returns the EN 61107 manufacturer from the manufacturer ID

func (*GXDLMSMBusClient) GetMethodCount

func (g *GXDLMSMBusClient) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSMBusClient) GetMethodNames

func (g *GXDLMSMBusClient) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSMBusClient) GetNames

func (g *GXDLMSMBusClient) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSMBusClient) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSMBusClient) GetValues

func (g *GXDLMSMBusClient) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSMBusClient) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSMBusClient) Load

func (g *GXDLMSMBusClient) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSMBusClient) PostLoad

func (g *GXDLMSMBusClient) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSMBusClient) ResetAlarm

func (g *GXDLMSMBusClient) ResetAlarm(client IGXDLMSClient) ([][]uint8, error)

ResetAlarm returns the resets alarm state of the M-Bus slave device.

Parameters:

client: DLMS client settings.

Returns:

Generated DLMS data.

func (*GXDLMSMBusClient) Save

func (g *GXDLMSMBusClient) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSMBusClient) SendData

func (g *GXDLMSMBusClient) SendData(client IGXDLMSClient, data []GXMBusClientData) ([][]uint8, error)

SendData returns the sends data to the M-Bus slave device.

Parameters:

client: DLMS client settings.
data: data to send

Returns:

Generated DLMS data.

func (*GXDLMSMBusClient) SetEncryptionKey

func (g *GXDLMSMBusClient) SetEncryptionKey(client IGXDLMSClient, encryptionKey []byte) ([][]uint8, error)

SetEncryptionKey returns the sets the encryption key in the M-Bus client and enables encrypted communication with the M-Bus slave device.

Parameters:

client: DLMS client settings.
encryptionKey: encryption key

Returns:

Generated DLMS data.

func (*GXDLMSMBusClient) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

func (*GXDLMSMBusClient) SlaveDeInstall

func (g *GXDLMSMBusClient) SlaveDeInstall(client IGXDLMSClient) ([][]uint8, error)

SlaveDeInstall returns the de-installs a slave device.

Parameters:

client: DLMS client settings.

Returns:

Generated DLMS data.

func (*GXDLMSMBusClient) SlaveInstall

func (g *GXDLMSMBusClient) SlaveInstall(client IGXDLMSClient, primaryAddress uint8) ([][]uint8, error)

SlaveInstall returns the installs a slave device.

Parameters:

client: DLMS client settings.
primaryAddress: Primary address.

Returns:

Generated DLMS data.

func (*GXDLMSMBusClient) SynchronizeClock

func (g *GXDLMSMBusClient) SynchronizeClock(client IGXDLMSClient) ([][]uint8, error)

SynchronizeClock returns the synchronize the clock.

Parameters:

client: DLMS client settings.

Returns:

Generated DLMS data.

func (*GXDLMSMBusClient) TransferKey

func (g *GXDLMSMBusClient) TransferKey(client IGXDLMSClient, encryptionKey []byte) ([][]uint8, error)

TransferKey returns the transfers an encryption key to the M-Bus slave device.

Parameters:

client: DLMS client settings.
encryptionKey: encryption key

Returns:

Generated DLMS data.

type GXDLMSMBusDiagnostic added in v1.0.8

type GXDLMSMBusDiagnostic struct {
	GXDLMSObject

	// Received signal strength in dBm.
	ReceivedSignalStrength uint8

	// Currently used channel ID.
	ChannelID uint8

	// Link status.
	LinkStatus enums.MBusLinkStatus

	// Broadcast frame counters.
	BroadcastFrames []GXBroadcastFrameCounter

	// Transmitted frames.
	Transmissions uint32

	// Received frames with a correct checksum.
	ReceivedFrames uint32

	// Received frames with an incorrect checksum.
	FailedReceivedFrames uint32

	// Last changed value.
	CaptureTime GXCaptureTime
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSMBusDiagnostic

func NewGXDLMSMBusDiagnostic added in v1.0.8

func NewGXDLMSMBusDiagnostic(ln string, sn int16) (*GXDLMSMBusDiagnostic, error)

NewGXDLMSMBusDiagnostic creates a new M-Bus Diagnostic object instance.

func (*GXDLMSMBusDiagnostic) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSMBusDiagnostic) GetAttributeCount added in v1.0.8

func (g *GXDLMSMBusDiagnostic) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

func (*GXDLMSMBusDiagnostic) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSMBusDiagnostic) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read.

func (*GXDLMSMBusDiagnostic) GetDataType added in v1.0.8

func (g *GXDLMSMBusDiagnostic) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

func (*GXDLMSMBusDiagnostic) GetMethodCount added in v1.0.8

func (g *GXDLMSMBusDiagnostic) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSMBusDiagnostic) GetMethodNames added in v1.0.8

func (g *GXDLMSMBusDiagnostic) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSMBusDiagnostic) GetNames added in v1.0.8

func (g *GXDLMSMBusDiagnostic) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSMBusDiagnostic) GetValue added in v1.0.8

GetValue returns the value of given attribute.

func (*GXDLMSMBusDiagnostic) GetValues added in v1.0.8

func (g *GXDLMSMBusDiagnostic) GetValues() []any

GetValues returns the object attribute values.

func (*GXDLMSMBusDiagnostic) Invoke added in v1.0.8

Invoke invokes method.

func (*GXDLMSMBusDiagnostic) Load added in v1.0.8

func (g *GXDLMSMBusDiagnostic) Load(reader *GXXmlReader) error

Load loads object content from XML.

func (*GXDLMSMBusDiagnostic) PostLoad added in v1.0.8

func (g *GXDLMSMBusDiagnostic) PostLoad(reader *GXXmlReader) error

PostLoad handles actions after Load.

func (*GXDLMSMBusDiagnostic) Reset added in v1.0.8

func (g *GXDLMSMBusDiagnostic) Reset(client IGXDLMSClient) ([][]byte, error)

Reset resets the diagnostic counters.

func (*GXDLMSMBusDiagnostic) Save added in v1.0.8

func (g *GXDLMSMBusDiagnostic) Save(writer *GXXmlWriter) error

Save saves object content to XML.

func (*GXDLMSMBusDiagnostic) SetValue added in v1.0.8

SetValue sets value of given attribute.

type GXDLMSMBusMasterPortSetup added in v1.0.3

type GXDLMSMBusMasterPortSetup struct {
	GXDLMSObject
	// The communication speed supported by the port.
	CommSpeed enums.BaudRate
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSMBusMasterPortSetup

func NewGXDLMSMBusMasterPortSetup added in v1.0.3

func NewGXDLMSMBusMasterPortSetup(ln string, sn int16) (*GXDLMSMBusMasterPortSetup, error)

NewGXDLMMBusMasterPortSetup creates a new M Bus Master Port Setup object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSMBusMasterPortSetup) Base added in v1.0.3

Base returns the base GXDLMSObject of the object.

func (*GXDLMSMBusMasterPortSetup) GetAttributeCount added in v1.0.3

func (g *GXDLMSMBusMasterPortSetup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSMBusMasterPortSetup) GetAttributeIndexToRead added in v1.0.3

func (g *GXDLMSMBusMasterPortSetup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSMBusMasterPortSetup) GetDataType added in v1.0.3

func (g *GXDLMSMBusMasterPortSetup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSMBusMasterPortSetup) GetMethodCount added in v1.0.3

func (g *GXDLMSMBusMasterPortSetup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSMBusMasterPortSetup) GetMethodNames added in v1.0.3

func (g *GXDLMSMBusMasterPortSetup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSMBusMasterPortSetup) GetNames added in v1.0.3

func (g *GXDLMSMBusMasterPortSetup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSMBusMasterPortSetup) GetValue added in v1.0.3

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSMBusMasterPortSetup) GetValues added in v1.0.3

func (g *GXDLMSMBusMasterPortSetup) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSMBusMasterPortSetup) Invoke added in v1.0.3

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSMBusMasterPortSetup) Load added in v1.0.3

func (g *GXDLMSMBusMasterPortSetup) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSMBusMasterPortSetup) PostLoad added in v1.0.3

func (g *GXDLMSMBusMasterPortSetup) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSMBusMasterPortSetup) Save added in v1.0.3

func (g *GXDLMSMBusMasterPortSetup) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSMBusMasterPortSetup) SetValue added in v1.0.3

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSMBusPortSetup added in v1.0.8

type GXDLMSMBusPortSetup struct {
	GXDLMSObject

	// Reference to M-Bus communication port setup object.
	ProfileSelection string

	// Communication status of the M-Bus node.
	PortCommunicationStatus enums.MBusPortCommunicationState

	// M-Bus data header type.
	DataHeaderType enums.MBusDataHeaderType

	// The primary address of the M-Bus slave device.
	PrimaryAddress uint8

	// Identification Number element of the data header.
	IdentificationNumber uint32

	// Manufacturer Identification element.
	ManufacturerID uint16

	// M-Bus version.
	MBusVersion uint8

	// Device type.
	DeviceType enums.MBusDeviceType

	// Max PDU size.
	MaxPduSize uint16

	// Listening windows.
	ListeningWindow []types.GXKeyValuePair[types.GXDateTime, types.GXDateTime]
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSMBusPortSetup

func NewGXDLMSMBusPortSetup added in v1.0.8

func NewGXDLMSMBusPortSetup(ln string, sn int16) (*GXDLMSMBusPortSetup, error)

NewGXDLMSMBusPortSetup creates a new M-Bus Port Setup object instance.

func (*GXDLMSMBusPortSetup) Base added in v1.0.8

func (g *GXDLMSMBusPortSetup) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSMBusPortSetup) GetAttributeCount added in v1.0.8

func (g *GXDLMSMBusPortSetup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

func (*GXDLMSMBusPortSetup) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSMBusPortSetup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read.

func (*GXDLMSMBusPortSetup) GetDataType added in v1.0.8

func (g *GXDLMSMBusPortSetup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

func (*GXDLMSMBusPortSetup) GetMethodCount added in v1.0.8

func (g *GXDLMSMBusPortSetup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSMBusPortSetup) GetMethodNames added in v1.0.8

func (g *GXDLMSMBusPortSetup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSMBusPortSetup) GetNames added in v1.0.8

func (g *GXDLMSMBusPortSetup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSMBusPortSetup) GetValue added in v1.0.8

GetValue returns the value of given attribute.

func (*GXDLMSMBusPortSetup) GetValues added in v1.0.8

func (g *GXDLMSMBusPortSetup) GetValues() []any

GetValues returns the object attribute values.

func (*GXDLMSMBusPortSetup) Invoke added in v1.0.8

Invoke invokes method.

func (*GXDLMSMBusPortSetup) Load added in v1.0.8

func (g *GXDLMSMBusPortSetup) Load(reader *GXXmlReader) error

Load loads object content from XML.

func (*GXDLMSMBusPortSetup) PostLoad added in v1.0.8

func (g *GXDLMSMBusPortSetup) PostLoad(reader *GXXmlReader) error

PostLoad handles actions after Load.

func (*GXDLMSMBusPortSetup) Save added in v1.0.8

func (g *GXDLMSMBusPortSetup) Save(writer *GXXmlWriter) error

Save saves object content to XML.

func (*GXDLMSMBusPortSetup) SetValue added in v1.0.8

SetValue sets value of given attribute.

type GXDLMSMBusSlavePortSetup

type GXDLMSMBusSlavePortSetup struct {
	GXDLMSObject
	// Defines the baud rate for the opening sequence.
	DefaultBaud enums.BaudRate

	// Defines the baud rate for the opening sequence.
	AvailableBaud enums.BaudRate

	// Defines whether or not the device has been assigned an address
	// since last power up of the device.
	AddressState enums.AddressState

	// The currently assigned device address.
	BusAddress uint8
}

Model and configure communication channels. Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSMBusSlavePortSetup

func NewGXDLMSMBusSlavePortSetup

func NewGXDLMSMBusSlavePortSetup(ln string, sn int16) (*GXDLMSMBusSlavePortSetup, error)

NewGXDLMSMBusSlavePortSetup creates a new M-Bus slave port setup object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSMBusSlavePortSetup) Base

Base returns the base GXDLMSObject of the object.

func (*GXDLMSMBusSlavePortSetup) GetAttributeCount

func (g *GXDLMSMBusSlavePortSetup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSMBusSlavePortSetup) GetAttributeIndexToRead

func (g *GXDLMSMBusSlavePortSetup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSMBusSlavePortSetup) GetDataType

func (g *GXDLMSMBusSlavePortSetup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSMBusSlavePortSetup) GetMethodCount

func (g *GXDLMSMBusSlavePortSetup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSMBusSlavePortSetup) GetMethodNames

func (g *GXDLMSMBusSlavePortSetup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSMBusSlavePortSetup) GetNames

func (g *GXDLMSMBusSlavePortSetup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSMBusSlavePortSetup) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSMBusSlavePortSetup) GetValues

func (g *GXDLMSMBusSlavePortSetup) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSMBusSlavePortSetup) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSMBusSlavePortSetup) Load

func (g *GXDLMSMBusSlavePortSetup) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSMBusSlavePortSetup) PostLoad

func (g *GXDLMSMBusSlavePortSetup) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSMBusSlavePortSetup) Save

func (g *GXDLMSMBusSlavePortSetup) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSMBusSlavePortSetup) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSMacAddressSetup

type GXDLMSMacAddressSetup struct {
	GXDLMSObject
	// Value of COSEM Data object.
	MacAddress string
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSMacAddressSetup

func NewGXDLMSMacAddressSetup

func NewGXDLMSMacAddressSetup(ln string, sn int16) (*GXDLMSMacAddressSetup, error)

NewGXDLMSMacAddressSetup creates a new MAC address setup object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSMacAddressSetup) Base

Base returns the base GXDLMSObject of the object.

func (*GXDLMSMacAddressSetup) GetAttributeCount

func (g *GXDLMSMacAddressSetup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSMacAddressSetup) GetAttributeIndexToRead

func (g *GXDLMSMacAddressSetup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSMacAddressSetup) GetDataType

func (g *GXDLMSMacAddressSetup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSMacAddressSetup) GetMethodCount

func (g *GXDLMSMacAddressSetup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSMacAddressSetup) GetMethodNames

func (g *GXDLMSMacAddressSetup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSMacAddressSetup) GetNames

func (g *GXDLMSMacAddressSetup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSMacAddressSetup) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSMacAddressSetup) GetValues

func (g *GXDLMSMacAddressSetup) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSMacAddressSetup) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSMacAddressSetup) Load

func (g *GXDLMSMacAddressSetup) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSMacAddressSetup) PostLoad

func (g *GXDLMSMacAddressSetup) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSMacAddressSetup) Save

func (g *GXDLMSMacAddressSetup) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSMacAddressSetup) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSMacPosTable added in v1.0.8

type GXDLMSMacPosTable struct {
	ShortAddress uint16
	LQI          uint8
	ValidTime    uint8
}

GXDLMSMacPosTable holds one entry from MAC POS table.

type GXDLMSMeterPrimaryAccountNumber added in v1.0.8

type GXDLMSMeterPrimaryAccountNumber struct {
	IssuerId               uint32
	DecoderReferenceNumber uint64
	PanCheckDigit          uint8
}

GXDLMSMeterPrimaryAccountNumber contains meter PAN information.

type GXDLMSModemConfiguration

type GXDLMSModemConfiguration struct {
	GXDLMSObject
	CommunicationSpeed enums.BaudRate

	InitialisationStrings []GXDLMSModemInitialisation

	ModemProfile []string
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSModemConfiguration

func NewGXDLMSModemConfiguration

func NewGXDLMSModemConfiguration(ln string, sn int16) (*GXDLMSModemConfiguration, error)

NewGXDLMSModemConfiguration creates a new modem configuration object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSModemConfiguration) Base

Base returns the base GXDLMSObject of the object.

func (*GXDLMSModemConfiguration) DefaultProfiles

func (g *GXDLMSModemConfiguration) DefaultProfiles() []string

func (*GXDLMSModemConfiguration) GetAttributeCount

func (g *GXDLMSModemConfiguration) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSModemConfiguration) GetAttributeIndexToRead

func (g *GXDLMSModemConfiguration) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSModemConfiguration) GetDataType

func (g *GXDLMSModemConfiguration) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSModemConfiguration) GetMethodCount

func (g *GXDLMSModemConfiguration) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSModemConfiguration) GetMethodNames

func (g *GXDLMSModemConfiguration) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSModemConfiguration) GetNames

func (g *GXDLMSModemConfiguration) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSModemConfiguration) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSModemConfiguration) GetValues

func (g *GXDLMSModemConfiguration) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSModemConfiguration) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSModemConfiguration) Load

func (g *GXDLMSModemConfiguration) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSModemConfiguration) PostLoad

func (g *GXDLMSModemConfiguration) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSModemConfiguration) Save

func (g *GXDLMSModemConfiguration) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSModemConfiguration) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSModemInitialisation

type GXDLMSModemInitialisation struct {
	Request string

	Response string

	Delay uint16
}

func (*GXDLMSModemInitialisation) String

func (g *GXDLMSModemInitialisation) String() string

type GXDLMSMonitoredValue added in v1.0.2

type GXDLMSMonitoredValue struct {
	ObjectType enums.ObjectType

	LogicalName string

	AttributeIndex int8
}

func (*GXDLMSMonitoredValue) String added in v1.0.2

func (g *GXDLMSMonitoredValue) String() string

type GXDLMSNeighbourTable added in v1.0.8

type GXDLMSNeighbourTable struct {
	ShortAddress       uint16
	Enabled            bool
	ToneMap            string
	Modulation         enums.Modulation
	TxGain             int8
	TxRes              enums.GainResolution
	TxCoeff            string
	Lqi                uint8
	PhaseDifferential  int8
	TMRValidTime       uint8
	NeighbourValidTime uint8
}

GXDLMSNeighbourTable holds one entry from MAC neighbour table.

type GXDLMSNtpSetup added in v1.0.8

type GXDLMSNtpSetup struct {
	GXDLMSObject
	Activated      bool
	ServerAddress  string
	Port           uint16
	Authentication enums.NtpAuthenticationMethod
	Keys           map[uint32][]byte
	ClientKey      []byte
}

GXDLMSNtpSetup contains NTP setup parameters used for time synchronization.

func NewGXDLMSNtpSetup added in v1.0.8

func NewGXDLMSNtpSetup(ln string, sn int16) (*GXDLMSNtpSetup, error)

NewGXDLMSNtpSetup creates a new NTP setup object instance.

func (*GXDLMSNtpSetup) AddAuthenticationKey added in v1.0.8

func (g *GXDLMSNtpSetup) AddAuthenticationKey(client IGXDLMSClient, id uint32, key []byte) ([][]byte, error)

AddAuthenticationKey adds a symmetric authentication key.

func (*GXDLMSNtpSetup) Base added in v1.0.8

func (g *GXDLMSNtpSetup) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSNtpSetup) DeleteAuthenticationKey added in v1.0.8

func (g *GXDLMSNtpSetup) DeleteAuthenticationKey(client IGXDLMSClient, id uint32) ([][]byte, error)

DeleteAuthenticationKey removes a symmetric authentication key.

func (*GXDLMSNtpSetup) GetAttributeCount added in v1.0.8

func (g *GXDLMSNtpSetup) GetAttributeCount() int

func (*GXDLMSNtpSetup) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSNtpSetup) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSNtpSetup) GetDataType added in v1.0.8

func (g *GXDLMSNtpSetup) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSNtpSetup) GetDataTypeByValue added in v1.0.8

func (g *GXDLMSNtpSetup) GetDataTypeByValue(value any) (enums.DataType, error)

func (*GXDLMSNtpSetup) GetMethodCount added in v1.0.8

func (g *GXDLMSNtpSetup) GetMethodCount() int

func (*GXDLMSNtpSetup) GetMethodNames added in v1.0.8

func (g *GXDLMSNtpSetup) GetMethodNames() []string

func (*GXDLMSNtpSetup) GetNames added in v1.0.8

func (g *GXDLMSNtpSetup) GetNames() []string

func (*GXDLMSNtpSetup) GetUIDataType added in v1.0.8

func (g *GXDLMSNtpSetup) GetUIDataType(index int) enums.DataType

func (*GXDLMSNtpSetup) GetValue added in v1.0.8

func (g *GXDLMSNtpSetup) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

func (*GXDLMSNtpSetup) GetValues added in v1.0.8

func (g *GXDLMSNtpSetup) GetValues() []any

func (*GXDLMSNtpSetup) Invoke added in v1.0.8

func (g *GXDLMSNtpSetup) Invoke(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) ([]byte, error)

func (*GXDLMSNtpSetup) Load added in v1.0.8

func (g *GXDLMSNtpSetup) Load(reader *GXXmlReader) error

func (*GXDLMSNtpSetup) PostLoad added in v1.0.8

func (g *GXDLMSNtpSetup) PostLoad(reader *GXXmlReader) error

func (*GXDLMSNtpSetup) Save added in v1.0.8

func (g *GXDLMSNtpSetup) Save(writer *GXXmlWriter) error

func (*GXDLMSNtpSetup) SetValue added in v1.0.8

func (*GXDLMSNtpSetup) Synchronize added in v1.0.8

func (g *GXDLMSNtpSetup) Synchronize(client IGXDLMSClient) ([][]byte, error)

Synchronize synchronizes time of the server with NTP server.

type GXDLMSObject

type GXDLMSObject struct {

	// Gets or sets the object that contains data about the control.
	Tag any

	// DLMS version number.
	Version uint8

	// The base name of the object, if using SN.
	ShortName int16

	// Description of DLMS object.
	Description string

	// Object attribute collection.
	Attributes manufacturersettings.GXAttributeCollection

	// object attribute collection.
	MethodAttributes manufacturersettings.GXAttributeCollection
	// contains filtered or unexported fields
}

GXDLMSObject provides an base class for DLMS COSEM objects.

func (*GXDLMSObject) CanRead

func (g *GXDLMSObject) CanRead(index int) bool

CanRead returns the is attribute of the object readable. index: Attribute index of the object.

Returns:
    True, if attribute of the object is readable.

func (*GXDLMSObject) GetAccess

func (g *GXDLMSObject) GetAccess(index int) enums.AccessMode

GetAccess returns the returns attribute access mode.index: Attribute index.

Returns:
    Is attribute read only.

func (*GXDLMSObject) GetAccess3

func (g *GXDLMSObject) GetAccess3(index int) enums.AccessMode3

GetAccess3 returns the returns is attribute read only.index: Attribute index.

Returns:
    Is attribute read only.

func (*GXDLMSObject) GetAccessSelector

func (g *GXDLMSObject) GetAccessSelector(index int) uint8

GetAccessSelector returns the returns is Method attribute read only. index: Method Attribute index.

Returns:
    Access selector value.

func (*GXDLMSObject) GetAttribute

func (*GXDLMSObject) GetDataType

func (g *GXDLMSObject) GetDataType(index int) (enums.DataType, error)

GetDataType returns the returns data type of selected index. index: Attribute index of the object.

Returns:
    Device data type of the object.

func (*GXDLMSObject) GetLastReadTime

func (g *GXDLMSObject) GetLastReadTime(attributeIndex int) time.Time

GetLastReadTime returns the last read time of attribute. attributeIndex: Attribute index.

Returns:
    Last read time.

func (*GXDLMSObject) GetMethodAccess

func (g *GXDLMSObject) GetMethodAccess(index int) enums.MethodAccessMode

GetMethodAccess returns the returns is Method attribute read only.index: Method Attribute index.

Returns:
    Is attribute read only.

func (*GXDLMSObject) GetMethodAccess3

func (g *GXDLMSObject) GetMethodAccess3(index int) enums.MethodAccessMode3

GetMethodAccess3 returns the returns is Method attribute read only. index: Method Attribute index.

Returns:
    Is attribute read only.

func (*GXDLMSObject) GetStatic

func (g *GXDLMSObject) GetStatic(index int) bool

func (*GXDLMSObject) GetUIDataType

func (g *GXDLMSObject) GetUIDataType(index int) enums.DataType

GetUIDataType returns UI data type of selected index. index: Attribute index of the object.

Returns:
    UseUI data type of the object.

func (*GXDLMSObject) GetValues

func (g *GXDLMSObject) GetValues() (any, error)

GetValues returns the returns attributes as an array.

Returns:
    Collection of COSEM object values.

func (*GXDLMSObject) IsRead

func (g *GXDLMSObject) IsRead(index int) bool

IsRead returns the is attribute read. index: Attribute index to read.

Returns:
    Returns true if attribute is read.

func (*GXDLMSObject) LogicalName

func (g *GXDLMSObject) LogicalName() string

LogicalName returns the logical name of DLMS object.

func (*GXDLMSObject) Name

func (g *GXDLMSObject) Name() any

Name returns the logical or Short Name of DLMS object.

Returns:

func (*GXDLMSObject) ObjectType

func (g *GXDLMSObject) ObjectType() enums.ObjectType

Interface type of the DLMS object.

func (*GXDLMSObject) SetAccess

func (g *GXDLMSObject) SetAccess(index int, access enums.AccessMode)

SetAccess returns the set attribute access.index: access:

func (*GXDLMSObject) SetAccess3

func (g *GXDLMSObject) SetAccess3(index int, access enums.AccessMode3)

SetAccess3 returns the set attribute access. index: access:

func (*GXDLMSObject) SetAccessSelector

func (g *GXDLMSObject) SetAccessSelector(index int, value uint8)

SetAccessSelector returns the set Method attribute access. index: Attribute inde value: Access selector value.

func (*GXDLMSObject) SetDataType

func (g *GXDLMSObject) SetDataType(index int, dt enums.DataType)

func (*GXDLMSObject) SetLastReadTime

func (g *GXDLMSObject) SetLastReadTime(attributeIndex int, tm time.Time)

SetLastReadTime sets the last read time of attribute. attributeIndex: Attribute index. tm: Read time.

func (*GXDLMSObject) SetLogicalName

func (g *GXDLMSObject) SetLogicalName(ln string) error

SetLogicalName sets the logical name of DLMS object.

func (*GXDLMSObject) SetMethodAccess

func (g *GXDLMSObject) SetMethodAccess(index int, access enums.MethodAccessMode) error

SetMethodAccess returns the set Method attribute access. index: Method Attribute index. access: Method access mode.

func (*GXDLMSObject) SetMethodAccess3

func (g *GXDLMSObject) SetMethodAccess3(index int, access enums.MethodAccessMode3)

SetMethodAccess3 returns the set Method attribute access.index: access:

func (*GXDLMSObject) SetStatic

func (g *GXDLMSObject) SetStatic(index int, isStatic bool)

func (*GXDLMSObject) SetUIDataType

func (g *GXDLMSObject) SetUIDataType(index int, dt enums.DataType)

func (*GXDLMSObject) String

func (g *GXDLMSObject) String() string

String produces logical or Short Name of DLMS object.

Returns:

type GXDLMSObjectCollection

type GXDLMSObjectCollection []IGXDLMSBase

func (*GXDLMSObjectCollection) Add

func (g *GXDLMSObjectCollection) Add(item IGXDLMSBase)

func (*GXDLMSObjectCollection) Clear

func (g *GXDLMSObjectCollection) Clear()

Clear removes all elements from the collection.

func (*GXDLMSObjectCollection) FindByLN

func (g *GXDLMSObjectCollection) FindByLN(objectType enums.ObjectType, ln string) IGXDLMSBase

FindByLN searches the collection for an object with the given logical name (string). If objectType is enums.ObjectTypeNone the type check is skipped.

func (*GXDLMSObjectCollection) FindByLNBytes

func (g *GXDLMSObjectCollection) FindByLNBytes(objectType enums.ObjectType, ln []byte) (IGXDLMSBase, error)

FindByLNBytes searches the collection for an object with the logical name represented by the byte slice. The byte slice is converted to the dotted string representation (e.g. 1.0.1.8.0.255).

func (*GXDLMSObjectCollection) FindBySN

func (g *GXDLMSObjectCollection) FindBySN(sn uint16) IGXDLMSBase

FindBySN searches the collection for an object with the given short name.

func (*GXDLMSObjectCollection) GetObjects

func (*GXDLMSObjectCollection) GetObjects2

func (g *GXDLMSObjectCollection) GetObjects2(objectTypes []enums.ObjectType) GXDLMSObjectCollection

func (*GXDLMSObjectCollection) Length added in v1.0.3

func (g *GXDLMSObjectCollection) Length() int

func (*GXDLMSObjectCollection) LoadFromFile

func (g *GXDLMSObjectCollection) LoadFromFile(filename string) error

LoadFromFile returns collection of serialized COSEM objects.

func (*GXDLMSObjectCollection) LoadFromStream

func (g *GXDLMSObjectCollection) LoadFromStream(stream *bufio.Reader) error

LoadFromStream returns new collection.

func (GXDLMSObjectCollection) SaveToFile

func (c GXDLMSObjectCollection) SaveToFile(filename string, settings *GXXmlWriterSettings) error

func (GXDLMSObjectCollection) SaveToStream

func (c GXDLMSObjectCollection) SaveToStream(stream *bufio.Writer, settings *GXXmlWriterSettings) error

func (*GXDLMSObjectCollection) String

func (g *GXDLMSObjectCollection) String() string

String returns the string representation of the collection.

type GXDLMSObjectDefinition added in v1.0.2

type GXDLMSObjectDefinition struct {

	// Logical name of the object.
	LogicalName string
	// contains filtered or unexported fields
}

Register activation uses this class to save register assigments.

func (*GXDLMSObjectDefinition) ObjectType added in v1.0.2

func (g *GXDLMSObjectDefinition) ObjectType() enums.ObjectType

ObjectType returns the objectType.

func (*GXDLMSObjectDefinition) SetObjectType added in v1.0.2

func (g *GXDLMSObjectDefinition) SetObjectType(value enums.ObjectType) error

SetObjectType sets the objectType.

func (*GXDLMSObjectDefinition) String added in v1.0.2

func (g *GXDLMSObjectDefinition) String() string

type GXDLMSParameterMonitor added in v1.0.6

type GXDLMSParameterMonitor struct {
	GXDLMSObject
	// Changed parameter.
	ChangedParameter *GXDLMSTarget

	// Capture time.
	CaptureTime time.Time

	// Changed Parameter
	Parameters []GXDLMSTarget
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSParameterMonitor

func NewGXDLMSParameterMonitor added in v1.0.6

func NewGXDLMSParameterMonitor(ln string, sn int16) (*GXDLMSParameterMonitor, error)

NewGXDLMSParameterMonitor creates a new Parameter Monitor object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSParameterMonitor) Base added in v1.0.6

Base returns the base GXDLMSObject of the object.

func (*GXDLMSParameterMonitor) Delete added in v1.0.6

func (g *GXDLMSParameterMonitor) Delete(client IGXDLMSClient, entry *GXDLMSTarget) ([][]uint8, error)

Delete returns the deletes an entry from the table.

func (*GXDLMSParameterMonitor) GetAttributeCount added in v1.0.6

func (g *GXDLMSParameterMonitor) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSParameterMonitor) GetAttributeIndexToRead added in v1.0.6

func (g *GXDLMSParameterMonitor) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSParameterMonitor) GetDataType added in v1.0.6

func (g *GXDLMSParameterMonitor) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSParameterMonitor) GetMethodCount added in v1.0.6

func (g *GXDLMSParameterMonitor) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSParameterMonitor) GetMethodNames added in v1.0.6

func (g *GXDLMSParameterMonitor) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSParameterMonitor) GetNames added in v1.0.6

func (g *GXDLMSParameterMonitor) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSParameterMonitor) GetValue added in v1.0.6

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSParameterMonitor) GetValues added in v1.0.6

func (g *GXDLMSParameterMonitor) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSParameterMonitor) Insert added in v1.0.6

func (g *GXDLMSParameterMonitor) Insert(client IGXDLMSClient, entry *GXDLMSTarget) ([][]uint8, error)

Insert returns the inserts a new entry in the table.

func (*GXDLMSParameterMonitor) Invoke added in v1.0.6

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSParameterMonitor) Load added in v1.0.6

func (g *GXDLMSParameterMonitor) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSParameterMonitor) PostLoad added in v1.0.6

func (g *GXDLMSParameterMonitor) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSParameterMonitor) Save added in v1.0.6

func (g *GXDLMSParameterMonitor) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSParameterMonitor) SetValue added in v1.0.6

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSPppSetup

type GXDLMSPppSetup struct {
	GXDLMSObject
	PHYReference string

	LCPOptions []GXDLMSPppSetupLcpOption

	IPCPOptions []GXDLMSPppSetupIPCPOption

	// PPP authentication procedure type.
	Authentication enums.PppAuthenticationType

	// PPP authentication procedure user name.
	UserName []byte

	// PPP authentication procedure password.
	Password []byte
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSPppSetup

func NewGXDLMSPppSetup

func NewGXDLMSPppSetup(ln string, sn int16) (*GXDLMSPppSetup, error)

NewGXDLMSPppSetup creates a new PPP setup object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSPppSetup) Base

func (g *GXDLMSPppSetup) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSPppSetup) GetAttributeCount

func (g *GXDLMSPppSetup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSPppSetup) GetAttributeIndexToRead

func (g *GXDLMSPppSetup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSPppSetup) GetDataType

func (g *GXDLMSPppSetup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSPppSetup) GetMethodCount

func (g *GXDLMSPppSetup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSPppSetup) GetMethodNames

func (g *GXDLMSPppSetup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSPppSetup) GetNames

func (g *GXDLMSPppSetup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSPppSetup) GetValue

func (g *GXDLMSPppSetup) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSPppSetup) GetValues

func (g *GXDLMSPppSetup) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSPppSetup) Invoke

func (g *GXDLMSPppSetup) Invoke(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) ([]byte, error)

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSPppSetup) Load

func (g *GXDLMSPppSetup) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSPppSetup) PostLoad

func (g *GXDLMSPppSetup) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSPppSetup) Save

func (g *GXDLMSPppSetup) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSPppSetup) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSPppSetupIPCPOption

type GXDLMSPppSetupIPCPOption struct {
	Type enums.PppSetupIPCPOptionType

	Length uint8

	Data any
}

type GXDLMSPppSetupLcpOption

type GXDLMSPppSetupLcpOption struct {
	Type enums.PppSetupLcpOptionType

	Length uint8

	Data any
}

func (*GXDLMSPppSetupLcpOption) String

func (g *GXDLMSPppSetupLcpOption) String() string

type GXDLMSPrimeNbOfdmPlcApplicationsIdentification added in v1.0.8

type GXDLMSPrimeNbOfdmPlcApplicationsIdentification struct {
	GXDLMSObject
	FirmwareVersion string
	VendorID        uint16
	ProductID       uint16
}

GXDLMSPrimeNbOfdmPlcApplicationsIdentification stores PRIME application identification.

func NewGXDLMSPrimeNbOfdmPlcApplicationsIdentification added in v1.0.8

func NewGXDLMSPrimeNbOfdmPlcApplicationsIdentification(ln string, sn int16) (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification, error)

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) GetAttributeCount added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcApplicationsIdentification) GetAttributeCount() int

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcApplicationsIdentification) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) GetDataType added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) GetMethodCount added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) GetMethodNames added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) GetNames added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) GetValue added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) GetValues added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) Invoke added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) Load added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) PostLoad added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) Save added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcApplicationsIdentification) SetValue added in v1.0.8

type GXDLMSPrimeNbOfdmPlcMacCounters added in v1.0.8

type GXDLMSPrimeNbOfdmPlcMacCounters struct {
	GXDLMSObject
	TxDataPktCount  uint32
	RxDataPktCount  uint32
	TxCtrlPktCount  uint32
	RxCtrlPktCount  uint32
	CsmaFailCount   uint32
	CsmaChBusyCount uint32
}

GXDLMSPrimeNbOfdmPlcMacCounters represents PRIME NB OFDM PLC MAC counters.

func NewGXDLMSPrimeNbOfdmPlcMacCounters added in v1.0.8

func NewGXDLMSPrimeNbOfdmPlcMacCounters(ln string, sn int16) (*GXDLMSPrimeNbOfdmPlcMacCounters, error)

func (*GXDLMSPrimeNbOfdmPlcMacCounters) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSPrimeNbOfdmPlcMacCounters) GetAttributeCount added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacCounters) GetAttributeCount() int

func (*GXDLMSPrimeNbOfdmPlcMacCounters) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacCounters) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSPrimeNbOfdmPlcMacCounters) GetDataType added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacCounters) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSPrimeNbOfdmPlcMacCounters) GetMethodCount added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacCounters) GetMethodCount() int

func (*GXDLMSPrimeNbOfdmPlcMacCounters) GetMethodNames added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacCounters) GetMethodNames() []string

func (*GXDLMSPrimeNbOfdmPlcMacCounters) GetNames added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacCounters) GetNames() []string

func (*GXDLMSPrimeNbOfdmPlcMacCounters) GetValue added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacCounters) GetValues added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacCounters) GetValues() []any

func (*GXDLMSPrimeNbOfdmPlcMacCounters) Invoke added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacCounters) Load added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacCounters) PostLoad added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacCounters) PostLoad(reader *GXXmlReader) error

func (*GXDLMSPrimeNbOfdmPlcMacCounters) Reset added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacCounters) Reset(client IGXDLMSClient) ([][]byte, error)

func (*GXDLMSPrimeNbOfdmPlcMacCounters) Save added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacCounters) SetValue added in v1.0.8

type GXDLMSPrimeNbOfdmPlcMacFunctionalParameters added in v1.0.8

type GXDLMSPrimeNbOfdmPlcMacFunctionalParameters struct {
	GXDLMSObject
	LnId               int16
	LsId               uint8
	SId                uint8
	Sna                []byte
	State              enums.MacState
	ScpLength          int16
	NodeHierarchyLevel uint8
	BeaconSlotCount    uint8
	BeaconRxSlot       uint8
	BeaconTxSlot       uint8
	BeaconRxFrequency  uint8
	BeaconTxFrequency  uint8
	Capabilities       enums.MacCapabilities
}

GXDLMSPrimeNbOfdmPlcMacFunctionalParameters stores PRIME MAC functional parameters.

func NewGXDLMSPrimeNbOfdmPlcMacFunctionalParameters added in v1.0.8

func NewGXDLMSPrimeNbOfdmPlcMacFunctionalParameters(ln string, sn int16) (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters, error)

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) GetAttributeCount added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) GetAttributeCount() int

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) GetDataType added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) GetMethodCount added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) GetMethodNames added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) GetNames added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) GetValue added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) GetValues added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) Invoke added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) Load added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) PostLoad added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) Save added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacFunctionalParameters) SetValue added in v1.0.8

type GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData added in v1.0.8

type GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData struct {
	GXDLMSObject
	MulticastEntries  []GXMacMulticastEntry
	SwitchTable       []int16
	DirectTable       []GXMacDirectTable
	AvailableSwitches []GXMacAvailableSwitch
	Communications    []GXMacPhyCommunication
}

GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData stores PRIME MAC network administration data.

func NewGXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData added in v1.0.8

func NewGXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData(ln string, sn int16) (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData, error)

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) Base added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) GetAttributeCount added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) GetDataType added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) GetMethodCount added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) GetMethodNames added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) GetNames added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) GetValue added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) GetValues added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) Invoke added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) Load added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) PostLoad added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) Reset added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) Save added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacNetworkAdministrationData) SetValue added in v1.0.8

type GXDLMSPrimeNbOfdmPlcMacSetup added in v1.0.8

type GXDLMSPrimeNbOfdmPlcMacSetup struct {
	GXDLMSObject
	MacMinSwitchSearchTime  uint8
	MacMaxPromotionPdu      uint8
	MacPromotionPduTxPeriod uint8
	MacBeaconsPerFrame      uint8
	MacScpMaxTxAttempts     uint8
	MacCtlReTxTimer         uint8
	MacMaxCtlReTx           uint8
}

GXDLMSPrimeNbOfdmPlcMacSetup represents PRIME NB OFDM PLC MAC setup.

func NewGXDLMSPrimeNbOfdmPlcMacSetup added in v1.0.8

func NewGXDLMSPrimeNbOfdmPlcMacSetup(ln string, sn int16) (*GXDLMSPrimeNbOfdmPlcMacSetup, error)

func (*GXDLMSPrimeNbOfdmPlcMacSetup) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSPrimeNbOfdmPlcMacSetup) GetAttributeCount added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacSetup) GetAttributeCount() int

func (*GXDLMSPrimeNbOfdmPlcMacSetup) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacSetup) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSPrimeNbOfdmPlcMacSetup) GetDataType added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacSetup) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSPrimeNbOfdmPlcMacSetup) GetMethodCount added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacSetup) GetMethodCount() int

func (*GXDLMSPrimeNbOfdmPlcMacSetup) GetMethodNames added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacSetup) GetMethodNames() []string

func (*GXDLMSPrimeNbOfdmPlcMacSetup) GetNames added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacSetup) GetNames() []string

func (*GXDLMSPrimeNbOfdmPlcMacSetup) GetValue added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacSetup) GetValues added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacSetup) GetValues() []any

func (*GXDLMSPrimeNbOfdmPlcMacSetup) Invoke added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacSetup) Load added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacSetup) PostLoad added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcMacSetup) PostLoad(reader *GXXmlReader) error

func (*GXDLMSPrimeNbOfdmPlcMacSetup) Save added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcMacSetup) SetValue added in v1.0.8

type GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters added in v1.0.8

type GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters struct {
	GXDLMSObject
	CrcIncorrectCount uint16
	CrcFailedCount    uint16
	TxDropCount       uint16
	RxDropCount       uint16
}

GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters represents PRIME NB OFDM PLC physical layer counters.

func NewGXDLMSPrimeNbOfdmPlcPhysicalLayerCounters added in v1.0.8

func NewGXDLMSPrimeNbOfdmPlcPhysicalLayerCounters(ln string, sn int16) (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters, error)

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) GetAttributeCount added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) GetAttributeCount() int

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) GetDataType added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) GetMethodCount added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) GetMethodCount() int

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) GetMethodNames added in v1.0.8

func (g *GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) GetMethodNames() []string

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) GetNames added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) GetValue added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) GetValues added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) Invoke added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) Load added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) PostLoad added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) Save added in v1.0.8

func (*GXDLMSPrimeNbOfdmPlcPhysicalLayerCounters) SetValue added in v1.0.8

type GXDLMSProfileGeneric

type GXDLMSProfileGeneric struct {
	GXDLMSObject
	// Client uses this to save how values are access.
	AccessSelector enums.AccessRange

	// Client uses this to save from which date values are retrieved.
	From any

	// Client uses this to save to which date values are retrieved.
	To any

	// Data of profile generic.
	Buffer [][]any

	CaptureObjects []types.GXKeyValuePair[IGXDLMSBase, *GXDLMSCaptureObject]

	// How often values are captured.
	CapturePeriod uint32

	// How columns are sorted.
	SortMethod enums.SortMethod

	// Column that is used for sorting.
	SortObject IGXDLMSBase

	// Sort object's attribute index.
	SortAttributeIndex int

	// Sort object's data index.
	SortDataIndex int

	// Entries (rows) in Use.
	EntriesInUse uint32

	// Maximum Entries (rows) count.
	ProfileEntries uint32
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSProfileGeneric

func NewGXDLMSProfileGeneric

func NewGXDLMSProfileGeneric(ln string, sn int16) (*GXDLMSProfileGeneric, error)

NewGXDLMSProfileGeneric creates a new profile generic object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSProfileGeneric) Base

Base returns the base GXDLMSObject of the object.

func (*GXDLMSProfileGeneric) Capture

func (g *GXDLMSProfileGeneric) Capture(client IGXDLMSClient) ([][]byte, error)

Capture returns the copies the values of the objects to capture into the buffer by reading each capture object.

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSProfileGeneric) GetAttributeCount

func (g *GXDLMSProfileGeneric) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSProfileGeneric) GetAttributeIndexToRead

func (g *GXDLMSProfileGeneric) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSProfileGeneric) GetCaptureObject

func (g *GXDLMSProfileGeneric) GetCaptureObject() []IGXDLMSBase

GetCaptureObject returns the get captured objects.

func (*GXDLMSProfileGeneric) GetCaptureObjects

func (g *GXDLMSProfileGeneric) GetCaptureObjects(array []any) []types.GXKeyValuePair[IGXDLMSBase, *GXDLMSCaptureObject]

GetCaptureObjects returns the get capture objects.

Parameters:

array: Received data.

func (*GXDLMSProfileGeneric) GetColumns

GetColumns returns the get selected (filtered) columns.

Parameters:

cols: Selected columns.

Returns:

Selected columns.

func (*GXDLMSProfileGeneric) GetData

GetData returns the buffer data.

Parameters:

settings: DLMS settings.
columns: Columns to get. nil if not used.

func (*GXDLMSProfileGeneric) GetDataType

func (g *GXDLMSProfileGeneric) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type_ of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type_ of the object.

func (*GXDLMSProfileGeneric) GetMethodCount

func (g *GXDLMSProfileGeneric) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSProfileGeneric) GetMethodNames

func (g *GXDLMSProfileGeneric) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSProfileGeneric) GetNames

func (g *GXDLMSProfileGeneric) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSProfileGeneric) GetSelectedColumns

func (g *GXDLMSProfileGeneric) GetSelectedColumns(selector int,
	parameters any) ([]types.GXKeyValuePair[IGXDLMSBase, *GXDLMSCaptureObject], error)

GetSelectedColumns returns the get selected columns from parameters.

Parameters:

selector: Is read by entry or range.
parameters: Received parameters where columns information is found.

Returns:

Selected columns.

func (*GXDLMSProfileGeneric) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSProfileGeneric) GetValues

func (g *GXDLMSProfileGeneric) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSProfileGeneric) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSProfileGeneric) Load

func (g *GXDLMSProfileGeneric) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSProfileGeneric) PostLoad

func (g *GXDLMSProfileGeneric) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSProfileGeneric) Reset

func (g *GXDLMSProfileGeneric) Reset(client IGXDLMSClient) ([][]byte, error)

Reset returns the clears the buffer.

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSProfileGeneric) Save

func (g *GXDLMSProfileGeneric) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSProfileGeneric) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSPushSetup added in v1.0.3

type GXDLMSPushSetup struct {
	GXDLMSObject
	Service enums.ServiceType

	Destination string

	Message enums.MessageType

	// Defines the list of attributes or objects to be pushed.
	// Upon a call of the push (data) method the selected attributes are sent to the destination
	// defined in send_destination_and_method.
	PushObjectList []types.GXKeyValuePair[IGXDLMSBase, GXDLMSCaptureObject]

	// Contains the start and end date/time
	// stamp when the communication window(s) for the push become active
	// (for the start instant), or inac-tive (for the end instant).
	CommunicationWindow []types.GXKeyValuePair[types.GXDateTime, types.GXDateTime]

	// To avoid simultaneous network connections of a lot of devices at ex-actly
	// the same point in time, a randomisation interval in seconds can be defined.
	// This means that the push operation is not started imme-diately at the
	// beginning of the first communication window but started randomly delayed.
	RandomisationStartInterval uint16

	// The maximum number of retrials in case of unsuccessful push at-tempts. After a successful push no further push attempts are made until the push setup is triggered again.
	// A value of 0 means no repetitions, i.e. only the initial connection at-tempt is made.
	NumberOfRetries uint8

	// Repetition delay.
	// Version 2 is using RepetitionDelay2.
	RepetitionDelay uint16

	// Repetition delay for Version2.
	// Version 0 and 1 use RepetitionDelay.
	RepetitionDelay2 GXRepetitionDelay

	// The logical name of a communication port setup object.
	PortReference IGXDLMSBase

	// Push client SAP.
	PushClientSAP int8

	// Push protection parameters.
	PushProtectionParameters []GXPushProtectionParameters

	// Push operation method.
	PushOperationMethod enums.PushOperationMethod

	// Push confirmation parameter.
	ConfirmationParameters GXPushConfirmationParameter

	// Last confirmation date time.
	LastConfirmationDateTime types.GXDateTime
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSPushSetup

func NewGXDLMSPushSetup added in v1.0.3

func NewGXDLMSPushSetup(ln string, sn int16) (*GXDLMSPushSetup, error)

NewGXDLMPushSetup creates a new Push Setup object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSPushSetup) Base added in v1.0.3

func (g *GXDLMSPushSetup) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSPushSetup) GetAttributeCount added in v1.0.3

func (g *GXDLMSPushSetup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSPushSetup) GetAttributeIndexToRead added in v1.0.3

func (g *GXDLMSPushSetup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSPushSetup) GetDataType added in v1.0.3

func (g *GXDLMSPushSetup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSPushSetup) GetMethodCount added in v1.0.3

func (g *GXDLMSPushSetup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSPushSetup) GetMethodNames added in v1.0.3

func (g *GXDLMSPushSetup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSPushSetup) GetNames added in v1.0.3

func (g *GXDLMSPushSetup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSPushSetup) GetPushValues added in v1.0.3

func (g *GXDLMSPushSetup) GetPushValues(client IGXDLMSClient, values []any) error

GetPushValues maps received push values to target COSEM objects.

Parameters:

values: Received values.

Returns:

Clone of captured COSEM objects.

func (*GXDLMSPushSetup) GetValue added in v1.0.3

func (g *GXDLMSPushSetup) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSPushSetup) GetValues added in v1.0.3

func (g *GXDLMSPushSetup) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSPushSetup) Invoke added in v1.0.3

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSPushSetup) Load added in v1.0.3

func (g *GXDLMSPushSetup) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSPushSetup) PostLoad added in v1.0.3

func (g *GXDLMSPushSetup) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSPushSetup) Push added in v1.0.3

func (g *GXDLMSPushSetup) Push(client IGXDLMSClient) ([][]uint8, error)

Push invokes the push action (method 1).

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSPushSetup) Reset added in v1.0.3

func (g *GXDLMSPushSetup) Reset(client IGXDLMSClient) ([][]uint8, error)

Reset invokes the reset action (method 2).

Parameters:

client: DLMS client.

Returns:

Action bytes.

func (*GXDLMSPushSetup) Save added in v1.0.3

func (g *GXDLMSPushSetup) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSPushSetup) SetValue added in v1.0.3

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSQosElement

type GXDLMSQosElement struct {
	Precedence     uint8
	Delay          uint8
	Reliability    uint8
	PeakThroughput uint8
	MeanThroughput uint8
}

type GXDLMSRegister

type GXDLMSRegister struct {
	GXDLMSObject

	// Unit of COSEM Register object.
	Unit enums.Unit

	// Value of COSEM Register object.
	Value any
	// contains filtered or unexported fields
}

Online help:

https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSRegister

func NewGXDLMSRegister

func NewGXDLMSRegister(ln string, sn int16) (*GXDLMSRegister, error)

NewGXDLMSRegister creates a new register object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSRegister) Base

func (g *GXDLMSRegister) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSRegister) GetAttributeCount

func (g *GXDLMSRegister) GetAttributeCount() int

GetAttributeCount returns the returns amount of attributes.

func (*GXDLMSRegister) GetAttributeIndexToRead

func (g *GXDLMSRegister) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the returns collection of attributes to read. all: All items are returned even if they are read already.

Returns:
    Collection of attributes to read.

func (*GXDLMSRegister) GetDataType

func (g *GXDLMSRegister) GetDataType(index int) (enums.DataType, error)

GetDataType returns the returns device data type of selected attribute index.index: Attribute index of the object.

Returns:
    Device data type of the object.

func (*GXDLMSRegister) GetMethodCount

func (g *GXDLMSRegister) GetMethodCount() int

GetMethodCount returns the returns amount of methods.

func (*GXDLMSRegister) GetMethodNames

func (g *GXDLMSRegister) GetMethodNames() []string

GetMethodNames returns the returns names of method indexes.

func (*GXDLMSRegister) GetNames

func (g *GXDLMSRegister) GetNames() []string

GetNames returns the returns names of attribute indexes.

func (*GXDLMSRegister) GetUIDataType

func (g *GXDLMSRegister) GetUIDataType(index int) enums.DataType

GetUIDataType returns UI data type of selected index. index: Attribute index of the object.

Returns:
    UseUI data type of the object.

func (*GXDLMSRegister) GetValue

func (g *GXDLMSRegister) GetValue(settings *settings.GXDLMSSettings,
	e *internal.ValueEventArgs) (any, error)

GetValue returns the returns value of given attribute. settings: DLMS settings. e: Get parameters.

Returns:
    Value of the attribute index.

func (*GXDLMSRegister) GetValues

func (g *GXDLMSRegister) GetValues() []any

GetValues returns the returns attributes as an array.

Returns:
    Collection of COSEM object values.

func (*GXDLMSRegister) Invoke

func (g *GXDLMSRegister) Invoke(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) ([]byte, error)

Invoke returns the invokes method.settings: DLMS settings. e: Invoke parameters.

func (*GXDLMSRegister) IsRead

func (g *GXDLMSRegister) IsRead(index int) bool

IsRead returns the is attribute read. index: Attribute index to read.

Returns:
    Returns true if attribute is read.

func (*GXDLMSRegister) Load

func (g *GXDLMSRegister) Load(reader *GXXmlReader) error

Load returns the load object content from XML.reader: XML reader.

func (*GXDLMSRegister) PostLoad

func (g *GXDLMSRegister) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load. reader: XML reader.

func (*GXDLMSRegister) Reset

func (g *GXDLMSRegister) Reset(client IGXDLMSClient) ([][]byte, error)

Reset returns the reset value. client: DLMS client.

Returns:
    Action bytes.

func (*GXDLMSRegister) Save

func (g *GXDLMSRegister) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.writer: XML writer.

func (*GXDLMSRegister) Scaler

func (g *GXDLMSRegister) Scaler() float64

Scaler returns the scaler of COSEM Register object.

func (*GXDLMSRegister) SetScaler

func (g *GXDLMSRegister) SetScaler(value float64)

SetScaler sets the scaler of COSEM Register object.

func (*GXDLMSRegister) SetValue

SetValue returns the set value of given attribute. settings: DLMS settings. e: Set parameters.

type GXDLMSRegisterActivation added in v1.0.2

type GXDLMSRegisterActivation struct {
	GXDLMSObject
	// Assignment list.
	RegisterAssignment []GXDLMSObjectDefinition
	// Mask list.
	MaskList []types.GXKeyValuePair[[]byte, []byte]
	// Active mask.
	ActiveMask []byte
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSRegisterActivation

func NewGXDLMSRegisterActivation added in v1.0.2

func NewGXDLMSRegisterActivation(ln string, sn int16) (*GXDLMSRegisterActivation, error)

NewGXDLMSRegisterActivation creates a new register activation object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSRegisterActivation) AddMask added in v1.0.2

func (g *GXDLMSRegisterActivation) AddMask(client IGXDLMSClient, name []byte, indexes []byte) ([][]uint8, error)

AddMask returns the add new register activation mask.

Parameters:

client: DLMS client.
name: Register activation mask name.
indexes: Register activation indexes.

Returns:

Action bytes.

func (*GXDLMSRegisterActivation) AddRegister added in v1.0.2

func (g *GXDLMSRegisterActivation) AddRegister(client IGXDLMSClient, target IGXDLMSBase) ([][]uint8, error)

AddRegister returns the add new register.

Parameters:

client: DLMS client.
script: Register to add.

Returns:

Action bytes.

func (*GXDLMSRegisterActivation) Base added in v1.0.2

Base returns the base GXDLMSObject of the object.

func (*GXDLMSRegisterActivation) GetAttributeCount added in v1.0.2

func (g *GXDLMSRegisterActivation) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSRegisterActivation) GetAttributeIndexToRead added in v1.0.2

func (g *GXDLMSRegisterActivation) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSRegisterActivation) GetDataType added in v1.0.2

func (g *GXDLMSRegisterActivation) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSRegisterActivation) GetMethodCount added in v1.0.2

func (g *GXDLMSRegisterActivation) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSRegisterActivation) GetMethodNames added in v1.0.2

func (g *GXDLMSRegisterActivation) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSRegisterActivation) GetNames added in v1.0.2

func (g *GXDLMSRegisterActivation) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSRegisterActivation) GetValue added in v1.0.2

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSRegisterActivation) GetValues added in v1.0.2

func (g *GXDLMSRegisterActivation) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSRegisterActivation) Invoke added in v1.0.2

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSRegisterActivation) Load added in v1.0.2

func (g *GXDLMSRegisterActivation) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSRegisterActivation) PostLoad added in v1.0.2

func (g *GXDLMSRegisterActivation) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSRegisterActivation) RemoveMask added in v1.0.2

func (g *GXDLMSRegisterActivation) RemoveMask(client IGXDLMSClient, name []byte) ([][]uint8, error)

RemoveMask returns the remove register activation mask.

Parameters:

client: DLMS client.
name: Register activation mask name.

Returns:

Action bytes.

func (*GXDLMSRegisterActivation) Save added in v1.0.2

func (g *GXDLMSRegisterActivation) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSRegisterActivation) SetValue added in v1.0.2

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSRegisterMonitor added in v1.0.2

type GXDLMSRegisterMonitor struct {
	GXDLMSObject
	Thresholds []any

	MonitoredValue GXDLMSMonitoredValue

	Actions []GXDLMSActionSet
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSRegisterMonitor

func NewGXDLMSRegisterMonitor added in v1.0.2

func NewGXDLMSRegisterMonitor(ln string, sn int16) (*GXDLMSRegisterMonitor, error)

NewGXDLMSRegisterMonitor creates a new register monitor object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSRegisterMonitor) Base added in v1.0.2

Base returns the base GXDLMSObject of the object.

func (*GXDLMSRegisterMonitor) GetAttributeCount added in v1.0.2

func (g *GXDLMSRegisterMonitor) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSRegisterMonitor) GetAttributeIndexToRead added in v1.0.2

func (g *GXDLMSRegisterMonitor) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSRegisterMonitor) GetDataType added in v1.0.2

func (g *GXDLMSRegisterMonitor) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSRegisterMonitor) GetMethodCount added in v1.0.2

func (g *GXDLMSRegisterMonitor) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSRegisterMonitor) GetMethodNames added in v1.0.2

func (g *GXDLMSRegisterMonitor) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSRegisterMonitor) GetNames added in v1.0.2

func (g *GXDLMSRegisterMonitor) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSRegisterMonitor) GetValue added in v1.0.2

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSRegisterMonitor) GetValues added in v1.0.2

func (g *GXDLMSRegisterMonitor) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSRegisterMonitor) Invoke added in v1.0.2

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSRegisterMonitor) Load added in v1.0.2

func (g *GXDLMSRegisterMonitor) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSRegisterMonitor) PostLoad added in v1.0.2

func (g *GXDLMSRegisterMonitor) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSRegisterMonitor) Save added in v1.0.2

func (g *GXDLMSRegisterMonitor) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSRegisterMonitor) SetValue added in v1.0.2

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSRestriction

type GXDLMSRestriction struct {
	// Restriction type.
	Type enums.RestrictionType

	// From date or entry.
	From any

	// To date or entry.
	To any
}

Compact data and push object restriction values.

type GXDLMSRoutingConfiguration added in v1.0.8

type GXDLMSRoutingConfiguration struct {
	NetTraversalTime       uint8
	RoutingTableEntryTtl   uint16
	Kr, Km, Kc, Kq, Kh     uint8
	Krt, RreqRetries       uint8
	RreqReqWait            uint8
	BlacklistTableEntryTtl uint16
	UnicastRreqGenEnable   bool
	RlcEnabled             bool
	AddRevLinkCost         uint8
}

type GXDLMSRoutingTable added in v1.0.8

type GXDLMSRoutingTable struct {
	DestinationAddress uint16
	NextHopAddress     uint16
	RouteCost          uint16
	HopCount           uint8
	WeakLinkCount      uint8
	ValidTime          uint16
}

type GXDLMSSFSKActiveInitiator added in v1.0.8

type GXDLMSSFSKActiveInitiator struct {
	GXDLMSObject
	SystemTitle  []byte
	MacAddress   uint16
	LSapSelector uint8
}

GXDLMSSFSKActiveInitiator contains active initiator information.

func NewGXDLMSSFSKActiveInitiator added in v1.0.8

func NewGXDLMSSFSKActiveInitiator(ln string, sn int16) (*GXDLMSSFSKActiveInitiator, error)

NewGXDLMSSFSKActiveInitiator creates a new S-FSK active initiator object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSSFSKActiveInitiator) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSSFSKActiveInitiator) GetAttributeCount added in v1.0.8

func (g *GXDLMSSFSKActiveInitiator) GetAttributeCount() int

func (*GXDLMSSFSKActiveInitiator) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSSFSKActiveInitiator) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSSFSKActiveInitiator) GetDataType added in v1.0.8

func (g *GXDLMSSFSKActiveInitiator) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSSFSKActiveInitiator) GetMethodCount added in v1.0.8

func (g *GXDLMSSFSKActiveInitiator) GetMethodCount() int

func (*GXDLMSSFSKActiveInitiator) GetMethodNames added in v1.0.8

func (g *GXDLMSSFSKActiveInitiator) GetMethodNames() []string

func (*GXDLMSSFSKActiveInitiator) GetNames added in v1.0.8

func (g *GXDLMSSFSKActiveInitiator) GetNames() []string

func (*GXDLMSSFSKActiveInitiator) GetValue added in v1.0.8

func (*GXDLMSSFSKActiveInitiator) GetValues added in v1.0.8

func (g *GXDLMSSFSKActiveInitiator) GetValues() []any

func (*GXDLMSSFSKActiveInitiator) Invoke added in v1.0.8

func (*GXDLMSSFSKActiveInitiator) Load added in v1.0.8

func (g *GXDLMSSFSKActiveInitiator) Load(reader *GXXmlReader) error

func (*GXDLMSSFSKActiveInitiator) PostLoad added in v1.0.8

func (g *GXDLMSSFSKActiveInitiator) PostLoad(reader *GXXmlReader) error

func (*GXDLMSSFSKActiveInitiator) Save added in v1.0.8

func (g *GXDLMSSFSKActiveInitiator) Save(writer *GXXmlWriter) error

func (*GXDLMSSFSKActiveInitiator) SetValue added in v1.0.8

type GXDLMSSFSKMacCounters added in v1.0.8

type GXDLMSSFSKMacCounters struct {
	GXDLMSObject
	SynchronizationRegister              []types.GXKeyValuePair[uint16, uint32]
	PhysicalLayerDesynchronization       uint32
	TimeOutNotAddressedDesynchronization uint32
	TimeOutFrameNotOkDesynchronization   uint32
	WriteRequestDesynchronization        uint32
	WrongInitiatorDesynchronization      uint32
	BroadcastFramesCounter               []types.GXKeyValuePair[uint16, uint32]
	RepetitionsCounter                   uint32
	TransmissionsCounter                 uint32
	CrcOkFramesCounter                   uint32
	CrcNOkFramesCounter                  uint32
}

GXDLMSSFSKMacCounters contains s-FSK MAC counters.

func NewGXDLMSSFSKMacCounters added in v1.0.8

func NewGXDLMSSFSKMacCounters(ln string, sn int16) (*GXDLMSSFSKMacCounters, error)

NewGXDLMSSFSKMacCounters creates a new s-FSK MAC counters object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSSFSKMacCounters) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSSFSKMacCounters) GetAttributeCount added in v1.0.8

func (g *GXDLMSSFSKMacCounters) GetAttributeCount() int

func (*GXDLMSSFSKMacCounters) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSSFSKMacCounters) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSSFSKMacCounters) GetDataType added in v1.0.8

func (g *GXDLMSSFSKMacCounters) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSSFSKMacCounters) GetMethodCount added in v1.0.8

func (g *GXDLMSSFSKMacCounters) GetMethodCount() int

func (*GXDLMSSFSKMacCounters) GetMethodNames added in v1.0.8

func (g *GXDLMSSFSKMacCounters) GetMethodNames() []string

func (*GXDLMSSFSKMacCounters) GetNames added in v1.0.8

func (g *GXDLMSSFSKMacCounters) GetNames() []string

func (*GXDLMSSFSKMacCounters) GetValue added in v1.0.8

func (*GXDLMSSFSKMacCounters) GetValues added in v1.0.8

func (g *GXDLMSSFSKMacCounters) GetValues() []any

func (*GXDLMSSFSKMacCounters) Invoke added in v1.0.8

func (*GXDLMSSFSKMacCounters) Load added in v1.0.8

func (g *GXDLMSSFSKMacCounters) Load(reader *GXXmlReader) error

func (*GXDLMSSFSKMacCounters) PostLoad added in v1.0.8

func (g *GXDLMSSFSKMacCounters) PostLoad(reader *GXXmlReader) error

func (*GXDLMSSFSKMacCounters) Save added in v1.0.8

func (g *GXDLMSSFSKMacCounters) Save(writer *GXXmlWriter) error

func (*GXDLMSSFSKMacCounters) SetValue added in v1.0.8

type GXDLMSSFSKMacSynchronizationTimeouts added in v1.0.8

type GXDLMSSFSKMacSynchronizationTimeouts struct {
	GXDLMSObject
	SearchInitiatorTimeout             uint16
	SynchronizationConfirmationTimeout uint16
	TimeOutNotAddressed                uint16
	TimeOutFrameNotOK                  uint16
}

GXDLMSSFSKMacSynchronizationTimeouts contains s-FSK MAC synchronization timeouts.

func NewGXDLMSSFSKMacSynchronizationTimeouts added in v1.0.8

func NewGXDLMSSFSKMacSynchronizationTimeouts(ln string, sn int16) (*GXDLMSSFSKMacSynchronizationTimeouts, error)

NewGXDLMSSFSKMacSynchronizationTimeouts creates a new s-FSK MAC synchronization timeouts object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSSFSKMacSynchronizationTimeouts) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSSFSKMacSynchronizationTimeouts) GetAttributeCount added in v1.0.8

func (g *GXDLMSSFSKMacSynchronizationTimeouts) GetAttributeCount() int

func (*GXDLMSSFSKMacSynchronizationTimeouts) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSSFSKMacSynchronizationTimeouts) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSSFSKMacSynchronizationTimeouts) GetDataType added in v1.0.8

func (g *GXDLMSSFSKMacSynchronizationTimeouts) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSSFSKMacSynchronizationTimeouts) GetMethodCount added in v1.0.8

func (g *GXDLMSSFSKMacSynchronizationTimeouts) GetMethodCount() int

func (*GXDLMSSFSKMacSynchronizationTimeouts) GetMethodNames added in v1.0.8

func (g *GXDLMSSFSKMacSynchronizationTimeouts) GetMethodNames() []string

func (*GXDLMSSFSKMacSynchronizationTimeouts) GetNames added in v1.0.8

func (*GXDLMSSFSKMacSynchronizationTimeouts) GetValue added in v1.0.8

func (*GXDLMSSFSKMacSynchronizationTimeouts) GetValues added in v1.0.8

func (g *GXDLMSSFSKMacSynchronizationTimeouts) GetValues() []any

func (*GXDLMSSFSKMacSynchronizationTimeouts) Invoke added in v1.0.8

func (*GXDLMSSFSKMacSynchronizationTimeouts) Load added in v1.0.8

func (*GXDLMSSFSKMacSynchronizationTimeouts) PostLoad added in v1.0.8

func (*GXDLMSSFSKMacSynchronizationTimeouts) Save added in v1.0.8

func (*GXDLMSSFSKMacSynchronizationTimeouts) SetValue added in v1.0.8

type GXDLMSSFSKPhyMacSetup added in v1.0.8

type GXDLMSSFSKPhyMacSetup struct {
	GXDLMSObject
	InitiatorElectricalPhase enums.InitiatorElectricalPhase
	DeltaElectricalPhase     enums.DeltaElectricalPhase
	MaxReceivingGain         uint8
	MaxTransmittingGain      uint8
	SearchInitiatorThreshold uint8
	MarkFrequency            uint32
	SpaceFrequency           uint32
	MacAddress               uint16
	MacGroupAddresses        []uint16
	Repeater                 enums.Repeater
	RepeaterStatus           bool
	MinDeltaCredit           uint8
	InitiatorMacAddress      uint16
	SynchronizationLocked    bool
	TransmissionSpeed        enums.BaudRate
}

GXDLMSSFSKPhyMacSetup contains S-FSK PHY/MAC setup parameters.

func NewGXDLMSSFSKPhyMacSetup added in v1.0.8

func NewGXDLMSSFSKPhyMacSetup(ln string, sn int16) (*GXDLMSSFSKPhyMacSetup, error)

NewGXDLMSSFSKPhyMacSetup creates a new s-FSK PHY/MAC setup object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSSFSKPhyMacSetup) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSSFSKPhyMacSetup) GetAttributeCount added in v1.0.8

func (g *GXDLMSSFSKPhyMacSetup) GetAttributeCount() int

func (*GXDLMSSFSKPhyMacSetup) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSSFSKPhyMacSetup) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSSFSKPhyMacSetup) GetDataType added in v1.0.8

func (g *GXDLMSSFSKPhyMacSetup) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSSFSKPhyMacSetup) GetMethodCount added in v1.0.8

func (g *GXDLMSSFSKPhyMacSetup) GetMethodCount() int

func (*GXDLMSSFSKPhyMacSetup) GetMethodNames added in v1.0.8

func (g *GXDLMSSFSKPhyMacSetup) GetMethodNames() []string

func (*GXDLMSSFSKPhyMacSetup) GetNames added in v1.0.8

func (g *GXDLMSSFSKPhyMacSetup) GetNames() []string

func (*GXDLMSSFSKPhyMacSetup) GetValue added in v1.0.8

func (*GXDLMSSFSKPhyMacSetup) GetValues added in v1.0.8

func (g *GXDLMSSFSKPhyMacSetup) GetValues() []any

func (*GXDLMSSFSKPhyMacSetup) Invoke added in v1.0.8

func (*GXDLMSSFSKPhyMacSetup) Load added in v1.0.8

func (g *GXDLMSSFSKPhyMacSetup) Load(reader *GXXmlReader) error

func (*GXDLMSSFSKPhyMacSetup) PostLoad added in v1.0.8

func (g *GXDLMSSFSKPhyMacSetup) PostLoad(reader *GXXmlReader) error

func (*GXDLMSSFSKPhyMacSetup) Save added in v1.0.8

func (g *GXDLMSSFSKPhyMacSetup) Save(writer *GXXmlWriter) error

func (*GXDLMSSFSKPhyMacSetup) SetValue added in v1.0.8

type GXDLMSSFSKReportingSystemList added in v1.0.8

type GXDLMSSFSKReportingSystemList struct {
	GXDLMSObject
	ReportingSystemList [][]byte
}

GXDLMSSFSKReportingSystemList contains registered reporting systems.

func NewGXDLMSSFSKReportingSystemList added in v1.0.8

func NewGXDLMSSFSKReportingSystemList(ln string, sn int16) (*GXDLMSSFSKReportingSystemList, error)

NewGXDLMSSFSKReportingSystemList creates a new S-FSK reporting system list object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSSFSKReportingSystemList) Base added in v1.0.8

Base returns the base GXDLMSObject of the object.

func (*GXDLMSSFSKReportingSystemList) GetAttributeCount added in v1.0.8

func (g *GXDLMSSFSKReportingSystemList) GetAttributeCount() int

func (*GXDLMSSFSKReportingSystemList) GetAttributeIndexToRead added in v1.0.8

func (g *GXDLMSSFSKReportingSystemList) GetAttributeIndexToRead(all bool) []int

func (*GXDLMSSFSKReportingSystemList) GetDataType added in v1.0.8

func (g *GXDLMSSFSKReportingSystemList) GetDataType(index int) (enums.DataType, error)

func (*GXDLMSSFSKReportingSystemList) GetMethodCount added in v1.0.8

func (g *GXDLMSSFSKReportingSystemList) GetMethodCount() int

func (*GXDLMSSFSKReportingSystemList) GetMethodNames added in v1.0.8

func (g *GXDLMSSFSKReportingSystemList) GetMethodNames() []string

func (*GXDLMSSFSKReportingSystemList) GetNames added in v1.0.8

func (g *GXDLMSSFSKReportingSystemList) GetNames() []string

func (*GXDLMSSFSKReportingSystemList) GetValue added in v1.0.8

func (*GXDLMSSFSKReportingSystemList) GetValues added in v1.0.8

func (g *GXDLMSSFSKReportingSystemList) GetValues() []any

func (*GXDLMSSFSKReportingSystemList) Invoke added in v1.0.8

func (*GXDLMSSFSKReportingSystemList) Load added in v1.0.8

func (*GXDLMSSFSKReportingSystemList) PostLoad added in v1.0.8

func (g *GXDLMSSFSKReportingSystemList) PostLoad(reader *GXXmlReader) error

func (*GXDLMSSFSKReportingSystemList) Save added in v1.0.8

func (*GXDLMSSFSKReportingSystemList) SetValue added in v1.0.8

type GXDLMSSapAssignment added in v1.0.2

type GXDLMSSapAssignment struct {
	GXDLMSObject
	SapAssignmentList []types.GXKeyValuePair[uint16, string]
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSSapAssignment

func NewGXDLMSSapAssignment added in v1.0.2

func NewGXDLMSSapAssignment(ln string, sn int16) (*GXDLMSSapAssignment, error)

NewGXDLMSSapAssignment creates a new Sap assignment object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSSapAssignment) AddSap added in v1.0.2

func (g *GXDLMSSapAssignment) AddSap(client IGXDLMSClient, id uint16, name string) ([][]uint8, error)

AddSap returns the add new SAP item.

Parameters:

client: DLMS client.
id: SAP ID.
name: Logical device name.

Returns:

Generated bytes sent to the meter.

func (*GXDLMSSapAssignment) Base added in v1.0.2

func (g *GXDLMSSapAssignment) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSSapAssignment) GetAttributeCount added in v1.0.2

func (g *GXDLMSSapAssignment) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSSapAssignment) GetAttributeIndexToRead added in v1.0.2

func (g *GXDLMSSapAssignment) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSSapAssignment) GetDataType added in v1.0.2

func (g *GXDLMSSapAssignment) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSSapAssignment) GetMethodCount added in v1.0.2

func (g *GXDLMSSapAssignment) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSSapAssignment) GetMethodNames added in v1.0.2

func (g *GXDLMSSapAssignment) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSSapAssignment) GetNames added in v1.0.2

func (g *GXDLMSSapAssignment) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSSapAssignment) GetValue added in v1.0.2

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSSapAssignment) GetValues added in v1.0.2

func (g *GXDLMSSapAssignment) GetValues() []any

GetValues returns the an array containing the COSEM object's attribute values.

func (*GXDLMSSapAssignment) Invoke added in v1.0.2

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSSapAssignment) Load added in v1.0.2

func (g *GXDLMSSapAssignment) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSSapAssignment) PostLoad added in v1.0.2

func (g *GXDLMSSapAssignment) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSSapAssignment) RemoveSap added in v1.0.2

func (g *GXDLMSSapAssignment) RemoveSap(client IGXDLMSClient, name string) ([][]uint8, error)

RemoveSap returns the remove SAP item.

Parameters:

client: DLMS client.
name: Logical device name.

Returns:

Generated bytes sent to the meter.

func (*GXDLMSSapAssignment) Save added in v1.0.2

func (g *GXDLMSSapAssignment) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSSapAssignment) SetValue added in v1.0.2

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSSchedule added in v1.0.2

type GXDLMSSchedule struct {
	GXDLMSObject
	// Specifies the scripts to be executed at given times.
	Entries []GXScheduleEntry
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSSchedule

func NewGXDLMSSchedule added in v1.0.2

func NewGXDLMSSchedule(ln string, sn int16) (*GXDLMSSchedule, error)

NewGXDLMSSchedule creates a new schedule object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSSchedule) Base added in v1.0.2

func (g *GXDLMSSchedule) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSSchedule) Delete added in v1.0.2

func (g *GXDLMSSchedule) Delete(client IGXDLMSClient, entry *GXScheduleEntry) ([][]uint8, error)

Delete returns the remove entry from entries list.

Parameters:

client: DLMS client.
entry: Schedule entry.

Returns:

Action bytes.

func (*GXDLMSSchedule) Disable added in v1.0.2

func (g *GXDLMSSchedule) Disable(client IGXDLMSClient, entry *GXScheduleEntry) ([][]uint8, error)

Disable returns the disable entry from entries list.

Parameters:

client: DLMS client.
entry: Schedule entries.

Returns:

Action bytes.

func (*GXDLMSSchedule) Enable added in v1.0.2

func (g *GXDLMSSchedule) Enable(client IGXDLMSClient, entry *GXScheduleEntry) ([][]uint8, error)

Enable returns the enable entry from entries list.

Parameters:

client: DLMS client.
entry: Schedule entries.

Returns:

Action bytes.

func (*GXDLMSSchedule) GetAttributeCount added in v1.0.2

func (g *GXDLMSSchedule) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSSchedule) GetAttributeIndexToRead added in v1.0.2

func (g *GXDLMSSchedule) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSSchedule) GetDataType added in v1.0.2

func (g *GXDLMSSchedule) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSSchedule) GetMethodCount added in v1.0.2

func (g *GXDLMSSchedule) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSSchedule) GetMethodNames added in v1.0.2

func (g *GXDLMSSchedule) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSSchedule) GetNames added in v1.0.2

func (g *GXDLMSSchedule) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSSchedule) GetValue added in v1.0.2

func (g *GXDLMSSchedule) GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSSchedule) GetValues added in v1.0.2

func (g *GXDLMSSchedule) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSSchedule) Insert added in v1.0.2

func (g *GXDLMSSchedule) Insert(client IGXDLMSClient, entry *GXScheduleEntry) ([][]uint8, error)

Insert returns the add entry to entries list.

Parameters:

client: DLMS client.
entry: Schedule entry.

Returns:

Action bytes.

func (*GXDLMSSchedule) Invoke added in v1.0.2

func (g *GXDLMSSchedule) Invoke(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) ([]byte, error)

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSSchedule) Load added in v1.0.2

func (g *GXDLMSSchedule) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSSchedule) PostLoad added in v1.0.2

func (g *GXDLMSSchedule) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSSchedule) Save added in v1.0.2

func (g *GXDLMSSchedule) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSSchedule) SetValue added in v1.0.2

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSScript

type GXDLMSScript struct {
	// Script identifier.
	Id uint16

	// Script actions.
	Actions []GXDLMSScriptAction
}

Script of script table.

type GXDLMSScriptAction

type GXDLMSScriptAction struct {
	// Executed object
	Target IGXDLMSBase

	// Defines which action to be applied to the referenced object.
	Type enums.ScriptActionType

	// Defines which attribute of the selected object is affected
	// or which specific method is to be executed.
	Index int8

	// Parameter is service spesific.
	Parameter any

	// Parameter data type can be used to tell spesific data type.
	ParameterDataType enums.DataType
}

func (*GXDLMSScriptAction) String

func (g *GXDLMSScriptAction) String() string

type GXDLMSScriptTable

type GXDLMSScriptTable struct {
	GXDLMSObject
	Scripts []GXDLMSScript
}

Script table objects contain a table of script entries. Each entry consists of a script identifier and a series of action specifications. Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSScriptTable

func NewGXDLMSScriptTable

func NewGXDLMSScriptTable(ln string, sn int16) (*GXDLMSScriptTable, error)

NewGXDLMSScriptTable creates a new script table object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSScriptTable) Base

func (g *GXDLMSScriptTable) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSScriptTable) Execute

func (g *GXDLMSScriptTable) Execute(client IGXDLMSClient, script *GXDLMSScript) ([][]byte, error)

Execute executes selected script.

Parameters:

client: DLMS client.
script: Executed script.

Returns:

Action bytes.

func (*GXDLMSScriptTable) ExecuteById

func (g *GXDLMSScriptTable) ExecuteById(client IGXDLMSClient, scriptId uint16) ([][]byte, error)

ExecuteById executes selected script by id.

Parameters:

client: DLMS client.
scriptId: Executed script id.

Returns:

Action bytes.

func (*GXDLMSScriptTable) GetAttributeCount

func (g *GXDLMSScriptTable) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSScriptTable) GetAttributeIndexToRead

func (g *GXDLMSScriptTable) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSScriptTable) GetDataType

func (g *GXDLMSScriptTable) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSScriptTable) GetMethodCount

func (g *GXDLMSScriptTable) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSScriptTable) GetMethodNames

func (g *GXDLMSScriptTable) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSScriptTable) GetNames

func (g *GXDLMSScriptTable) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSScriptTable) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSScriptTable) GetValues

func (g *GXDLMSScriptTable) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSScriptTable) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSScriptTable) Load

func (g *GXDLMSScriptTable) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSScriptTable) PostLoad

func (g *GXDLMSScriptTable) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSScriptTable) Save

func (g *GXDLMSScriptTable) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSScriptTable) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSSeasonProfile

type GXDLMSSeasonProfile struct {
	// Name of season profile.
	// Some manufacturers are using non ASCII names.
	Name []byte

	// Season Profile start time.
	Start types.GXDateTime

	// Week name of season profile.
	// Some manufacturers are using non ASCII names.
	WeekName []byte
}

func (*GXDLMSSeasonProfile) String

func (g *GXDLMSSeasonProfile) String() string

type GXDLMSSecuritySetup

type GXDLMSSecuritySetup struct {
	GXDLMSObject

	// Master key.
	Kek []byte

	// Security suite.
	SecuritySuite enums.SecuritySuite

	// Client system title.
	ClientSystemTitle []byte

	// Server system title.
	ServerSystemTitle []byte

	// Available certificates.
	Certificates GXDLMSCertificateCollection
	// contains filtered or unexported fields
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSSecuritySetup

func NewGXDLMSSecuritySetup

func NewGXDLMSSecuritySetup(ln string, sn int16) (*GXDLMSSecuritySetup, error)

NewGXDLMSSecuritySetup creates a new security setup object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSSecuritySetup) Activate

func (g *GXDLMSSecuritySetup) Activate(client IGXDLMSClient, policy enums.SecurityPolicy) ([][]byte, error)

Activate returns the activates and strengthens the security policy.

Parameters:

client: DLMS client that is used to generate action.
security: New security level.

Returns:

Generated action.

func (*GXDLMSSecuritySetup) ApplyKeys

ApplyKeys returns the start to use new keys after reply is generated.

Parameters:

settings: DLMS settings.

func (*GXDLMSSecuritySetup) Base

func (g *GXDLMSSecuritySetup) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSSecuritySetup) ExportCertificateByEntity

func (g *GXDLMSSecuritySetup) ExportCertificateByEntity(client IGXDLMSClient,
	entity enums.CertificateEntity,
	type_ enums.CertificateType,
	systemTitle []byte) ([][]byte, error)

ExportCertificateByEntity returns the exports an X.509 v3 certificate from the server using entity information.

Parameters:

client: DLMS client that is used to generate action.
entity: Certificate entity.
type_: Certificate type_.
systemTitle: System title.

Returns:

Generated action.

func (*GXDLMSSecuritySetup) ExportCertificateBySerial

func (g *GXDLMSSecuritySetup) ExportCertificateBySerial(client IGXDLMSClient, serialNumber big.Int, issuer []byte) ([][]byte, error)

ExportCertificateBySerial returns the exports an X.509 v3 certificate from the server using serial information.

Parameters:

client: DLMS client that is used to generate action.
serialNumber: Serial number.
issuer: Issuer

Returns:

Generated action.

func (*GXDLMSSecuritySetup) FindCertificateByEntity

func (g *GXDLMSSecuritySetup) FindCertificateByEntity(certificates types.GXx509CertificateCollection,
	entity enums.CertificateEntity,
	type_ enums.CertificateType,
	systemtitle []byte) *types.GXx509Certificate

FindCertificateByEntity returns the find certificate using entity information.

Parameters:

certificates: Certificate collection.
entity: Certificate entity type.
type_: Certificate type.
systemtitle: System title.

func (*GXDLMSSecuritySetup) FindCertificateBySerial

func (g *GXDLMSSecuritySetup) FindCertificateBySerial(certificates types.GXx509CertificateCollection,
	serialNumber []byte,
	issuer string) *types.GXx509Certificate

FindCertificateBySerial returns the find certificate using serial information.

Parameters:

certificates: Certificate collection.
serialNumber: Serial number.
issuer: Issuer.

func (*GXDLMSSecuritySetup) Gak

func (g *GXDLMSSecuritySetup) Gak() []byte

Gak returns the authentication key.

func (*GXDLMSSecuritySetup) Gbek

func (g *GXDLMSSecuritySetup) Gbek() []byte

Gbek returns the broadcast block cipher key.

func (*GXDLMSSecuritySetup) GenerateCertificate

func (g *GXDLMSSecuritySetup) GenerateCertificate(client IGXDLMSClient, type_ enums.CertificateType) ([][]byte, error)

GenerateCertificate returns the ask Server sends the Certificate Signing Request (CSR) data.

Parameters:

client: DLMS client that is used to generate action.
type_: identifies the key pair for which the certificate will be requested.

Returns:

Generated action.

func (*GXDLMSSecuritySetup) GenerateKeyPair

func (g *GXDLMSSecuritySetup) GenerateKeyPair(client IGXDLMSClient, type_ enums.CertificateType) ([][]byte, error)

GenerateKeyPair returns the generates an asymmetric key pair as required by the security suite.

Parameters:

client: DLMS client that is used to generate action.
type_: New certificate type_.

Returns:

Generated action.

func (*GXDLMSSecuritySetup) GetAttributeCount

func (g *GXDLMSSecuritySetup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSSecuritySetup) GetAttributeIndexToRead

func (g *GXDLMSSecuritySetup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSSecuritySetup) GetDataType

func (g *GXDLMSSecuritySetup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type_ of the object.

func (*GXDLMSSecuritySetup) GetMethodCount

func (g *GXDLMSSecuritySetup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSSecuritySetup) GetMethodNames

func (g *GXDLMSSecuritySetup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSSecuritySetup) GetNames

func (g *GXDLMSSecuritySetup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSSecuritySetup) GetValue

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSSecuritySetup) GetValues

func (g *GXDLMSSecuritySetup) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSSecuritySetup) GlobalKeyTransfer

func (g *GXDLMSSecuritySetup) GlobalKeyTransfer(client IGXDLMSClient, kek []byte, list []types.GXKeyValuePair[enums.GlobalKeyType, []byte]) ([][]byte, error)

GlobalKeyTransfer returns the updates one or more global keys.

Parameters:

client: DLMS client that is used to generate action.
kek: Master key, also known as Key Encrypting Key.
list: List of Global key types and keys.

Returns:

Generated action.

func (*GXDLMSSecuritySetup) Guek

func (g *GXDLMSSecuritySetup) Guek() []byte

Guek returns the block cipher key.

func (*GXDLMSSecuritySetup) ImportCertificate

func (g *GXDLMSSecuritySetup) ImportCertificate(client IGXDLMSClient, certificate *types.GXx509Certificate) ([][]byte, error)

ImportCertificate returns the imports an X.509 v3 certificate of a public key.

Parameters:

client: DLMS client that is used to generate action.
key: Public key.

Returns:

Generated action.

func (*GXDLMSSecuritySetup) ImportCertificateFromBytes

func (g *GXDLMSSecuritySetup) ImportCertificateFromBytes(client IGXDLMSClient, key []byte) ([][]byte, error)

ImportCertificateFromBytes returns the imports an X.509 v3 certificate of a public key.

Parameters:

client: DLMS client that is used to generate action.
key: Public key.

Returns:

Generated action.

func (*GXDLMSSecuritySetup) Invoke

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSSecuritySetup) KeyAgreement

func (g *GXDLMSSecuritySetup) KeyAgreement(client IGXDLMSClient,
	list []types.GXKeyValuePair[enums.GlobalKeyType, []byte]) ([][]byte, error)

KeyAgreement returns the agree on one or more symmetric keys using the key agreement algorithm.

Parameters:

client: DLMS client that is used to generate action.
list: List of keys.

Returns:

Generated action.

func (*GXDLMSSecuritySetup) KeyAgreementFromClient

func (g *GXDLMSSecuritySetup) KeyAgreementFromClient(client IGXDLMSClient) ([][]byte, error)

KeyAgreement returns the agree on global unicast encryption key.

Parameters:

client: DLMS client that is used to generate action.
key: List of keys.

Returns:

Generated action.

func (*GXDLMSSecuritySetup) Load

func (g *GXDLMSSecuritySetup) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSSecuritySetup) PostLoad

func (g *GXDLMSSecuritySetup) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSSecuritySetup) RemoveCertificateByEntity

func (g *GXDLMSSecuritySetup) RemoveCertificateByEntity(client IGXDLMSClient,
	entity enums.CertificateEntity,
	type_ enums.CertificateType,
	systemTitle []byte) ([][]byte, error)

RemoveCertificateByEntity returns the removes X.509 v3 certificate from the server using entity.

Parameters:

client: DLMS client that is used to generate action.
entity: Certificate entity type_.
type_: Certificate type_.
systemTitle: System title.

Returns:

Generated action.

func (*GXDLMSSecuritySetup) RemoveCertificateBySerial

func (g *GXDLMSSecuritySetup) RemoveCertificateBySerial(client IGXDLMSClient,
	serialNumber big.Int,
	issuer []byte) ([][]byte, error)

RemoveCertificateBySerial returns the removes X.509 v3 certificate from the server using serial number.

Parameters:

client: DLMS client that is used to generate action.
serialNumber: Serial number.
issuer: Issuer.

Returns:

Generated action.

func (*GXDLMSSecuritySetup) Save

func (g *GXDLMSSecuritySetup) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSSecuritySetup) SecurityPolicy

func (g *GXDLMSSecuritySetup) SecurityPolicy() enums.SecurityPolicy

SecurityPolicy returns the security policy for Version 0 and 1.

func (*GXDLMSSecuritySetup) SetGak

func (g *GXDLMSSecuritySetup) SetGak(value []byte) error

SetGak sets the authentication key.

func (*GXDLMSSecuritySetup) SetGbek

func (g *GXDLMSSecuritySetup) SetGbek(value []byte) error

SetGbek sets the broadcast block cipher key.

func (*GXDLMSSecuritySetup) SetGuek

func (g *GXDLMSSecuritySetup) SetGuek(value []byte) error

SetGuek sets the block cipher key.

func (*GXDLMSSecuritySetup) SetSecurityPolicy

func (g *GXDLMSSecuritySetup) SetSecurityPolicy(value enums.SecurityPolicy) error

SetSecurityPolicy sets the security policy for Version 0 and 1.

func (*GXDLMSSecuritySetup) SetValue

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

func (*GXDLMSSecuritySetup) UpdateEphemeralKeys

func (g *GXDLMSSecuritySetup) UpdateEphemeralKeys(client IGXDLMSClient, value []byte) ([]*types.GXKeyValuePair[enums.GlobalKeyType, []byte], error)

UpdateEphemeralKeys returns the update ephemeral keys.

Returns:

List of Parsed key id and GUAK. This is for debugging purpose.

func (*GXDLMSSecuritySetup) UpdateEphemeralKeysFromByteBuffer

func (g *GXDLMSSecuritySetup) UpdateEphemeralKeysFromByteBuffer(client IGXDLMSClient,
	value *types.GXByteBuffer) ([]*types.GXKeyValuePair[enums.GlobalKeyType, []byte], error)

UpdateEphemeralKeys returns the update ephemeral keys.

Parameters:

client: DLMS Client.
value: Received reply from the server.

Returns:

List of Parsed key id and GUAK. This is for debugging purpose.

func (*GXDLMSSecuritySetup) VerifyIssuer

func (g *GXDLMSSecuritySetup) VerifyIssuer(issuer []byte) error

VerifyIssuer returns the verify that issuer is in types.Asn1 format.

Parameters:

issuer: Certificate issuer.

type GXDLMSSpecialDay added in v1.0.2

type GXDLMSSpecialDay struct {
	Index uint16

	Date types.GXDate

	DayId uint8
}

func (*GXDLMSSpecialDay) String added in v1.0.2

func (g *GXDLMSSpecialDay) String() string

type GXDLMSSpecialDaysTable added in v1.0.2

type GXDLMSSpecialDaysTable struct {
	GXDLMSObject
	// Value of COSEM Data object.
	Entries []GXDLMSSpecialDay
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSSpecialDaysTable

func NewGXDLMSSpecialDaysTable added in v1.0.2

func NewGXDLMSSpecialDaysTable(ln string, sn int16) (*GXDLMSSpecialDaysTable, error)

NewGXDLMSSpecialDaysTable creates a new special days table object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSSpecialDaysTable) Base added in v1.0.2

Base returns the base GXDLMSObject of the object.

func (*GXDLMSSpecialDaysTable) Delete added in v1.0.2

func (g *GXDLMSSpecialDaysTable) Delete(client IGXDLMSClient, entry *GXDLMSSpecialDay) ([][]uint8, error)

Delete returns the deletes an entry from the table.

func (*GXDLMSSpecialDaysTable) GetAttributeCount added in v1.0.2

func (g *GXDLMSSpecialDaysTable) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSSpecialDaysTable) GetAttributeIndexToRead added in v1.0.2

func (g *GXDLMSSpecialDaysTable) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSSpecialDaysTable) GetDataType added in v1.0.2

func (g *GXDLMSSpecialDaysTable) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSSpecialDaysTable) GetMethodCount added in v1.0.2

func (g *GXDLMSSpecialDaysTable) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSSpecialDaysTable) GetMethodNames added in v1.0.2

func (g *GXDLMSSpecialDaysTable) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSSpecialDaysTable) GetNames added in v1.0.2

func (g *GXDLMSSpecialDaysTable) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSSpecialDaysTable) GetValue added in v1.0.2

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSSpecialDaysTable) GetValues added in v1.0.2

func (g *GXDLMSSpecialDaysTable) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSSpecialDaysTable) Insert added in v1.0.2

func (g *GXDLMSSpecialDaysTable) Insert(client IGXDLMSClient, entry *GXDLMSSpecialDay) ([][]uint8, error)

Insert returns the inserts a new entry in the table.

Returns:

If a special day with the same index or with the same date as an already defined day is inserted,
the old entry will be overwritten.

func (*GXDLMSSpecialDaysTable) Invoke added in v1.0.2

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSSpecialDaysTable) Load added in v1.0.2

func (g *GXDLMSSpecialDaysTable) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSSpecialDaysTable) PostLoad added in v1.0.2

func (g *GXDLMSSpecialDaysTable) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSSpecialDaysTable) Save added in v1.0.2

func (g *GXDLMSSpecialDaysTable) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSSpecialDaysTable) SetValue added in v1.0.2

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSTarget added in v1.0.6

type GXDLMSTarget struct {
	// Target COSEM object.
	Target IGXDLMSBase

	// Attribute Index of COSEM object.
	AttributeIndex uint8

	// Data index of COSEM object.
	// All targets don't use this.
	DataIndex int

	// Data value of COSEM object.
	// All targets don't use this.
	Value any
}

type GXDLMSTargetObject added in v1.0.8

type GXDLMSTargetObject struct {
	Target         IGXDLMSBase
	AttributeIndex int8
}

GXDLMSTargetObject identifies a target object and attribute.

func NewGXDLMSTargetObject added in v1.0.8

func NewGXDLMSTargetObject(target IGXDLMSBase, attributeIndex int8) *GXDLMSTargetObject

NewGXDLMSTargetObject creates a new target object.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

type GXDLMSTcpUdpSetup added in v1.0.2

type GXDLMSTcpUdpSetup struct {
	GXDLMSObject
	// TCP/UDP port number on which the physical device is
	// listening for the DLMS/COSEM application.
	Port uint16

	// References an IP setup object by its logical name. The referenced object
	// contains information about the IP Address settings of the IP layer
	// supporting the TCP-UDP layer.
	IPReference string

	// TCP can indicate the maximum receive segment size to its partner.
	MaximumSegmentSize uint16

	// The maximum number of simultaneous connections the COSEM
	// TCP/UDP based transport layer is able to support.
	MaximumSimultaneousConnections uint8

	// Defines the time, expressed in seconds over which, if no frame is
	// received from the COSEM client, the inactive TCP connection shall be aborted.
	// When this value is set to 0, this means that the inactivity_time_out is
	// not operational. In other words, a TCP connection, once established,
	// in normal conditions no power failure, etc. will never be aborted by the COSEM server.
	InactivityTimeout uint16
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSTcpUdpSetup

func NewGXDLMSTcpUdpSetup added in v1.0.2

func NewGXDLMSTcpUdpSetup(ln string, sn int16) (*GXDLMSTcpUdpSetup, error)

NewGXDLMSTcpUdpSetup creates a new TcpUdp setup object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSTcpUdpSetup) Base added in v1.0.2

func (g *GXDLMSTcpUdpSetup) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSTcpUdpSetup) GetAttributeCount added in v1.0.2

func (g *GXDLMSTcpUdpSetup) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSTcpUdpSetup) GetAttributeIndexToRead added in v1.0.2

func (g *GXDLMSTcpUdpSetup) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSTcpUdpSetup) GetDataType added in v1.0.2

func (g *GXDLMSTcpUdpSetup) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSTcpUdpSetup) GetMethodCount added in v1.0.2

func (g *GXDLMSTcpUdpSetup) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSTcpUdpSetup) GetMethodNames added in v1.0.2

func (g *GXDLMSTcpUdpSetup) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSTcpUdpSetup) GetNames added in v1.0.2

func (g *GXDLMSTcpUdpSetup) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSTcpUdpSetup) GetValue added in v1.0.2

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSTcpUdpSetup) GetValues added in v1.0.2

func (g *GXDLMSTcpUdpSetup) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSTcpUdpSetup) Invoke added in v1.0.2

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSTcpUdpSetup) Load added in v1.0.2

func (g *GXDLMSTcpUdpSetup) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSTcpUdpSetup) PostLoad added in v1.0.2

func (g *GXDLMSTcpUdpSetup) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSTcpUdpSetup) Save added in v1.0.2

func (g *GXDLMSTcpUdpSetup) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSTcpUdpSetup) SetValue added in v1.0.2

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSTokenGateway added in v1.0.6

type GXDLMSTokenGateway struct {
	GXDLMSObject
	// Token.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSTokenGateway
	Token []byte

	// Time
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSTokenGateway
	Time types.GXDateTime

	// Descriptions.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSTokenGateway
	Descriptions []string

	// Token Delivery method.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSTokenGateway
	DeliveryMethod enums.TokenDelivery

	// Token status code.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSTokenGateway
	StatusCode enums.TokenStatusCode

	// Token data value.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSTokenGateway
	DataValue string
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSTokenGateway

func NewGXDLMSTokenGateway added in v1.0.6

func NewGXDLMSTokenGateway(ln string, sn int16) (*GXDLMSTokenGateway, error)

NewGXDLMSGXDLMSTokenGateway creates a new Token Gateway object instance.

The function validates `ln` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSTokenGateway) Base added in v1.0.6

func (g *GXDLMSTokenGateway) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSTokenGateway) Enter added in v1.0.6

func (g *GXDLMSTokenGateway) Enter(client IGXDLMSClient, token []byte) ([][]uint8, error)

Enter returns the transfer a token to the server.

Parameters:

client: DLMS client.
token: The token to send.

Returns:

Action bytes.

func (*GXDLMSTokenGateway) GetAttributeCount added in v1.0.6

func (g *GXDLMSTokenGateway) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSTokenGateway) GetAttributeIndexToRead added in v1.0.6

func (g *GXDLMSTokenGateway) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSTokenGateway) GetDataType added in v1.0.6

func (g *GXDLMSTokenGateway) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSTokenGateway) GetMethodCount added in v1.0.6

func (g *GXDLMSTokenGateway) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSTokenGateway) GetMethodNames added in v1.0.6

func (g *GXDLMSTokenGateway) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSTokenGateway) GetNames added in v1.0.6

func (g *GXDLMSTokenGateway) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSTokenGateway) GetUIDataType added in v1.0.6

func (g *GXDLMSTokenGateway) GetUIDataType(index int) enums.DataType

GetUIDataType returns the UI data type of selected index.

Parameters:

index: Attribute index of the object.

Returns:

UI data type of the object.

func (*GXDLMSTokenGateway) GetValue added in v1.0.6

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSTokenGateway) GetValues added in v1.0.6

func (g *GXDLMSTokenGateway) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSTokenGateway) Invoke added in v1.0.6

Invoke returns the invokes method.

Parameters:

settings: DLMS settings.
e: Invoke parameters.

func (*GXDLMSTokenGateway) Load added in v1.0.6

func (g *GXDLMSTokenGateway) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSTokenGateway) PostLoad added in v1.0.6

func (g *GXDLMSTokenGateway) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSTokenGateway) Save added in v1.0.6

func (g *GXDLMSTokenGateway) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSTokenGateway) SetValue added in v1.0.6

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSUtilityTables added in v1.0.3

type GXDLMSUtilityTables struct {
	GXDLMSObject
	// Table Id.
	TableId uint16

	// Contents of the table
	Buffer []byte
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSUtilityTables

func NewGXDLMSUtilityTables added in v1.0.3

func NewGXDLMSUtilityTables(ln string, sn int16) (*GXDLMSUtilityTables, error)

NewGXDLMSUtilityTables creates a new Utility Tables object instance.

The var attributes []int` before creating the object. `ln` is the Logical Name and `sn` is the Short Name of the object.

func (*GXDLMSUtilityTables) Base added in v1.0.3

func (g *GXDLMSUtilityTables) Base() *GXDLMSObject

Base returns the base GXDLMSObject of the object.

func (*GXDLMSUtilityTables) GetAttributeCount added in v1.0.3

func (g *GXDLMSUtilityTables) GetAttributeCount() int

GetAttributeCount returns the amount of attributes.

Returns:

Count of attributes.

func (*GXDLMSUtilityTables) GetAttributeIndexToRead added in v1.0.3

func (g *GXDLMSUtilityTables) GetAttributeIndexToRead(all bool) []int

GetAttributeIndexToRead returns the collection of attributes to read. If attribute is static and already read or device is returned HW error it is not returned.

Parameters:

all: All items are returned even if they are read already.

Returns:

Collection of attributes to read.

func (*GXDLMSUtilityTables) GetDataType added in v1.0.3

func (g *GXDLMSUtilityTables) GetDataType(index int) (enums.DataType, error)

GetDataType returns the device data type of selected attribute index.

Parameters:

index: Attribute index of the object.

Returns:

Device data type of the object.

func (*GXDLMSUtilityTables) GetMethodCount added in v1.0.3

func (g *GXDLMSUtilityTables) GetMethodCount() int

GetMethodCount returns the amount of methods.

func (*GXDLMSUtilityTables) GetMethodNames added in v1.0.3

func (g *GXDLMSUtilityTables) GetMethodNames() []string

GetMethodNames returns the names of method indexes.

func (*GXDLMSUtilityTables) GetNames added in v1.0.3

func (g *GXDLMSUtilityTables) GetNames() []string

GetNames returns the names of attribute indexes.

func (*GXDLMSUtilityTables) GetValue added in v1.0.3

GetValue returns the value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Get parameters.

Returns:

Value of the attribute index.

func (*GXDLMSUtilityTables) GetValues added in v1.0.3

func (g *GXDLMSUtilityTables) GetValues() []any

GetValues returns an array containing the object's current attribute values.

func (*GXDLMSUtilityTables) Invoke added in v1.0.3

func (*GXDLMSUtilityTables) Load added in v1.0.3

func (g *GXDLMSUtilityTables) Load(reader *GXXmlReader) error

Load returns the load object content from XML.

Parameters:

reader: XML reader.

func (*GXDLMSUtilityTables) PostLoad added in v1.0.3

func (g *GXDLMSUtilityTables) PostLoad(reader *GXXmlReader) error

PostLoad returns the handle actions after Load.

Parameters:

reader: XML reader.

func (*GXDLMSUtilityTables) Save added in v1.0.3

func (g *GXDLMSUtilityTables) Save(writer *GXXmlWriter) error

Save returns the save object content to XML.

Parameters:

writer: XML writer.

func (*GXDLMSUtilityTables) SetValue added in v1.0.3

SetValue returns the set value of given attribute. When raw parameter us not used example register multiplies value by scalar.

Parameters:

settings: DLMS settings.
e: Set parameters.

type GXDLMSWeekProfile

type GXDLMSWeekProfile struct {
	Name      []byte
	Monday    uint8
	Tuesday   uint8
	Wednesday uint8
	Thursday  uint8
	Friday    uint8
	Saturday  uint8
	Sunday    uint8
}

func (*GXDLMSWeekProfile) String

func (g *GXDLMSWeekProfile) String() string

type GXLteNetworkParameters added in v1.0.8

type GXLteNetworkParameters struct {
	T3402        uint16
	T3412        uint16
	T3412ext2    uint32
	T3324        uint16
	TeDRX        uint32
	TPTW         uint16
	QRxlevMin    int8
	QRxlevMinCE  int8
	QRxLevMinCE1 int8
}

GXLteNetworkParameters holds LTE network parameter values.

type GXLteQualityOfService added in v1.0.8

type GXLteQualityOfService struct {
	SignalQuality       int8
	SignalLevel         int8
	SignalToNoiseRatio  int8
	CoverageEnhancement enums.LteCoverageEnhancement
}

GXLteQualityOfService holds LTE quality-of-service values.

type GXMBusClientData

type GXMBusClientData struct {
	// Data information block.
	DataInformation []byte

	// Value information block.
	ValueInformation []byte

	// Data.
	Data any
}

M-Bus data definition element.

type GXMacAvailableSwitch added in v1.0.8

type GXMacAvailableSwitch struct {
	Sna     []byte
	LsId    int16
	Level   int8
	RxLevel int8
	RxSnr   int8
}

GXMacAvailableSwitch represents a switch discovered in the network.

type GXMacDirectTable added in v1.0.8

type GXMacDirectTable struct {
	SourceSId       int16
	SourceLnId      int16
	SourceLcId      int16
	DestinationSId  int16
	DestinationLnId int16
	DestinationLcId int16
	Did             []byte
}

GXMacDirectTable represents a direct routing table entry.

type GXMacMulticastEntry added in v1.0.8

type GXMacMulticastEntry struct {
	Id      int8
	Members int16
}

GXMacMulticastEntry represents an entry in PRIME multicast switching table.

type GXMacPhyCommunication added in v1.0.8

type GXMacPhyCommunication struct {
	Eui              []byte
	TxPower          int8
	TxCoding         int8
	RxCoding         int8
	RxLvl            int8
	Snr              int8
	TxPowerModified  int8
	TxCodingModified int8
	RxCodingModified int8
}

GXMacPhyCommunication represents PHY communication parameters.

type GXNeighborDiscoverySetup added in v1.0.8

type GXNeighborDiscoverySetup struct {
	// MaxRetry gives the maximum number of router solicitation retries to be performed by a node if the expected router advertisement has not been received.
	MaxRetry uint8
	// RetryWaitTime gives the waiting time in milliseconds between two successive router solicitation retries.
	RetryWaitTime uint16
	//SendPeriod gives the router advertisement transmission period in seconds.
	SendPeriod uint32
}

GXNeighborDiscoverySetup defines neighbor discovery setup values for GXDLMSIp6Setup. Te configuration to be used for both routers and hosts to support the Neighbor Discovery protocol for IPv6.

type GXPushConfirmationParameter added in v1.0.3

type GXPushConfirmationParameter struct {
	// Confirmation start date. Fields of date-time not specified are not used.
	StartDate types.GXDateTime

	// Confirmation time interval in seconds. Disabled, if zero.
	Interval uint32
}

Push confirmation parameters.

type GXPushProtectionParameters added in v1.0.3

type GXPushProtectionParameters struct {
	// Protection type.
	ProtectionType enums.ProtectionType
	// Transaction Id.
	TransactionId []byte
	// Originator system title.
	OriginatorSystemTitle []byte
	// Recipient system title.
	RecipientSystemTitle []byte
	// Other information.
	OtherInformation []byte
	// Key info.
	KeyInfo GXDLMSDataProtectionKey
}

Push protection parameters.

type GXRepetitionDelay added in v1.0.3

type GXRepetitionDelay struct {
	// The minimum delay until a next push attempt is started in seconds.
	Min uint16
	// Calculating the next delay.
	Exponent uint16
	// The maximum delay until a next push attempt is started in seconds.
	Max uint16
}

This class is used to count repetition delay for the next push message.

type GXScheduleEntry added in v1.0.2

type GXScheduleEntry struct {
	// Schedule entry index.
	Index uint16

	// Is Schedule entry enabled.
	Enable bool

	// Executed Script.
	Script *GXDLMSScriptTable

	// Script identifier of the script to be executed.
	ScriptSelector uint16

	// Switch time.
	SwitchTime types.GXTime

	// Defines a period in minutes, in which an entry shall be processed after power fail.
	ValidityWindow uint16

	// Days of the week on which the entry is valid.
	ExecWeekdays enums.Weekdays

	// Perform the link to the IC "Special days table", day_id.
	ExecSpecDays string

	// Date starting period in which the entry is valid.
	BeginDate types.GXDate

	// Date ending period in which the entry is valid.
	EndDate types.GXDate
}

Executed scripts.

type GXTokenGatewayConfiguration added in v1.0.3

type GXTokenGatewayConfiguration struct {
	CreditReference string

	TokenProportion uint8
}

type GXUnitCharge added in v1.0.6

type GXUnitCharge struct {
	// Charge per unit scaling.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	ChargePerUnitScaling GXChargePerUnitScaling

	// Commodity.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	Commodity GXCommodity

	// Charge tables.
	// Online help:
	// https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge
	ChargeTables []GXChargeTable
}

Online help: https://www.gurux.fi/Gurux.DLMS.Objects.GXDLMSCharge

type GXXmlReader

type GXXmlReader struct {
	Objects *GXDLMSObjectCollection
	// contains filtered or unexported fields
}

func NewGXXmlReaderFromStream

func NewGXXmlReaderFromStream(stream *bufio.Reader) *GXXmlReader

func (*GXXmlReader) Close

func (r *GXXmlReader) Close() error

func (*GXXmlReader) EOF

func (r *GXXmlReader) EOF() bool

func (*GXXmlReader) GetAttribute

func (r *GXXmlReader) GetAttribute(index int) string

func (*GXXmlReader) IsStartElement

func (r *GXXmlReader) IsStartElement() bool

func (*GXXmlReader) IsStartElementNamed

func (x *GXXmlReader) IsStartElementNamed(name string, getNext bool) (bool, error)

func (*GXXmlReader) Name

func (r *GXXmlReader) Name() string

func (*GXXmlReader) Read

func (r *GXXmlReader) Read() error

func (*GXXmlReader) ReadElementContentAsBool

func (x *GXXmlReader) ReadElementContentAsBool(name string, def bool) (bool, error)

func (*GXXmlReader) ReadElementContentAsDateTime

func (x *GXXmlReader) ReadElementContentAsDateTime(name string, def *types.GXDateTime) (types.GXDateTime, error)

func (*GXXmlReader) ReadElementContentAsDouble

func (x *GXXmlReader) ReadElementContentAsDouble(name string, def float64) (float64, error)

func (*GXXmlReader) ReadElementContentAsGXDate

func (x *GXXmlReader) ReadElementContentAsGXDate(name string) (types.GXDate, error)

func (*GXXmlReader) ReadElementContentAsGXDateTime

func (x *GXXmlReader) ReadElementContentAsGXDateTime(name string) (types.GXDateTime, error)

func (*GXXmlReader) ReadElementContentAsInt

func (x *GXXmlReader) ReadElementContentAsInt(name string, def int) (int, error)

func (*GXXmlReader) ReadElementContentAsInt8 added in v1.0.2

func (x *GXXmlReader) ReadElementContentAsInt8(name string, def int) (int8, error)

func (*GXXmlReader) ReadElementContentAsInt16 added in v1.0.2

func (x *GXXmlReader) ReadElementContentAsInt16(name string, def int) (int16, error)

func (*GXXmlReader) ReadElementContentAsInt32 added in v1.0.6

func (x *GXXmlReader) ReadElementContentAsInt32(name string, def int32) (int32, error)

func (*GXXmlReader) ReadElementContentAsLong

func (x *GXXmlReader) ReadElementContentAsLong(name string, def int64) (int64, error)

func (*GXXmlReader) ReadElementContentAsObject

func (x *GXXmlReader) ReadElementContentAsObject(name string, def any, obj IGXDLMSBase, index int) (any, error)

func (*GXXmlReader) ReadElementContentAsString

func (x *GXXmlReader) ReadElementContentAsString(name string, def string) (string, error)

func (*GXXmlReader) ReadElementContentAsTime

func (x *GXXmlReader) ReadElementContentAsTime(name string) (types.GXTime, error)

func (*GXXmlReader) ReadElementContentAsUInt8 added in v1.0.2

func (x *GXXmlReader) ReadElementContentAsUInt8(name string, def int) (uint8, error)

func (*GXXmlReader) ReadElementContentAsUInt16 added in v1.0.2

func (x *GXXmlReader) ReadElementContentAsUInt16(name string, def int) (uint16, error)

func (*GXXmlReader) ReadElementContentAsUInt32 added in v1.0.2

func (x *GXXmlReader) ReadElementContentAsUInt32(name string, def int) (uint32, error)

func (*GXXmlReader) ReadElementContentAsULong

func (x *GXXmlReader) ReadElementContentAsULong(name string, def uint64) (uint64, error)

func (*GXXmlReader) ReadEndElement

func (x *GXXmlReader) ReadEndElement(name string) error

ReadEndElement(name)

func (*GXXmlReader) String

func (x *GXXmlReader) String() string

type GXXmlWriter

type GXXmlWriter struct {
	// contains filtered or unexported fields
}

func (*GXXmlWriter) Flush

func (x *GXXmlWriter) Flush() error

func (*GXXmlWriter) WriteAttributeString

func (x *GXXmlWriter) WriteAttributeString(name, value string) error

func (*GXXmlWriter) WriteElementObject

func (x *GXXmlWriter) WriteElementObject(name string, value any, dt enums.DataType, uiType enums.DataType) error

func (*GXXmlWriter) WriteElementString

func (x *GXXmlWriter) WriteElementString(name string, value any) error

func (*GXXmlWriter) WriteElementStringBool

func (x *GXXmlWriter) WriteElementStringBool(name string, value bool) error

func (*GXXmlWriter) WriteElementStringDouble

func (x *GXXmlWriter) WriteElementStringDouble(name string, value float64, defaultValue float64) error

func (*GXXmlWriter) WriteElementStringGXDateTime

func (x *GXXmlWriter) WriteElementStringGXDateTime(name string, value *types.GXDateTime) error

func (*GXXmlWriter) WriteElementStringInt

func (x *GXXmlWriter) WriteElementStringInt(name string, value int) error

func (*GXXmlWriter) WriteElementStringU32

func (x *GXXmlWriter) WriteElementStringU32(name string, value uint32) error

func (*GXXmlWriter) WriteElementStringU64

func (x *GXXmlWriter) WriteElementStringU64(name string, value uint64) error

func (*GXXmlWriter) WriteEndDocument

func (x *GXXmlWriter) WriteEndDocument() error

func (*GXXmlWriter) WriteEndElement

func (x *GXXmlWriter) WriteEndElement() error

func (*GXXmlWriter) WriteStartDocument

func (x *GXXmlWriter) WriteStartDocument() error

WriteStartDocument ~ writer.WriteStartDocument()

func (*GXXmlWriter) WriteStartElement

func (x *GXXmlWriter) WriteStartElement(name string) error

func (*GXXmlWriter) WriteStartElementWithAttrs

func (x *GXXmlWriter) WriteStartElementWithAttrs(name string, attrs map[string]string) error

func (*GXXmlWriter) WriteString

func (x *GXXmlWriter) WriteString(s string) error

WriteString writes character data inside current element.

type GXXmlWriterSettings

type GXXmlWriterSettings struct {
	// Are attribute values also serialized.
	Values bool

	// Are default values serialized.
	IgnoreDefaultValues bool

	// Is Description serialized.
	IgnoreDescription bool

	// GXDateTime values are serialised using meter time, not local time.
	UseMeterTime bool

	// Is XML declaration skipped.
	OmitXmlDeclaration bool

	// Attribute index to Get.
	Index int
}

XML write settings.

type GXxDLMSContextType

type GXxDLMSContextType struct {
	// Conformance
	Conformance enums.Conformance

	MaxReceivePduSize uint16

	MaxSendPduSize uint16

	// Dlms Version Number.
	DlmsVersionNumber uint8

	QualityOfService int8

	CypheringInfo []byte
}

func (*GXxDLMSContextType) String

func (g *GXxDLMSContextType) String() string

String returns string presentation of GXxDLMSContextType struct.

type IGXDLMSBase

type IGXDLMSBase interface {
	// Base returns the base information from the COSEM object.
	Base() *GXDLMSObject

	// GetValues returns the returns attributes as an array.
	//
	//	Returns:
	//	    Collection of COSEM attribute values.
	GetValues() []any

	// GetAttributeIndexToRead returns collection of attributes to read.
	// If attribute is static and already read or device returned HW error it is not returned.
	// If all == true, all items are returned even if read already.
	GetAttributeIndexToRead(all bool) []int

	// GetAttributeCount returns amount of attributes.
	GetAttributeCount() int

	// GetMethodCount returns amount of methods.
	GetMethodCount() int

	// GetDataType returns data type of selected attribute index.
	GetDataType(index int) (enums.DataType, error)

	// GetUIDataType returns UI data type of selected attribute index.
	GetUIDataType(index int) enums.DataType

	// GetNames returns names of attribute indexes.
	GetNames() []string

	// GetMethodNames returns names of method indexes.
	GetMethodNames() []string

	// GetValue returns value of given attribute.
	// When raw parameter is not used example register multiplies value by scalar.
	GetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) (any, error)

	// SetValue sets value of given attribute.
	SetValue(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) error

	// Invoke invokes method.
	Invoke(settings *settings.GXDLMSSettings, e *internal.ValueEventArgs) ([]byte, error)

	// Load loads object content from XML.
	Load(reader *GXXmlReader) error

	// Save saves object content to XML.
	Save(writer *GXXmlWriter) error

	// PostLoad handles actions after Load.
	PostLoad(reader *GXXmlReader) error
}

IGXDLMSBase corresponds to Gurux.DLMS.Objects.IGXDLMSBase.

func CreateObject

func CreateObject(objectType enums.ObjectType, ln string, sn int16) (IGXDLMSBase, error)

CreateObject creates a COSEM object based on the object type.

type IGXDLMSClient

type IGXDLMSClient interface {
	Settings() *settings.GXDLMSSettings

	// GetDataType returns the device data type of selected attribute index.
	// Write returns the generates a write message.
	//
	// Parameters:
	//
	//	item: object to write.
	//	index: Attribute index where data is write.
	Write(item IGXDLMSBase, index int) ([][]byte, error)

	// Method returns the generate Method (Action) request.
	//
	// Parameters:
	//
	//	item: object to write.
	//	index: Attribute index where data is write.
	Method(item IGXDLMSBase, index int, data any, dataType enums.DataType) ([][]byte, error)
}

IGXDLMSBase corresponds to Gurux.DLMS.Objects.IGXDLMSBase.

Source Files

Jump to

Keyboard shortcuts

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