1 /*****************************************************************
3 * Copyright 2011 - 2013 Intel Corporation All Rights Reserved.
5 * The source code contained or described herein and all documents related to the
6 * source code("Material") are owned by Intel Corporation or its suppliers or
7 * licensors.Title to the Material remains with Intel Corporation or its
8 * suppliers and licensors.The Material may contain trade secrets and proprietary
9 * and confidential information of Intel Corporation and its suppliers and
10 * licensors, and is protected by worldwide copyright and trade secret laws and
11 * treaty provisions.No part of the Material may be used, copied, reproduced,
12 * modified, published, uploaded, posted, transmitted, distributed, or disclosed
13 * in any way without Intels prior express written permission.
14 * No license under any patent, copyright, trade secret or other intellectual
15 * property right is granted to or conferred upon you by disclosure or delivery
16 * of the Materials, either expressly, by implication, inducement, estoppel or
17 * otherwise.Any license under such intellectual property rights must be
18 * express and approved by Intel in writing.
20 * Unless otherwise agreed by Intel in writing, you may not remove or alter this
21 * notice or any other notice embedded in Materials by Intel or Intels suppliers
22 * or licensors in any way.
23 *****************************************************************/
29 * @defgroup libcanbus libcanbus static library
30 * \brief SocketCAN based CAN bus library.
34 #include "canobserver.h"
37 * \brief Encapsulation of the raw CAN bus.
45 * @param observer Object derived from #CANObserver that will receive CAN bus frames
47 CANBus(CANObserver& observer);
51 * Starts the CAN bus instance on the specified interface
53 * @param name Name of the CAN bus network interface
54 * @return True if no error occurs.
56 virtual bool start(const char* name);
58 * Stops the CAN bus instance
63 * Sends standard(11bit) CAN frame over the bus
64 * @fn sendStandardFrame
65 * @param frame CAN frame to be sent
66 * @return True if frame was sent
68 virtual bool sendStandardFrame(const can_frame& frame);
70 * Sends extended(29bit) CAN frame over the bus
71 * @fn sendExtendedFrame
72 * @param frame CAN frame to be sent
73 * @return True if frame was sent
75 virtual bool sendExtendedFrame(const can_frame& frame);
80 * CANBus class private implementation