function Identifier(type, value) {
  var isValue = (value != null);

  // Constructor for EUI-64
  if((type == TYPE_EUI64) && isValue) {
    this.type = TYPE_EUI64;
    this.value = value;
  }

  // Constructor for RA-28
  else if((type == TYPE_RA28) && isValue) {
    this.type = TYPE_RA28;
    this.value = value.substr(value.length - 7, 7);
  }

  // Constructor for ADVA-48
  else if((type == TYPE_ADVA48) && isValue) {
    this.type = TYPE_ADVA48;
    this.value = value;
  }

  // Constructor for RadioPayload
  else if((type = TYPE_RADIO_PAYLOAD) && isValue) {
    this.type = TYPE_RADIO_PAYLOAD;
    this.value = value.payload;
    this.lengthBytes = value.payloadLengthBytes;
  }

  // Constructor for Undefined
  else {
    this.type = TYPE_UNDEFINED;
    this.value = null;
  }
}
/**
 * Identifier Class
 * Represents an identifier
 * @param {string} type Type of identifier.
 * @param {Object} value The value of the given identifier.
 * @constructor
 */
Identifier Class
Represents an identifier
@param {string} type Type of identifier.
@param {Object} value The value of the given identifier.
@constructor
Identifier Class Represents an identifier @param { string } type Type of identifier . @param { Object } value The value of the given identifier . @constructor
function Identifier(type, value) {
  var isValue = (value != null);
  if((type == TYPE_EUI64) && isValue) {
    this.type = TYPE_EUI64;
    this.value = value;
  }
  else if((type == TYPE_RA28) && isValue) {
    this.type = TYPE_RA28;
    this.value = value.substr(value.length - 7, 7);
  }
  else if((type == TYPE_ADVA48) && isValue) {
    this.type = TYPE_ADVA48;
    this.value = value;
  }
  else if((type = TYPE_RADIO_PAYLOAD) && isValue) {
    this.type = TYPE_RADIO_PAYLOAD;
    this.value = value.payload;
    this.lengthBytes = value.payloadLengthBytes;
  }
  else {
    this.type = TYPE_UNDEFINED;
    this.value = null;
  }
}
function Identifier ( type , value ) { var isValue = ( value != null ) ; if ( ( type == TYPE_EUI64 ) && isValue ) { this . type = TYPE_EUI64 ; this . value = value ; } else if ( ( type == TYPE_RA28 ) && isValue ) { this . type = TYPE_RA28 ; this . value = value . substr ( value . length - 7 , 7 ) ; } else if ( ( type == TYPE_ADVA48 ) && isValue ) { this . type = TYPE_ADVA48 ; this . value = value ; } else if ( ( type = TYPE_RADIO_PAYLOAD ) && isValue ) { this . type = TYPE_RADIO_PAYLOAD ; this . value = value . payload ; this . lengthBytes = value . payloadLengthBytes ; } else { this . type = TYPE_UNDEFINED ; this . value = null ; } }
Identifier Class
 Represents an identifier
 @param {string} type Type of identifier.
Identifier Class Represents an identifier @param { string } type Type of identifier .
// Constructor for EUI-64 // Constructor for RA-28 // Constructor for ADVA-48 // Constructor for RadioPayload // Constructor for Undefined