bacsharp-developers Mailing List for bacsharp
Brought to you by:
anders-agren,
skarg
You can subscribe to this list here.
2008 |
Jan
(1) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
|
Dec
|
From: Dennis V M. <d.m...@d2...> - 2018-10-31 12:24:34
|
Assuming I haven't made a mistake (?), the following property-id need their names corrected: // LAST_NOTIFY_TIME = 173, // Incorrect: Should be named 'LAST_NOTIFY_RECORD' // LOG_DEVICE_OBJECT = 132, // Incorrect: Should be named 'LOG_DEVICE_OBJECT_PROPERTY' // LOGGING_DEVICE = 183, // Incorrect: Should be named 'LOGGING_OBJECT' [http://dev.d2i.co/d2i-email-signature/wlogo.png] Dennis McEnaney Technical Lead DDI 020 3102 4100<tel:02031024100> [http://dev.d2i.co/d2i-email-signature/wdot.png] TEL 020 3817 7839<tel:02038177839> [http://dev.d2i.co/d2i-email-signature/wdot.png] WEB d2i.co<http://d2i.co/> Portsoken House, 155-157 Minories, London, EC3N 1LJ [http://dev.d2i.co/d2i-email-signature/wico-linkedin.png]<https://www.linkedin.com/company/d2-interactive-uk>[http://dev.d2i.co/d2i-email-signature/wico-facebook.png]<https://www.facebook.com/d2iglobal>[http://dev.d2i.co/d2i-email-signature/wico-twitter.png]<https://twitter.com/d2interactive>[http://dev.d2i.co/d2i-email-signature/wico-instagram.png]<https://www.instagram.com/d2interactive/>[http://dev.d2i.co/d2i-email-signature/wico-google.png]<https://plus.google.com/116460778442548453069/posts> D2 Interactive Limited, Company Reg No. 7116878, VAT No. 984-4271-88, Registered Office: Portsoken House, 155-157 Minories, London, EC3N 1LJ. This email may be private and confidential, and contain legally privileged information. If you are not the addressee you should not disclose, copy, circulate or in any other way use the information contained in this transmission. Such unauthorised use is prohibited and may be unlawful. If you are not the intended recipient, please contact us immediately. P Save a tree - we only print the emails we really need. |
From: Dennis V M. <d.m...@d2...> - 2018-10-24 17:15:22
|
Similar (1 of the 2 'SADR') MAC Address fixes (- code to be added), but this time for the 'DADR', in the 'NPDU.Parse()' method: //PEP Other DLEN values ... // DVM: MAC Address if (DLEN == 6) { DADR = new byte[6]; DADR[5] = bytes[len++]; DADR[4] = bytes[len++]; DADR[3] = bytes[len++]; DADR[2] = bytes[len++]; DADR[1] = bytes[len++]; DADR[0] = bytes[len++]; DAddress = BitConverter.ToUInt32(DADR, 0); } (Also, I would have thought that 'SAddress' & 'DAddress' / all MAC-Addresses should be of type 'ulong' rather than 'uint' - just in case they need to accommodate a full 6-byte MAC address - also including the 3 leading "manufacturer" bytes, in addition to the 3 trailing "serial number" bytes; although you'd have to ignore the 2 high-order bytes as 'ulong' is 8 octets/bytes long.) [http://dev.d2i.co/d2i-email-signature/wlogo.png] Dennis McEnaney Technical Lead DDI 020 3102 4100<tel:02031024100> [http://dev.d2i.co/d2i-email-signature/wdot.png] TEL 020 3817 7839<tel:02038177839> [http://dev.d2i.co/d2i-email-signature/wdot.png] WEB d2i.co<http://d2i.co/> Portsoken House, 155-157 Minories, London, EC3N 1LJ [http://dev.d2i.co/d2i-email-signature/wico-linkedin.png]<https://www.linkedin.com/company/d2-interactive-uk>[http://dev.d2i.co/d2i-email-signature/wico-facebook.png]<https://www.facebook.com/d2iglobal>[http://dev.d2i.co/d2i-email-signature/wico-twitter.png]<https://twitter.com/d2interactive>[http://dev.d2i.co/d2i-email-signature/wico-instagram.png]<https://www.instagram.com/d2interactive/>[http://dev.d2i.co/d2i-email-signature/wico-google.png]<https://plus.google.com/116460778442548453069/posts> D2 Interactive Limited, Company Reg No. 7116878, VAT No. 984-4271-88, Registered Office: Portsoken House, 155-157 Minories, London, EC3N 1LJ. This email may be private and confidential, and contain legally privileged information. If you are not the addressee you should not disclose, copy, circulate or in any other way use the information contained in this transmission. Such unauthorised use is prohibited and may be unlawful. If you are not the intended recipient, please contact us immediately. P Save a tree - we only print the emails we really need. |
From: Dennis V M. <d.m...@d2...> - 2018-10-24 17:00:33
|
Similar (1 of the 2 'SADR') MAC Address fixes (- code to be added), but this time for the 'DADR', in the 'NPDU.Parse()' method: //PEP Other DLEN values ... // DVM: MAC Address if (DLEN == 6) { DADR = new byte[6]; DADR[5] = bytes[len++]; DADR[4] = bytes[len++]; DADR[3] = bytes[len++]; DADR[2] = bytes[len++]; DADR[1] = bytes[len++]; DADR[0] = bytes[len++]; DAddress = BitConverter.ToUInt32(SADR, 0); } (Also, I would have thought that 'SAddress' & 'DAddress' / all MAC-Addresses should be of type 'ulong' rather than 'uint' - just in case they need to accommodate a full 6-byte MAC address - also including the 3 leading "manufacturer" bytes, in addition to the 3 trailing "serial number" bytes; although you'd have to ignore the 2 high-order bytes as 'ulong' is 8 octets/bytes long.) [http://dev.d2i.co/d2i-email-signature/wlogo.png] Dennis McEnaney Technical Lead DDI 020 3102 4100<tel:02031024100> [http://dev.d2i.co/d2i-email-signature/wdot.png] TEL 020 3817 7839<tel:02038177839> [http://dev.d2i.co/d2i-email-signature/wdot.png] WEB d2i.co<http://d2i.co/> Portsoken House, 155-157 Minories, London, EC3N 1LJ [http://dev.d2i.co/d2i-email-signature/wico-linkedin.png]<https://www.linkedin.com/company/d2-interactive-uk>[http://dev.d2i.co/d2i-email-signature/wico-facebook.png]<https://www.facebook.com/d2iglobal>[http://dev.d2i.co/d2i-email-signature/wico-twitter.png]<https://twitter.com/d2interactive>[http://dev.d2i.co/d2i-email-signature/wico-instagram.png]<https://www.instagram.com/d2interactive/>[http://dev.d2i.co/d2i-email-signature/wico-google.png]<https://plus.google.com/116460778442548453069/posts> D2 Interactive Limited, Company Reg No. 7116878, VAT No. 984-4271-88, Registered Office: Portsoken House, 155-157 Minories, London, EC3N 1LJ. This email may be private and confidential, and contain legally privileged information. If you are not the addressee you should not disclose, copy, circulate or in any other way use the information contained in this transmission. Such unauthorised use is prohibited and may be unlawful. If you are not the intended recipient, please contact us immediately. P Save a tree - we only print the emails we really need. |
From: Dennis V M. <d.m...@d2...> - 2018-10-24 14:09:21
|
Relating to the (/my) previous MAC address (suggested) fix for 'SendReadProperty()' - possible fix (??) for the same issue in 'SendWriteProperty()' (- not tested as yet but looks like the same fix might be required, original code commented-out): var macAddrBytes = BitConverter.GetBytes(device.MacAddress); // DVM: // sendBytes[len++] = 0x01; // MAC address length - adjust for other lengths ... sendBytes[len++] = device.SourceLength; // sendBytes[len++] = macAddrBytes[0]; for (var idx = 0; idx < (device.SourceLength - macAddrBytes.Length); idx++) { sendBytes[len++] = 0x00; } for (var idx = 0; idx < macAddrBytes.Length; idx++) { sendBytes[len++] = macAddrBytes[(macAddrBytes.Length - 1) - idx]; } [cid:image015.png@01D46BA8.967AB950] [http://dev.d2i.co/d2i-email-signature/wlogo.png] Dennis McEnaney Technical Lead DDI 020 3102 4100<tel:02031024100> [http://dev.d2i.co/d2i-email-signature/wdot.png] TEL 020 3817 7839<tel:02038177839> [http://dev.d2i.co/d2i-email-signature/wdot.png] WEB d2i.co<http://d2i.co/> Portsoken House, 155-157 Minories, London, EC3N 1LJ [http://dev.d2i.co/d2i-email-signature/wico-linkedin.png]<https://www.linkedin.com/company/d2-interactive-uk>[http://dev.d2i.co/d2i-email-signature/wico-facebook.png]<https://www.facebook.com/d2iglobal>[http://dev.d2i.co/d2i-email-signature/wico-twitter.png]<https://twitter.com/d2interactive>[http://dev.d2i.co/d2i-email-signature/wico-instagram.png]<https://www.instagram.com/d2interactive/>[http://dev.d2i.co/d2i-email-signature/wico-google.png]<https://plus.google.com/116460778442548453069/posts> D2 Interactive Limited, Company Reg No. 7116878, VAT No. 984-4271-88, Registered Office: Portsoken House, 155-157 Minories, London, EC3N 1LJ. This email may be private and confidential, and contain legally privileged information. If you are not the addressee you should not disclose, copy, circulate or in any other way use the information contained in this transmission. Such unauthorised use is prohibited and may be unlawful. If you are not the intended recipient, please contact us immediately. P Save a tree - we only print the emails we really need. |
From: Dennis V M. <d.m...@d2...> - 2018-10-24 12:33:34
|
Inspired by the intention of the following comment: //PEP Use NPDU.Create and APDU.Create (when written) A candidate method for 'BVLL.Create()': using System; //----------------------------------------------------------------------------------------------- // BVLL Routines public static class BVLL { public static int /*BVLL*/ Create(byte[] bytes, ushort bvlcLen = 0, int offset = 0) { // BVLL // BLVC Type bytes[offset++] = BACnetEnums.BACNET_BVLC_TYPE_BIP; // BLVC Function bytes[offset++] = BACnetEnums.BACNET_UNICAST_NPDU; // BLVC Length var blvcBytes = BitConverter.GetBytes(bvlcLen); bytes[offset++] = blvcBytes[1]; bytes[offset++] = blvcBytes[0]; return offset; } } E.g. Used like so: // BVLL var offset = BVLL.Create(sendBytes, 12); // 'offset' (/"len") == BVLL is always 4 bytes //sendBytes[0] = BACnetEnums.BACNET_BVLC_TYPE_BIP; //sendBytes[1] = BACnetEnums.BACNET_UNICAST_NPDU; //sendBytes[2] = 0; //sendBytes[3] = 12; [http://dev.d2i.co/d2i-email-signature/wlogo.png] Dennis McEnaney Technical Lead DDI 020 3102 4100<tel:02031024100> [http://dev.d2i.co/d2i-email-signature/wdot.png] TEL 020 3817 7839<tel:02038177839> [http://dev.d2i.co/d2i-email-signature/wdot.png] WEB d2i.co<http://d2i.co/> Portsoken House, 155-157 Minories, London, EC3N 1LJ [http://dev.d2i.co/d2i-email-signature/wico-linkedin.png]<https://www.linkedin.com/company/d2-interactive-uk>[http://dev.d2i.co/d2i-email-signature/wico-facebook.png]<https://www.facebook.com/d2iglobal>[http://dev.d2i.co/d2i-email-signature/wico-twitter.png]<https://twitter.com/d2interactive>[http://dev.d2i.co/d2i-email-signature/wico-instagram.png]<https://www.instagram.com/d2interactive/>[http://dev.d2i.co/d2i-email-signature/wico-google.png]<https://plus.google.com/116460778442548453069/posts> D2 Interactive Limited, Company Reg No. 7116878, VAT No. 984-4271-88, Registered Office: Portsoken House, 155-157 Minories, London, EC3N 1LJ. This email may be private and confidential, and contain legally privileged information. If you are not the addressee you should not disclose, copy, circulate or in any other way use the information contained in this transmission. Such unauthorised use is prohibited and may be unlawful. If you are not the intended recipient, please contact us immediately. P Save a tree - we only print the emails we really need. |
From: Dennis V M. <d.m...@d2...> - 2018-10-17 20:41:03
|
I believe the MAC address handling might also be off – 2 bugs? 1. In ‘NDPU.Parse()’ (?) – added the missing code to deal with a MAC address: //PEP Other SLEN values ... // DVM: MAC Address if (SLEN == 6) { SADR = new byte[6]; SADR[5] = bytes[len++]; SADR[4] = bytes[len++]; SADR[3] = bytes[len++]; SADR[2] = bytes[len++]; SADR[1] = bytes[len++]; SADR[0] = bytes[len++]; SAddress = BitConverter.ToUInt32(SADR, 0); } 1. In ‘SendReadProperty()’ (?) - commented out the original 2 lines & replaced each with some code: // Get the MAC address (0x0D) //sendBytes[8] = 0x01; // MAC address length //sendBytes[9] = 0x0D; // Destination MAC layer address var macAddrBytes = BitConverter.GetBytes(device.MacAddress); // DVM: // sendBytes[len++] = 0x01; // MAC address length - adjust for other lengths ... sendBytes[len++] = device.SourceLength; // sendBytes[len++] = macAddrBytes[0]; for (var idx = 0; idx < (device.SourceLength - macAddrBytes.Length); idx ++) { sendBytes[len++] = 0x00; } for (var idx = 0; idx < macAddrBytes.Length; idx++) { sendBytes[len++] = macAddrBytes[(macAddrBytes.Length - 1) - idx]; } sendBytes[len++] = 0xFF; // Hop count = 255 You might also want to start with the following code (as a quick-running guide) to adding the parsing of ‘Abort’, ‘Error’ & ‘Reject’: // DVM: public static void /*APDU*/ ParseAbort( ref byte[] bytes, int pos, out BnAbortInfo bnAbortInfo) { bnAbortInfo = BnAbortInfo.Create(); bnAbortInfo.BnServer = (bytes[pos] & 0x01) == 1; Trace.WriteLine($"\tServer - '{bnAbortInfo.BnServer}'"); // Move on past the 'PDU-Type'-'Reserved'-'Server' (- 'first header octet') pos++; // {1} bnAbortInfo.BnOriginalInvokeId = bytes[pos++]; Trace.WriteLine($"\tOriginal Invoke ID - '{bnAbortInfo.BnOriginalInvokeId}'"); // {1} bnAbortInfo.BnAbortReason = (BACnetEnums.BACNET_ABORT_REASON) (uint)bytes[pos++]; Trace.WriteLine($"\tAbort Reason - '{bnAbortInfo.BnAbortReason}'"); } // DVM: public static void /*APDU*/ ParseError( ref byte[] bytes, int pos, out BnErrorInfo bnErrorInfo) { // Skip the 'PDU-Type'-'Reserved' (- 'first header octet') pos++; bnErrorInfo = BnErrorInfo.Create(); // {1} bnErrorInfo.BnOriginalInvokeId = bytes[pos++]; Trace.WriteLine($"\tOriginal Invoke ID - '{bnErrorInfo.BnOriginalInvokeId }'"); // {1} // 'BACnetConfirmedServiceChoice' bnErrorInfo.BnErrorChoice = (BACnetEnums.BACNET_CONFIRMED_SERVICE)bytes[pos++]; Trace.WriteLine($"\tError Choice - '{bnErrorInfo.BnErrorChoice}'"); // {2} // 'X'91' Application Tag 9 (Enumerated, L=1) (Error Class)' ? // TODO: Parse the 1st app-tag; skipping it for now pos++; bnErrorInfo.BnErrorClass = (BACnetEnums.BACNET_ERROR_CLASS) (uint)bytes[pos++]; Trace.WriteLine($"\tError Class - '{bnErrorInfo.BnErrorClass}'"); // {2} // 'X'91' Application Tag 9 (Enumerated, L=1) (Error Code)' ? // TODO: Parse the 2nd app-tag; skipping it for now pos++; bnErrorInfo.BnErrorCode = (BACnetEnums.BACNET_ERROR_CODE) bytes[pos++]; Trace.WriteLine($"\tError Code - '{bnErrorInfo.BnErrorCode}'"); } // DVM: public static void /*APDU*/ ParseReject( ref byte[] bytes, int pos, out BnRejectInfo bnRejectInfo) { // Skip 'Reserved' ? pos++; bnRejectInfo = BnRejectInfo.Create(); // {1} bnRejectInfo.BnOriginalInvokeId = bytes[pos++]; Trace.WriteLine($"\tOriginal Invoke ID - '{bnRejectInfo.BnOriginalInvokeId}'"); // {1} bnRejectInfo.BnRejectReason = (BACnetEnums.BACNET_REJECT_REASON) (uint)bytes[pos++]; Trace.WriteLine($"\tReject Reason - '{bnRejectInfo.BnRejectReason}'"); } So, plugging them into ‘SendReadProperty()’ something like so: else { if (pduType == (uint) BACnetEnums.BACNET_PDU_TYPE.ERROR) { TraceWriteLine(@"ERROR!!"); // Verify the Invoke ID is the same var ic = (byte)(_invokeCounter == 0 ? 255 : _invokeCounter - 1); if (ic == recvBytes[apduOffset + 1] ) { APDU.ParseError(ref recvBytes, apduOffset); return false; // This will still execute the finally } } else { if (pduType == (uint)BACnetEnums.BACNET_PDU_TYPE.REJECT) { TraceWriteLine(@"REJECT!"); // Verify the Invoke ID is the same var ic = (byte)(_invokeCounter == 0 ? 255 : _invokeCounter - 1); if (ic == recvBytes[apduOffset + 1] ) { APDU.ParseReject(ref recvBytes, apduOffset); return false; // This will still execute the finally } } else { if (pduType == (uint)BACnetEnums.BACNET_PDU_TYPE.ABORT) { TraceWriteLine(@"ABORT!!!"); // Verify the Invoke ID is the same var ic = (byte)(_invokeCounter == 0 ? 255 : _invokeCounter - 1); if (ic == recvBytes[apduOffset + 1]) { APDU.ParseAbort(ref recvBytes, apduOffset); return false; // This will still execute the finally } } } } } My last comment about ‘SetObjectID()’ was not quite right – I was incorrectly staring at a App-Tag, so what I’d given was a method for parsing an App-Tag; e.g. the 2 methods together (new one & original one) with different names for distinction/clarity): // DVM: // Application-Tag & BACnet 'Object-Identifier' (- e.g. for 'I-Am' service) // (- VTS: "iAmDeviceIdentifier" / app-tag & Bn-Obj-Id - e.g. "device,257" == 'C4 02 00 01 01') public static uint /*APDU*/ SetAppTagObjectID(ref byte[] bytes, uint pos, BACnetEnums.BACNET_OBJECT_TYPE bnObjType, uint objInstNum) { // Assemble Object ID portion of APDU // E.g. Right for creating an 'I-Am' response // DVM: 'Tag Number' - 'Class' (application-tag/'0' - defaulted here), 'Length' (to the object-id length/'4') bytes[pos++] = (0x0C << 4) | 4; //PEP Context Specific Tag number could differ bytes[pos++] = 0x0C; // Tag number (BACnet Object ID) // <-- original //bytes[pos++] = 0x01; //bytes[pos++] = 0x00; //bytes[pos++] = 0x00; //bytes[pos++] = 0x00; var value = (uint)bnObjType; value = value & BACnetEnums.BACNET_MAX_OBJECT; value = value << BACnetEnums.BACNET_INSTANCE_BITS; value = value | (objInstNum & BACnetEnums.BACNET_MAX_INSTANCE); //len = encode_unsigned32(apdu, value); byte[] temp4 = new byte[4]; temp4 = BitConverter.GetBytes(value); bytes[pos++] = temp4[3]; bytes[pos++] = temp4[2]; bytes[pos++] = temp4[1]; bytes[pos++] = temp4[0]; return pos; } // SD-Context-Specific-Tag & BACnet 'Object-Identifier' (- e.g. for 'ReadProperty' service) // (- VTS: "objectIdentifier" / SD-ctx-specific-tag & Bn-Obj-Id) // DVM: Renamed - was originally called 'SetObjectID' public static uint /*APDU*/ SetCtxSpecificTagObjectID(ref byte[] bytes, uint pos, BACnetEnums.BACNET_OBJECT_TYPE bnObjType, uint objInstNum) { // Assemble Object ID portion of APDU //PEP Context Specific Tag number could differ bytes[pos++] = 0x0C; // Tag number (BACnet Object ID) //bytes[pos++] = 0x01; //bytes[pos++] = 0x00; //bytes[pos++] = 0x00; //bytes[pos++] = 0x00; var value = (uint)bnObjType; value = value & BACnetEnums.BACNET_MAX_OBJECT; value = value << BACnetEnums.BACNET_INSTANCE_BITS; value = value | (objInstNum & BACnetEnums.BACNET_MAX_INSTANCE); //len = encode_unsigned32(apdu, value); byte[] temp4 = new byte[4]; temp4 = BitConverter.GetBytes(value); bytes[pos++] = temp4[3]; bytes[pos++] = temp4[2]; bytes[pos++] = temp4[1]; bytes[pos++] = temp4[0]; return pos; } So, for example, for the new one that I’ve drafted – ‘SetAppTagObjectID()’, you could use it for a ‘I-Am’ listen method for mocking a device; e.g. something loosely like: public void ListenForWhoIs() { var sock = _udpReceiveClnt.Client; var remoteIpEndPoint = new IPEndPoint(IPAddress.Any, RemoteUdpPortNum); TraceWriteLine( $"\tRemoteIpEndPoint = '{remoteIpEndPoint}' (AF = '{remoteIpEndPoint.AddressFamily}'{(remoteIpEndPoint.AddressFamily == AddressFamily.InterNetworkV6 ? $", Is Ipv6 Link Local = '{remoteIpEndPoint.Address.IsIPv6LinkLocal}'" : string.Empty)})"); TraceWriteLine(string.Empty); while (true) { // YIELD: // Application.DoEvents(); Yield(); // Process the response packets if (sock.Available > 0) { var recvBytes = _udpReceiveClnt.Receive(ref remoteIpEndPoint); TraceRecvBytes(recvBytes); TraceWriteLine( $"\tRemoteIpEndPoint = '{remoteIpEndPoint}' (AF = '{remoteIpEndPoint.AddressFamily}'{(remoteIpEndPoint.AddressFamily == AddressFamily.InterNetworkV6 ? $", Is Ipv6 Link Local = '{remoteIpEndPoint.Address.IsIPv6LinkLocal}'" : string.Empty)})"); TraceWriteLine(string.Empty); // Parse and save the BACnet data var apduOffset = NPDU.Parse(recvBytes, 4); // BVLL is always 4 bytes if (APDU.ParseWhoIs(recvBytes, apduOffset)) { var sendBytes = new byte[25]; sendBytes[0] = BACnetEnums.BACNET_BVLC_TYPE_BIP; sendBytes[1] = BACnetEnums.BACNET_UNICAST_NPDU; sendBytes[2] = 0; sendBytes[3] = 12; sendBytes[4] = BACnetEnums.BACNET_PROTOCOL_VERSION; sendBytes[5] = 0x20; // Control flags sendBytes[6] = 0xFF; // Destination network address (65535) sendBytes[7] = 0xFF; sendBytes[8] = 0; // Destination MAC layer address length, 0 = Broadcast sendBytes[9] = 0xFF; // Hop count = 255 sendBytes[10] = (byte)BACnetEnums.BACNET_PDU_TYPE.UNCONFIRMED_SERVICE_REQUEST; sendBytes[11] = (byte)BACnetEnums.BACNET_UNCONFIRMED_SERVICE.I_AM; // Device Identifier var pos = APDU.SetAppTagObjectID( ref sendBytes, 12, BACnetEnums.BACNET_OBJECT_TYPE.DEVICE, MockDevObjInstNum); /* // E.g.: For obj-inst-# '257', would equate to: // - Application tag sendBytes[12] = BACnetTag.GenerateAppTag( BACnetEnums.BACNET_APPLICATION_TAG.OBJECT_ID); // - BACnet Object Identifier sendBytes[13] = 0x02; sendBytes[14] = 0x00; sendBytes[15] = 0x01; sendBytes[16] = 0x01; */ // maxADPULengthAccepted sendBytes[17] = 0x22; sendBytes[18] = 0x04; sendBytes[19] = 0x00; // segmentationSupported sendBytes[20] = 0x91; sendBytes[21] = 0x03; // vendorID sendBytes[22] = 0x22; sendBytes[23] = 0x01; sendBytes[24] = 0x04; _broadcastIpEp = new IPEndPoint(BroadcastIpAddress, RemoteUdpPortNum); // VTS - 0,0 (- Global broadcast) Trace.WriteLine( $"\tBroadcastIpEndPoint = '{_broadcastIpEp}' (AF = '{_broadcastIpEp.AddressFamily}'{(_broadcastIpEp.AddressFamily == AddressFamily.InterNetworkV6 ? $", Is Ipv6 Link Local = '{_broadcastIpEp.Address.IsIPv6LinkLocal}'" : string.Empty)})"); _udpSendClnt.EnableBroadcast = true; TraceSendBytes(sendBytes); _udpSendClnt.Send(sendBytes, sendBytes.Length, _broadcastIpEp); } } } } From: Steve Karg <st...@ka...> Sent: 16 October 2018 22:49 To: Discussion for developers of the BACsharp BACnet stack <bac...@li...> Subject: Re: [Bacsharp-developers] BACNET_OBJECT_TYPE: Value correction - from 31 to 54 Hi Dennis, Thank you for the bug-fix notice. I updated the object type enumerations in the BACsharp repo. Best Regards, Steve On Sun, Oct 14, 2018 at 11:27 AM Dennis V McEnaney <d.m...@d2...<mailto:d.m...@d2...>> wrote: // DBS: Value correction LIGHTING_OUTPUT = 54, // 31, [http://dev.d2i.co/d2i-email-signature/wlogo.png] Dennis McEnaney Technical Lead DDI 020 3102 4100<tel:02031024100> [http://dev.d2i.co/d2i-email-signature/wdot.png] TEL 020 3817 7839<tel:02038177839> [http://dev.d2i.co/d2i-email-signature/wdot.png] WEB d2i.co<http://d2i.co/> Portsoken House, 155-157 Minories, London, EC3N 1LJ [http://dev.d2i.co/d2i-email-signature/wico-linkedin.png]<https://www.linkedin.com/company/d2-interactive-uk>[http://dev.d2i.co/d2i-email-signature/wico-facebook.png]<https://www.facebook.com/d2iglobal>[http://dev.d2i.co/d2i-email-signature/wico-twitter.png]<https://twitter.com/d2interactive>[http://dev.d2i.co/d2i-email-signature/wico-instagram.png]<https://www.instagram.com/d2interactive/>[http://dev.d2i.co/d2i-email-signature/wico-google.png]<https://plus.google.com/116460778442548453069/posts> D2 Interactive Limited, Company Reg No. 7116878, VAT No. 984-4271-88, Registered Office: Portsoken House, 155-157 Minories, London, EC3N 1LJ. This email may be private and confidential, and contain legally privileged information. If you are not the addressee you should not disclose, copy, circulate or in any other way use the information contained in this transmission. Such unauthorised use is prohibited and may be unlawful. If you are not the intended recipient, please contact us immediately. P Save a tree - we only print the emails we really need. _______________________________________________ Bacsharp-developers mailing list Bac...@li...<mailto:Bac...@li...> https://lists.sourceforge.net/lists/listinfo/bacsharp-developers |
From: Dennis V M. <d.m...@d2...> - 2018-10-17 18:35:43
|
… Following on from my last e-mail (/reply) – forgot something – If you were mocking the listening for ‘Who-Is’ you’d also to add/implement a ‘APDU.ParseWhoIs()’ method (- as referenced): // DVM: public static bool /*APDU*/ ParseWhoIs(byte[] bytes, int offset) { // Look for and parse Who-Is Packet // int len = 0; ObjectID = 0; APDUType = bytes[offset]; if ((APDUType == 0x10) && (bytes[offset + 1] == 0x08)) { // TODO: Get the Device Instance Range Low Limit // TODO: Get the Device Instance Range High Limit return true; } else return false; } From: Steve Karg <st...@ka...> Sent: 16 October 2018 22:49 To: Discussion for developers of the BACsharp BACnet stack <bac...@li...> Subject: Re: [Bacsharp-developers] BACNET_OBJECT_TYPE: Value correction - from 31 to 54 Hi Dennis, Thank you for the bug-fix notice. I updated the object type enumerations in the BACsharp repo. Best Regards, Steve On Sun, Oct 14, 2018 at 11:27 AM Dennis V McEnaney <d.m...@d2...<mailto:d.m...@d2...>> wrote: // DBS: Value correction LIGHTING_OUTPUT = 54, // 31, [http://dev.d2i.co/d2i-email-signature/wlogo.png] Dennis McEnaney Technical Lead DDI 020 3102 4100<tel:02031024100> [http://dev.d2i.co/d2i-email-signature/wdot.png] TEL 020 3817 7839<tel:02038177839> [http://dev.d2i.co/d2i-email-signature/wdot.png] WEB d2i.co<http://d2i.co/> Portsoken House, 155-157 Minories, London, EC3N 1LJ [http://dev.d2i.co/d2i-email-signature/wico-linkedin.png]<https://www.linkedin.com/company/d2-interactive-uk>[http://dev.d2i.co/d2i-email-signature/wico-facebook.png]<https://www.facebook.com/d2iglobal>[http://dev.d2i.co/d2i-email-signature/wico-twitter.png]<https://twitter.com/d2interactive>[http://dev.d2i.co/d2i-email-signature/wico-instagram.png]<https://www.instagram.com/d2interactive/>[http://dev.d2i.co/d2i-email-signature/wico-google.png]<https://plus.google.com/116460778442548453069/posts> D2 Interactive Limited, Company Reg No. 7116878, VAT No. 984-4271-88, Registered Office: Portsoken House, 155-157 Minories, London, EC3N 1LJ. This email may be private and confidential, and contain legally privileged information. If you are not the addressee you should not disclose, copy, circulate or in any other way use the information contained in this transmission. Such unauthorised use is prohibited and may be unlawful. If you are not the intended recipient, please contact us immediately. P Save a tree - we only print the emails we really need. _______________________________________________ Bacsharp-developers mailing list Bac...@li...<mailto:Bac...@li...> https://lists.sourceforge.net/lists/listinfo/bacsharp-developers |
From: Steve K. <st...@ka...> - 2018-10-16 22:43:08
|
Hi Dennis, Thank you for the bug-fix notice. I updated the object type enumerations in the BACsharp repo. Best Regards, Steve On Sun, Oct 14, 2018 at 11:27 AM Dennis V McEnaney <d.m...@d2...> wrote: > // DBS: Value correction > > LIGHTING_OUTPUT = 54, // 31, > > > > > > [image: http://dev.d2i.co/d2i-email-signature/wlogo.png] > > > > *Dennis McEnaney* > > Technical Lead > > DDI 020 3102 4100 <02031024100> [image: > http://dev.d2i.co/d2i-email-signature/wdot.png]TEL 020 3817 7839 > <02038177839> [image: http://dev.d2i.co/d2i-email-signature/wdot.png]WEB > d2i.co > Portsoken House, 155-157 Minories, London, EC3N 1LJ > > > > [image: http://dev.d2i.co/d2i-email-signature/wico-linkedin.png] > <https://www.linkedin.com/company/d2-interactive-uk>[image: > http://dev.d2i.co/d2i-email-signature/wico-facebook.png] > <https://www.facebook.com/d2iglobal>[image: > http://dev.d2i.co/d2i-email-signature/wico-twitter.png] > <https://twitter.com/d2interactive>[image: > http://dev.d2i.co/d2i-email-signature/wico-instagram.png] > <https://www.instagram.com/d2interactive/>[image: > http://dev.d2i.co/d2i-email-signature/wico-google.png] > <https://plus.google.com/116460778442548453069/posts> > > > > D2 Interactive Limited, Company Reg No. 7116878, VAT No. 984-4271-88, > Registered Office: Portsoken House, 155-157 Minories, London, EC3N 1LJ. > This email may be private and confidential, and contain legally privileged > information. If you are not the addressee you should not disclose, copy, > circulate or in any other way use the information contained in this > transmission. Such unauthorised use is prohibited and may be unlawful. If > you are not the intended recipient, please contact us immediately. > > P Save a tree - we only print the emails we really need. > > > > > _______________________________________________ > Bacsharp-developers mailing list > Bac...@li... > https://lists.sourceforge.net/lists/listinfo/bacsharp-developers > |
From: Dennis V M. <d.m...@d2...> - 2018-10-14 16:43:16
|
// DBS: Value correction LIGHTING_OUTPUT = 54, // 31, [http://dev.d2i.co/d2i-email-signature/wlogo.png] Dennis McEnaney Technical Lead DDI 020 3102 4100<tel:02031024100> [http://dev.d2i.co/d2i-email-signature/wdot.png] TEL 020 3817 7839<tel:02038177839> [http://dev.d2i.co/d2i-email-signature/wdot.png] WEB d2i.co<http://d2i.co/> Portsoken House, 155-157 Minories, London, EC3N 1LJ [http://dev.d2i.co/d2i-email-signature/wico-linkedin.png]<https://www.linkedin.com/company/d2-interactive-uk>[http://dev.d2i.co/d2i-email-signature/wico-facebook.png]<https://www.facebook.com/d2iglobal>[http://dev.d2i.co/d2i-email-signature/wico-twitter.png]<https://twitter.com/d2interactive>[http://dev.d2i.co/d2i-email-signature/wico-instagram.png]<https://www.instagram.com/d2interactive/>[http://dev.d2i.co/d2i-email-signature/wico-google.png]<https://plus.google.com/116460778442548453069/posts> D2 Interactive Limited, Company Reg No. 7116878, VAT No. 984-4271-88, Registered Office: Portsoken House, 155-157 Minories, London, EC3N 1LJ. This email may be private and confidential, and contain legally privileged information. If you are not the addressee you should not disclose, copy, circulate or in any other way use the information contained in this transmission. Such unauthorised use is prohibited and may be unlawful. If you are not the intended recipient, please contact us immediately. P Save a tree - we only print the emails we really need. |
From: Dennis V M. <d.m...@d2...> - 2018-10-04 19:47:37
|
Guys & Gals, Apologies if I've strayed from the original naming. But I thought you might like a copy of the following additional property types: // DBS: ADDED EVENT_MESSAGE_TEXTS_CONFIG = 352, EVENT_DETECTION_ENABLE = 353, EVENT_ALGORITHM_INHIBIT = 354, EVENT_ALGORITHM_INHIBIT_REF = 355, TIME_DELAY_NORMAL = 356, RELIABILITY_EVALUATION_INHIBIT = 357, FAULT_PARAMETERS = 358, FAULT_TYPE = 359, LOCAL_FORWARDING_ONLY = 360, PROCESS_IDENTIFIER_FILTER = 361, SUBSCRIBED_RECIPIENTS = 362, PORT_FILTER = 363, AUTHORIZATION_EXEMPTIONS = 364, ALLOW_GROUP_DELAY_INHIBIT = 365, CHANNEL_NUMBER = 366, CONTROL_GROUPS = 367, EXECUTION_DELAY = 368, LAST_PRIORITY = 369, WRITE_STATUS = 370, PROPERTY_LIST = 371, // Added in protocol revision 14 (?) // SERIAL_NUMBER = 372, BLINK_WARN_ENABLE = 373, DEFAULT_FADE_TIME = 374, DEFAULT_RAMP_RATE = 375, DEFAULT_STEP_INCREMENT = 376, EGRESS_TIME = 377, IN_PROGRESS = 378, INSTANTANEOUS_POWER = 379, // LIGHTING_COMMAND = 380, LIGHTING_COMMAND_DEFAULT_PRIORITY = 381, MAX_ACTUAL_VALUE = 382, MIN_ACTUAL_VALUE = 383, // POWER = 384, TRANSITION = 385, EGRESS_ACTIVE = 386 Also, if your IP address has multiple subnets (rather than just the one) - e.g. ends with something a value like 248, rather than 0, you might need to calculate the broadcast address, e.g.: https://blogs.msdn.microsoft.com/knom/2008/12/31/ip-address-calculations-with-c-subnetmasks-networks/ Maybe I'm wrong, but I think the 'SetObjectID' method might not be correct (?); what I believe to be correct with comment (- along with the old line of code commented-out): // Application-Tag & BACnet 'Object-Identifier' // (- VTS: 'Device Identifier' / app-tag & Bn-Obj-Id - e.g. "device,257" == 'C4 02 00 01 01') public static uint /*APDU*/ SetObjectID(ref byte[] bytes, uint pos, BACnetEnums.BACNET_OBJECT_TYPE bnObjType, uint objInstNum) { // Assemble Object ID portion of APDU uint value = 0u; //PEP Context Specific Tag number could differ // DVM: Bug-fix (?); was not placing the 'Tag Number' in the right // place (or with the right value), and was not setting the 'Class' // (toapplication-tag/'0' - defaulted here), and was not setting // the 'Length' (to the object-id length/'4'). The 'Tag Number' // might have been a typo - "0x0C" << 4 == '0xC0' (?). bytes[pos++] = (0x0C << 4) | 4; // Tag number (BACnet Object ID) // bytes[pos++] = 0x0C; // Tag number (BACnet Object ID) // <-- original [http://dev.d2i.co/d2i-email-signature/wlogo.png] Dennis McEnaney Technical Lead DDI 020 3102 4100<tel:02031024100> [http://dev.d2i.co/d2i-email-signature/wdot.png] TEL 020 3817 7839<tel:02038177839> [http://dev.d2i.co/d2i-email-signature/wdot.png] WEB d2i.co<http://d2i.co/> Portsoken House, 155-157 Minories, London, EC3N 1LJ [http://dev.d2i.co/d2i-email-signature/wico-linkedin.png]<https://www.linkedin.com/company/d2-interactive-uk>[http://dev.d2i.co/d2i-email-signature/wico-facebook.png]<https://www.facebook.com/d2iglobal>[http://dev.d2i.co/d2i-email-signature/wico-twitter.png]<https://twitter.com/d2interactive>[http://dev.d2i.co/d2i-email-signature/wico-instagram.png]<https://www.instagram.com/d2interactive/>[http://dev.d2i.co/d2i-email-signature/wico-google.png]<https://plus.google.com/116460778442548453069/posts> D2 Interactive Limited, Company Reg No. 7116878, VAT No. 984-4271-88, Registered Office: Portsoken House, 155-157 Minories, London, EC3N 1LJ. This email may be private and confidential, and contain legally privileged information. If you are not the addressee you should not disclose, copy, circulate or in any other way use the information contained in this transmission. Such unauthorised use is prohibited and may be unlawful. If you are not the intended recipient, please contact us immediately. P Save a tree - we only print the emails we really need. |
From: Dennis M. <d.m...@d2...> - 2017-10-06 13:47:17
|
Guys & Gals, I thought you appreciate an update for the 'BACnetEnums'. I've added new values - from the 2012 standard I think, with all of them commented out, proceeded with the following comment: // DBS: There's also a few comments that start with the following prefix, where I've tried to note corrections: // Incorrect Assuming I haven't made mistakes myself, I hope this helps. ;D Here's the 'BACnetEnums' & the 'BACnetStack' class (- renamed to 'BacnetStack'): // BACnetEnums public class BACnetEnums { public const int BACNET_MAX_OBJECT = 0x3FF; public const int BACNET_MAX_INSTANCE = 0x3FFFFF; public const int BACNET_INSTANCE_BITS = 22; public const int BACNET_PROTOCOL_VERSION = 0x01; public const int BACNET_UNICAST_NPDU = 0x0A; public const byte BACNET_BVLC_TYPE_BIP = 0x81; public enum BACNET_PROPERTY_ID { PROP_ACKED_TRANSITIONS = 0, PROP_ACK_REQUIRED = 1, PROP_ACTION = 2, PROP_ACTION_TEXT = 3, PROP_ACTIVE_TEXT = 4, PROP_ACTIVE_VT_SESSIONS = 5, PROP_ALARM_VALUE = 6, PROP_ALARM_VALUES = 7, PROP_ALL = 8, PROP_ALL_WRITES_SUCCESSFUL = 9, PROP_APDU_SEGMENT_TIMEOUT = 10, PROP_APDU_TIMEOUT = 11, PROP_APPLICATION_SOFTWARE_VERSION = 12, PROP_ARCHIVE = 13, PROP_BIAS = 14, PROP_CHANGE_OF_STATE_COUNT = 15, PROP_CHANGE_OF_STATE_TIME = 16, PROP_NOTIFICATION_CLASS = 17, PROP_BLANK_1 = 18, PROP_CONTROLLED_VARIABLE_REFERENCE = 19, PROP_CONTROLLED_VARIABLE_UNITS = 20, PROP_CONTROLLED_VARIABLE_VALUE = 21, PROP_COV_INCREMENT = 22, PROP_DATE_LIST = 23, PROP_DAYLIGHT_SAVINGS_STATUS = 24, PROP_DEADBAND = 25, PROP_DERIVATIVE_CONSTANT = 26, PROP_DERIVATIVE_CONSTANT_UNITS = 27, PROP_DESCRIPTION = 28, PROP_DESCRIPTION_OF_HALT = 29, PROP_DEVICE_ADDRESS_BINDING = 30, PROP_DEVICE_TYPE = 31, PROP_EFFECTIVE_PERIOD = 32, PROP_ELAPSED_ACTIVE_TIME = 33, PROP_ERROR_LIMIT = 34, PROP_EVENT_ENABLE = 35, PROP_EVENT_STATE = 36, PROP_EVENT_TYPE = 37, PROP_EXCEPTION_SCHEDULE = 38, PROP_FAULT_VALUES = 39, PROP_FEEDBACK_VALUE = 40, PROP_FILE_ACCESS_METHOD = 41, PROP_FILE_SIZE = 42, PROP_FILE_TYPE = 43, PROP_FIRMWARE_REVISION = 44, PROP_HIGH_LIMIT = 45, PROP_INACTIVE_TEXT = 46, PROP_IN_PROCESS = 47, PROP_INSTANCE_OF = 48, PROP_INTEGRAL_CONSTANT = 49, PROP_INTEGRAL_CONSTANT_UNITS = 50, PROP_ISSUE_CONFIRMED_NOTIFICATIONS = 51, PROP_LIMIT_ENABLE = 52, PROP_LIST_OF_GROUP_MEMBERS = 53, PROP_LIST_OF_OBJECT_PROPERTY_REFERENCES = 54, PROP_LIST_OF_SESSION_KEYS = 55, PROP_LOCAL_DATE = 56, PROP_LOCAL_TIME = 57, PROP_LOCATION = 58, PROP_LOW_LIMIT = 59, PROP_MANIPULATED_VARIABLE_REFERENCE = 60, PROP_MAXIMUM_OUTPUT = 61, PROP_MAX_APDU_LENGTH_ACCEPTED = 62, PROP_MAX_INFO_FRAMES = 63, PROP_MAX_MASTER = 64, PROP_MAX_PRES_VALUE = 65, PROP_MINIMUM_OFF_TIME = 66, PROP_MINIMUM_ON_TIME = 67, PROP_MINIMUM_OUTPUT = 68, PROP_MIN_PRES_VALUE = 69, PROP_MODEL_NAME = 70, PROP_MODIFICATION_DATE = 71, PROP_NOTIFY_TYPE = 72, PROP_NUMBER_OF_APDU_RETRIES = 73, PROP_NUMBER_OF_STATES = 74, PROP_OBJECT_IDENTIFIER = 75, PROP_OBJECT_LIST = 76, PROP_OBJECT_NAME = 77, PROP_OBJECT_PROPERTY_REFERENCE = 78, PROP_OBJECT_TYPE = 79, PROP_OPTIONAL = 80, PROP_OUT_OF_SERVICE = 81, PROP_OUTPUT_UNITS = 82, PROP_EVENT_PARAMETERS = 83, PROP_POLARITY = 84, PROP_PRESENT_VALUE = 85, PROP_PRIORITY = 86, PROP_PRIORITY_ARRAY = 87, PROP_PRIORITY_FOR_WRITING = 88, PROP_PROCESS_IDENTIFIER = 89, PROP_PROGRAM_CHANGE = 90, PROP_PROGRAM_LOCATION = 91, PROP_PROGRAM_STATE = 92, PROP_PROPORTIONAL_CONSTANT = 93, PROP_PROPORTIONAL_CONSTANT_UNITS = 94, PROP_PROTOCOL_CONFORMANCE_CLASS = 95, /* deleted in version 1 revision 2 */ PROP_PROTOCOL_OBJECT_TYPES_SUPPORTED = 96, PROP_PROTOCOL_SERVICES_SUPPORTED = 97, PROP_PROTOCOL_VERSION = 98, PROP_READ_ONLY = 99, PROP_REASON_FOR_HALT = 100, PROP_RECIPIENT = 101, PROP_RECIPIENT_LIST = 102, PROP_RELIABILITY = 103, PROP_RELINQUISH_DEFAULT = 104, PROP_REQUIRED = 105, PROP_RESOLUTION = 106, PROP_SEGMENTATION_SUPPORTED = 107, PROP_SETPOINT = 108, PROP_SETPOINT_REFERENCE = 109, PROP_STATE_TEXT = 110, PROP_STATUS_FLAGS = 111, PROP_SYSTEM_STATUS = 112, PROP_TIME_DELAY = 113, PROP_TIME_OF_ACTIVE_TIME_RESET = 114, PROP_TIME_OF_STATE_COUNT_RESET = 115, PROP_TIME_SYNCHRONIZATION_RECIPIENTS = 116, PROP_UNITS = 117, PROP_UPDATE_INTERVAL = 118, PROP_UTC_OFFSET = 119, PROP_VENDOR_IDENTIFIER = 120, PROP_VENDOR_NAME = 121, PROP_VT_CLASSES_SUPPORTED = 122, PROP_WEEKLY_SCHEDULE = 123, PROP_ATTEMPTED_SAMPLES = 124, PROP_AVERAGE_VALUE = 125, PROP_BUFFER_SIZE = 126, PROP_CLIENT_COV_INCREMENT = 127, PROP_COV_RESUBSCRIPTION_INTERVAL = 128, PROP_CURRENT_NOTIFY_TIME = 129, PROP_EVENT_TIME_STAMPS = 130, PROP_LOG_BUFFER = 131, PROP_LOG_DEVICE_OBJECT = 132, /* The enable property is renamed from log-enable in Addendum b to ANSI/ASHRAE 135-2004(135b-2) */ PROP_ENABLE = 133, PROP_LOG_INTERVAL = 134, PROP_MAXIMUM_VALUE = 135, PROP_MINIMUM_VALUE = 136, PROP_NOTIFICATION_THRESHOLD = 137, PROP_PREVIOUS_NOTIFY_TIME = 138, PROP_PROTOCOL_REVISION = 139, PROP_RECORDS_SINCE_NOTIFICATION = 140, PROP_RECORD_COUNT = 141, PROP_START_TIME = 142, PROP_STOP_TIME = 143, PROP_STOP_WHEN_FULL = 144, PROP_TOTAL_RECORD_COUNT = 145, PROP_VALID_SAMPLES = 146, PROP_WINDOW_INTERVAL = 147, PROP_WINDOW_SAMPLES = 148, PROP_MAXIMUM_VALUE_TIMESTAMP = 149, PROP_MINIMUM_VALUE_TIMESTAMP = 150, PROP_VARIANCE_VALUE = 151, PROP_ACTIVE_COV_SUBSCRIPTIONS = 152, PROP_BACKUP_FAILURE_TIMEOUT = 153, PROP_CONFIGURATION_FILES = 154, PROP_DATABASE_REVISION = 155, PROP_DIRECT_READING = 156, PROP_LAST_RESTORE_TIME = 157, PROP_MAINTENANCE_REQUIRED = 158, PROP_MEMBER_OF = 159, PROP_MODE = 160, PROP_OPERATION_EXPECTED = 161, PROP_SETTING = 162, PROP_SILENCED = 163, PROP_TRACKING_VALUE = 164, PROP_ZONE_MEMBERS = 165, PROP_LIFE_SAFETY_ALARM_VALUES = 166, PROP_MAX_SEGMENTS_ACCEPTED = 167, PROP_PROFILE_NAME = 168, PROP_AUTO_SLAVE_DISCOVERY = 169, PROP_MANUAL_SLAVE_ADDRESS_BINDING = 170, PROP_SLAVE_ADDRESS_BINDING = 171, PROP_SLAVE_PROXY_ENABLE = 172, PROP_LAST_NOTIFY_TIME = 173, PROP_SCHEDULE_DEFAULT = 174, PROP_ACCEPTED_MODES = 175, PROP_ADJUST_VALUE = 176, PROP_COUNT = 177, PROP_COUNT_BEFORE_CHANGE = 178, PROP_COUNT_CHANGE_TIME = 179, PROP_COV_PERIOD = 180, PROP_INPUT_REFERENCE = 181, PROP_LIMIT_MONITORING_INTERVAL = 182, PROP_LOGGING_DEVICE = 183, PROP_LOGGING_RECORD = 184, PROP_PRESCALE = 185, PROP_PULSE_RATE = 186, PROP_SCALE = 187, PROP_SCALE_FACTOR = 188, PROP_UPDATE_TIME = 189, PROP_VALUE_BEFORE_CHANGE = 190, PROP_VALUE_SET = 191, PROP_VALUE_CHANGE_TIME = 192, /* enumerations 193-206 are new */ PROP_ALIGN_INTERVALS = 193, PROP_GROUP_MEMBER_NAMES = 194, PROP_INTERVAL_OFFSET = 195, PROP_LAST_RESTART_REASON = 196, PROP_LOGGING_TYPE = 197, PROP_MEMBER_STATUS_FLAGS = 198, PROP_NOTIFICATION_PERIOD = 199, PROP_PREVIOUS_NOTIFY_RECORD = 200, PROP_REQUESTED_UPDATE_INTERVAL = 201, PROP_RESTART_NOTIFICATION_RECIPIENTS = 202, PROP_TIME_OF_DEVICE_RESTART = 203, PROP_TIME_SYNCHRONIZATION_INTERVAL = 204, PROP_TRIGGER = 205, PROP_UTC_TIME_SYNCHRONIZATION_RECIPIENTS = 206, /* enumerations 207-211 are used in Addendum d to ANSI/ASHRAE 135-2004 */ PROP_NODE_SUBTYPE = 207, PROP_NODE_TYPE = 208, PROP_STRUCTURED_OBJECT_LIST = 209, PROP_SUBORDINATE_ANNOTATIONS = 210, PROP_SUBORDINATE_LIST = 211, /* enumerations 212-225 are used in Addendum e to ANSI/ASHRAE 135-2004 */ PROP_ACTUAL_SHED_LEVEL = 212, PROP_DUTY_WINDOW = 213, PROP_EXPECTED_SHED_LEVEL = 214, PROP_FULL_DUTY_BASELINE = 215, /* enumerations 216-217 are used in Addendum i to ANSI/ASHRAE 135-2004 */ PROP_BLINK_PRIORITY_THRESHOLD = 216, PROP_BLINK_TIME = 217, /* enumerations 212-225 are used in Addendum e to ANSI/ASHRAE 135-2004 */ PROP_REQUESTED_SHED_LEVEL = 218, PROP_SHED_DURATION = 219, PROP_SHED_LEVEL_DESCRIPTIONS = 220, PROP_SHED_LEVELS = 221, PROP_STATE_DESCRIPTION = 222, /* enumerations 223-225 are used in Addendum i to ANSI/ASHRAE 135-2004 */ PROP_FADE_TIME = 223, PROP_LIGHTING_COMMAND = 224, PROP_LIGHTING_COMMAND_PRIORITY = 225, /* enumerations 226-235 are used in Addendum f to ANSI/ASHRAE 135-2004 */ /* enumerations 236-243 are used in Addendum i to ANSI/ASHRAE 135-2004 */ PROP_OFF_DELAY = 236, PROP_ON_DELAY = 237, PROP_POWER = 238, PROP_POWER_ON_VALUE = 239, PROP_PROGRESS_VALUE = 240, PROP_RAMP_RATE = 241, PROP_STEP_INCREMENT = 242, PROP_SYSTEM_FAILURE_VALUE = 243, /* The special property identifiers all, optional, and required */ /* are reserved for use in the ReadPropertyConditional and */ /* ReadPropertyMultiple services or services not defined in this standard. */ /* Enumerated values 0-511 are reserved for definition by ASHRAE. */ /* Enumerated values 512-4194303 may be used by others subject to the */ /* procedures and constraints described in Clause 23. */ PROP_BAUD_RATE = 9600, PROP_SERIAL_NUMBER = 9701 // DBS: // PROP_NOTIFICATION_CLASS = 17, // renamed from previous version // PROP_IN_PROCESS = 47, // PROP_ISSUE_CONFIRMED_NOTIFICATIONS = 51, // This property was deleted in version 1 revision 4. // PROP_OUTPUT_UNITS = 82, // PROP_EVENT_PARAMETERS = 83, // renamed from previous version // PROP_PROTOCOL_CONFORMANCE_CLASS = 95, // This property was deleted in version 1 revision 2. // PROP_RECIPIENT = 101, // This property was deleted in version 1 revision 4. // PROP_CURRENT_NOTIFY_TIME = 129, // This property was deleted in version 1 revision 3. // PROP_LOG_DEVICE_OBJECT_PROPERTY = 132, // PROP_ENABLE = 133, // renamed from previous version // PROP_PREVIOUS_NOTIFY_TIME = 138, // This property was deleted in version 1 revision 3. // PROP_LAST_NOTIFY_RECORD = 173, // PROP_LOGGING_OBJECT = 183, // PROP_LOGGING_RECORD = 184, // PROP_VALUE_CHANGE_TIME = 192, // PROP_LOGGING_TYPE = 197, // PROP_SHED_LEVELS = 221, // PROP_DOOR_ALARM_STATE = 226, // PROP_DOOR_EXTENDED_PULSE_TIME = 227, // PROP_DOOR_MEMBERS = 228, // PROP_DOOR_OPEN_TOO_LONG_TIME = 229, // PROP_DOOR_PULSE_TIME = 230, // PROP_DOOR_STATUS = 231, // PROP_DOOR_UNLOCK_DELAY_TIME = 232, // PROP_LOCK_STATUS = 233, // PROP_MASKED_ALARM_VALUES = 234, // PROP_SECURED_STATUS = 235, // PROP_ABSENTEE_LIMIT = 244, // PROP_ACCESS_ALARM_EVENTS = 245, // PROP_ACCESS_DOORS = 246, // PROP_ACCESS_EVENT = 247, // PROP_ACCESS_EVENT_AUTHENTICATION_FACTOR = 248, // PROP_ACCESS_EVENT_CREDENTIAL = 249, // PROP_ACCESS_EVENT_TIME = 250, // PROP_ACCESS_TRANSACTION_EVENTS = 251, // PROP_ACCOMPANIMENT = 252, // PROP_ACCOMPANIMENT_TIME = 253, // PROP_ACTIVATION_TIME = 254, // PROP_ACTIVE_AUTHENTICATION_POLICY = 255, // PROP_ASSIGNED_ACCESS_RIGHTS = 256, // PROP_AUTHENTICATION_FACTORS = 257, // PROP_AUTHENTICATION_POLICY_LIST = 258, // PROP_AUTHENTICATION_POLICY_NAMES = 259, // PROP_AUTHENTICATION_STATUS = 260, // PROP_AUTHORIZATION_MODE = 261, // PROP_BELONGS_TO = 262, // PROP_CREDENTIAL_DISABLE = 263, // PROP_CREDENTIAL_STATUS = 264, // PROP_CREDENTIALS = 265, // PROP_CREDENTIALS_IN_ZONE = 266, // PROP_DAYS_REMAINING = 267, // PROP_ENTRY_POINTS = 268, // PROP_EXIT_POINTS = 269, // PROP_EXPIRY_TIME = 270, // PROP_EXTENDED_TIME_ENABLE = 271, // PROP_FAILED_ATTEMPT_EVENTS = 272, // PROP_FAILED_ATTEMPTS = 273, // PROP_FAILED_ATTEMPTS_TIME = 274, // PROP_LAST_ACCESS_EVENT = 275, // PROP_LAST_ACCESS_POINT = 276, // PROP_LAST_CREDENTIAL_ADDED = 277, // PROP_LAST_CREDENTIAL_ADDED_TIME = 278, // PROP_LAST_CREDENTIAL_REMOVED = 279, // PROP_LAST_CREDENTIAL_REMOVED_TIME = 280, // PROP_LAST_USE_TIME = 281, // PROP_LOCKOUT = 282, // PROP_LOCKOUT_RELINQUISH_TIME = 283, // PROP_MASTER_EXEMPTION = 284, // PROP_MAX_FAILED_ATTEMPTS = 285, // PROP_MEMBERS = 286, // PROP_MUSTER_POINT = 287, // PROP_NEGATIVE_ACCESS_RULES = 288, // PROP_NUMBER_OF_AUTHENTICATION_POLICIES = 289, // PROP_OCCUPANCY_COUNT = 290, // PROP_OCCUPANCY_COUNT_ADJUST = 291, // PROP_OCCUPANCY_COUNT_ENABLE = 292, // PROP_OCCUPANCY_EXEMPTION = 293, // PROP_OCCUPANCY_LOWER_LIMIT = 294, // PROP_OCCUPANCY_LOWER_LIMIT_ENFORCED = 295, // PROP_OCCUPANCY_STATE = 296, // PROP_OCCUPANCY_UPPER_LIMIT = 297, // PROP_OCCUPANCY_UPPER_LIMIT_ENFORCED = 298, // PROP_PASSBACK_EXEMPTION = 299, // PROP_PASSBACK_MODE = 300, // PROP_PASSBACK_TIMEOUT = 301, // PROP_POSITIVE_ACCESS_RULES = 302, // PROP_REASON_FOR_DISABLE = 303, // PROP_SUPPORTED_FORMATS = 304, // PROP_SUPPORTED_FORMAT_CLASSES = 305, // PROP_THREAT_AUTHORITY = 306, // PROP_THREAT_LEVEL = 307, // PROP_TRACE_FLAG = 308, // PROP_TRANSACTION_NOTIFICATION_CLASS = 309, // PROP_USER_EXTERNAL_IDENTIFIER = 310, // PROP_USER_INFORMATION_REFERENCE = 311, // PROP_USER_NAME = 317, // PROP_USER_TYPE = 318, // PROP_USES_REMAINING = 319, // PROP_ZONE_FROM = 320, // PROP_ZONE_TO = 321, // PROP_ACCESS_EVENT_TAG = 322, // PROP_GLOBAL_IDENTIFIER = 323, // PROP_VERIFICATION_TIME = 326, // PROP_BASE_DEVICE_SECURITY_POLICY = 327, // PROP_DISTRIBUTION_KEY_REVISION = 328, // PROP_DO_NOT_HIDE = 329, // PROP_KEY_SETS = 330, // PROP_LAST_KEY_SERVER = 331, // PROP_NETWORK_ACCESS_SECURITY_POLICIES = 332, // PROP_PACKET_REORDER_TIME = 333, // PROP_SECURITY_PDU_TIMEOUT = 334, // PROP_SECURITY_TIME_WINDOW = 335, // PROP_SUPPORTED_SECURITY_ALGORITHMS = 336, // PROP_UPDATE_KEY_SET_TIMEOUT = 337, // PROP_BACKUP_AND_RESTORE_STATE = 338, // PROP_BACKUP_PREPARATION_TIME = 339, // PROP_RESTORE_COMPLETION_TIME = 340, // PROP_RESTORE_PREPARATION_TIME = 341, // PROP_BIT_MASK = 342, // PROP_BIT_TEXT = 343, // PROP_IS_UTC = 344, // PROP_GROUP_MEMBERS = 345, // PROP_GROUP_MEMBER_NAMES = 346, // PROP_MEMBER_STATUS_FLAGS = 347, // PROP_REQUESTED_UPDATE_INTERVAL = 348, // PROP_COVU_PERIOD = 349, // PROP_COVU_RECIPIENTS = 350, // PROP_EVENT_MESSAGE_TEXTS = 351 } public const int MAX_BACNET_PROPERTY_ID = 4194303; public enum BACNET_ACTION { ACTION_DIRECT = 0, ACTION_REVERSE = 1 } public enum BACNET_BINARY_PV { BINARY_INACTIVE = 0, BINARY_ACTIVE = 1, MIN_BINARY_PV = 0, /* for validating incoming values */ MAX_BINARY_PV = 1, /* for validating incoming values */ BINARY_NULL = 2 /* our homemade way of storing this info */ } public enum BACNET_ACTION_VALUE_TYPE { ACTION_BINARY_PV, ACTION_UNSIGNED, ACTION_FLOAT } public enum BACNET_EVENT_STATE { EVENT_STATE_NORMAL = 0, EVENT_STATE_FAULT = 1, EVENT_STATE_OFFNORMAL = 2, EVENT_STATE_HIGH_LIMIT = 3, EVENT_STATE_LOW_LIMIT = 4 // DBS: // EVENT_STATE_LIFE_SAFETY_ALARM = 5 } public enum BACNET_DEVICE_STATUS { STATUS_OPERATIONAL = 0, STATUS_OPERATIONAL_READ_ONLY = 1, STATUS_DOWNLOAD_REQUIRED = 2, STATUS_DOWNLOAD_IN_PROGRESS = 3, STATUS_NON_OPERATIONAL = 4, // DBS: // STATUS_BACKUP_IN_PROGRESS = 5, // MIN_DEVICE_STATUS = 0, MAX_DEVICE_STATUS = 5 } public enum BACNET_ENGINEERING_UNITS { /* Acceleration */ UNITS_METERS_PER_SECOND_PER_SECOND = 166, /* Area */ UNITS_SQUARE_METERS = 0, UNITS_SQUARE_CENTIMETERS = 116, UNITS_SQUARE_FEET = 1, UNITS_SQUARE_INCHES = 115, /* Currency */ UNITS_CURRENCY1 = 105, UNITS_CURRENCY2 = 106, UNITS_CURRENCY3 = 107, UNITS_CURRENCY4 = 108, UNITS_CURRENCY5 = 109, UNITS_CURRENCY6 = 110, UNITS_CURRENCY7 = 111, UNITS_CURRENCY8 = 112, UNITS_CURRENCY9 = 113, UNITS_CURRENCY10 = 114, /* Electrical */ UNITS_MILLIAMPERES = 2, UNITS_AMPERES = 3, UNITS_AMPERES_PER_METER = 167, UNITS_AMPERES_PER_SQUARE_METER = 168, UNITS_AMPERE_SQUARE_METERS = 169, UNITS_FARADS = 170, UNITS_HENRYS = 171, UNITS_OHMS = 4, UNITS_OHM_METERS = 172, UNITS_MILLIOHMS = 145, UNITS_KILOHMS = 122, UNITS_MEGOHMS = 123, UNITS_SIEMENS = 173, /* 1 mho equals 1 siemens */ UNITS_SIEMENS_PER_METER = 174, UNITS_TESLAS = 175, UNITS_VOLTS = 5, UNITS_MILLIVOLTS = 124, UNITS_KILOVOLTS = 6, UNITS_MEGAVOLTS = 7, UNITS_VOLT_AMPERES = 8, UNITS_KILOVOLT_AMPERES = 9, UNITS_MEGAVOLT_AMPERES = 10, UNITS_VOLT_AMPERES_REACTIVE = 11, UNITS_KILOVOLT_AMPERES_REACTIVE = 12, UNITS_MEGAVOLT_AMPERES_REACTIVE = 13, UNITS_VOLTS_PER_DEGREE_KELVIN = 176, UNITS_VOLTS_PER_METER = 177, UNITS_DEGREES_PHASE = 14, UNITS_POWER_FACTOR = 15, UNITS_WEBERS = 178, /* Energy */ UNITS_JOULES = 16, UNITS_KILOJOULES = 17, UNITS_KILOJOULES_PER_KILOGRAM = 125, UNITS_MEGAJOULES = 126, UNITS_WATT_HOURS = 18, UNITS_KILOWATT_HOURS = 19, UNITS_MEGAWATT_HOURS = 146, UNITS_BTUS = 20, UNITS_KILO_BTUS = 147, UNITS_MEGA_BTUS = 148, UNITS_THERMS = 21, UNITS_TON_HOURS = 22, /* Enthalpy */ UNITS_JOULES_PER_KILOGRAM_DRY_AIR = 23, UNITS_KILOJOULES_PER_KILOGRAM_DRY_AIR = 149, UNITS_MEGAJOULES_PER_KILOGRAM_DRY_AIR = 150, UNITS_BTUS_PER_POUND_DRY_AIR = 24, UNITS_BTUS_PER_POUND = 117, /* Entropy */ UNITS_JOULES_PER_DEGREE_KELVIN = 127, UNITS_KILOJOULES_PER_DEGREE_KELVIN = 151, UNITS_MEGAJOULES_PER_DEGREE_KELVIN = 152, UNITS_JOULES_PER_KILOGRAM_DEGREE_KELVIN = 128, /* Force */ UNITS_NEWTON = 153, /* Frequency */ UNITS_CYCLES_PER_HOUR = 25, UNITS_CYCLES_PER_MINUTE = 26, UNITS_HERTZ = 27, UNITS_KILOHERTZ = 129, UNITS_MEGAHERTZ = 130, UNITS_PER_HOUR = 131, /* Humidity */ UNITS_GRAMS_OF_WATER_PER_KILOGRAM_DRY_AIR = 28, UNITS_PERCENT_RELATIVE_HUMIDITY = 29, /* Length */ UNITS_MILLIMETERS = 30, UNITS_CENTIMETERS = 118, UNITS_METERS = 31, UNITS_INCHES = 32, UNITS_FEET = 33, /* Light */ UNITS_CANDELAS = 179, UNITS_CANDELAS_PER_SQUARE_METER = 180, UNITS_WATTS_PER_SQUARE_FOOT = 34, UNITS_WATTS_PER_SQUARE_METER = 35, UNITS_LUMENS = 36, UNITS_LUXES = 37, UNITS_FOOT_CANDLES = 38, /* Mass */ UNITS_KILOGRAMS = 39, UNITS_POUNDS_MASS = 40, UNITS_TONS = 41, /* Mass Flow */ UNITS_GRAMS_PER_SECOND = 154, UNITS_GRAMS_PER_MINUTE = 155, UNITS_KILOGRAMS_PER_SECOND = 42, UNITS_KILOGRAMS_PER_MINUTE = 43, UNITS_KILOGRAMS_PER_HOUR = 44, UNITS_POUNDS_MASS_PER_SECOND = 119, UNITS_POUNDS_MASS_PER_MINUTE = 45, UNITS_POUNDS_MASS_PER_HOUR = 46, UNITS_TONS_PER_HOUR = 156, /* Power */ UNITS_MILLIWATTS = 132, UNITS_WATTS = 47, UNITS_KILOWATTS = 48, UNITS_MEGAWATTS = 49, UNITS_BTUS_PER_HOUR = 50, UNITS_KILO_BTUS_PER_HOUR = 157, UNITS_HORSEPOWER = 51, UNITS_TONS_REFRIGERATION = 52, /* Pressure */ UNITS_PASCALS = 53, UNITS_HECTOPASCALS = 133, UNITS_KILOPASCALS = 54, UNITS_MILLIBARS = 134, UNITS_BARS = 55, UNITS_POUNDS_FORCE_PER_SQUARE_INCH = 56, UNITS_CENTIMETERS_OF_WATER = 57, UNITS_INCHES_OF_WATER = 58, UNITS_MILLIMETERS_OF_MERCURY = 59, UNITS_CENTIMETERS_OF_MERCURY = 60, UNITS_INCHES_OF_MERCURY = 61, /* Temperature */ UNITS_DEGREES_CELSIUS = 62, UNITS_DEGREES_KELVIN = 63, UNITS_DEGREES_KELVIN_PER_HOUR = 181, UNITS_DEGREES_KELVIN_PER_MINUTE = 182, UNITS_DEGREES_FAHRENHEIT = 64, UNITS_DEGREE_DAYS_CELSIUS = 65, UNITS_DEGREE_DAYS_FAHRENHEIT = 66, UNITS_DELTA_DEGREES_FAHRENHEIT = 120, UNITS_DELTA_DEGREES_KELVIN = 121, /* Time */ UNITS_YEARS = 67, UNITS_MONTHS = 68, UNITS_WEEKS = 69, UNITS_DAYS = 70, UNITS_HOURS = 71, UNITS_MINUTES = 72, UNITS_SECONDS = 73, UNITS_HUNDREDTHS_SECONDS = 158, UNITS_MILLISECONDS = 159, /* Torque */ UNITS_NEWTON_METERS = 160, /* Velocity */ UNITS_MILLIMETERS_PER_SECOND = 161, UNITS_MILLIMETERS_PER_MINUTE = 162, UNITS_METERS_PER_SECOND = 74, UNITS_METERS_PER_MINUTE = 163, UNITS_METERS_PER_HOUR = 164, UNITS_KILOMETERS_PER_HOUR = 75, UNITS_FEET_PER_SECOND = 76, UNITS_FEET_PER_MINUTE = 77, UNITS_MILES_PER_HOUR = 78, /* Volume */ UNITS_CUBIC_FEET = 79, UNITS_CUBIC_METERS = 80, UNITS_IMPERIAL_GALLONS = 81, UNITS_LITERS = 82, UNITS_US_GALLONS = 83, /* Volumetric Flow */ UNITS_CUBIC_FEET_PER_SECOND = 142, UNITS_CUBIC_FEET_PER_MINUTE = 84, UNITS_CUBIC_METERS_PER_SECOND = 85, UNITS_CUBIC_METERS_PER_MINUTE = 165, UNITS_CUBIC_METERS_PER_HOUR = 135, UNITS_IMPERIAL_GALLONS_PER_MINUTE = 86, UNITS_LITERS_PER_SECOND = 87, UNITS_LITERS_PER_MINUTE = 88, UNITS_LITERS_PER_HOUR = 136, UNITS_US_GALLONS_PER_MINUTE = 89, /* Other */ UNITS_DEGREES_ANGULAR = 90, UNITS_DEGREES_CELSIUS_PER_HOUR = 91, UNITS_DEGREES_CELSIUS_PER_MINUTE = 92, UNITS_DEGREES_FAHRENHEIT_PER_HOUR = 93, UNITS_DEGREES_FAHRENHEIT_PER_MINUTE = 94, UNITS_JOULE_SECONDS = 183, UNITS_KILOGRAMS_PER_CUBIC_METER = 186, UNITS_KW_HOURS_PER_SQUARE_METER = 137, UNITS_KW_HOURS_PER_SQUARE_FOOT = 138, UNITS_MEGAJOULES_PER_SQUARE_METER = 139, UNITS_MEGAJOULES_PER_SQUARE_FOOT = 140, UNITS_NO_UNITS = 95, UNITS_NEWTON_SECONDS = 187, UNITS_NEWTONS_PER_METER = 188, UNITS_PARTS_PER_MILLION = 96, UNITS_PARTS_PER_BILLION = 97, UNITS_PERCENT = 98, UNITS_PERCENT_OBSCURATION_PER_FOOT = 143, UNITS_PERCENT_OBSCURATION_PER_METER = 144, UNITS_PERCENT_PER_SECOND = 99, UNITS_PER_MINUTE = 100, UNITS_PER_SECOND = 101, UNITS_PSI_PER_DEGREE_FAHRENHEIT = 102, UNITS_RADIANS = 103, UNITS_RADIANS_PER_SECOND = 184, UNITS_REVOLUTIONS_PER_MINUTE = 104, UNITS_SQUARE_METERS_PER_NEWTON = 185, UNITS_WATTS_PER_METER_PER_DEGREE_KELVIN = 189, UNITS_WATTS_PER_SQUARE_METER_DEGREE_KELVIN = 141 /* Enumerated values 0-255 are reserved for definition by ASHRAE. */ /* Enumerated values 256-65535 may be used by others subject to */ /* the procedures and constraints described in Clause 23. */ /* The last enumeration used in this version is 189. */ } public enum BACNET_POLARITY { POLARITY_NORMAL = 0, POLARITY_REVERSE = 1 } public enum BACNET_PROGRAM_REQUEST { PROGRAM_REQUEST_READY = 0, PROGRAM_REQUEST_LOAD = 1, PROGRAM_REQUEST_RUN = 2, PROGRAM_REQUEST_HALT = 3, PROGRAM_REQUEST_RESTART = 4, PROGRAM_REQUEST_UNLOAD = 5 } public enum BACNET_PROGRAM_STATE { PROGRAM_STATE_IDLE = 0, PROGRAM_STATE_LOADING = 1, PROGRAM_STATE_RUNNING = 2, PROGRAM_STATE_WAITING = 3, PROGRAM_STATE_HALTED = 4, PROGRAM_STATE_UNLOADING = 5 } public enum BACNET_PROGRAM_ERROR { PROGRAM_ERROR_NORMAL = 0, PROGRAM_ERROR_LOAD_FAILED = 1, PROGRAM_ERROR_INTERNAL = 2, PROGRAM_ERROR_PROGRAM = 3, PROGRAM_ERROR_OTHER = 4 /* Enumerated values 0-63 are reserved for definition by ASHRAE. */ /* Enumerated values 64-65535 may be used by others subject to */ /* the procedures and constraints described in Clause 23. */ } public enum BACNET_RELIABILITY { RELIABILITY_NO_FAULT_DETECTED = 0, RELIABILITY_NO_SENSOR = 1, RELIABILITY_OVER_RANGE = 2, RELIABILITY_UNDER_RANGE = 3, RELIABILITY_OPEN_LOOP = 4, RELIABILITY_SHORTED_LOOP = 5, RELIABILITY_NO_OUTPUT = 6, RELIABILITY_UNRELIABLE_OTHER = 7, RELIABILITY_PROCESS_ERROR = 8, RELIABILITY_MULTI_STATE_FAULT = 9, RELIABILITY_CONFIGURATION_ERROR = 10, // Enumeration value 11 is reserved for a future addendum RELIABILITY_COMMUNICATION_FAILURE = 12, // DBS: // RELIABILITY_MEMBER_FAULT = 13, // RELIABILITY_MONITORED_OBJECT_FAULT = 14, // RELIABILITY_TRIPPED = 13 // Incorrect value RELIABILITY_TRIPPED = 15 /* Enumerated values 0-63 are reserved for definition by ASHRAE. */ /* Enumerated values 64-65535 may be used by others subject to */ /* the procedures and constraints described in Clause 23. */ } public enum BACNET_EVENT_TYPE { EVENT_CHANGE_OF_BITSTRING = 0, EVENT_CHANGE_OF_STATE = 1, EVENT_CHANGE_OF_VALUE = 2, EVENT_COMMAND_FAILURE = 3, EVENT_FLOATING_LIMIT = 4, EVENT_OUT_OF_RANGE = 5, /* complex-event-type (6), -- see comment below */ /* event-buffer-ready (7), -- context tag 7 is deprecated */ EVENT_CHANGE_OF_LIFE_SAFETY = 8, EVENT_EXTENDED = 9, EVENT_BUFFER_READY = 10, EVENT_UNSIGNED_RANGE = 11 // -- enumeration value 12 is reserved for future addenda /* Enumerated values 0-63 are reserved for definition by ASHRAE. */ /* Enumerated values 64-65535 may be used by others subject to */ /* the procedures and constraints described in Clause 23. */ /* It is expected that these enumerated values will correspond to */ /* the use of the complex-event-type CHOICE [6] of the */ /* BACnetNotificationParameters production. */ /* The last enumeration used in this version is 11. */ // DBS: // EVENT_ACCESS-EVENT = 13, // EVENT_DOUBLE-OUT-OF-RANGE = 14, // EVENT_SIGNED-OUT-OF-RANGE = 15, // EVENT_UNSIGNED-OUT-OF-RANGE = 16, // EVENT_CHANGE-OF-CHARACTERSTRING = 17, // EVENT_CHANGE-OF-STATUS-FLAGS = 18, // EVENT_CHANGE-OF-RELIABILITY = 19, // EVENT_NONE = 20 } public enum BACNET_FILE_ACCESS_METHOD { FILE_RECORD_ACCESS = 0, FILE_STREAM_ACCESS = 1, FILE_RECORD_AND_STREAM_ACCESS = 2 } public enum BACNET_LIFE_SAFETY_MODE { LIFE_SAFETY_MODE_OFF = 0, LIFE_SAFETY_MODE_ON = 1, LIFE_SAFETY_MODE_TEST = 2, LIFE_SAFETY_MODE_MANNED = 3, LIFE_SAFETY_MODE_UNMANNED = 4, LIFE_SAFETY_MODE_ARMED = 5, LIFE_SAFETY_MODE_DISARMED = 6, LIFE_SAFETY_MODE_PREARMED = 7, LIFE_SAFETY_MODE_SLOW = 8, LIFE_SAFETY_MODE_FAST = 9, LIFE_SAFETY_MODE_DISCONNECTED = 10, LIFE_SAFETY_MODE_ENABLED = 11, LIFE_SAFETY_MODE_DISABLED = 12, LIFE_SAFETY_MODE_AUTOMATIC_RELEASE_DISABLED = 13, LIFE_SAFETY_MODE_DEFAULT = 14, MIN_LIFE_SAFETY_MODE = 0, MAX_LIFE_SAFETY_MODE = 14 /* Enumerated values 0-255 are reserved for definition by ASHRAE. */ /* Enumerated values 256-65535 may be used by others subject to */ /* procedures and constraints described in Clause 23. */ } public enum BACNET_LIFE_SAFETY_OPERATION { LIFE_SAFETY_OP_NONE = 0, LIFE_SAFETY_OP_SILENCE = 1, LIFE_SAFETY_OP_SILENCE_AUDIBLE = 2, LIFE_SAFETY_OP_SILENCE_VISUAL = 3, LIFE_SAFETY_OP_RESET = 4, LIFE_SAFETY_OP_RESET_ALARM = 5, LIFE_SAFETY_OP_RESET_FAULT = 6, LIFE_SAFETY_OP_UNSILENCE = 7, LIFE_SAFETY_OP_UNSILENCE_AUDIBLE = 8, LIFE_SAFETY_OP_UNSILENCE_VISUAL = 9 /* Enumerated values 0-63 are reserved for definition by ASHRAE. */ /* Enumerated values 64-65535 may be used by others subject to */ /* procedures and constraints described in Clause 23. */ } public enum BACNET_LIFE_SAFETY_STATE { LIFE_SAFETY_STATE_QUIET = 0, LIFE_SAFETY_STATE_PRE_ALARM = 1, LIFE_SAFETY_STATE_ALARM = 2, LIFE_SAFETY_STATE_FAULT = 3, LIFE_SAFETY_STATE_FAULT_PRE_ALARM = 4, LIFE_SAFETY_STATE_FAULT_ALARM = 5, LIFE_SAFETY_STATE_NOT_READY = 6, LIFE_SAFETY_STATE_ACTIVE = 7, LIFE_SAFETY_STATE_TAMPER = 8, LIFE_SAFETY_STATE_TEST_ALARM = 9, LIFE_SAFETY_STATE_TEST_ACTIVE = 10, LIFE_SAFETY_STATE_TEST_FAULT = 11, LIFE_SAFETY_STATE_TEST_FAULT_ALARM = 12, LIFE_SAFETY_STATE_HOLDUP = 13, LIFE_SAFETY_STATE_DURESS = 14, LIFE_SAFETY_STATE_TAMPER_ALARM = 15, LIFE_SAFETY_STATE_ABNORMAL = 16, LIFE_SAFETY_STATE_EMERGENCY_POWER = 17, LIFE_SAFETY_STATE_DELAYED = 18, LIFE_SAFETY_STATE_BLOCKED = 19, LIFE_SAFETY_STATE_LOCAL_ALARM = 20, LIFE_SAFETY_STATE_GENERAL_ALARM = 21, LIFE_SAFETY_STATE_SUPERVISORY = 22, LIFE_SAFETY_STATE_TEST_SUPERVISORY = 23, MIN_LIFE_SAFETY_STATE = 0, // DBS: '0'? Life-safety not supported? MAX_LIFE_SAFETY_STATE = 0 // MAX_LIFE_SAFETY_STATE = 23 /* Enumerated values 0-255 are reserved for definition by ASHRAE. */ /* Enumerated values 256-65535 may be used by others subject to */ /* procedures and constraints described in Clause 23. */ } public enum BACNET_SILENCED_STATE { SILENCED_STATE_UNSILENCED = 0, SILENCED_STATE_AUDIBLE_SILENCED = 1, SILENCED_STATE_VISIBLE_SILENCED = 2, SILENCED_STATE_ALL_SILENCED = 3 /* Enumerated values 0-63 are reserved for definition by ASHRAE. */ /* Enumerated values 64-65535 may be used by others subject to */ /* procedures and constraints described in Clause 23. */ } public enum BACNET_MAINTENANCE { MAINTENANCE_NONE = 0, MAINTENANCE_PERIODIC_TEST = 1, AINTENANCE_NEED_SERVICE_OPERATIONAL = 2, MAINTENANCE_NEED_SERVICE_INOPERATIVE = 3 /* Enumerated values 0-255 are reserved for definition by ASHRAE. */ /* Enumerated values 256-65535 may be used by others subject to */ /* procedures and constraints described in Clause 23. */ } public enum BACNET_NOTIFY_TYPE { NOTIFY_ALARM = 0, NOTIFY_EVENT = 1, NOTIFY_ACK_NOTIFICATION = 2 } public enum BACNET_OBJECT_TYPE { //OBJECT_NULL = -1, OBJECT_ANALOG_INPUT = 0, OBJECT_ANALOG_OUTPUT = 1, OBJECT_ANALOG_VALUE = 2, OBJECT_BINARY_INPUT = 3, OBJECT_BINARY_OUTPUT = 4, OBJECT_BINARY_VALUE = 5, OBJECT_CALENDAR = 6, OBJECT_COMMAND = 7, OBJECT_DEVICE = 8, OBJECT_EVENT_ENROLLMENT = 9, OBJECT_FILE = 10, OBJECT_GROUP = 11, OBJECT_LOOP = 12, OBJECT_MULTI_STATE_INPUT = 13, OBJECT_MULTI_STATE_OUTPUT = 14, OBJECT_NOTIFICATION_CLASS = 15, OBJECT_PROGRAM = 16, OBJECT_SCHEDULE = 17, OBJECT_AVERAGING = 18, OBJECT_MULTI_STATE_VALUE = 19, OBJECT_TREND_LOG = 20, // Incorrect name - rename from: 'OBJECT_TRENDLOG' OBJECT_LIFE_SAFETY_POINT = 21, OBJECT_LIFE_SAFETY_ZONE = 22, OBJECT_ACCUMULATOR = 23, OBJECT_PULSE_CONVERTER = 24, OBJECT_EVENT_LOG = 25, OBJECT_GLOBAL_GROUP = 26, OBJECT_TREND_LOG_MULTIPLE = 27, OBJECT_LOAD_CONTROL = 28, OBJECT_STRUCTURED_VIEW = 29, // DBS: // /* what is object type 30? */ OBJECT_ACCESS_DOOR = 30, OBJECT_LIGHTING_OUTPUT = 31, /* Enumerated values 0-127 are reserved for definition by ASHRAE. */ /* Enumerated values 128-1023 may be used by others subject to */ /* the procedures and constraints described in Clause 23. */ MAX_ASHRAE_OBJECT_TYPE = 32, /* used for bit string loop */ MAX_BACNET_OBJECT_TYPE = 1023 // DBS: // OBJECT_ACCESS_CREDENTIAL = 32, // OBJECT_ACCESS_POINT = 33, // OBJECT_ACCESS_RIGHTS = 34, // OBJECT_ACCESS_USER = 35, // OBJECT_ACCESS_ZONE = 36, // OBJECT_CREDENTIAL_DATA_INPUT = 37, // OBJECT_NETWORK_SECURITY = 38, // OBJECT_BITSTRING_VALUE = 39, // OBJECT_CHARACTERSTRING_VALUE = 40, // OBJECT_DATE_PATTERN_VALUE = 41, // OBJECT_DATE_VALUE = 42, // OBJECT_DATETIME_PATTERN_VALUE = 43, // OBJECT_DATETIME_VALUE = 44, // OBJECT_INTEGER_VALUE = 45, // OBJECT_LARGE_ANALOG_VALUE = 46, // OBJECT_OCTETSTRING_VALUE = 47, // OBJECT_POSITIVE_INTEGER_VALUE = 48, // OBJECT_NOTIFICATION_FORWARDER = 51, // OBJECT_ALERT_ENROLLMENT = 52, // OBJECT_CHANNEL = 53, // OBJECT_LIGHTING_OUTPUT = 54 } public enum BACNET_SEGMENTATION { SEGMENTATION_BOTH = 0, SEGMENTATION_TRANSMIT = 1, SEGMENTATION_RECEIVE = 2, SEGMENTATION_NO_SEGMENTATION = 3, // Incorrect name - rename from: 'SEGMENTATION_NONE' // DBS: MIN_BACNET_SEGMENTATION = 0, MAX_BACNET_SEGMENTATION = 4 } public enum BACNET_VT_CLASS { VT_CLASS_DEFAULT = 0, VT_CLASS_ANSI_X34 = 1, /* real name is ANSI X3.64 */ VT_CLASS_DEC_VT52 = 2, VT_CLASS_DEC_VT100 = 3, VT_CLASS_DEC_VT220 = 4, VT_CLASS_HP_700_94 = 5, /* real name is HP 700/94 */ VT_CLASS_IBM_3130 = 6 /* Enumerated values 0-63 are reserved for definition by ASHRAE. */ /* Enumerated values 64-65535 may be used by others subject to */ /* the procedures and constraints described in Clause 23. */ } public enum BACNET_CHARACTER_STRING_ENCODING { CHARACTER_ANSI_X34 = 0, CHARACTER_MS_DBCS = 1, CHARACTER_JISC_6226 = 2, CHARACTER_UCS4 = 3, CHARACTER_UCS2 = 4, CHARACTER_ISO8859 = 5 } public enum BACNET_APPLICATION_TAG { BACNET_APPLICATION_TAG_NULL = 0, BACNET_APPLICATION_TAG_BOOLEAN = 1, BACNET_APPLICATION_TAG_UNSIGNED_INT = 2, BACNET_APPLICATION_TAG_SIGNED_INT = 3, BACNET_APPLICATION_TAG_REAL = 4, BACNET_APPLICATION_TAG_DOUBLE = 5, BACNET_APPLICATION_TAG_OCTET_STRING = 6, BACNET_APPLICATION_TAG_CHARACTER_STRING = 7, BACNET_APPLICATION_TAG_BIT_STRING = 8, BACNET_APPLICATION_TAG_ENUMERATED = 9, BACNET_APPLICATION_TAG_DATE = 10, BACNET_APPLICATION_TAG_TIME = 11, BACNET_APPLICATION_TAG_OBJECT_ID = 12, BACNET_APPLICATION_TAG_RESERVE1 = 13, BACNET_APPLICATION_TAG_RESERVE2 = 14, BACNET_APPLICATION_TAG_RESERVE3 = 15, MAX_BACNET_APPLICATION_TAG = 16 } /* note: these are not the real values, */ /* but are shifted left for easy encoding */ public enum BACNET_PDU_TYPE { PDU_TYPE_CONFIRMED_SERVICE_REQUEST = 0, PDU_TYPE_UNCONFIRMED_SERVICE_REQUEST = 0x10, PDU_TYPE_SIMPLE_ACK = 0x20, PDU_TYPE_COMPLEX_ACK = 0x30, PDU_TYPE_SEGMENT_ACK = 0x40, PDU_TYPE_ERROR = 0x50, PDU_TYPE_REJECT = 0x60, PDU_TYPE_ABORT = 0x70 } public enum BACNET_CONFIRMED_SERVICE { /* Alarm and Event Services */ SERVICE_CONFIRMED_ACKNOWLEDGE_ALARM = 0, SERVICE_CONFIRMED_COV_NOTIFICATION = 1, SERVICE_CONFIRMED_EVENT_NOTIFICATION = 2, SERVICE_CONFIRMED_GET_ALARM_SUMMARY = 3, SERVICE_CONFIRMED_GET_ENROLLMENT_SUMMARY = 4, SERVICE_CONFIRMED_GET_EVENT_INFORMATION = 29, SERVICE_CONFIRMED_SUBSCRIBE_COV = 5, SERVICE_CONFIRMED_SUBSCRIBE_COV_PROPERTY = 28, SERVICE_CONFIRMED_LIFE_SAFETY_OPERATION = 27, /* File Access Services */ SERVICE_CONFIRMED_ATOMIC_READ_FILE = 6, SERVICE_CONFIRMED_ATOMIC_WRITE_FILE = 7, /* Object Access Services */ SERVICE_CONFIRMED_ADD_LIST_ELEMENT = 8, SERVICE_CONFIRMED_REMOVE_LIST_ELEMENT = 9, SERVICE_CONFIRMED_CREATE_OBJECT = 10, SERVICE_CONFIRMED_DELETE_OBJECT = 11, SERVICE_CONFIRMED_READ_PROPERTY = 12, SERVICE_CONFIRMED_READ_PROP_CONDITIONAL = 13, SERVICE_CONFIRMED_READ_PROP_MULTIPLE = 14, SERVICE_CONFIRMED_READ_RANGE = 26, SERVICE_CONFIRMED_WRITE_PROPERTY = 15, SERVICE_CONFIRMED_WRITE_PROP_MULTIPLE = 16, /* Remote Device Management Services */ SERVICE_CONFIRMED_DEVICE_COMMUNICATION_CONTROL = 17, SERVICE_CONFIRMED_PRIVATE_TRANSFER = 18, SERVICE_CONFIRMED_TEXT_MESSAGE = 19, SERVICE_CONFIRMED_REINITIALIZE_DEVICE = 20, /* Virtual Terminal Services */ SERVICE_CONFIRMED_VT_OPEN = 21, SERVICE_CONFIRMED_VT_CLOSE = 22, SERVICE_CONFIRMED_VT_DATA = 23, /* Security Services */ SERVICE_CONFIRMED_AUTHENTICATE = 24, SERVICE_CONFIRMED_REQUEST_KEY = 25, /* Services added after 1995 */ /* readRange (26) see Object Access Services */ /* lifeSafetyOperation (27) see Alarm and Event Services */ /* subscribeCOVProperty (28) see Alarm and Event Services */ /* getEventInformation (29) see Alarm and Event Services */ MAX_BACNET_CONFIRMED_SERVICE = 30 } public enum BACNET_UNCONFIRMED_SERVICE { SERVICE_UNCONFIRMED_I_AM = 0, SERVICE_UNCONFIRMED_I_HAVE = 1, SERVICE_UNCONFIRMED_COV_NOTIFICATION = 2, SERVICE_UNCONFIRMED_EVENT_NOTIFICATION = 3, SERVICE_UNCONFIRMED_PRIVATE_TRANSFER = 4, SERVICE_UNCONFIRMED_TEXT_MESSAGE = 5, SERVICE_UNCONFIRMED_TIME_SYNCHRONIZATION = 6, SERVICE_UNCONFIRMED_WHO_HAS = 7, SERVICE_UNCONFIRMED_WHO_IS = 8, SERVICE_UNCONFIRMED_UTC_TIME_SYNCHRONIZATION = 9, /* Other services to be added as they are defined. */ /* All choice values in this production are reserved */ /* for definition by ASHRAE. */ /* Proprietary extensions are made by using the */ /* UnconfirmedPrivateTransfer service. See Clause 23. */ MAX_BACNET_UNCONFIRMED_SERVICE = 10 } /* Bit String Enumerations */ public enum BACNET_SERVICES_SUPPORTED { /* Alarm and Event Services */ SERVICE_SUPPORTED_ACKNOWLEDGE_ALARM = 0, SERVICE_SUPPORTED_CONFIRMED_COV_NOTIFICATION = 1, SERVICE_SUPPORTED_CONFIRMED_EVENT_NOTIFICATION = 2, SERVICE_SUPPORTED_GET_ALARM_SUMMARY = 3, SERVICE_SUPPORTED_GET_ENROLLMENT_SUMMARY = 4, SERVICE_SUPPORTED_GET_EVENT_INFORMATION = 39, SERVICE_SUPPORTED_SUBSCRIBE_COV = 5, SERVICE_SUPPORTED_SUBSCRIBE_COV_PROPERTY = 38, SERVICE_SUPPORTED_LIFE_SAFETY_OPERATION = 37, /* File Access Services */ SERVICE_SUPPORTED_ATOMIC_READ_FILE = 6, SERVICE_SUPPORTED_ATOMIC_WRITE_FILE = 7, /* Object Access Services */ SERVICE_SUPPORTED_ADD_LIST_ELEMENT = 8, SERVICE_SUPPORTED_REMOVE_LIST_ELEMENT = 9, SERVICE_SUPPORTED_CREATE_OBJECT = 10, SERVICE_SUPPORTED_DELETE_OBJECT = 11, SERVICE_SUPPORTED_READ_PROPERTY = 12, SERVICE_SUPPORTED_READ_PROP_CONDITIONAL = 13, SERVICE_SUPPORTED_READ_PROP_MULTIPLE = 14, SERVICE_SUPPORTED_READ_RANGE = 35, SERVICE_SUPPORTED_WRITE_PROPERTY = 15, SERVICE_SUPPORTED_WRITE_PROP_MULTIPLE = 16, /* Remote Device Management Services */ SERVICE_SUPPORTED_DEVICE_COMMUNICATION_CONTROL = 17, SERVICE_SUPPORTED_PRIVATE_TRANSFER = 18, SERVICE_SUPPORTED_TEXT_MESSAGE = 19, SERVICE_SUPPORTED_REINITIALIZE_DEVICE = 20, /* Virtual Terminal Services */ SERVICE_SUPPORTED_VT_OPEN = 21, SERVICE_SUPPORTED_VT_CLOSE = 22, SERVICE_SUPPORTED_VT_DATA = 23, /* Security Services */ SERVICE_SUPPORTED_AUTHENTICATE = 24, SERVICE_SUPPORTED_REQUEST_KEY = 25, SERVICE_SUPPORTED_I_AM = 26, SERVICE_SUPPORTED_I_HAVE = 27, SERVICE_SUPPORTED_UNCONFIRMED_COV_NOTIFICATION = 28, SERVICE_SUPPORTED_UNCONFIRMED_EVENT_NOTIFICATION = 29, SERVICE_SUPPORTED_UNCONFIRMED_PRIVATE_TRANSFER = 30, SERVICE_SUPPORTED_UNCONFIRMED_TEXT_MESSAGE = 31, SERVICE_SUPPORTED_TIME_SYNCHRONIZATION = 32, SERVICE_SUPPORTED_UTC_TIME_SYNCHRONIZATION = 36, SERVICE_SUPPORTED_WHO_HAS = 33, SERVICE_SUPPORTED_WHO_IS = 34, /* Other services to be added as they are defined. */ /* All values in this production are reserved */ /* for definition by ASHRAE. */ MAX_BACNET_SERVICES_SUPPORTED = 40 } public enum BACNET_BVLC_FUNCTION { BVLC_RESULT = 0, BVLC_WRITE_BROADCAST_DISTRIBUTION_TABLE = 1, BVLC_READ_BROADCAST_DIST_TABLE = 2, BVLC_READ_BROADCAST_DIST_TABLE_ACK = 3, BVLC_FORWARDED_NPDU = 4, BVLC_REGISTER_FOREIGN_DEVICE = 5, BVLC_READ_FOREIGN_DEVICE_TABLE = 6, BVLC_READ_FOREIGN_DEVICE_TABLE_ACK = 7, BVLC_DELETE_FOREIGN_DEVICE_TABLE_ENTRY = 8, BVLC_DISTRIBUTE_BROADCAST_TO_NETWORK = 9, BVLC_ORIGINAL_UNICAST_NPDU = 10, BVLC_ORIGINAL_BROADCAST_NPDU = 11, MAX_BVLC_FUNCTION = 12 } public enum BACNET_BVLC_RESULT { BVLC_RESULT_SUCCESSFUL_COMPLETION = 0x0000, BVLC_RESULT_WRITE_BROADCAST_DISTRIBUTION_TABLE_NAK = 0x0010, BVLC_RESULT_READ_BROADCAST_DISTRIBUTION_TABLE_NAK = 0x0020, BVLC_RESULT_REGISTER_FOREIGN_DEVICE_NAK = 0X0030, BVLC_RESULT_READ_FOREIGN_DEVICE_TABLE_NAK = 0x0040, BVLC_RESULT_DELETE_FOREIGN_DEVICE_TABLE_ENTRY_NAK = 0x0050, BVLC_RESULT_DISTRIBUTE_BROADCAST_TO_NETWORK_NAK = 0x0060 } /* Bit String Enumerations */ public enum BACNET_STATUS_FLAGS { STATUS_FLAG_IN_ALARM = 0, STATUS_FLAG_FAULT = 1, STATUS_FLAG_OVERRIDDEN = 2, STATUS_FLAG_OUT_OF_SERVICE = 3 } public enum BACNET_ACKNOWLEDGMENT_FILTER { ACKNOWLEDGMENT_FILTER_ALL = 0, ACKNOWLEDGMENT_FILTER_ACKED = 1, ACKNOWLEDGMENT_FILTER_NOT_ACKED = 2 } public enum BACNET_EVENT_STATE_FILTER { EVENT_STATE_FILTER_OFFNORMAL = 0, EVENT_STATE_FILTER_FAULT = 1, EVENT_STATE_FILTER_NORMAL = 2, EVENT_STATE_FILTER_ALL = 3, EVENT_STATE_FILTER_ACTIVE = 4 } public enum BACNET_SELECTION_LOGIC { SELECTION_LOGIC_AND = 0, SELECTION_LOGIC_OR = 1, SELECTION_LOGIC_ALL = 2 } public enum BACNET_RELATION_SPECIFIER { RELATION_SPECIFIER_EQUAL = 0, RELATION_SPECIFIER_NOT_EQUAL = 1, RELATION_SPECIFIER_LESS_THAN = 2, RELATION_SPECIFIER_GREATER_THAN = 3, RELATION_SPECIFIER_LESS_THAN_OR_EQUAL = 4, RELATION_SPECIFIER_GREATER_THAN_OR_EQUAL = 5 } public enum BACNET_COMMUNICATION_ENABLE_DISABLE { COMMUNICATION_ENABLE = 0, COMMUNICATION_DISABLE = 1, COMMUNICATION_DISABLE_INITIATION = 2, MAX_BACNET_COMMUNICATION_ENABLE_DISABLE = 3 } public enum BACNET_MESSAGE_PRIORITY { MESSAGE_PRIORITY_NORMAL = 0, MESSAGE_PRIORITY_URGENT = 1, MESSAGE_PRIORITY_CRITICAL_EQUIPMENT = 2, MESSAGE_PRIORITY_LIFE_SAFETY = 3 } /*Network Layer Message Type */ /*If Bit 7 of the control octet described in 6.2.2 is 1, */ /* a message type octet shall be present as shown in Figure 6-1. */ /* The following message types are indicated: */ public enum BACNET_NETWORK_MESSAGE_TYPE { NETWORK_MESSAGE_WHO_IS_ROUTER_TO_NETWORK = 0, NETWORK_MESSAGE_I_AM_ROUTER_TO_NETWORK = 1, NETWORK_MESSAGE_I_COULD_BE_ROUTER_TO_NETWORK = 2, NETWORK_MESSAGE_REJECT_MESSAGE_TO_NETWORK = 3, NETWORK_MESSAGE_ROUTER_BUSY_TO_NETWORK = 4, NETWORK_MESSAGE_ROUTER_AVAILABLE_TO_NETWORK = 5, NETWORK_MESSAGE_INIT_RT_TABLE = 6, NETWORK_MESSAGE_INIT_RT_TABLE_ACK = 7, NETWORK_MESSAGE_ESTABLISH_CONNECTION_TO_NETWORK = 8, NETWORK_MESSAGE_DISCONNECT_CONNECTION_TO_NETWORK = 9, /* X'0A' to X'7F': Reserved for use by ASHRAE, */ /* X'80' to X'FF': Available for vendor proprietary messages */ NETWORK_MESSAGE_INVALID = 0x100 } public enum BACNET_REINITIALIZED_STATE_OF_DEVICE { REINITIALIZED_STATE_COLD_START = 0, REINITIALIZED_STATE_WARM_START = 1, REINITIALIZED_STATE_START_BACKUP = 2, REINITIALIZED_STATE_END_BACKUP = 3, REINITIALIZED_STATE_START_RESTORE = 4, REINITIALIZED_STATE_END_RESTORE = 5, REINITIALIZED_STATE_ABORT_RESTORE = 6, REINITIALIZED_STATE_IDLE = 255 } public enum BACNET_ABORT_REASON { ABORT_REASON_OTHER = 0, ABORT_REASON_BUFFER_OVERFLOW = 1, ABORT_REASON_INVALID_APDU_IN_THIS_STATE = 2, ABORT_REASON_PREEMPTED_BY_HIGHER_PRIORITY_TASK = 3, ABORT_REASON_SEGMENTATION_NOT_SUPPORTED = 4, /* Enumerated values 0-63 are reserved for definition by ASHRAE. */ /* Enumerated values 64-65535 may be used by others subject to */ /* the procedures and constraints described in Clause 23. */ MAX_BACNET_ABORT_REASON = 5, FIRST_PROPRIETARY_ABORT_REASON = 64, LAST_PROPRIETARY_ABORT_REASON = 65535 } public enum BACNET_BACNET_REJECT_REASON { REJECT_REASON_OTHER = 0, REJECT_REASON_BUFFER_OVERFLOW = 1, REJECT_REASON_INCONSISTENT_PARAMETERS = 2, REJECT_REASON_INVALID_PARAMETER_DATA_TYPE = 3, REJECT_REASON_INVALID_TAG = 4, REJECT_REASON_MISSING_REQUIRED_PARAMETER = 5, REJECT_REASON_PARAMETER_OUT_OF_RANGE = 6, REJECT_REASON_TOO_MANY_ARGUMENTS = 7, REJECT_REASON_UNDEFINED_ENUMERATION = 8, REJECT_REASON_UNRECOGNIZED_SERVICE = 9, /* Enumerated values 0-63 are reserved for definition by ASHRAE. */ /* Enumerated values 64-65535 may be used by others subject to */ /* the procedures and constraints described in Clause 23. */ MAX_BACNET_REJECT_REASON = 10, FIRST_PROPRIETARY_REJECT_REASON = 64, LAST_PROPRIETARY_REJECT_REASON = 65535 } public enum BACNET_ERROR_CLASS { ERROR_CLASS_DEVICE = 0, ERROR_CLASS_OBJECT = 1, ERROR_CLASS_PROPERTY = 2, ERROR_CLASS_RESOURCES = 3, ERROR_CLASS_SECURITY = 4, ERROR_CLASS_SERVICES = 5, ERROR_CLASS_VT = 6, /* Enumerated values 0-63 are reserved for definition by ASHRAE. */ /* Enumerated values 64-65535 may be used by others subject to */ /* the procedures and constraints described in Clause 23. */ MAX_BACNET_ERROR_CLASS = 7, FIRST_PROPRIETARY_ERROR_CLASS = 64, LAST_PROPRIETARY_ERROR_CLASS = 65535 } /* These are sorted in the order given in Clause 18. ERROR, REJECT AND ABORT CODES The Class and Code pairings are required to be used in accordance with Clause 18. */ public enum BACNET_ERROR_CODE { /* valid for all classes */ ERROR_CODE_OTHER = 0, /* Error Class - Device */ ERROR_CODE_DEVICE_BUSY = 3, ERROR_CODE_CONFIGURATION_IN_PROGRESS = 2, ERROR_CODE_OPERATIONAL_PROBLEM = 25, /* Error Class - Object */ ERROR_CODE_DYNAMIC_CREATION_NOT_SUPPORTED = 4, ERROR_CODE_NO_OBJECTS_OF_SPECIFIED_TYPE = 17, ERROR_CODE_OBJECT_DELETION_NOT_PERMITTED = 23, ERROR_CODE_OBJECT_IDENTIFIER_ALREADY_EXISTS = 24, ERROR_CODE_READ_ACCESS_DENIED = 27, ERROR_CODE_UNKNOWN_OBJECT = 31, ERROR_CODE_UNSUPPORTED_OBJECT_TYPE = 36, /* Error Class - Property */ ERROR_CODE_CHARACTER_SET_NOT_SUPPORTED = 41, ERROR_CODE_DATATYPE_NOT_SUPPORTED = 47, ERROR_CODE_INCONSISTENT_SELECTION_CRITERION = 8, ERROR_CODE_INVALID_ARRAY_INDEX = 42, ERROR_CODE_INVALID_DATA_TYPE = 9, ERROR_CODE_NOT_COV_PROPERTY = 44, ERROR_CODE_OPTIONAL_FUNCTIONALITY_NOT_SUPPORTED = 45, ERROR_CODE_PROPERTY_IS_NOT_AN_ARRAY = 50, /* ERROR_CODE_READ_ACCESS_DENIED = 27, */ ERROR_CODE_UNKNOWN_PROPERTY = 32, ERROR_CODE_VALUE_OUT_OF_RANGE = 37, ERROR_CODE_WRITE_ACCESS_DENIED = 40, /* Error Class - Resources */ ERROR_CODE_NO_SPACE_FOR_OBJECT = 18, ERROR_CODE_NO_SPACE_TO_ADD_LIST_ELEMENT = 19, ERROR_CODE_NO_SPACE_TO_WRITE_PROPERTY = 20, /* Error Class - Security */ ERROR_CODE_AUTHENTICATION_FAILED = 1, /* ERROR_CODE_CHARACTER_SET_NOT_SUPPORTED = 41, */ ERROR_CODE_INCOMPATIBLE_SECURITY_LEVELS = 6, ERROR_CODE_INVALID_OPERATOR_NAME = 12, ERROR_CODE_KEY_GENERATION_ERROR = 15, ERROR_CODE_PASSWORD_FAILURE = 26, ERROR_CODE_SECURITY_NOT_SUPPORTED = 28, ERROR_CODE_TIMEOUT = 30, /* Error Class - Services */ /* ERROR_CODE_CHARACTER_SET_NOT_SUPPORTED = 41, */ ERROR_CODE_COV_SUBSCRIPTION_FAILED = 43, ERROR_CODE_DUPLICATE_NAME = 48, ERROR_CODE_DUPLICATE_OBJECT_ID = 49, ERROR_CODE_FILE_ACCESS_DENIED = 5, ERROR_CODE_INCONSISTENT_PARAMETERS = 7, ERROR_CODE_INVALID_CONFIGURATION_DATA = 46, ERROR_CODE_INVALID_FILE_ACCESS_METHOD = 10, ERROR_CODE_ERROR_CODE_INVALID_FILE_START_POSITION = 11, ERROR_CODE_INVALID_PARAMETER_DATA_TYPE = 13, ERROR_CODE_INVALID_TIME_STAMP = 14, ERROR_CODE_MISSING_REQUIRED_PARAMETER = 16, /* ERROR_CODE_OPTIONAL_FUNCTIONALITY_NOT_SUPPORTED = 45, */ ERROR_CODE_PROPERTY_IS_NOT_A_LIST = 22, ERROR_CODE_SERVICE_REQUEST_DENIED = 29, /* Error Class - VT */ ERROR_CODE_UNKNOWN_VT_CLASS = 34, ERROR_CODE_UNKNOWN_VT_SESSION = 35, ERROR_CODE_NO_VT_SESSIONS_AVAILABLE = 21, ERROR_CODE_VT_SESSION_ALREADY_CLOSED = 38, ERROR_CODE_VT_SESSION_TERMINATION_FAILURE = 39, /* unused */ ERROR_CODE_RESERVED1 = 33, /* Enumerated values 0-255 are reserved for definition by ASHRAE. */ /* Enumerated values 256-65535 may be used by others subject to */ /* the procedures and constraints described in Clause 23. */ /* The last enumeration used in this version is 50. */ MAX_BACNET_ERROR_CODE = 51, FIRST_PROPRIETARY_ERROR_CODE = 256, LAST_PROPRIETARY_ERROR_CODE = 65535 } public enum BACNET_REINITIALIZED_STATE { BACNET_REINIT_COLDSTART = 0, BACNET_REINIT_WARMSTART = 1, BACNET_REINIT_STARTBACKUP = 2, BACNET_REINIT_ENDBACKUP = 3, BACNET_REINIT_STARTRESTORE = 4, BACNET_REINIT_ENDRESTORE = 5, BACNET_REINIT_ABORTRESTORE = 6, MAX_BACNET_REINITIALIZED_STATE = 7 } public enum BACNET_NODE_TYPE { BACNET_NODE_UNKNOWN = 0, BACNET_NODE_SYSTEM = 1, BACNET_NODE_NETWORK = 2, BACNET_NODE_DEVICE = 3, BACNET_NODE_ORGANIZATIONAL = 4, BACNET_NODE_AREA = 5, BACNET_NODE_EQUIPMENT = 6, BACNET_NODE_POINT = 7, BACNET_NODE_COLLECTION = 8, BACNET_NODE_PROPERTY = 9, BACNET_NODE_FUNCTIONAL = 10, BACNET_NODE_OTHER = 11 } public enum BACNET_SHED_STATE { BACNET_SHED_INACTIVE = 0, BACNET_SHED_REQUEST_PENDING = 1, BACNET_SHED_COMPLIANT = 2, BACNET_SHED_NON_COMPLIANT = 3 } public enum BACNET_LIGHTING_OPERATION { BACNET_LIGHTS_STOP = 0, BACNET_LIGHTS_FADE_TO = 1, BACNET_LIGHTS_FADE_TO_OVER = 2, BACNET_LIGHTS_RAMP_TO = 3, BACNET_LIGHTS_RAMP_TO_AT_RATE = 4, BACNET_LIGHTS_RAMP_UP = 5, BACNET_LIGHTS_RAMP_UP_AT_RATE = 6, BACNET_LIGHTS_RAMP_DOWN = 7, BACNET_LIGHTS_RAMP_DOWN_AT_RATE = 8, BACNET_LIGHTS_STEP_UP = 9, BACNET_LIGHTS_STEP_DOWN = 10, BACNET_LIGHTS_STEP_UP_BY = 11, BACNET_LIGHTS_STEP_DOWN_BY = 12, BACNET_LIGHTS_GOTO_LEVEL = 13, B... [truncated message content] |
From: Gabriel V. <gab...@gm...> - 2015-11-15 13:34:19
|
Good morning! My name is Gabriel Valderramos and I'm starting to develop a system in C # for controllers that communicate over BACnet. I have worked quite a while with Controllers for Honeywell and Alerton, so I'm used to working with this kind of language, but I am beginner in the C #. My client asked me to develop a system to communicate with an IP of a specific device and has also knowing instance and property (in most cases will be "Present Value"), open a connection to the mysql and add this information in a specific table. Frankly I've downloaded the example you posted (in which, I might add, that is very well done), but still could not find a way to do this. It would be grateful if you were able to help me in some way. Awaiting return, Regards, Gabriel Valderramos |
From: Jayantha D. <jay...@gm...> - 2013-11-06 13:35:08
|
Hi All, I am new to BACnet. I am interested on developping a C# based application to experience with BACnet communication. please guide me. Thanks, Jayantha Dayananda. |
From: Nelson J. V. <nel...@da...> - 2012-10-18 16:16:54
|
Hello, I have a project to develop a Bacnet application using C#. I downloaded the bacsharp bacnet stack but I would like to know if there is any docummentation on how to use this stack. I'm a begginer in C# and really need some help with this. Thanks a lot for your support. Regards, NELSON JULIÁN VARGAS E. |
From: Steve K. <st...@ka...> - 2008-07-11 13:53:46
|
Bonjour Olivier, > My name is Olivier Segouin, I works for Siemens in France > I'am a newbie developper on C#, I'am very interessting by bacnet product > So i want to create some tools just for fun and for knowlege bacnet protocol > But Have you a very sample program for show me some code ? Unfortunately for this project, the developers who started and were working on the project have moved on to other interests. I am also a newbie C# developer, and would like to see this project succeed. I haven't had the time lately to contribute and port all the important pieces of my BACnet Stack at SourceForge to this project. My next step was to create a packet class that supports all the BACnet encoding and decoding. I have been traveling during most of last month for BACnet meetings in Salt Lake City, BACnet teaching in Limoges, France, and BACnet product development in San Diego. You are welcome to experiment with the existing code in subversion and contribute to making this a great project. Best Regards, Steve -- http://steve.kargs.net/ |
From: Olivier S. <ose...@te...> - 2008-07-03 22:18:02
|
Hello, My name is Olivier Segouin, I works for Siemens in France I'am a newbie developper on C#, I'am very interessting by bacnet product So i want to create some tools just for fun and for knowlege bacnet protocol But Have you a very sample program for show me some code ? Regards Olivier Segouin |
From: A. Å. <agr...@gm...> - 2008-02-18 08:10:51
|
Hi Steve! It was Andreas who tested Bnotes, so I can't really give you any more info there. However, I will look into Bnotes this week to gain some knowledge. Please contact Andreas Kahl for more info aoubout his Bnotes tests: ak...@us... or and...@we.... Best regrads, Anders 2008/2/13, Steve Karg <st...@ka...>: > > Hello Anders, > > I noticed your post on the Open Discussion forum in May about Binary > Notes and BACnet ASN.1 > http://sourceforge.net/projects/bnotes/ > > You said: > <quote> > I have tested the Bnotes ASN.1 compiler with the following results: > - 95% of BACnet ASN.1 protocol definitions could by compiled > - Compiler create 155 C# classes > - the BER en-/decoding of the BACnet PDUs works fine > > According this results a special en-/decoder should be written for > BACnet encoding rules. > </quote> > > Do you have BACnet ASN.1 used for testing Binary Notes? Is Binary > Notes a plausible way to go forward? I haven't tried to use Binary > Notes or the results of its compilation yet. I would guess that I > just cut/paste the Clause 21 ASN.1 from the BACnet standard. > > At a recent BACnet committee we discussed ASN.1 and agreed that if the > BACnet ASN.1 didn't compile cleanly that we should fix the BACnet > standard so that it is correct. > > Best Regards, > > Steve > -- > http://steve.kargs.net/ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Bacsharp-developers mailing list > Bac...@li... > https://lists.sourceforge.net/lists/listinfo/bacsharp-developers > |
From: Steve K. <st...@ka...> - 2008-02-13 20:34:43
|
Hello Anders, I noticed your post on the Open Discussion forum in May about Binary Notes and BACnet ASN.1 http://sourceforge.net/projects/bnotes/ You said: <quote> I have tested the Bnotes ASN.1 compiler with the following results: - 95% of BACnet ASN.1 protocol definitions could by compiled - Compiler create 155 C# classes - the BER en-/decoding of the BACnet PDUs works fine According this results a special en-/decoder should be written for BACnet encoding rules. </quote> Do you have BACnet ASN.1 used for testing Binary Notes? Is Binary Notes a plausible way to go forward? I haven't tried to use Binary Notes or the results of its compilation yet. I would guess that I just cut/paste the Clause 21 ASN.1 from the BACnet standard. At a recent BACnet committee we discussed ASN.1 and agreed that if the BACnet ASN.1 didn't compile cleanly that we should fix the BACnet standard so that it is correct. Best Regards, Steve -- http://steve.kargs.net/ |
From: Steve K. <st...@ka...> - 2008-01-28 23:16:26
|
Hi Developers! I have looked at the code that is in Subversion (thank you Anders!), and noticed that it is similar to other efforts that I have seen (VTS3 and BACpypes) as far has how the packet encoding and decoding is solved - very distributed. I would like to change that. I think that creating a BACnetPacket class that has all the core methods for encoding and decoding data in packets as well as tracking size and current offset would be useful as a core piece of code. (similar to bacdcode.c and friends from the BACnet Stack at SourceForge) Then it should be straight forward to encode or decode each service using the BACnetPacket methods. Thoughts? I also would like to extend the BACnetEnums class that has been started by converting the code from the BACnet Stack at SourceForge bacenum.h file. It should be pretty straight forward. Anders: the license in the header looks great! The version for the BACnet Stack at SourceForge was heavily "influenced" by the eCos files. :-) Best Regards, Steve -- http://steve.kargs.net/ |