function tag = get_tag_id_from_string (~, str)
    % tag = GET_TAG_ID_FROM_STRING (self, str)
    %
    % Translates the Ubisense tag ID given in string form to an integer
    % value.
    %
    % Input:
    %  - self = @UbisenseDatavase instance
    %  - str = Ubisense tag ID string: AAA-BBB-CCC-DDD format
    %
    % Output:
    %  - tag = Ubisense tag ID
    %
    % Copyright (C) 2011-2012, Rok Mandeljc <rok.mandeljc@fe.uni-lj.si>

    num = sscanf(str, '%d-%d-%d-%d');
    tag = num(4) + bitshift(num(3),  8) + bitshift(num(2), 16) + bitshift(num(1), 24);
end