package main

import (
	"cicv-data-closedloop/kinglong_msgs"
	"fmt"
)

func Topic() string {
	return "/nodefault_info"
}
func Label() string {
	return "enginefault"
}
func Rule(data *kinglong_msgs.FaultInfo) string {
	if string(Hex(int(data.ErrorCode))[2]) == "5" {
		return "enginefault"
	}
	return ""
}

func Hex(num int) string {
	return fmt.Sprintf("0x%x", num)
}
