Skip to content

Commit

Permalink
add the mixin outline
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelBender committed Jul 27, 2021
1 parent 0c9c0dd commit 5ce45a4
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions py34/bacpypes/local/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,36 @@ class CurrentPropertyListMixIn(Object):
CurrentPropertyList(),
]

#
# WriteableObjectName
#

@bacpypes_debugging
class WriteableObjectName(WritableProperty):

def __init__(self):
if _debug: WriteableObjectName._debug("__init__")
WritableProperty.__init__(self, 'objectName', CharacterString, default=None, optional=False)

def WriteProperty(self, obj, value, arrayIndex=None, priority=None, direct=False):
if _debug:
WritableProperty._debug(
"WriteProperty %r %r arrayIndex=%r priority=%r direct=%r",
obj, value, arrayIndex, priority, direct,
)
raise ExecutionError(errorClass='property', errorCode='writeAccessDenied')

#
# WriteableObjectNameMixIn
#

@bacpypes_debugging
class WriteableObjectNameMixIn(Object):

properties = [
WriteableObjectName(),
]

#
# Turtle Reference Patterns
#
Expand Down

0 comments on commit 5ce45a4

Please sign in to comment.