My code has a number of classes. These are all instantiated in main.cpp.
Example:
SystemMaster oMaster;
GP22 oGP22;
CurrentData oCurrentData;
OCTControl oOCTControl;
SystemError oError;
LCDIconControl oIconControl;
DataStream oDataStream;
MemSegment oMemSegment;
SpoolPiece oSpoolPiece;
MBUS oMBUS;
MBUSStream oMBUSStream;
In other source files where a class is needed, I do this at the top of the file:
extern SystemMaster oMaster;
The ULP advisor complains. It says:
(ULP 8.1) variable "oMaster" is used as a constant. Recommend declaring variable as either 'static const' or 'const'
Why?
Should this advice be ignored or is there some treatment of cpp classes in CCS that I am missing?
Note: there is currently one instance of each class, but I prefer class notation over structures.