-
Notifications
You must be signed in to change notification settings - Fork 24
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
Update the SET
, tag
and schedule
APIs and deprecate old ones
#68
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nicely done with the _Pragma's for issuing warnings. I didn't know about that trick.
This is a unique opportunity to change the names of all these to something less likely to conflict, like lf_set
.
Also, it will be a tedious job, but all the tests and documentation examples will need to be changed.
Let's discuss to settle on the naming.
SET
APIs to lowercase and deprecate uppercase variantsSET
, tag
and schedule
APIs and deprecate old ones
This PR updates the
SET
,tag
andschedule
APIs with new signatures and deprecated out-of-date ones.Specifically, the following renames are performed:
Format:
old name -> new name
means that the API is renamed fromold name
tonew name
.old name
is still available in the current release, but will be removed in a future release.old name
(deprecated) means that theold name
has not been renamed, and will be removed in a future release.new name
(new) means that the API is introduced in the linked PR.SET
related APIs:SET
->lf_set
SET_ARRAY
(deprecated)SET_NEW
(deprecated)SET_NEW_ARRAY
(deprecated)SET_PRESENT
(deprecated)SET_TOKEN
->lf_set_token
SET_MODE
->lf_set_mode
lf_set_destructor
(new)lf_set_copy_constructor
(new)schedule
related APIs:schedule
->lf_schedule
schedule_int
->lf_schedule_int
schedule_token
->lf_schedule_token
schedule_copy
->lf_schedule_copy
schedule_value
->lf_schedule_value
check_deadline
->lf_check_deadline
tag_t
related APIs (WIP):lf_tag()
(new)lf_time(lf_time_flag flag)
(new)compare_tags
->lf_compare_tags
get_elapsed_logical_time
->lf_time(LF_ELAPSED_LOGICAL)
get_logical_time
->lf_time(LF_LOGICAL)
get_current_tag
->lf_tag
get_microstep
(deprecated)get_physical_time
->lf_time(LF_PHYSICAL)
get_elapsed_physical_time
->lf_time(LF_ELAPSED_PHYSICAL)
set_physical_clock_offset
->lf_set_physical_clock_offset
get_start_time
->lf_time(LF_START)
These are copied from lf-lang/lingua-franca#1108.
Please refer to that issue for the most up-to-date information