📄 bacnetapdu.py
字号:
, 'getEnrollmentSummary':4 , 'subscribeCOV':5 , 'atomicReadFile':6 , 'atomicWriteFile':7 , 'addListElement':8 , 'removeListElement':9 , 'createObject':10 , 'deleteObject':11 , 'readProperty':12 , 'readPropertyConditional':13 , 'readPropertyMultiple':14 , 'writeProperty':15 , 'writePropertyMultiple':16 , 'deviceCommunicationControl':17 , 'confirmedPrivateTransfer':18 , 'confirmedTextMessage':19 , 'reinitializeDevice':20 , 'vtOpen':21 , 'vtClose':22 , 'vtData':23 , 'authenticate':24 , 'requestKey':25 , 'i-Am':26 , 'i-Have':27 , 'unconfirmedCOVNotification':28 , 'unconfirmedEventNotification':29 , 'unconfirmedPrivateTransfer':30 , 'unconfirmedTextMessage':31 , 'timeSynchronization':32 , 'who-Has':33 , 'who-Is':34 , 'readRange':35 , 'utcTimeSynchronization':36 , 'lifeSafetyOperation':37 , 'subscribeCOVProperty':38 , 'getEventInformation':39 } bitLen = 40class StatusFlags(BitString): bitNames = \ { 'in-alarm':0 , 'fault':1 , 'overridden':2 , 'out-of-service':3 } bitLen = 4class FileAccessMethod(Enumerated): enumerations = \ { 'record-access':0 , 'stream-access':1 }class LifeSafetyMode(Enumerated): enumerations = \ { 'off':0 , 'on':1 , 'test':2 , 'manned':3 , 'unmanned':4 , 'armed':5 , 'disarmed':6 , 'prearmed':7 , 'slow':8 , 'fast':9 , 'disconnected':10 , 'enabled':11 , 'disabled':12 , 'automatic-release-disabled':13 , 'default':14 }###class DaysOfWeek(BitString): bitNames = \ { 'monday':0 , 'tuesday':1 , 'wednesday':2 , 'thursday':3 , 'friday':4 , 'saturday':5 , 'sunday':6 } bitLen = 7class EventTransitionBits(BitString): bitNames = \ { 'to-offnormal':0 , 'to-fault':1 , 'to-normal':2 } bitLen = 3class LimitEnable(BitString): bitNames = \ { 'lowLimitEnable':0 , 'highLimitEnable':1 } bitLen = 2class ObjectTypesSupported(BitString): bitNames = \ { 'analog-input':0 , 'analog-output':1 , 'analog-value':2 , 'binary-input':3 , 'binary-output':4 , 'binary-value':5 , 'calendar':6 , 'command':7 , 'device':8 , 'event-enrollment':9 , 'file':10 , 'group':11 , 'loop':12 , 'multi-state-input':13 , 'multi-state-output':14 , 'notification-class':15 , 'program':16 , 'schedule':17 , 'averaging':18 , 'multi-state-value':19 , 'trend-log':20 , 'life-safety-point':21 , 'life-safety-zone':22 , 'accumulator':23 , 'pulse-converter':24 } bitLen = 25class ServicesSupported(BitString): bitNames = \ { 'acknowledgeAlarm':0 , 'confirmedCOVNotification':1 , 'confirmedEventNotification':2 , 'getAlarmSummary':3 , 'getEnrollmentSummary':4 , 'subscribeCOV':5 , 'atomicReadFile':6 , 'atmoicWriteFile':7 , 'addListElement':8 , 'removeListElement':9 , 'createObject':10 , 'deleteObject':11 , 'readProperty':12 , 'readPropertyConditional':13 , 'readPropertyMultiple':14 , 'writeProperty':15 , 'writePropertyMultiple':16 , 'deviceCommunicationControl':17 , 'confirmedPrivateTransfer':18 , 'confirmedTextMessage':19 , 'reinitializeDevice':20 , 'vtOpen':21 , 'vtClose':22 , 'vtData':23 , 'authenticate':24 , 'requestKey':25 , 'i-Am':26 , 'i-Have':27 , 'unconfirmedCOVNotification':28 , 'unconfirmedEventNotification':29 , 'unconfirmedPrivateTransfer':30 , 'unconfirmedTextMessage':31 , 'timeSynchronization':32 , 'who-Has':33 , 'who-Is':34 , 'readRange':35 , 'utcTimeSynchronization':36 , 'lifeSafetyOperation':37 , 'subscribeCOVProperty':38 , 'getEventInformation':39 } bitLen = 40###class BACnetAddress(Sequence): sequenceElements = \ [ Element('networkNumber', Unsigned) , Element('macAddress', OctetString) ]class AddressBinding(Sequence): sequenceElements = \ [ Element('deviceObjectIdentifier', ObjectIdentifier) , Element('deviceAddress', BACnetAddress) ]###class Error(Sequence): sequenceElements = \ [ Element('errorClass', ErrorClass) , Element('errorCode', ErrorCode) ]class ReadPropertyRequest(Sequence): sequenceElements = \ [ Element('objectIdentifier', ObjectIdentifier, 0) , Element('propertyIdentifier', PropertyIdentifier, 1) , Element('propertyArrayIndex', Unsigned, 2, True) ]class ReadPropertyACK(Sequence): sequenceElements = \ [ Element('objectIdentifier', ObjectIdentifier, 0) , Element('propertyIdentifier', PropertyIdentifier, 1) , Element('propertyArrayIndex', Unsigned, 2, True) , Element('propertyValue', Any, 3) ]class WhoIsRequest(Sequence): sequenceElements = \ [ Element('deviceInstanceRangeLowLimit', Unsigned, 0, True) , Element('deviceInstanceRangeHighLimit', Unsigned, 1, True) ]class WhoHasLimits(Sequence): sequenceElements = \ [ Element('deviceInstanceRangeLowLimit', Unsigned, 0) , Element('deviceInstanceRangeHighLimit', Unsigned, 1) ]class WhoHasObject(Choice): choiceElements = \ [ Element('objectIdentifier', ObjectIdentifier, 2) , Element('objectName', CharacterString, 3) ]class WhoHasRequest(Sequence): sequenceElements = \ [ Element('limits', WhoHasLimits, None, True) , Element('object', WhoHasObject) ]class IAmRequest(Sequence): sequenceElements = \ [ Element('iAmDeviceIdentifier', ObjectIdentifier) , Element('maxAPDULengthAccepted', Unsigned) , Element('segmentationSupported', Segmentation) , Element('vendorID', Unsigned) ]class IHaveRequest(Sequence): sequenceElements = \ [ Element('deviceIdentifier', ObjectIdentifier) , Element('objectIdentifier', ObjectIdentifier) , Element('objectName', CharacterString) ]class DateTime(Sequence): sequenceElements = \ [ Element('date', Date) , Element('time', Time) ]class TimeStamp(Choice): choiceElements = \ [ Element('time', Time, 0) , Element('sequenceNumber', Unsigned, 1) , Element('dateTime', DateTime, 2) ]class NotificationChangeOfBitstring(Sequence): sequenceElements = \ [ Element('referencedBitstring', BitString, 0) , Element('statusFlags', StatusFlags, 1) ]class PropertyStates(Any): passclass NotificationChangeOfState(Any): passclass NotificationChangeOfValue(Any): passclass NotificationCommandFailure(Any): passclass NotificationFloatingLimit(Any): passclass NotificationOutOfRange(Any): passclass NotificationComplexEventType(Any): passclass NotificationChangeOfLifeSafety(Any): passclass NotificationExtended(Any): passclass NotificationBufferReady(Any): passclass NotificationUnsignedRange(Any): passclass NotificationParameters(Choice): choiceElements = \ [ Element('changeOfBitstring', NotificationChangeOfBitstring, 0) , Element('changeOfState', NotificationChangeOfState, 1) , Element('changeOfValue', NotificationChangeOfValue, 2) , Element('commandFailure', NotificationCommandFailure, 3) , Element('floatingLimit', NotificationFloatingLimit, 4) , Element('outOfRange', NotificationOutOfRange, 5) , Element('complexEventType', NotificationComplexEventType, 6) , Element('changeOfLifeSafety', NotificationChangeOfLifeSafety, 8) , Element('extended', NotificationExtended, 9) , Element('bufferReady', NotificationBufferReady, 10) , Element('unsignedRange', NotificationUnsignedRange, 11) ]class ConfirmedEventNotificationRequest(Sequence): sequenceElements = \ [ Element('processIdentifier', Unsigned, 0) , Element('initiatingDeviceIdentifier', ObjectIdentifier, 1) , Element('eventObjectIdentifier', ObjectIdentifier, 2) , Element('timeStamp', TimeStamp, 3) , Element('notificationClass', Unsigned, 4) , Element('priority', Unsigned, 5) , Element('eventType', EventType, 6) , Element('messageText', CharacterString, 7, True) , Element('notifyType', NotifyType, 8) , Element('ackRequired', Boolean, 9, True) , Element('fromState', EventState, 10, True) , Element('toState', EventState, 11) , Element('eventValues', NotificationParameters, 12, True) ]class UnconfirmedEventNotificationRequest(Sequence): sequenceElements = ConfirmedEventNotificationRequest.sequenceElementsclass PropertyValue(Sequence): sequenceElements = \ [ Element('propertyIdentifier', PropertyIdentifier, 0) , Element('propertyArrayIndex', Unsigned, 1, True) , Element('value', Any, 2) , Element('priority', Unsigned, 3, True) ]class UnconfirmedCOVNotificationRequest(Sequence): sequenceElements = \ [ Element('subscriberProcessIdentifier', Unsigned, 0) , Element('initiatingDeviceIdentifier', ObjectIdentifier, 1) , Element('monitoredObjectIdentifier', ObjectIdentifier, 2) , Element('timeRemaining', Unsigned, 3) , Element('listOfValues', SequenceOf(PropertyValue), 4) ]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -