function outData = isProtocol(inStructure)

%   verifies that a variable is an appropriate protocol structure
%   boolean = isProtocol(inStructure)

if isstruct(inStructure)
    protocolFields = {'fileName', 'channelNames', 'startingValues',...
		'ttlStepEnable', 'ttlStepLatency',...
        'ttlStepDuration', 'ttlPulseEnable', 'ttlPulseDuration',...
        'ttlArbitraryEnable', 'ttlArbitrary', 'ttlTrainEnable',...
        'ttlTrainLatency', 'ttlTrainInterval', 'ttlTrainNumber',...
        'ttlBurstEnable', 'ttlBurstInterval', 'ttlBurstNumber',...
        'channelType', 'channelRange', 'channelExtGain', 'source',...
        'sweepWindow', 'acquisitionRate', 'timePerPoint', 'ampType',...
        'ampCurrent', 'ampVoltage', 'ampTelegraph', 'ampStimulus',...
        'ampSaveStim', 'ampTpEnable', 'ampTpSetPoint',...
        'ampTpMaxCurrent', 'ampTpMaxPer', 'ampRandomizeFamilies',...
        'ampMonitorRin', 'ampMatlabCommand', 'ampStimEnable',...
        'ampStepEnable', 'ampStepInitialAmplitude', 'ampStep1Start',...
        'ampStep1Stop', 'ampStep1Amplitude', 'ampStep2Start', 'ampStep2Stop',...
        'ampStep2Amplitude', 'ampStep3Start', 'ampStep3Stop', 'ampStep3Amplitude',...
        'ampStepLastAmplitude', 'ampStep1Enable', 'ampStep2Enable',...
        'ampStep3Enable', 'ampPspEnable', 'ampPspStart', 'ampPspNumber',...
        'ampPspTau', 'ampPspInterval', 'ampPspPeak', 'ampSineEnable', 'ampCosineEnable',...
        'ampSineStart', 'ampSineStop', 'ampSineFrequency', 'ampSineOffset',...
        'ampSineAmplitude', 'ampRampEnable', 'ampRampStartTime',...
        'ampRampStopTime', 'ampRampStartAmplitude', 'ampRampStopAmplitude',...
        'ampRampLogarithmic', 'ampTrainEnable', 'ampTrainStart',...
        'ampTrainOnDuration', 'ampTrainOffDuration', 'ampTrainAmplitude', 'ampPulseEnable',...
        'ampPulse1Start', 'ampPulse1Stop', 'ampPulse1Amplitude',...
        'ampPulse2Start', 'ampPulse2Stop', 'ampPulse2Amplitude',...
        'ampPulse3Start', 'ampPulse3Stop', 'ampPulse3Amplitude',...
        'ampPulse4Start', 'ampPulse4Stop', 'ampPulse4Amplitude',...
        'ampPulse5Start', 'ampPulse5Stop', 'ampPulse5Amplitude',...
        'ampMatlabStim', 'ampCellLocation', 'ttlIntensity',...
		'ampsCorandomize', 'ampSealTestStep', 'ampBridgeBalanceStep',...
		'ttlType', 'ttlTypeName', 'ampCellLocationName', 'ampTypeName', 'sourceName'};
    fields = fieldnames(inStructure);
    outData = true;
    
    for fieldIndex = 1:numel(fields)
        if ~ismember(fields{fieldIndex}, protocolFields)
            outData = 0;
            break
        end
    end
else
    outData = false;
end