Processor Expert - HCS08DZ128  & CW 6.2 - PE autoedits MY code

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Processor Expert - HCS08DZ128  & CW 6.2 - PE autoedits MY code

1,294 Views
AndersJ
Contributor IV

I decided to point a PE bean event directly into my code,

as opposed to using the default events module.

 

The event handler is in my module xyz.c, and the function prototype in xyz.h

 

After this change PE adds ALL its headers to my xyz.h.

I do not want PE to modify my source files.

 

Q!. Why is this done?

Q2. Is this autoedit needed?

Q3. Can it be avoided?

 

 

BR,

Anders J

 

Message Edited by AndersJ on 2009-11-26 07:50 AM
Labels (1)
0 Kudos
3 Replies

445 Views
ProcessorExpert
Senior Contributor III

Hello Anders J,
 
the behavoiur that you described is the normal behaviour of Processor Expert and currently there is no option to change or disable it. It is intended to help user to easily use methods of the beans in the project.
 
You can use #ifdef statement to avoid including all generate #include statements in your header file, for example:
 
#ifdef non_existing_symbol
 
#include "PE_Types.h"
#include "PE_Error.h"
#include "PE_Const.h"
#include "IO_Map.h"
#include "Cap1.h"
#include "FC1.h"
#include "EInt1.h"

 

#endif

best regards
Vojtech Filip
Processor Expert Support Team

0 Kudos

445 Views
AndersJ
Contributor IV

Vojtech,

 

Thanks for responding.

Adding headers like this may facilitate bean usage,

but I think it lays a foundation for bad coding.

 

Making beans "global" does not suport the concept of information hiding,

which I believe is one of the most important ways to avoid unwanted side effects.

Givin access to all beans like this is a variant of global variables misuse,

by introducing properties and methods that are unnecessarily global/visible.

 

I do not want tools like PE to edit my code.

Let me decide what properties, methods, functions etc,  I want to make public.

 

Comments invited,

 

Anders J

 

0 Kudos

445 Views
ProcessorExpert
Senior Contributor III
Hello,
 
we decided to add new option to control generation of includes in 'User modules' into next release of Processor Expert according to your request. Newly the user will have the possibility to disable generation of includes into main and event modules and modify this section manually.
However names of methods, events, etc. of beans will be updated according to changes in a bean configuration.
 
Is this sufficient for you?
 
Note:
Currenlty Processor Expert provides the 'Update type' option to specify update/modification/creation of the existing user module and there is the possibility by setting this option to 'do not change' value to disable access of Processor Expert into these files completely.
For more details please find attached screen shot.

best regards
Vojtech Filip
Processor Expert Support Team