#pragma once
#include <windows.h>
#include <stdio.h>

#include "CANIOControl.h"

#define DEBUG_MSG

class FitCANBus
{
public:
	FitCANBus(char* sComPortNumber);
	~FitCANBus();
	long init(int baudrate);
	long startReading(char mode, DWORD dAcr, DWORD dAmr);
	long FintekCanbus_SetId(DWORD id, FITAPI::CFitekCanBusControl::CanFrameFormat type);
	long writeMessage(FITAPI::CFitekCanBusControl::CanFrameInfor* msg);
private:
	char asComPortNumber[8];
	FITAPI::CFitekCanBusControl* hCan;
	FITAPI::CFitekCanBusControl::CanFrameFormat txType;
	DWORD txCanId;
};
