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 |
const TestModule& obj;instead of:
if(obj.get_Frequency() == TestModule::Frequency::Low) { ... }
else if(obj.get_Frequency() == TestModule::Frequency::High) { ... }
else if(obj.get_Frequency() == TestModule::Frequency::Default) { ... }
else ...
const TestModule& obj;This allows to write more safe code from the following points of view:
if(obj.get_Frequency() == "low") { ... }
else if(obj.get_Frequency() == "High") { ... }
else if(obj.get_Frequency() == "default") { ... }
else ...
/**
* 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;
};