Skip to content

Added reactor name functions #302

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/reference/target-language-details.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2854,6 +2854,11 @@ Reactions in C can use a number of pre-defined functions, macros, and constants

- Schedule future events, such as `lf_schedule` and `lf_schedule_value` ([api.h](https://www.lf-lang.org/reactor-c/dc/d65/api_8h.html))

- **Reactor Names**

- `lf_reactor_name(self)`: Returns the name of the reactor that contains the current reaction. The name is that assigned upon instantiation. If the reactor is in a bank, then the name has a suffix of the form `[bank_index]`.
- `lf_reactor_full_name(self)`: Returns the full name of the reactor that contains the current reaction. This is the name of the reactor and all its parent reactors, separated by periods.

- **File Access**

- LF_SOURCE_DIRECTORY: A C string giving the full path to the directory containing the `.lf` file of the program.
Expand Down
Loading