Hello,
I would recommend following approach:
Step 1: Manage all strings within the Embedded Wizard project. For this purpose each string is represented by a constant member. The name of the constant identifies the string. Each string can contain several language dependent variants. When using *.xls files the constants are automatically generated.
Step 2: Don't use the strings from the .c code. This means, don't map the fault code to a string and pass the string from the .c code to GUI application.
Step 3: Instead, pass the fault code id to the GUI application. In the GUI application use the fault code id to select the right string constant. For this purpose create a switch-case statement matching all possible faul code ids to constants containing the corresponding error messages. This could be the switch-case implementation:
var int32 faultCode = ...
var string faultString;
switch ( faultCode )
{
case 1 : faultString = Strings::SomeMessage1;
case 2 : faultString = Strings::SomeMessage2;
...
case N : faultString = Strings::SomeMessageN;
default : faultString = Strings::AllOK;
}
This mens: in the Device Interface implement an interface to transfer the fault code ids (as numbers, e.g. int32) between the device and the GUI application. In the GUI application evaluate the fault code id and select the appropriate string constant.
I hope it helps you further.
Best regards
Paul Banach