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 * \addtogroup libcanbus
33 #include <linux/can.h>
36 * \brief Interface. Receives notifications about the CAN bus traffic and errors.
38 * CANBus user has to derive from this interface.
46 * General CAN bus error. Currently only GENERAL_ERROR is specified.
54 virtual ~CANObserver(){} /*LCOV_EXCL_LINE*/
56 * Called when error occurred on the bus.
58 * @param error Bus error code
60 virtual void errorOccured(CANObserver::CANError error) = 0; /* socket error */
62 * Called when standard frame was is received from the bus.
63 * @fn standardFrameReceived
64 * @param frame Received frame
66 virtual void standardFrameReceived(const can_frame& frame) = 0; /* SFF was present */
68 * Called when extended frame was is received from the bus.
69 * @fn extendedFrameReceived
70 * @param frame Received frame
72 virtual void extendedFrameReceived(const can_frame& frame) = 0; /* EFF was present */
74 * Called when error frame was received from the bus.
75 * @fn errorFrameReceived
76 * @param frame Error frame
78 virtual void errorFrameReceived(const can_frame& frame) = 0; /* error frame */
80 * Called when remote transmission frame was received from the bus.
81 * @fn remoteTransmissionRequest
82 * @param frame RTR frame
84 virtual void remoteTransmissionRequest(const can_frame& frame) = 0; /* remote transmission request (SFF/EFF is still present)*/
88 #endif // CANOBSERVER_H