public MOTGEARNodeReader(CanMessage canMessage) { if (canMessage.Identifier != Identifier) { throw new NotSupportedException($"Identifier is not supported."); } _canMessage = canMessage; Signals = new ISignalParser[] { new BoolSignalParser(_canMessage.Data, 63, "EngineTorqueForNCAValidData"), new BoolSignalParser(_canMessage.Data, 62, "EngineTorqueReductNCAValidData"), new BoolSignalParser(_canMessage.Data, 61, "StopLightSwitchStsValidData"), new BoolSignalParser(_canMessage.Data, 60, "StopLightSwitchSts"), new BoolSignalParser(_canMessage.Data, 59, "AirConSts"), new BoolSignalParser(_canMessage.Data, 58, "EngineSpeedValidData"), new BoolSignalParser(_canMessage.Data, 57, "KickDownRequest"), new EmptySignalParser("NotUsed"), new RangeSignalParser(_canMessage.Data, 48, 55, "EngineTorqueForNCA"), new RangeSignalParser(_canMessage.Data, 40, 47, "EngineTorqueReductNCA"), new RangeSignalParser(_canMessage.Data, 32, 39, "EngineWaterTempForNCA"), new BoolSignalParser(_canMessage.Data, 31, "EngineWaterTempForNCAFailSts"), new EmptySignalParser("NotUsed") }; }
public MOT1NodeReader(CanMessage canMessage) { if (canMessage.Identifier != Identifier) { throw new NotSupportedException($"Identifier is not supported."); } _canMessage = canMessage; Signals = new ISignalParser[] { new BoolSignalParser(_canMessage.Data, 63, "MaxEngineTorqueValidData"), new BoolSignalParser(_canMessage.Data, 62, "GasPedalPositionValidData"), new BoolSignalParser(_canMessage.Data, 61, "EngineFrictionTorqueValidData"), new BoolSignalParser(_canMessage.Data, 60, "FeedbackASR/VDCReq"), new BoolSignalParser(_canMessage.Data, 59, "EngineTorqueValidData"), new BoolSignalParser(_canMessage.Data, 58, "EngineTorqueDriverReqValidData"), new EnumSignalParser <TorqueIntervention>(_canMessage.Data, 56, 57, "TorqueInterventionSts"), new RangeSignalParser(_canMessage.Data, 48, 55, "EngineTorque"), new RangeSignalParser(_canMessage.Data, 32, 47, "EngineSpeed"), new RangeSignalParser(_canMessage.Data, 24, 31, "EngineTorqueDriverReq"), new RangeSignalParser(_canMessage.Data, 16, 23, "EngineFrictionTorque"), new RangeSignalParser(_canMessage.Data, 8, 15, "MaxEngineTorque"), new RangeSignalParser(_canMessage.Data, 0, 7, "GasPedalPosition") }; }
public STNB_CUSW11NodeReader(CanMessage canMessage) { if (canMessage.Identifier != Identifier) { throw new NotSupportedException($"Identifier is not supported."); } _canMessage = canMessage; Signals = new ISignalParser[] { // AC Status on CAN // 1 = AC Request // 2 = No AC Request new BoolSignalParser(_canMessage.Data, 50, "CompressorACReqSts"), // Value Range -40ºC to +87ºC // CAN Conversion E = N * 0.5 - 40ºC new RangeSignalParser(_canMessage.Data, 32, 39, "ExternalTemperature"), // This signal contains the faulty information related to the signal "ExternalTemperature". If the value is "Fail Present", then the ECM doesn' t take into account the external temperature value. // TRUE = Fail Present // FALSE = Fail not Present new BoolSignalParser(_canMessage.Data, 31, "ExternalTemperatureFailSts"), // This signal contains the information about Drive Style Sts. // Value Range 0 to 7 new RangeSignalParser(_canMessage.Data, 27, 29, "Drive Style Sts"), // This signal contains the information about hand brake insertion. If the hand break is activated, the value $1(On) will be received. // 1 = On // 0 = Off new BoolSignalParser(_canMessage.Data, 13, "HandBrakeSts") }; }
public SignalService(ISignalReader <T> reader, ISignalParser <T> parser, ISignalHub hub, ILogger logger) { _signalReader = reader; _signalParser = parser; _signalHub = hub; _logger = logger; }
public ASR2NodeReader(CanMessage canMessage) { if (canMessage.Identifier != Identifier) { throw new NotSupportedException($"Identifier is not supported."); } _canMessage = canMessage; Signals = new ISignalParser[] { }; }
public STNBNodeReader(CanMessage canMessage) { if (canMessage.Identifier != Identifier) { throw new NotSupportedException($"Identifier is not supported."); } _canMessage = canMessage; Signals = new ISignalParser[] { new BoolSignalParser(_canMessage.Data, 24, "Fuel Level Fail Sts"), new RangeSignalParser(_canMessage.Data, 16, 23, "Fuel Level") }; }
public MOT2NodeReader(CanMessage canMessage) { if (canMessage.Identifier != Identifier) { throw new NotSupportedException($"Identifier is not supported."); } _canMessage = canMessage; Signals = new ISignalParser[] { new RangeSignalParser(_canMessage.Data, 56, 63, "DriverPowerReq"), new RangeSignalParser(_canMessage.Data, 48, 55, "MaxEngTorqueNorm"), new BoolSignalParser(_canMessage.Data, 47, "GasPedalGradientValidData"), new BoolSignalParser(_canMessage.Data, 46, "ThrottlePositionValidData"), new BoolSignalParser(_canMessage.Data, 45, "StopLightSwitchStsValidData"), new BoolSignalParser(_canMessage.Data, 44, "StopLightSwitchSts"), new BoolSignalParser(_canMessage.Data, 43, "EngineIntervention"), new BoolSignalParser(_canMessage.Data, 42, "CruiseControlSts"), new BoolSignalParser(_canMessage.Data, 41, "ECUFail"), new BoolSignalParser(_canMessage.Data, 40, "Override"), new RangeSignalParser(_canMessage.Data, 32, 39, "GasPedalGradient"), new RangeSignalParser(_canMessage.Data, 24, 31, "Throttle Position"), new BoolSignalParser(_canMessage.Data, 23, "ECACCFail"), new BoolSignalParser(_canMessage.Data, 22, "ECACCShutOff"), new BoolSignalParser(_canMessage.Data, 21, "ClutchPedalAction"), new BoolSignalParser(_canMessage.Data, 20, "GasPedalAct"), new EmptySignalParser("EngineTorqueTarget"), new BoolSignalParser(_canMessage.Data, 11, "MainSwitchACC"), new EnumSignalParser <OperationCodeACC>(_canMessage.Data, 8, 10, "OperationCodeACC"), new EnumSignalParser <TypeOfGearbox>(_canMessage.Data, 6, 7, "TypeOfGearbox"), new EnumSignalParser <EngineSts>(_canMessage.Data, 4, 5, "EngineSts"), new BoolSignalParser(_canMessage.Data, 3, "Crank Aborted"), new BoolSignalParser(_canMessage.Data, 2, "Starter Active"), new BoolSignalParser(_canMessage.Data, 2, "Starter Failed Sts"), new BoolSignalParser(_canMessage.Data, 1, "Start Relay BCM Cmd") }; }