Skip to content
This repository has been archived by the owner on Jan 5, 2021. It is now read-only.

Add support for generating tracing callbacks (in C generator). #266

Closed
nyssen opened this issue Dec 23, 2015 · 5 comments
Closed

Add support for generating tracing callbacks (in C generator). #266

nyssen opened this issue Dec 23, 2015 · 5 comments

Comments

@nyssen
Copy link
Contributor

nyssen commented Dec 23, 2015

We should create a code generator feature that enables creation of callbacks, via which entering and exiting of states an be traced. The callbacks could be generated into the 'Required' header. It should pass a respective state identifier.

@nyssen nyssen added this to the M23 - Generators & Domains milestone Dec 23, 2015
@nyssen nyssen self-assigned this Dec 23, 2015
nyssen added a commit that referenced this issue Dec 23, 2015
- Add Tracing generator feature with parameters to trigger generation of
state-enter and state-exit callbacks.
- Enhanced C code generator to generate callbacks to required header and
respective calls based on corresponding trace steps.
- Ensure that ADD_TRACES option is enabled for C code generator in case
Tracing feature is enabled. Ensured its disabled for all other
generators by default. Had to change contract of
GenericDomainInjectorProvider to accept an overriding module, and
replaced child injector usage in code generators with an overriding
module instead.
@nyssen
Copy link
Contributor Author

nyssen commented Dec 23, 2015

Merged enhancement into master. Resolving as fixed.

@nyssen nyssen closed this as completed Dec 23, 2015
@terfloth
Copy link
Contributor

terfloth commented Jan 4, 2016

Reopened since the generated code is not compilable and complete.

In detail there are the following problems:

  1. The required header declares the callback function prototypes "extern void stateEntered(const SCTStates state);" and "extern void stateEntered(const SCTStates state);" wich uses the undefined type SCTStates
  2. The callback function names are not scoped by a prefix as other callback functions but should be.
  3. It is not possible to distinguish different state machine instances in the callback implementation as the handle is not provided as parameter.

@terfloth terfloth reopened this Jan 4, 2016
@terfloth
Copy link
Contributor

terfloth commented Jan 4, 2016

We should define test cases for this feature. At least we require an entry for the manual test plan.

@nyssen
Copy link
Contributor Author

nyssen commented Jan 6, 2016

I will take a look into it.

@nyssen nyssen mentioned this issue Jan 6, 2016
nyssen added a commit that referenced this issue Jan 6, 2016
Fixed issues related to initial fix for issue #266.
@nyssen
Copy link
Contributor Author

nyssen commented Jan 6, 2016

I fixed the issues you named. What remains is to define test cases for this functionality.

@terfloth terfloth modified the milestones: M23 - Generators & Domains, M24 Feb 22, 2016
@terfloth terfloth closed this as completed Apr 4, 2016
BeckmaR pushed a commit that referenced this issue Dec 15, 2017
- Add Tracing generator feature with parameters to trigger generation of
state-enter and state-exit callbacks.
- Enhanced C code generator to generate callbacks to required header and
respective calls based on corresponding trace steps.
- Ensure that ADD_TRACES option is enabled for C code generator in case
Tracing feature is enabled. Ensured its disabled for all other
generators by default. Had to change contract of
GenericDomainInjectorProvider to accept an overriding module, and
replaced child injector usage in code generators with an overriding
module instead.
BeckmaR pushed a commit that referenced this issue Dec 15, 2017
- Add Tracing generator feature with parameters to trigger generation of
state-enter and state-exit callbacks.
- Enhanced C code generator to generate callbacks to required header and
respective calls based on corresponding trace steps.
- Ensure that ADD_TRACES option is enabled for C code generator in case
Tracing feature is enabled. Ensured its disabled for all other
generators by default. Had to change contract of
GenericDomainInjectorProvider to accept an overriding module, and
replaced child injector usage in code generators with an overriding
module instead.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants