mirror of
https://github.com/JoelBender/bacpypes
synced 2025-09-28 22:15:23 +08:00
make a writable array of strings just for grins, unrestricted size so this isn't accurate for the standard property
This commit is contained in:
parent
f3dce2f343
commit
f3378ba83c
|
@ -12,7 +12,8 @@ from bacpypes.consolelogging import ConfigArgumentParser
|
|||
|
||||
from bacpypes.core import run
|
||||
|
||||
from bacpypes.primitivedata import Real
|
||||
from bacpypes.primitivedata import Real, CharacterString
|
||||
from bacpypes.constructeddata import ArrayOf
|
||||
from bacpypes.object import AnalogValueObject, Property, register_object_type
|
||||
from bacpypes.errors import ExecutionError
|
||||
|
||||
|
@ -73,6 +74,7 @@ class RandomAnalogValueObject(AnalogValueObject):
|
|||
|
||||
properties = [
|
||||
RandomValueProperty('presentValue'),
|
||||
Property('eventMessageTexts', ArrayOf(CharacterString), mutable=True),
|
||||
]
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
|
@ -107,7 +109,8 @@ def main():
|
|||
|
||||
# make a random input object
|
||||
ravo1 = RandomAnalogValueObject(
|
||||
objectIdentifier=('analogValue', 1), objectName='Random1'
|
||||
objectIdentifier=('analogValue', 1), objectName='Random1',
|
||||
eventMessageTexts=ArrayOf(CharacterString)(["hello"]),
|
||||
)
|
||||
_log.debug(" - ravo1: %r", ravo1)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user