1717#include < array>
1818#include < cstdint>
1919
20- #include " error.hpp"
2120#include " functional.hpp"
2221#include " units.hpp"
2322
@@ -149,10 +148,10 @@ class can
149148 * @brief Configure this can bus port to match the settings supplied
150149 *
151150 * @param p_settings - settings to apply to can driver
152- * @return status - success or failure
151+ * @return void - success or failure
153152 * @throws std::errc::invalid_argument if the settings could not be achieved.
154153 */
155- [[nodiscard]] status configure (const settings& p_settings)
154+ void configure (const settings& p_settings)
156155 {
157156 return driver_configure (p_settings);
158157 }
@@ -176,11 +175,11 @@ class can
176175 * If this occurs, this function must be called to re-enable bus
177176 * communication.
178177 *
179- * @return status - success or failure. In the case this function fails
178+ * @return void - success or failure. In the case this function fails
180179 * repeatedly, it is advised to simply not use the bus anymore as something is
181180 * critical wrong and may not be recoverable.
182181 */
183- [[nodiscard]] status bus_on ()
182+ void bus_on ()
184183 {
185184 return driver_bus_on ();
186185 }
@@ -189,13 +188,13 @@ class can
189188 * @brief Send a can message
190189 *
191190 * @param p_message - the message to be sent
192- * @return result< send_t> - success or failure
191+ * @return send_t - success or failure
193192 * @throws std::errc::network_down - if the can device is in the "bus-off"
194193 * state. This can happen if a critical fault in the bus has occurred. A call
195194 * to `bus_on()` will need to be issued to attempt to talk on the bus again.
196195 * See `bus_on()` for more details.
197196 */
198- [[nodiscard]] result< send_t > send (const message_t & p_message)
197+ send_t send (const message_t & p_message)
199198 {
200199 return driver_send (p_message);
201200 }
@@ -216,9 +215,9 @@ class can
216215 virtual ~can () = default ;
217216
218217private:
219- virtual status driver_configure (const settings& p_settings) = 0;
220- virtual status driver_bus_on () = 0;
221- virtual result< send_t > driver_send (const message_t & p_message) = 0;
218+ virtual void driver_configure (const settings& p_settings) = 0;
219+ virtual void driver_bus_on () = 0;
220+ virtual send_t driver_send (const message_t & p_message) = 0;
222221 virtual void driver_on_receive (hal::callback<handler> p_handler) = 0;
223222};
224223} // namespace hal
0 commit comments