The following three plugins are part of Papyrus SW designer and are responsible for doing the instrumentation.
This plugin provides some functionality for instrumentation that is independent of a particular instrumentation technology such as BareCTF. The plugin contains the documentation (notably about specifying tracepoints) that is technology independent and this small developer information.
The plugin offers a couple of functions that are useful for specific trace implementations: This includes the definition of a name/instance configurator that is responsible for adding a name attribute and intializes it with the name of the corresponding instance specification in the deployment plan. This is useful to identify a particular instance in the moment that a trace event is produced. In addition, there are some utility functions and code that associate an event name with a tracepoint on a UML element. Even if introduced in the context of BareCTF, it is likely useful for other technologies as well. The utility function class TraceUtils enables the user to check whether a trace point is active on a specific element. This includes not only the trace points that are directly on the element, but also implicit tracepoints (indirectly calculated by the separate class ImplicitTrace). The latter correspond for instance to operations that do not have a trace point, but are part of class that has a tracepoint with the option "AllOperations".
The plugin contains the BareCTF specific instrumentation code, including the creation of a configuration file and suitable initialization code. The instrumentation is based on the modification of the opaque behaviors associated with an operation. The use of the class BehaviorUtil (in the standard designer transformation library) facilitates the addition of code at the beginning or end of a method. The instrumentation transformation is executed before the state-machine transformation. This implies that the tracing of state-machine related operations can be done by modifying (or creating) the entry/exit actions for states and effects in case of transitions.
The creation of the config.yaml file for BareCTF is based on xtend text templates. The creation of C code from this configuration file is done by an invocation of the barectf command line tool which must be installed (and accessible via the "PATH" variable) on the system of the user.