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

Document behavior of SendCANMessage #31

Merged
merged 2 commits into from
Sep 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/main/native/include/rev/CANDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,22 @@ class CANDevice {

virtual int GetId() const = 0;

/**
* Start, stop, or update a periodic signal
*
* @param msg the message to send. See notes in periodMs.
* @param periodMs the period of the signal, 0, or -1. If this value is -1,
* the value of msg is irrelevant, and we stop any signals with the
* given id. If the value is 0, we queue a new message given by msg.
* This message will always be scheduled to be sent exactly once.
* If a repeating value is scheduled, passing 0 will cancel it.
* If this value is any positive value, schedule msg to be sent
* every periodMs milliseconds. If a message with this id was already
* scheduled to repeat, update the period and message contents. Note
* that this will not replace a message with periodMs set to 0.
*
* @return a CANStatus
*/
virtual CANStatus SendCANMessage(const CANMessage& msg, int periodMs) = 0;
virtual CANStatus ReceiveCANMessage(std::shared_ptr<CANMessage>& msg, uint32_t messageID, uint32_t messageMask) = 0;
virtual CANStatus OpenStreamSession(uint32_t* sessionHandle, CANBridge_CANFilter filter, uint32_t maxSize) = 0;
Expand Down
Loading