Skip to content
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

Remove/replace CFE_TIME_Copy macro #1499

Open
skliper opened this issue May 11, 2021 · 2 comments
Open

Remove/replace CFE_TIME_Copy macro #1499

skliper opened this issue May 11, 2021 · 2 comments

Comments

@skliper
Copy link
Contributor

skliper commented May 11, 2021

Is your feature request related to a problem? Please describe.
The stated purpose (copy across different structures with Second/Subsecond fields) really is better avoided by using a common time structure.

Describe the solution you'd like
Remove CFE_TIME_Copy, use CFE_TIME_SysTime_t which enables simple assignment (x = y), or replace with more type-safe/inline function.

Describe alternatives you've considered
None

Additional context
Code review

Requester Info
Jacob Hageman - NASA/GSFC

@jphickey
Copy link
Contributor

IIRC, the intent of doing this as a macro initially was because there were still some cases where a structure which was not CFE_TIME_SysTime_t had a "Seconds" and "Subseconds" field. In this case the non-type-specific aspect of the macro was desirable, as it would work with any struct that had a seconds and subseconds member, not required to be CFE_TIME_SysTime_t.

As long as all internal structs have been updated to CFE_TIME_SysTime_t then this should be doable, but I recall there might be a few cases still remaining of code storing seconds and subseconds without using the CFE_TIME_SysTime_t type.

@thnkslprpt
Copy link
Contributor

Note: #2246 should clear up the remaining cases, but need to confirm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants