circuitmatter.data_model

Attributes

ATTRIBUTES_KEY

Classes

Enum8

Enum where members are also (and must be) ints

Enum16

Enum where members are also (and must be) ints

Map8

Support for integer-based Flags

Map16

Support for integer-based Flags

Uint16

Helper class that provides a standard way to create an ABC using

Uint32

Helper class that provides a standard way to create an ABC using

Uint64

Helper class that provides a standard way to create an ABC using

NodeId

Helper class that provides a standard way to create an ABC using

GroupId

Helper class that provides a standard way to create an ABC using

ClusterId

Helper class that provides a standard way to create an ABC using

AttributeId

Helper class that provides a standard way to create an ABC using

EventId

Helper class that provides a standard way to create an ABC using

CommandId

Helper class that provides a standard way to create an ABC using

DeviceTypeId

Helper class that provides a standard way to create an ABC using

EndpointNumber

Helper class that provides a standard way to create an ABC using

List

Helper class that provides a standard way to create an ABC using

Attribute

NumberAttribute

EnumAttribute

ListAttribute

BoolAttribute

StructAttribute

OctetStringAttribute

UTF8StringAttribute

BitmapAttribute

Command

Cluster

Module Contents

circuitmatter.data_model.ATTRIBUTES_KEY = 'a'
class circuitmatter.data_model.Enum8

Bases: enum.IntEnum

Enum where members are also (and must be) ints

class circuitmatter.data_model.Enum16

Bases: enum.IntEnum

Enum where members are also (and must be) ints

class circuitmatter.data_model.Map8

Bases: enum.IntFlag

Support for integer-based Flags

class circuitmatter.data_model.Map16

Bases: enum.IntFlag

Support for integer-based Flags

class circuitmatter.data_model.Uint16(_id=None, minimum=0, **kwargs)

Bases: circuitmatter.tlv.IntMember

Helper class that provides a standard way to create an ABC using inheritance.

uformat
format
integer
signed
max_value_length
__set__(obj, value)
static decode_member(control_octet, buffer, offset=0, depth=0) tuple[_NT, int]

Return the decoded value at offset in buffer. offset is after the tag (but before any length)

print(value)

Return string representation of value

encode_element_type(value)

Return Element Type Field as defined in Appendix A in the spec

encode_value_into(value, buffer, offset) int

Encode value into buffer and return the new offset

tag
optional
nullable
tag_length = 0
__set_name__(owner, name)
property max_length
__get__(obj: Structure, objtype: type[Structure] | None = None) _T | None
__get__(obj: Structure, objtype: type[Structure] | None = None) _T
__delete__(obj)
encode(value)
encode_into(obj: Container, buffer: bytearray | memoryview, offset: int, anonymous_ok=False) int
decode(buffer: memoryview, offset: int = 0) _T

Return the decoded value at offset in buffer

from_value(value)
__slots__ = ()
class circuitmatter.data_model.Uint32(_id=None, minimum=0, **kwargs)

Bases: circuitmatter.tlv.IntMember

Helper class that provides a standard way to create an ABC using inheritance.

uformat
format
integer
signed
max_value_length
__set__(obj, value)
static decode_member(control_octet, buffer, offset=0, depth=0) tuple[_NT, int]

Return the decoded value at offset in buffer. offset is after the tag (but before any length)

print(value)

Return string representation of value

encode_element_type(value)

Return Element Type Field as defined in Appendix A in the spec

encode_value_into(value, buffer, offset) int

Encode value into buffer and return the new offset

tag
optional
nullable
tag_length = 0
__set_name__(owner, name)
property max_length
__get__(obj: Structure, objtype: type[Structure] | None = None) _T | None
__get__(obj: Structure, objtype: type[Structure] | None = None) _T
__delete__(obj)
encode(value)
encode_into(obj: Container, buffer: bytearray | memoryview, offset: int, anonymous_ok=False) int
decode(buffer: memoryview, offset: int = 0) _T

Return the decoded value at offset in buffer

from_value(value)
__slots__ = ()
class circuitmatter.data_model.Uint64(_id=None, minimum=0, **kwargs)

Bases: circuitmatter.tlv.IntMember

Helper class that provides a standard way to create an ABC using inheritance.

uformat
format
integer
signed
max_value_length
__set__(obj, value)
static decode_member(control_octet, buffer, offset=0, depth=0) tuple[_NT, int]

Return the decoded value at offset in buffer. offset is after the tag (but before any length)

print(value)

Return string representation of value

encode_element_type(value)

Return Element Type Field as defined in Appendix A in the spec

encode_value_into(value, buffer, offset) int

Encode value into buffer and return the new offset

tag
optional
nullable
tag_length = 0
__set_name__(owner, name)
property max_length
__get__(obj: Structure, objtype: type[Structure] | None = None) _T | None
__get__(obj: Structure, objtype: type[Structure] | None = None) _T
__delete__(obj)
encode(value)
encode_into(obj: Container, buffer: bytearray | memoryview, offset: int, anonymous_ok=False) int
decode(buffer: memoryview, offset: int = 0) _T

Return the decoded value at offset in buffer

from_value(value)
__slots__ = ()
class circuitmatter.data_model.NodeId(_id=None, minimum=0, **kwargs)

Bases: Uint64

Helper class that provides a standard way to create an ABC using inheritance.

uformat
format
integer
signed
max_value_length
__set__(obj, value)
static decode_member(control_octet, buffer, offset=0, depth=0) tuple[_NT, int]

Return the decoded value at offset in buffer. offset is after the tag (but before any length)

print(value)

Return string representation of value

encode_element_type(value)

Return Element Type Field as defined in Appendix A in the spec

encode_value_into(value, buffer, offset) int

Encode value into buffer and return the new offset

tag
optional
nullable
tag_length = 0
__set_name__(owner, name)
property max_length
__get__(obj: Structure, objtype: type[Structure] | None = None) _T | None
__get__(obj: Structure, objtype: type[Structure] | None = None) _T
__delete__(obj)
encode(value)
encode_into(obj: Container, buffer: bytearray | memoryview, offset: int, anonymous_ok=False) int
decode(buffer: memoryview, offset: int = 0) _T

Return the decoded value at offset in buffer

from_value(value)
__slots__ = ()
class circuitmatter.data_model.GroupId(_id=None, **kwargs)

Bases: Uint16

Helper class that provides a standard way to create an ABC using inheritance.

uformat
format
integer
signed
max_value_length
__set__(obj, value)
static decode_member(control_octet, buffer, offset=0, depth=0) tuple[_NT, int]

Return the decoded value at offset in buffer. offset is after the tag (but before any length)

print(value)

Return string representation of value

encode_element_type(value)

Return Element Type Field as defined in Appendix A in the spec

encode_value_into(value, buffer, offset) int

Encode value into buffer and return the new offset

tag
optional
nullable
tag_length = 0
__set_name__(owner, name)
property max_length
__get__(obj: Structure, objtype: type[Structure] | None = None) _T | None
__get__(obj: Structure, objtype: type[Structure] | None = None) _T
__delete__(obj)
encode(value)
encode_into(obj: Container, buffer: bytearray | memoryview, offset: int, anonymous_ok=False) int
decode(buffer: memoryview, offset: int = 0) _T

Return the decoded value at offset in buffer

from_value(value)
__slots__ = ()
class circuitmatter.data_model.ClusterId(_id=None, minimum=0, **kwargs)

Bases: Uint16

Helper class that provides a standard way to create an ABC using inheritance.

uformat
format
integer
signed
max_value_length
__set__(obj, value)
static decode_member(control_octet, buffer, offset=0, depth=0) tuple[_NT, int]

Return the decoded value at offset in buffer. offset is after the tag (but before any length)

print(value)

Return string representation of value

encode_element_type(value)

Return Element Type Field as defined in Appendix A in the spec

encode_value_into(value, buffer, offset) int

Encode value into buffer and return the new offset

tag
optional
nullable
tag_length = 0
__set_name__(owner, name)
property max_length
__get__(obj: Structure, objtype: type[Structure] | None = None) _T | None
__get__(obj: Structure, objtype: type[Structure] | None = None) _T
__delete__(obj)
encode(value)
encode_into(obj: Container, buffer: bytearray | memoryview, offset: int, anonymous_ok=False) int
decode(buffer: memoryview, offset: int = 0) _T

Return the decoded value at offset in buffer

from_value(value)
__slots__ = ()
class circuitmatter.data_model.AttributeId(_id=None, minimum=0, **kwargs)

Bases: Uint16

Helper class that provides a standard way to create an ABC using inheritance.

uformat
format
integer
signed
max_value_length
__set__(obj, value)
static decode_member(control_octet, buffer, offset=0, depth=0) tuple[_NT, int]

Return the decoded value at offset in buffer. offset is after the tag (but before any length)

print(value)

Return string representation of value

encode_element_type(value)

Return Element Type Field as defined in Appendix A in the spec

encode_value_into(value, buffer, offset) int

Encode value into buffer and return the new offset

tag
optional
nullable
tag_length = 0
__set_name__(owner, name)
property max_length
__get__(obj: Structure, objtype: type[Structure] | None = None) _T | None
__get__(obj: Structure, objtype: type[Structure] | None = None) _T
__delete__(obj)
encode(value)
encode_into(obj: Container, buffer: bytearray | memoryview, offset: int, anonymous_ok=False) int
decode(buffer: memoryview, offset: int = 0) _T

Return the decoded value at offset in buffer

from_value(value)
__slots__ = ()
class circuitmatter.data_model.EventId(_id=None, minimum=0, **kwargs)

Bases: Uint16

Helper class that provides a standard way to create an ABC using inheritance.

uformat
format
integer
signed
max_value_length
__set__(obj, value)
static decode_member(control_octet, buffer, offset=0, depth=0) tuple[_NT, int]

Return the decoded value at offset in buffer. offset is after the tag (but before any length)

print(value)

Return string representation of value

encode_element_type(value)

Return Element Type Field as defined in Appendix A in the spec

encode_value_into(value, buffer, offset) int

Encode value into buffer and return the new offset

tag
optional
nullable
tag_length = 0
__set_name__(owner, name)
property max_length
__get__(obj: Structure, objtype: type[Structure] | None = None) _T | None
__get__(obj: Structure, objtype: type[Structure] | None = None) _T
__delete__(obj)
encode(value)
encode_into(obj: Container, buffer: bytearray | memoryview, offset: int, anonymous_ok=False) int
decode(buffer: memoryview, offset: int = 0) _T

Return the decoded value at offset in buffer

from_value(value)
__slots__ = ()
class circuitmatter.data_model.CommandId(_id=None, minimum=0, **kwargs)

Bases: Uint16

Helper class that provides a standard way to create an ABC using inheritance.

uformat
format
integer
signed
max_value_length
__set__(obj, value)
static decode_member(control_octet, buffer, offset=0, depth=0) tuple[_NT, int]

Return the decoded value at offset in buffer. offset is after the tag (but before any length)

print(value)

Return string representation of value

encode_element_type(value)

Return Element Type Field as defined in Appendix A in the spec

encode_value_into(value, buffer, offset) int

Encode value into buffer and return the new offset

tag
optional
nullable
tag_length = 0
__set_name__(owner, name)
property max_length
__get__(obj: Structure, objtype: type[Structure] | None = None) _T | None
__get__(obj: Structure, objtype: type[Structure] | None = None) _T
__delete__(obj)
encode(value)
encode_into(obj: Container, buffer: bytearray | memoryview, offset: int, anonymous_ok=False) int
decode(buffer: memoryview, offset: int = 0) _T

Return the decoded value at offset in buffer

from_value(value)
__slots__ = ()
class circuitmatter.data_model.DeviceTypeId(_id=None, minimum=0, **kwargs)

Bases: Uint32

Helper class that provides a standard way to create an ABC using inheritance.

uformat
format
integer
signed
max_value_length
__set__(obj, value)
static decode_member(control_octet, buffer, offset=0, depth=0) tuple[_NT, int]

Return the decoded value at offset in buffer. offset is after the tag (but before any length)

print(value)

Return string representation of value

encode_element_type(value)

Return Element Type Field as defined in Appendix A in the spec

encode_value_into(value, buffer, offset) int

Encode value into buffer and return the new offset

tag
optional
nullable
tag_length = 0
__set_name__(owner, name)
property max_length
__get__(obj: Structure, objtype: type[Structure] | None = None) _T | None
__get__(obj: Structure, objtype: type[Structure] | None = None) _T
__delete__(obj)
encode(value)
encode_into(obj: Container, buffer: bytearray | memoryview, offset: int, anonymous_ok=False) int
decode(buffer: memoryview, offset: int = 0) _T

Return the decoded value at offset in buffer

from_value(value)
__slots__ = ()
class circuitmatter.data_model.EndpointNumber(_id=None, **kwargs)

Bases: Uint16

Helper class that provides a standard way to create an ABC using inheritance.

uformat
format
integer
signed
max_value_length
__set__(obj, value)
static decode_member(control_octet, buffer, offset=0, depth=0) tuple[_NT, int]

Return the decoded value at offset in buffer. offset is after the tag (but before any length)

print(value)

Return string representation of value

encode_element_type(value)

Return Element Type Field as defined in Appendix A in the spec

encode_value_into(value, buffer, offset) int

Encode value into buffer and return the new offset

tag
optional
nullable
tag_length = 0
__set_name__(owner, name)
property max_length
__get__(obj: Structure, objtype: type[Structure] | None = None) _T | None
__get__(obj: Structure, objtype: type[Structure] | None = None) _T
__delete__(obj)
encode(value)
encode_into(obj: Container, buffer: bytearray | memoryview, offset: int, anonymous_ok=False) int
decode(buffer: memoryview, offset: int = 0) _T

Return the decoded value at offset in buffer

from_value(value)
__slots__ = ()
class circuitmatter.data_model.List(tag, substruct_class: type[_TLVStruct, Member], *, max_length: int | None = None, optional: _OPT = False, nullable: _NULLABLE = False, **kwargs)

Bases: circuitmatter.tlv.ArrayMember

Helper class that provides a standard way to create an ABC using inheritance.

substruct_class
max_value_length = 1280
max_items
static decode_member(control_octet, buffer, offset=0, depth=0)

Return the decoded value at offset in buffer. offset is after the tag (but before any length)

print(value)

Return string representation of value

encode_element_type(value)

Return Element Type Field as defined in Appendix A in the spec

encode_value_into(value, buffer: memoryview, offset: int) int

Encode value into buffer and return the new offset

tag
optional
nullable
tag_length = 0
__set_name__(owner, name)
property max_length
__get__(obj: Structure, objtype: type[Structure] | None = None) _T | None
__get__(obj: Structure, objtype: type[Structure] | None = None) _T
__set__(obj: Structure, value: _T | None) None
__set__(obj: Structure, value: _T) None
__delete__(obj)
encode(value)
encode_into(obj: Container, buffer: bytearray | memoryview, offset: int, anonymous_ok=False) int
decode(buffer: memoryview, offset: int = 0) _T

Return the decoded value at offset in buffer

from_value(value)
__slots__ = ()
class circuitmatter.data_model.Attribute(_id, default=None, optional=False, feature=0, C_changes_omitted=False, F_fixed=False, N_nonvolatile=False, P_reportable=False, Q_quieter_reporting=False, S_scene=False, X_nullable=False)
id
default
optional
feature
nullable
nonvolatile
omit_changes
__get__(instance, cls)
__set__(instance, value)
to_json(value)
from_json(value)
encode(value) bytes
class circuitmatter.data_model.NumberAttribute(_id, *, signed, bits, **kwargs)

Bases: Attribute

signed
bits
id
static encode_number(value, *, signed=True) bytes
default
optional
feature
nullable
nonvolatile
omit_changes
__get__(instance, cls)
__set__(instance, value)
to_json(value)
from_json(value)
encode(value) bytes
class circuitmatter.data_model.EnumAttribute(_id, enum_type, **kwargs)

Bases: NumberAttribute

enum_type
bits
signed
id
static encode_number(value, *, signed=True) bytes
default
optional
feature
nullable
nonvolatile
omit_changes
__get__(instance, cls)
__set__(instance, value)
to_json(value)
from_json(value)
encode(value) bytes
class circuitmatter.data_model.ListAttribute(_id, element_type, **kwargs)

Bases: Attribute

tlv_type
__get__(instance, cls)
to_json(value)
from_json(value)
element_from_value(value)
id
default
optional
feature
nullable
nonvolatile
omit_changes
__set__(instance, value)
encode(value) bytes
class circuitmatter.data_model.BoolAttribute(_id, default=None, optional=False, feature=0, C_changes_omitted=False, F_fixed=False, N_nonvolatile=False, P_reportable=False, Q_quieter_reporting=False, S_scene=False, X_nullable=False)

Bases: Attribute

encode(value) bytes
id
default
optional
feature
nullable
nonvolatile
omit_changes
__get__(instance, cls)
__set__(instance, value)
to_json(value)
from_json(value)
class circuitmatter.data_model.StructAttribute(_id, struct_type, default=None)

Bases: Attribute

struct_type
encode(value) memoryview
id
default
optional
feature
nullable
nonvolatile
omit_changes
__get__(instance, cls)
__set__(instance, value)
to_json(value)
from_json(value)
class circuitmatter.data_model.OctetStringAttribute(_id, min_length, max_length, **kwargs)

Bases: Attribute

min_length
max_length
member
encode(value)
id
default
optional
feature
nullable
nonvolatile
omit_changes
__get__(instance, cls)
__set__(instance, value)
to_json(value)
from_json(value)
class circuitmatter.data_model.UTF8StringAttribute(_id, min_length=0, max_length=1200, **kwargs)

Bases: Attribute

min_length
max_length
member
encode(value)
id
default
optional
feature
nullable
nonvolatile
omit_changes
__get__(instance, cls)
__set__(instance, value)
to_json(value)
from_json(value)
class circuitmatter.data_model.BitmapAttribute(_id, enum_type, **kwargs)

Bases: NumberAttribute

enum_type
bits
signed
id
static encode_number(value, *, signed=True) bytes
default
optional
feature
nullable
nonvolatile
omit_changes
__get__(instance, cls)
__set__(instance, value)
to_json(value)
from_json(value)
encode(value) bytes
class circuitmatter.data_model.Command(command_id, request_type, response_id=None, response_type=interaction_model.StatusCode)
command_id
request_type
response_id
response_type
class circuitmatter.data_model.Cluster
cluster_revision
feature_map
attribute_list
event_list
accepted_command_list
generated_command_list
data_version
__contains__(descriptor_id)
restore(nonvolatile)
get_attribute_data(session, path, subscription=None) list[circuitmatter.interaction_model.AttributeDataIB]
set_attribute(context, attribute_data) circuitmatter.interaction_model.AttributeStatusIB
invoke(session, path, fields) circuitmatter.interaction_model.CommandDataIB | circuitmatter.interaction_model.StatusCode | None