Skip to main content

Module attrs

Module attrs 

Source
Expand description

Typed attributes for COSEM interface classes (IEC 62056-6-2).

Each IC has specific attribute types defined in the standard. This module provides strongly-typed structs for these attributes, replacing the generic CosemDataType where possible while maintaining BER compatibility.

Structs§

AccessRight
access_right — structure { attribute_access, method_access } Used by Association LN (attr 2) and Association SN.
ActionItem
action_item — structure { script_logical_name, script_selector } Used in Register Monitor, Limiter, and other ICs.
ActionSet
action_set — structure { action_up, action_down } Used in Register Monitor (attr 4).
ActionSpecification
action_specification — structure { service_id, class_id, logical_name, index, parameter } Used in Script Table (attr 2).
ActivityCalendarAttrs
Activity calendar class (class_id = 20) attributes.
ArbitratorAttrs
Arbitrator class (class_id = 68) attributes.
AssociatedPartnersId
associated_partners_type — structure { client_SAP, server_SAP } Used in Association LN attr 3.
AssociationLnAttrs
Association LN class (class_id = 15) attributes.
AttributeAccessItem
attribute_access_item — structure { attribute_id, access_mode, access_selectors }
BitString
Bit-string value (held as raw octets).
CaptureObjectDefinition
Capture object definition: structure { class_id, logical_name, attribute_index, data_index } per IEC 62056-6-2, 4.3.6.2.
CellInfo
Cell information for GSM Diagnostic. Structure with cell_id, location_id, imsi, imei, etc.
Certificate
Certificate entry for Security Setup. Structure { data: octet-string }
ClockAttrs
Clock class (class_id = 8) attributes.
CommunicationWindow
communication_window entry — structure { begin, end: date-time } Used in Push Setup (attr 4).
ConfirmationParameters
Confirmation parameters for Push Setup v2. Structure { data: octet-string }
DataAttrs
Data class (class_id = 1) attributes.
DataProtectionAttrs
Data protection class (class_id = 30) attributes.
DateTime
Date-time value (12 octets) per IEC 62056-6-2, 4.1.6.1.
DayProfile
day_profile — structure { day_id, day_schedule: array day_profile_action } Used in Activity Calendar (attr 5/9).
DayProfileAction
day_profile_action — structure { start_time, script_logical_name, script_selector } Used inside day_profile.
DemandRegisterAttrs
Demand register class (class_id = 5) attributes.
DisconnectControlAttrs
Disconnect control class (class_id = 70) attributes.
EmergencyProfile
emergency_profile — structure { emergency_profile_id, emergency_activation_time, emergency_duration } Used in Limiter (attr 8).
ExecutedScript
single_action_schedule_executed_script — structure { script_logical_name, script_selector } Used in Single Action Schedule (attr 2).
ExecutionTime
Execution time structure for Single Action Schedule. Structure { time: octet-string, date: octet-string }
ExtendedRegisterAttrs
Extended register class (class_id = 4) attributes.
GprsModemSetupAttrs
GPRS modem setup class (class_id = 45) attributes.
GsmAdjacentCell
gsm_adjacent_cell — structure { cell_id, signal_quality, signal_strength } Used in GSM Diagnostic (attr 9).
GsmDiagnosticAttrs
GSM diagnostic class (class_id = 47) attributes.
GsmServiceParameter
GSM service parameter for GPRS Modem Setup. Structure { delay_class, reliability_class, precedence_class, peak_throughput, mean_throughput }
IecHdlcSetupAttrs
IEC HDLC setup class (class_id = 23) attributes.
IecLocalPortSetupAttrs
IEC local port setup class (class_id = 19) attributes.
ImageToActivateInfo
image_to_activate_info entry — structure { image_block_number, image_block_value } Used in Image Transfer (attr 7).
ImageTransferAttrs
Image transfer class (class_id = 18) attributes.
IpOption
ip_option — structure { option_type: unsigned, option_value: octet-string } Used in IPv4/IPv6 setup.
Ipv4SetupAttrs
IPv4 setup class (class_id = 42) attributes.
Ipv6SetupAttrs
IPv6 setup class (class_id = 48) attributes.
LimiterAction
limiter_action — structure { action_over_threshold, action_under_threshold } Used in Limiter (attr 11).
LimiterAttrs
Limiter class (class_id = 71) attributes.
MacAddressSetupAttrs
MAC address setup class (class_id = 43) attributes.
MbusSlavePortSetupAttrs
M-Bus slave port setup class (class_id = 25) attributes.
MethodAccessItem
method_access_item — structure { method_id, access_mode }
NeighborDiscoverySetup
neighbor_discovery_setup — structure { ip_address, hardware_address } Used in IPv6 neighbor discovery.
ObjectDefinition
object_definition — structure { class_id, logical_name } Used in Register Activation (attr 2).
ObjectListElement
object_list_element — structure { class_id, version, logical_name, access_rights } Used in Association LN attr 2 (object_list).
ProfileGenericAttrs
Profile generic class (class_id = 7) attributes.
ProtectionObject
protection_object — structure { class_id, logical_name, attribute_index } Used in Data Protection and Security Setup.
PushProtectionParameter
Push protection parameter (Push Setup v1+). Structure { data: octet-string }
QualityOfService
Quality of Service structure for GPRS Modem Setup. Structure { default: gsm_service_parameter, requested: gsm_service_parameter }
RegisterActMask
register_act_mask — structure { mask_name, index_list: array unsigned } Used in Register Activation (attr 3).
RegisterAttrs
Register class (class_id = 3) attributes.
RegisterMonitorAttrs
Register monitor class (class_id = 21) attributes.
SapAssignmentAttrs
SAP assignment class (class_id = 17) attributes.
SapAssignmentEntry
sap_assignment_entry — structure { SAP: long-unsigned, logical_device_name: octet-string } Used in SAP Assignment (attr 2).
ScalerUnit
ScalerUnit: structure { scaler: integer, unit: enum } per IEC 62056-6-2, Table 41.
ScheduleAttrs
Schedule class (class_id = 10) attributes.
ScheduleTableEntry
schedule_table_entry — structure { index, enable, script_logical_name, … } Used in Schedule (attr 2).
Script
script — structure { script_identifier, actions } Used in Script Table (attr 2).
ScriptTableAttrs
Script table class (class_id = 9) attributes.
SeasonProfile
season_profile — structure { season_profile_name, season_start, week_name } Used in Activity Calendar (attr 3/7).
SecuritySetupAttrs
Security setup class (class_id = 64) attributes.
SendDestinationAndMethod
send_destination_and_method — structure { transport_service, destination, message } Used in Push Setup (attr 3).
SingleActionScheduleAttrs
Single action schedule class (class_id = 22) attributes.
SpecialDayEntry
spec_day_entry — structure { index, specialday_date, day_id } Used in Special Days Table (attr 2).
SpecialDaysTableAttrs
Special days table class (class_id = 11) attributes.
TcpUdpSetupAttrs
TCP-UDP setup class (class_id = 41) attributes.
User
User entry for Association LN v2 user_list. Structure { user_id: unsigned, user_name: visible-string }
ValueDefinition
value_definition — structure { class_id, logical_name, attribute_index } Used in Register Monitor (attr 3) and Limiter (attr 2).
WeekProfile
week_profile — structure { week_profile_name, monday..sunday: day_id } Used in Activity Calendar (attr 4/8).
XDLMSContextInfo
xDLMS-context-type — structure { conformance, max_receive_pdu_size, … } Used in Association LN attr 5.

Enums§

AssociationStatus
Association status (IEC 62056-6-2, 4.4.3.2).
ClockBase
Clock base (IEC 62056-6-2, 4.3.7).
ContextName
context_name_type — CHOICE of structure or octet-string. Used in Association LN attr 4.
SortMethod
Sort method for Profile generic (IEC 62056-6-2, 4.3.6.2).

Type Aliases§

Choice
CHOICE type — any COSEM data type (for value, status, etc.). This maintains backward compatibility with the generic CosemDataType.
LogicalName
Logical name (OBIS code) — attribute 1 of all ICs.