public void Peripheral(int relativeTime, int subchannel, float value, float minValue, float maxValue, float eegFullScale, float eegSmooth, DisplayControlFlags flags) { CommandHandler currentHandler; if (m_Commands.TryGetValue(CommandReceiver.PERIPHERAL, out currentHandler)) { currentHandler(relativeTime, subchannel, value, minValue, maxValue, eegFullScale, eegSmooth, flags); } }
public void ParsePeripheral(JsonData json) { int relativeTime = JsonUtil.ParseInteger(json["relativeTime"]); int subchannel = JsonUtil.ParseInteger(json["subchannel"]); float value = json["value"].ParseNumber(); float minValue = json["minValue"].ParseNumber(); float maxValue = json["maxValue"].ParseNumber(); float eegFullScale = json["eegFullScale"].ParseNumber(); float eegSmooth = json["eegSmooth"].ParseNumber(); DisplayControlFlags flags = new DisplayControlFlags(json["control"]); m_CommandExecutor.Peripheral(relativeTime, subchannel, value, minValue, maxValue, eegFullScale, eegSmooth, flags); }