Add a new command - NTU-ALComLab/LSV-PA GitHub Wiki
There are several ways to add new commands. We recommend students to follow this readme to create an external package for the new commands.
You can refer to the following code snippet:
In short, we have to create an object of type Abc_FrameInitializer_t
whose data members point to functions init
and destroy
.
The function init
will add commands to the frame (Abc_Frame_t
).
The function destroy
will be called before the external package is shut down.
The best thing about this method is that you don't need to change other parts of ABC except your own package. It is more flexible and less error-prone for beginners.
Implementing commands for the PAs
There is no restriction about how you implement the commands for the PAs. You can define new functions or new classes in new files. Although strongly discouraged, you can even modify existing functions or classes to meet your needs.