Multifixes: class and methods, typo, comments
[apps/low-level-can-service.git] / src / can_decode_message.cpp
index a28fa18..f5f530e 100644 (file)
  * limitations under the License.
  */
 
-#include <linux/can.h>
-#include <linux/can/raw.h>
-#include <queue>
-#include <sys/timeb.h>
-
-#include <afb/afb-binding.h>
-
-#include "can-utils.hpp"
-#include "can-decoder.hpp"
-#include "openxc.pb.h"
-#include "openxc-utils.hpp"
+#include "low-can-binding.hpp"
 
 void can_decode_message(can_bus_t &can_bus)
 {
@@ -36,16 +26,15 @@ void can_decode_message(can_bus_t &can_bus)
        openxc_VehicleMessage vehicle_message;
        openxc_DynamicField search_key, ret;
        bool send = true;
-       
+
        decoder_t decoder();
 
        while(true)
        {
-               if(can_message = can_bus.next_can_message())
+               if(can_message = can_bus.next_can_message(interface))
                {
                        /* First we have to found which CanSignal is */
                        search_key = build_DynamicField(openxc_DynamicField_Type::openxc_DynamicField_Type_NUM, (double)can_message.get_id())
-
                        signals = find_can_signals(search_key);
                        
                        /* Decoding the message ! Don't kill the messenger ! */