-
Notifications
You must be signed in to change notification settings - Fork 0
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
FWT-124 FWT-149 We have made changes to ouR TOS #109
base: main
Are you sure you want to change the base?
FWT-124 FWT-149 We have made changes to ouR TOS #109
Conversation
…tializable::init().
…onversionLayer' into feature/aclowmclaughlin/threadxConversionLayer # Conflicts: # src/rtos/BytePool.cpp
…tePool pure abstract class that serves to hide the templated BytePool class when passing it into methods
…pposed to be, and added override keyword to all the inheritors of it.
…flect its flexibility.
…e convention. Switched the names of BytePool and BytePoolBase to more accurately reflect the inheritance structure. Created an enum for ThreadX error return values and switched Semaphore, Queue, and Mutex return values to that appropriate enum type.
…zable.hpp and Threadx.hpp.
…ctor and deconstructor.
…onversionLayer' into feature/aclowmclaughlin/threadxConversionLayer # Conflicts: # src/rtos/Threadx.cpp
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.
Some thoughts
samples/rtos/threadx-demo/main.cpp
Outdated
* Struct that holds the arguments for the controller thread | ||
*/ | ||
typedef struct controller_thread_args { | ||
rtos::Queue* queue; |
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.
Can you name this queue better? I don't really understand what it's for. Also, each member here should have a comment just like you would have in a class
Also don't forget to set the HAL timebase source to another timer before starting the kernel incase something (most the low level drivers) needs to wait for a period of time and doesn't call the TX_wait method. |
…tations of registerNotifyFunction from the classes that have that method, and added todos for them.
…onversionLayer' into feature/aclowmclaughlin/threadxConversionLayer
…onversionLayer' into feature/aclowmclaughlin/threadxConversionLayer
…onversionLayer' into feature/aclowmclaughlin/threadxConversionLayer
…onversionLayer' into feature/aclowmclaughlin/threadxConversionLayer
… up the example and added comments.
Authors: Rue & Diego
Implemented ThreadX conversion layer. Now, inside the core::rtos namespace, we have c++ objects that wrap the functionality of threadx's c structs. This means that hopefully, those working with RTOS in the future will never have to touch threadx directly. They will never have to sully their bright, beautiful minds with *shudder* complicated c pointer stuff.
Implemented:
BytePools
Threads
EventFlags
Mutexes
Queues
Semaphores
General Structure:
All of the threadx objects inherit from an initializable abstract class that basically just means they need to have an initialize function that registers them with the threadx kernel. This is important because we want to create the c++ objects before we start the kernel, but we have to register them with the kernel after the kernel has started, while the kernel is running.
Unimplemented:
Notification functions; some of the data types have notification functions, but due to c function pointer and c++ object member function weirdness it is difficult to create wrapper functions for these notification functions. The general framework for these notification functions is build into Initializable but is unimplemented for now.
Wrapper Classes:
In addition to our threadx wrappers, we are working towards thread-safe wrapper classes for our own common communication protocols. UARTTX (name courtesy of Diego), our thread-safe UART implementation, works on the surface exactly like normal UART, but actually buffers outputs and works with threadx to ensure thread safety. Plans are in place to create another wrapper like this for CAN and CANopen, possibly. Other communication protocols may be added in the event they become necessary.