Open vargheseg opened 4 years ago
Yes, I agree the names are confusing. They are from the very beginning of the development, where we defined that the directions of the variables are "ControlSystemToDevice" and "DeviceToControlSystem". ApplicationCore did not exist back then. From today's perspective the better names would have been "ControlSystemToApplication" and "ApplicationToControlSystem".
The names are taken from the perspective of the CS adapter developer- So the TO_DEVICE_XX
is an output of the CS adapter, hence it is an input to the application. If you think of the application as a device dummy it becomes clear that TO_DEVICE_XX
is an input.
I would propose to put an according comment into the code of the ReferenceTestApplication
to begin with. The names are part of the test interface of the CS adapter implementations, so renaming them to TO_APPLICATION_XX
and FROM_APPLICATION_XX
would break this interface.
Now on redmine #8396
As I understand it, the
ReferenceTestApplication
creates a pair of linked process variables:FROM_DEVICE_XX
,TO_DEVICE_XX
. My intuition with this scheme is, data flows from theFROM
to theTO
variant.However the code seems to invert this (looking at
TypedPVHolder::inputToOutput
); it takes data from theTO
variant and writes it to theFROM
variant. If there is no good reason for this behavior, please consider changing it to be inline with the concept of sending data from a source to a destination.