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

Retire EMC #52

Closed
machinekoder opened this issue Jan 14, 2016 · 8 comments
Closed

Retire EMC #52

machinekoder opened this issue Jan 14, 2016 · 8 comments

Comments

@machinekoder
Copy link
Member

EMC is still used in many places https://github.com/machinekit/machinetalk-protobuf/blob/master/src/machinetalk/protobuf/status.proto#L15 maybe a good time to retire that term.

@bobvanderlinden
Copy link
Contributor

It would be more consise. To test what would happen I used:

git reset --hard && sed -ri 's|EMC_(\w+)  |\1      |g' src/machinetalk/protobuf/*.proto && sed -ri 's|EMC_||g' src/machinetalk/protobuf/*.proto && sed -ri 's|Emc_?(\w+)  |\1     |g' src/machinetalk/protobuf/*.proto && sed -ri 's|Emc_?(\w+)|\1|g' src/machinetalk/protobuf/*.proto && sed -ri 's|EMC(MOT_\w+)|\1|gI' src/machinetalk/protobuf/*.proto && sed -ri 's|EMCCMD_(\w+)|CMD_\1|g' src/machinetalk/protobuf/*.proto && sed -ri 's|emc_(\w+)|\1|g' src/machinetalk/protobuf/*.proto && sed -ri 's|EMCSTAT_(\w+)|STAT_\1|g' src/machinetalk/protobuf/*.proto && grep -Ri 'emc' src

You can see the results here: https://github.com/bobvanderlinden/machinetalk-protobuf/tree/drop_emc

There was one issue with KinematicsType that is defined in preview.proto as well as status.proto. Alignment also isn't correct yet. That said, I don't know whether this will cause issues in Machinekit itself. .h files might have duplicate definitions without EMC_.

@machinekoder
Copy link
Member Author

Hmm, I think it should be replaced rather than removed. It's just that the term EMC is extremely outdated and nobody knows anyways what it means. Some suggestions? STACK, CNC, BLOB,...

@machinekoder
Copy link
Member Author

Looking at it: It actually does not look that bad without EMC at all. KinematicsType should probably be renamed to TrajectoryKinementaticsType to keep consistency.

@bobvanderlinden
Copy link
Contributor

CNC sounds alright. I'm not quite sure why it would be called STACK or BLOB?

@mhaberler
Copy link
Contributor

@Strahlex TrajectoryKinementaticsType does not make sense IMO as there is no intrinsic connection between the two concepts, or a NonTrajectoryKinementaticsType for that matter

@mhaberler
Copy link
Contributor

as for the reason why I kept the EMC* names:
there are enums in C/C++ code, and matching enums in proto files
that is an undesirable duplication asa they can get out of sync
my idea was that we eventually switch to all protobuf-generated enums in the code to get around the consistency issue

which is why I am decidedly lukewarm about the big rename because 'EMC' is old - it makes for a new learning curve when reading code without adding value

@machinekoder
Copy link
Member Author

Maybe an opportunity to fix #43 int the same pass. I don't think the EMC_ prefix is helping with readability.

@machinekoder
Copy link
Member Author

Well then PreviewKinematicsType might make sense.

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

No branches or pull requests

3 participants