Looking back on my post, I need to add additional context. The message of containing the variable in question is...
message GeneratorStatus {
optional int32 command = 1;
optional bool is_generator_on = 2;
optional bool is_generator_busy = 3;
optional float current = 4;
}
The following encode the GeneratorStatus message...
pGeneratorStatus->set_current(4.5);
if (pGeneratorStatus->has_current())
float CurrentReadback = pGeneratorStatus->current();
CurrentReadback is a very small number, certainly not 4.5.
Tracing into the Protec .h file the disassembled function _internal_set_current() the AX register is set to the instance of pGeneratorStatus (this pointer) and stores the argument at AX+16h. Similarly the getter function _internal_current() set AX to the this pointer and sets the destination register to AX+18h. The GeneratorStatus object member _current is a float and the generated code leading up to setting _current is correct, it is only the operand references that are not correct.
I have changed the scalar to double and uint32 to no avail.
It is obvious not a proto/Protec issue in that the generated C++ code is correct, but VS 2015 code generation anomaly.
I am hoping a group member has experienced this issue and might have a solution. Thank you.