public static int Decode_Application_Data(ref Byte[] apdu, uint max_apdu_len, ref BACNET_APPLICATION_DATA_VALUE value, int pos)
        {
            int    len            = 0;
            int    tag_len        = 0;
            int    decode_len     = 0;
            Byte   tag_number     = 0;
            UInt32 len_value_type = 0;

            // if (apdu && value && !IS_CONTEXT_SPECIFIC(*apdu))
            value.context_specific = false;
            tag_len    = BasicalProcessor.Decode_Tag_number_and_Value(ref apdu, ref tag_number, ref len_value_type, pos);
            len       += tag_len;
            value.tag  = tag_number;
            decode_len = BasicalProcessor.Decode_Data(ref apdu, tag_number, len_value_type, ref value, pos + len);
            //  if (value->tag != MAX_BACNET_APPLICATION_TAG)

            len       += decode_len;
            value.next = null;
            return(len);
        }