C++ API Changes

Integer Types
To support 64-bits platform the generated get() and set() methods use typedefs from <stdint.h> instead of non-safe built-in C++ types. One has to replace any occurrences of explicitly used in such methods signed and unsigned char, short and long types as shown in the following table:

OKS Type
Old C++ Type
New C++ Type
 s8 (8-bits signed integer)
unsigned char
uint8_t
 u8 (8-bits unsigned integer)
signed char
int8_t
s16 (16-bits signed integer)
unsigned short
uint16_t
u16 (16-bits unsigned integer)
signed short
int16_t
s32 (32-bits signed integer)
unsigned long
uint32_t
u32 (32-bits unsigned integer)
signed long
int32_t

Generated Enum Values
The valid values of enumeration types are generated. Such generated values can be used for get and set methods. The user's code in such case can look like:
const TestModule& obj;
if(obj.
get_Frequency() == TestModule::Frequency::Low) { ... }
else if(obj.
get_Frequency() == TestModule::Frequency::High) { ... }
else
if(obj.get_Frequency() == TestModule::Frequency::Default) { ... }
else ...
instead of:
const TestModule& obj;
if(obj.get_Frequency() == "low") { ... }
else if(obj.get_Frequency() == "High") { ... }
else if(obj.get_Frequency() == "default") { ... }
else ...
This allows to write more safe code from the following points of view:
Also, this simplifies possible future replacement of strings used for enumeration by more appropriate C++ enum type (using new code no changes from user side will be need at all).

The valid values are generated as const strings put inside wrapper type (struct) with name of attribute. To avoid clushes with C++ keywords and to satisfy variable name syntax requrements, the following rules are applied:
Example of generated code for TestModule::frequency enum attribute with range="default,low,High,1KHz,5KHz":
 /**
  *  Valid enumeration values for get and set "Frequency" attribute methods.
  */

struct Frequency {
  static const std::string Default;
  static const std::string Low;
  static const std::string High;
  static const std::string _1KHz;
 
static const std::string _5KHz;
};

Java Changes

The generated methods of DAL classes are synchronized for multi-thread safety.