How to use the bacpypes.primitivedata.Boolean function in bacpypes

To help you get started, we’ve selected a few bacpypes examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github JoelBender / bacpypes / tests / test_primitive_data / test_boolean.py View on Github external
def test_boolean(self):
        if _debug: TestBoolean._debug("test_boolean")

        obj = Boolean()
        assert obj.value == False

        with self.assertRaises(TypeError):
            Boolean("some string")
        with self.assertRaises(TypeError):
            Boolean(1.0)
github JoelBender / bacpypes / tests / test_objects / test_LoopObject.py View on Github external
, (OptionalProperty,'covIncrement', Real)
        , (OptionalProperty,'timeDelay', Unsigned)
        , (OptionalProperty,'notificationClass', Unsigned)
        , (OptionalProperty,'errorLimit', Real)
        , (OptionalProperty,'deadband', Real)
        , (OptionalProperty,'eventEnable', EventTransitionBits)
        , (OptionalProperty,'ackedTransitions', EventTransitionBits)
        , (OptionalProperty,'notifyType', NotifyType)
        , (OptionalProperty,'eventTimeStamps', ArrayOf(TimeStamp))
        , (OptionalProperty,'eventMessageTexts', ArrayOf(CharacterString))
        , (OptionalProperty,'eventMessageTextsConfig', ArrayOf(CharacterString))
        , (OptionalProperty,'eventDetectionEnable', Boolean)
        , (OptionalProperty,'eventAlgorithmInhibitRef', ObjectPropertyReference)
        , (OptionalProperty,'eventAlgorithmInhibit', Boolean)
        , (OptionalProperty,'timeDelayNormal', Unsigned)
        , (OptionalProperty,'reliabilityEvaluationInhibit', Boolean)
        ]
github JoelBender / bacpypes / tests / test_objects / test_DeviceObject.py View on Github external
, (OptionalProperty,'backupPreparationTime', Unsigned)
        , (OptionalProperty,'restorePreparationTime', Unsigned)
        , (OptionalProperty,'restoreCompletionTime', Unsigned)
        , (OptionalProperty,'backupAndRestoreState', BackupState)
        , (OptionalProperty,'activeCovSubscriptions', SequenceOf(COVSubscription))
        , (OptionalProperty,'maxSegmentsAccepted', Unsigned)
        , (OptionalProperty,'slaveProxyEnable', ArrayOf(Boolean))
        , (OptionalProperty,'autoSlaveDiscovery', ArrayOf(Boolean))
        , (OptionalProperty,'slaveAddressBinding', SequenceOf(AddressBinding))
        , (OptionalProperty,'manualSlaveAddressBinding', SequenceOf(AddressBinding))
        , (OptionalProperty,'lastRestartReason', RestartReason)
        , (OptionalProperty,'timeOfDeviceRestart', TimeStamp)
        , (OptionalProperty,'restartNotificationRecipients', SequenceOf(Recipient))
        , (OptionalProperty,'utcTimeSynchronizationRecipients', SequenceOf(Recipient))
        , (OptionalProperty,'timeSynchronizationInterval', Unsigned)
        , (OptionalProperty,'alignIntervals', Boolean)
        , (OptionalProperty,'intervalOffset', Unsigned)
        ]
github JoelBender / bacpypes / tests / test_objects / test_AnalogOutputObject.py View on Github external
, (OptionalProperty,'notificationClass', Unsigned)
        , (OptionalProperty,'highLimit', Real)
        , (OptionalProperty,'lowLimit', Real)
        , (OptionalProperty,'deadband', Real)
        , (OptionalProperty,'limitEnable', LimitEnable)
        , (OptionalProperty,'eventEnable', EventTransitionBits)
        , (OptionalProperty,'ackedTransitions',  EventTransitionBits)
        , (OptionalProperty,'notifyType', NotifyType)
        , (OptionalProperty,'eventTimeStamps', ArrayOf(TimeStamp))
        , (OptionalProperty,'eventMessageTexts', ArrayOf(CharacterString))
        , (OptionalProperty,'eventMessageTextsConfig', ArrayOf(CharacterString))
        , (OptionalProperty,'eventDetectionEnable', Boolean)
        , (OptionalProperty,'eventAlgorithmInhibitRef', ObjectPropertyReference)
        , (OptionalProperty,'eventAlgorithmInhibit', Boolean)
        , (OptionalProperty,'timeDelayNormal', Unsigned)
        , (OptionalProperty,'reliabilityEvaluationInhibit', Boolean)
        ]
github JoelBender / bacpypes / tests / test_objects / test_AccessRightsObject.py View on Github external
def setUp(self):
        if _debug: Test_AccessRightsObject._debug("Test_AccessRightsObject")
        self.obj = AccessRightsObject()
        self.objType = 'accessRights'
        self.identifiers = self.build_list_of_identifiers(self.obj.properties)
        self.numberOfPropertiesRequired = 8
        self.writeValue = 0
        self.listOfProperties = \
        [ (WritableProperty,'globalIdentifier', Unsigned)
        , (ReadableProperty,'statusFlags', StatusFlags)
        , (ReadableProperty,'reliability', Reliability)
        , (ReadableProperty,'enable', Boolean)
        , (ReadableProperty,'negativeAccessRules', ArrayOf(AccessRule))
        , (ReadableProperty,'positiveAccessRules', ArrayOf(AccessRule))
        , (OptionalProperty,'accompaniment', DeviceObjectReference)
        , (OptionalProperty,'reliabilityEvaluationInhibit', Boolean)
        ]
github JoelBender / bacpypes / tests / test_objects / test_NotificationForwarderObject.py View on Github external
def setUp(self):
        if _debug: Test_NotificationForwarderObject._debug("Test_NotificationForwarderObject")
        self.obj = NotificationForwarderObject()
        self.objType = 'notificationForwarder'
        self.identifiers = self.build_list_of_identifiers(self.obj.properties)
        self.numberOfPropertiesRequired = 9
        self.writeValue = 0
        self.listOfProperties = \
        [ (ReadableProperty,'statusFlags', StatusFlags)
        , (ReadableProperty,'reliability', Reliability)
        , (ReadableProperty,'outOfService', Boolean)
        , (ReadableProperty,'recipientList', SequenceOf(Destination))
        , (WritableProperty,'subscribedRecipients', SequenceOf(EventNotificationSubscription))
        , (ReadableProperty,'processIdentifierFilter', ProcessIdSelection)
        , (OptionalProperty,'portFilter', ArrayOf(PortPermission))
        , (ReadableProperty,'localForwardingOnly', Boolean)
        , (OptionalProperty,'reliabilityEvaluationInhibit', Boolean)
        ]
github JoelBender / bacpypes / tests / test_objects / test_DateTimeValueObject.py View on Github external
def setUp(self):
        if _debug: Test_DateTimeValueObject._debug("Test_DateTimeValueObject")
        self.obj = DateTimeValueObject()
        self.objType = 'datetimeValue'
        self.identifiers = self.build_list_of_identifiers(self.obj.properties)
        self.numberOfPropertiesRequired = 8
        self.writeValue = 0
        self.listOfProperties = \
        [ (ReadableProperty,'presentValue', DateTime)
        , (ReadableProperty,'statusFlags', StatusFlags)
        , (OptionalProperty,'eventState', EventState)
        , (OptionalProperty,'reliability', Reliability)
        , (OptionalProperty,'outOfService', Boolean)
        , (OptionalProperty,'priorityArray', PriorityArray)
        , (OptionalProperty,'relinquishDefault', DateTime)
        , (OptionalProperty,'isUtc', Boolean)
        ]
github JoelBender / bacpypes / tests / test_objects / test_OctetStringValueObject.py View on Github external
def setUp(self):
        if _debug: Test_OctetStringValueObject._debug("Test_OctetStringValueObject")
        self.obj = OctetStringValueObject()
        self.objType = 'octetstringValue'
        self.identifiers = self.build_list_of_identifiers(self.obj.properties)
        self.numberOfPropertiesRequired = 7
        self.writeValue = 0
        self.listOfProperties = \
        [ (ReadableProperty,'presentValue', CharacterString)
        , (ReadableProperty,'statusFlags', StatusFlags)
        , (OptionalProperty,'eventState', EventState)
        , (OptionalProperty,'reliability', Reliability)
        , (OptionalProperty,'outOfService', Boolean)
        , (OptionalProperty,'priorityArray', PriorityArray)
        , (OptionalProperty,'relinquishDefault', OctetString)
        ]
github JoelBender / bacpypes / tests / test_objects / test_CredentialDataInputObject.py View on Github external
def setUp(self):
        if _debug: Test_CredentialDataInputObject._debug("Test_CredentialDataInputObject")
        self.obj = CredentialDataInputObject()
        self.objType = 'credentialDataInput'
        self.identifiers = self.build_list_of_identifiers(self.obj.properties)
        self.numberOfPropertiesRequired = 16
        self.writeValue = 0
        self.listOfProperties = \
        [ (ReadableProperty,'presentValue', AuthenticationFactor)
        , (ReadableProperty,'statusFlags', StatusFlags)
        , (OptionalProperty,'reliability', Reliability)
        , (ReadableProperty,'outOfService', Boolean)
        , (ReadableProperty,'supportedFormats', ArrayOf(AuthenticationFactorFormat))
        , (ReadableProperty,'supportedFormatClasses', ArrayOf(Unsigned))
        , (ReadableProperty,'updateTime', TimeStamp)
        , (OptionalProperty,'eventDetectionEnable', Boolean)
        , (OptionalProperty,'notificationClass', Unsigned)
        , (OptionalProperty,'eventEnable', EventTransitionBits)
        , (OptionalProperty,'ackedTransitions', EventTransitionBits)
        , (OptionalProperty,'notifyType', NotifyType)
        , (OptionalProperty,'eventTimeStamps', ArrayOf(TimeStamp))
        , (OptionalProperty,'eventMessageTexts', ArrayOf(CharacterString))
        , (OptionalProperty,'eventMessageTextsConfig', ArrayOf(CharacterString))
        , (OptionalProperty,'reliabilityEvaluationInhibit', Boolean)
        ]
github JoelBender / bacpypes / tests / test_objects / test_CalendarObject.py View on Github external
def setUp(self):
        if _debug: Test_CalendarObject._debug("Test_CalendarObject")
        self.obj = CalendarObject()
        self.objType = 'calendar'
        self.identifiers = self.build_list_of_identifiers(self.obj.properties)
        self.numberOfPropertiesRequired = 2
        self.writeValue = 0
        self.listOfProperties = \
        [ (ReadableProperty,'presentValue', Boolean)
        , (ReadableProperty,'dateList', SequenceOf(CalendarEntry))
        ]