1、工具制作用途
模仿DBC中对于Layout方案的模仿,先完成一些基本功能,数据导入和信号解析
2、工具UI
1、初始化CAN的布局
2、导入CAN Message信号
3、导入CAN Signal
1、初始化CANFD的布局
2、导入CANFD Message信号
3、导入CANFD Signal
3、工具代码
#region CAN CANFD layout
private void bt_InitCAN_Click(object sender, EventArgs e)
{
dBCLayoutDAL.InitCANLayout(dataGridViewCAN);
}
private void bt_InitCANFD_Click(object sender, EventArgs e)
{
dBCLayoutDAL.InitCANFDLayout(dataGridViewCAN);
}
private void bt_CANSet_Click(object sender, EventArgs e)
{
dBCLayoutDAL.SetCANMessage(textBox_CAN_Message.Text, dataGridViewCAN);
}
private void bt_CANFDSet_Click(object sender, EventArgs e)
{
dBCLayoutDAL.SetCANFDMessage(textBox_CANFD_Message.Text, dataGridViewCAN);
}
private void bt_SetSignal_Click(object sender, EventArgs e)
{
string m_Value = "";
dBCLayoutDAL.GetCANSingle((int)numericUpDown_CAN_StartBit.Value, (int)numericUpDown_CAN_Length.Value,
cB_CAN_ByteOrder.Text, ref m_Value, dataGridViewCAN);
}
private void bt_SetSignal_CANFD_Click(object sender, EventArgs e)
{
string m_Value = "";
dBCLayoutDAL.GetCANFDSingle((int)numericUpDown_CANFD_StartBit.Value, (int)numericUpDown_CANFD_Length.Value,
cB_CANFD_ByteOrder.Text, ref m_Value, dataGridViewCAN);
}
#endregion
4、后续开发计划
下一步就是将DBC读取解析导入到Layout,并且优先开发DBC比对工具。
标签:Layout,DBC,object,CANFD,private,CANTool,Value,dBCLayoutDAL,void From: https://blog.csdn.net/caoxuefei520/article/details/142426220