AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/ports/xplained/bname.c
static bool bacnet_name_isvalid(uint8_t encoding,
    uint8_t length,
    char *str)
{
    bool valid = false;

    if ((encoding < MAX_CHARACTER_STRING_ENCODING) &&
        (length <= NVM_NAME_SIZE)) {
        if (encoding == CHARACTER_UTF8) {
            valid = utf8_isvalid(str, length);
        } else {
            valid = true;
        }
    }

    return valid;
}
/*************************************************************************
* DESCRIPTION: Test the BACnet CharacterString for validity
* RETURN: true if valid
* NOTES: none
**************************************************************************/
Test the BACnet CharacterString for validity
RETURN: true if valid
NOTES: none
Test the BACnet CharacterString for validity RETURN : true if valid NOTES : none
static bool bacnet_name_isvalid(uint8_t encoding,
    uint8_t length,
    char *str)
{
    bool valid = false;
    if ((encoding < MAX_CHARACTER_STRING_ENCODING) &&
        (length <= NVM_NAME_SIZE)) {
        if (encoding == CHARACTER_UTF8) {
            valid = utf8_isvalid(str, length);
        } else {
            valid = true;
        }
    }
    return valid;
}
static bool bacnet_name_isvalid ( uint8_t encoding , uint8_t length , char * str ) { bool valid = false ; if ( ( encoding < MAX_CHARACTER_STRING_ENCODING ) && ( length <= NVM_NAME_SIZE ) ) { if ( encoding == CHARACTER_UTF8 ) { valid = utf8_isvalid ( str , length ) ; } else { valid = true ; } } return valid ; }
DESCRIPTION: Test the BACnet CharacterString for validity
RETURN: true if valid
NOTES: none
DESCRIPTION : Test the BACnet CharacterString for validity RETURN : true if valid NOTES : none