﻿#include <stdio.h>
#include <iostream>

#include "honeywell_i300.hpp"
#include "stim300.hpp"

int main(int argc, char *argv[])
{
	int		type = 0; // 0 - i300, 1 - stim300
	std::string	log_file = "";

	// 参数检查
	if (argc == 1)
	{
		printf("\n");
		printf(" Usage : %s logfile type\n", argv[0]);
		printf("         logfile   log file\n");
		printf("         type      0 - i300, 1 - stim300, default is 0\n");
		printf("\n");
		return 0;
	}

	// 获取参数
	if (argc >= 2)
		log_file = std::string(argv[1]);
	if (argc >= 3)
		type     = atoi(argv[2]);

	// 转化
	if (type == 0)
		convert_hw_i300(log_file);
	else if (type == 1)
		convert_stim300(log_file);

	return 0;
}