lib/metadataprotocol.js
function(requestId, itemData) {
		var i, payload = [], item;
		for (i = 0; i < itemData.length; i = i + 1) {
			payload.push(types.INT);
			payload.push(protocol.encodeInteger(itemData[i].distinctSnapLen));
			payload.push(types.DOUBLE);
			payload.push(protocol.encodeDouble(itemData[i].minSourceFreq));
			payload.push(types.MODE);
			payload.push(protocol.encodePubModes(itemData[i].allowedModes));
		}
		return protocol.implodeMessage(requestId, metadataMethods.GET_ITEM_DATA,
			protocol.implodeArray(payload));
	}
function(requestId, itemData) {
		var i, payload = [], item;
		for (i = 0; i < itemData.length; i = i + 1) {
			payload.push(types.INT);
			payload.push(protocol.encodeInteger(itemData[i].distinctSnapLen));
			payload.push(types.DOUBLE);
			payload.push(protocol.encodeDouble(itemData[i].minSourceFreq));
			payload.push(types.MODE);
			payload.push(protocol.encodePubModes(itemData[i].allowedModes));
		}
		return protocol.implodeMessage(requestId, metadataMethods.GET_ITEM_DATA,
			protocol.implodeArray(payload));
	}
function ( requestId , itemData ) { var i , payload = [ ] , item ; for ( i = 0 ; i < itemData . length ; i = i + 1 ) { payload . push ( types . INT ) ; payload . push ( protocol . encodeInteger ( itemData [ i ] . distinctSnapLen ) ) ; payload . push ( types . DOUBLE ) ; payload . push ( protocol . encodeDouble ( itemData [ i ] . minSourceFreq ) ) ; payload . push ( types . MODE ) ; payload . push ( protocol . encodePubModes ( itemData [ i ] . allowedModes ) ) ; } return protocol . implodeMessage ( requestId , metadataMethods . GET_ITEM_DATA , protocol . implodeArray ( payload ) ) ; }
Encodes a successful get item data reply.

@param {String} requestId the originating request id
@param {Array} itemData an array of objects with the following structure:
{distinctSnapLen: INTEGER, minSourceFreq: DOUBLE,
allowedModes: {raw: BOOL, merge: BOOL, distinct: BOOL, command: BOOL}}
@return {String} the encoded message
@private
Encodes a successful get item data reply .