1717#include < array>
1818#include < cstdint>
1919
20- #include " error.hpp"
2120#include " functional.hpp"
2221#include " units.hpp"
2322
@@ -149,10 +148,9 @@ 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
153151 * @throws std::errc::invalid_argument if the settings could not be achieved.
154152 */
155- [[nodiscard]] status configure (const settings& p_settings)
153+ void configure (const settings& p_settings)
156154 {
157155 return driver_configure (p_settings);
158156 }
@@ -176,11 +174,9 @@ class can
176174 * If this occurs, this function must be called to re-enable bus
177175 * communication.
178176 *
179- * @return status - success or failure. In the case this function fails
180- * repeatedly, it is advised to simply not use the bus anymore as something is
181- * critical wrong and may not be recoverable.
177+ * @return throw - TBD
182178 */
183- [[nodiscard]] status bus_on ()
179+ void bus_on ()
184180 {
185181 return driver_bus_on ();
186182 }
@@ -189,13 +185,13 @@ class can
189185 * @brief Send a can message
190186 *
191187 * @param p_message - the message to be sent
192- * @return result< send_t> - success or failure
188+ * @return send_t - Nothing currently
193189 * @throws std::errc::network_down - if the can device is in the "bus-off"
194190 * state. This can happen if a critical fault in the bus has occurred. A call
195191 * to `bus_on()` will need to be issued to attempt to talk on the bus again.
196192 * See `bus_on()` for more details.
197193 */
198- [[nodiscard]] result< send_t > send (const message_t & p_message)
194+ send_t send (const message_t & p_message)
199195 {
200196 return driver_send (p_message);
201197 }
@@ -216,9 +212,9 @@ class can
216212 virtual ~can () = default ;
217213
218214private:
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;
215+ virtual void driver_configure (const settings& p_settings) = 0;
216+ virtual void driver_bus_on () = 0;
217+ virtual send_t driver_send (const message_t & p_message) = 0;
222218 virtual void driver_on_receive (hal::callback<handler> p_handler) = 0;
223219};
224220} // namespace hal
0 commit comments