Open ernstblechaPT opened 3 weeks ago
I had another thought: since there is the FakeTimeDev
and the RMT_DEV
it is possible to select the required timer based on the device used.
My Idea of tying automatic enablement of the FakeTimer to the FakeTimeDev poses a problem: the command line switch would need to be turned to a "disable FakeTimer" switch which breaks my use case.
In this state this practically makes the FakeTimer unusable on systems where FORTE is not started via command line. Is there currently someone using FakeTime on any platform other than Win32/Posix that we are aware of?
FakeTimeDev
I'm not sure how the FakeTimeDev is being used. I understand that you need to compile forte with FORTE_DEVICE=FakeTimeDev
and you get the fakeTimer in it.
What's your use case? Do you want to also have the disable FakeTimer
command line to be able to use a regular timer? In that case I think the FakeTimeDev becomes the same to a RMT_DEV, right?
FakeTimeDev
I'm not sure how the FakeTimeDev is being used. I understand that you need to compile forte with
FORTE_DEVICE=FakeTimeDev
and you get the fakeTimer in it.What's your use case? Do you want to also have the
disable FakeTimer
command line to be able to use a regular timer? In that case I think the FakeTimeDev becomes the same to a RMT_DEV, right?
I want to build one FORTE binary and have it start up as a "normal" FORTE as default - and if needed switch it to FakeTime for doing some testing
I have not problem adding a switch for testing, but the default should be the "normal" FORTE
I want to build one FORTE binary and have it start up as a "normal" FORTE as default - and if needed switch it to FakeTime for doing some testing
I have not problem adding a switch for testing, but the default should be the "normal" FORTE
But do you actually need the FakeTimeDevice
? I see it has the extra input for setting the time it seems. is this something that's actually being used? Do you want to be able to switch between RMT_DEV
and FakeTimeDevice
or actually between RMT_DEV(with normal timer)
and RMT_DEV(with fakeTimer)
?
I want to build one FORTE binary and have it start up as a "normal" FORTE as default - and if needed switch it to FakeTime for doing some testing I have not problem adding a switch for testing, but the default should be the "normal" FORTE
But do you actually need the
FakeTimeDevice
? I see it has the extra input for setting the time it seems. is this something that's actually being used? Do you want to be able to switch betweenRMT_DEV
andFakeTimeDevice
or actually betweenRMT_DEV(with normal timer)
andRMT_DEV(with fakeTimer)
?
Having the FakeTimeDevice allows you to set the time during a Debug-Session for a FB via the FB-Debug view in the Debug perspective - this is a really powerful tool
Having the FakeTimeDevice allows you to set the time during a Debug-Session for a FB via the FB-Debug view in the Debug perspective - this is a really powerful tool
I see two possible ways of having that:
OPCUA_DEV
device. The FakeTimeDev would need to set the timer properly in the constructor and set it back to the regular in the destructor.FakeTimeDev
to allow switching timers: A boolean input could allow to select between the fake and the normal timer. This will basically convert your FakeTimeDev
in to a regular RMT_DEV
at runtime.
As discussed in #265 this adds a command line option to enable the fakeTimer if the feature is compiled in.