BACnet.Tagging.TagReader.ReadObjectId C# (CSharp) Method

ReadObjectId() public method

Reads an object id tag from the stream
public ReadObjectId ( byte tag = 255 ) : ObjectId
tag byte The tag number of the object id tag, or 255 for an application tag
return ObjectId
        public ObjectId ReadObjectId(byte tag = 255)
        {
            _ensureTag(tag, ApplicationTag.ObjectId);
            _ensureLength(4);

            uint val = new Union4(_reader.ReadUInt32()).ReverseLE().UInt32;
            ushort type = (ushort)(val >> 22);
            uint instance = (val & 0x003FFFFF);
            return new ObjectId(type, instance);
        }