learning C++
This commit is contained in:
parent
d4bb6a3a5e
commit
a0c234c76d
|
@ -837,9 +837,7 @@ uint32_t TriggerDecoderBase::findTriggerZeroEventIndex(
|
|||
return 0;
|
||||
}
|
||||
|
||||
TriggerStimulatorHelper helper;
|
||||
|
||||
expected<uint32_t> syncIndex = helper.findTriggerSyncPoint(shape,
|
||||
expected<uint32_t> syncIndex = TriggerStimulatorHelper::findTriggerSyncPoint(shape,
|
||||
triggerConfiguration,
|
||||
*this);
|
||||
if (!syncIndex) {
|
||||
|
@ -855,7 +853,7 @@ uint32_t TriggerDecoderBase::findTriggerZeroEventIndex(
|
|||
}
|
||||
#endif /* EFI_UNIT_TEST */
|
||||
|
||||
helper.assertSyncPosition(triggerConfiguration,
|
||||
TriggerStimulatorHelper::assertSyncPosition(triggerConfiguration,
|
||||
syncIndex.Value, *this, shape);
|
||||
|
||||
return syncIndex.Value % shape.getSize();
|
||||
|
|
|
@ -17,20 +17,20 @@ int getSimulatedEventTime(const TriggerWaveform& shape, int i);
|
|||
class TriggerStimulatorHelper {
|
||||
public:
|
||||
|
||||
expected<uint32_t> findTriggerSyncPoint(
|
||||
static expected<uint32_t> findTriggerSyncPoint(
|
||||
TriggerWaveform& shape,
|
||||
const TriggerConfiguration& triggerConfiguration,
|
||||
TriggerDecoderBase& state);
|
||||
|
||||
void assertSyncPosition(
|
||||
static void assertSyncPosition(
|
||||
const TriggerConfiguration& triggerConfiguration,
|
||||
const uint32_t index,
|
||||
TriggerDecoderBase& state,
|
||||
TriggerWaveform& shape
|
||||
);
|
||||
|
||||
private:
|
||||
// send next event so that we can see how state reacts
|
||||
void feedSimulatedEvent(
|
||||
static void feedSimulatedEvent(
|
||||
const TriggerConfiguration& triggerConfiguration,
|
||||
TriggerDecoderBase& state,
|
||||
const TriggerWaveform& shape,
|
||||
|
|
Loading…
Reference in New Issue