初始化
This commit is contained in:
324
CommunicationProtocol/BLV_Bootloader/BLV_Bootloader.vb
Normal file
324
CommunicationProtocol/BLV_Bootloader/BLV_Bootloader.vb
Normal file
@@ -0,0 +1,324 @@
|
||||
Imports System.ComponentModel
|
||||
Imports _485_BurningTool.CommunicationFlow
|
||||
Imports _485_BurningTool.RuningLog
|
||||
|
||||
Public MustInherit Class BLV_Bootloader
|
||||
Inherits CommunicationProtocol
|
||||
Public m_config As BLV_Bootloaderconfig
|
||||
Private SN As Integer
|
||||
Public m_flowdic As Dictionary(Of String, List(Of (Integer, Cmdconfig)))
|
||||
Enum CmdType
|
||||
<Description("等待回复")>
|
||||
WaitReply = 0
|
||||
<Description("处理回复")>
|
||||
ProcessReply = 1
|
||||
<Description("搜索命令")>
|
||||
SearchCommand = 192 'C0
|
||||
<Description("跳转命令")>
|
||||
skipCommand = 193
|
||||
<Description("设置参数")>
|
||||
SetUpParameters = 194
|
||||
<Description("写入Flash数据")>
|
||||
WriteFlashData = 195
|
||||
<Description("读取Flash数据")>
|
||||
ReadingFlashData = 196
|
||||
<Description("擦除Flash数据")>
|
||||
EraseFlashData = 197
|
||||
<Description("写入EEPROM数据")>
|
||||
WriteEEPROMData = 198
|
||||
<Description("读取EEPROM数据")>
|
||||
ReadingEEPROMData = 199
|
||||
<Description("擦除EEPROM数据")>
|
||||
EraseEEPROMData = 200
|
||||
<Description("校验命令")>
|
||||
CheckCommand = 201
|
||||
|
||||
End Enum
|
||||
|
||||
Enum WorkflowType
|
||||
none = 0
|
||||
<Description("搜索设备")>
|
||||
SearchEquipment = 192
|
||||
<Description("写入Flash")>
|
||||
FlashWrite = 195
|
||||
<Description("写入EEPROM")>
|
||||
EEPROMWrite = 198
|
||||
<Description("群写入Flash")>
|
||||
FlashGroupUpgrade
|
||||
|
||||
<Description("Boot搜索")>
|
||||
BootSearchEquipment
|
||||
|
||||
<Description("Boot搜索")>
|
||||
ReadingFlashData
|
||||
|
||||
|
||||
End Enum
|
||||
'自增SN号
|
||||
Public Function GetSN() As Integer
|
||||
If SN < 15 Then
|
||||
SN += 1
|
||||
Else
|
||||
SN = 0
|
||||
End If
|
||||
Console.WriteLine("SN:" & SN)
|
||||
Return SN
|
||||
End Function
|
||||
|
||||
|
||||
'创建协议类对象
|
||||
Public Shared Function CreateProtocol(communicationType As CommunicationType) As Object
|
||||
Select Case communicationType
|
||||
Case CommunicationType.SerialPort
|
||||
Return New SerialPort_BLV_Bootloader()
|
||||
Case CommunicationType.Udp
|
||||
Return New SerialPort_BLV_Bootloader()
|
||||
Case Else
|
||||
Return Nothing
|
||||
End Select
|
||||
End Function
|
||||
|
||||
|
||||
Public MustOverride Function PacketDataSearchCommand(ParamArray args() As String) As Byte()
|
||||
|
||||
|
||||
|
||||
Public MustOverride Function PacketDataSkipCommand(ParamArray args() As String) As Byte()
|
||||
|
||||
|
||||
|
||||
Public MustOverride Function PacketDataSetUpParameters(ParamArray args() As String) As Byte()
|
||||
|
||||
|
||||
|
||||
Public MustOverride Function PacketDataWriteFlashData(ParamArray args() As String) As Byte()
|
||||
|
||||
|
||||
|
||||
Public MustOverride Function PacketDataReadingFlashData(ParamArray args() As String) As Byte()
|
||||
|
||||
|
||||
Public MustOverride Function PacketDataEraseFlashData(ParamArray args() As String) As Byte()
|
||||
|
||||
|
||||
|
||||
Public MustOverride Function PacketDataWriteEEPROMData(ParamArray args() As String) As Byte()
|
||||
|
||||
|
||||
|
||||
Public MustOverride Function PacketDataReadingEEPROMData(ParamArray args() As String) As Byte()
|
||||
|
||||
|
||||
|
||||
Public MustOverride Function PacketDataEraseEEPROMData(ParamArray args() As String) As Byte()
|
||||
|
||||
|
||||
|
||||
Public MustOverride Function PacketDataCheckCommand(ParamArray args() As String) As Byte()
|
||||
Public MustOverride Sub SetUpgradeProgressProgressbar(gTable As DataGridView, addr As String, devtype As String, val As String, bcolor As Color, Optional RText_OutputText As RichTextBox = Nothing)
|
||||
Public MustOverride Sub NewSearchEquipmentProcess(Parameterlist As Parameterlist)
|
||||
Public MustOverride Sub NewBootSearchEquipmentProcess(Parameterlist As Parameterlist)
|
||||
Public MustOverride Sub OrdinaryOccurrenceCommand(Parameterlist As Parameterlist)
|
||||
|
||||
Public MustOverride Sub WorkflowTypeNone(Parameterlist As Parameterlist, ByRef isRuning As Boolean)
|
||||
Public MustOverride Sub NewUpgradeProcess(Parameterlist As Parameterlist)
|
||||
Public MustOverride Sub NewFlashGroupUpgrade(Parameterlist As Parameterlist)
|
||||
|
||||
Public MustOverride Sub NewSearchEquipmentProcess2(Parameterlist As Parameterlist)
|
||||
Public MustOverride Sub NewBootSearchEquipmentProcess2(Parameterlist As Parameterlist)
|
||||
Public MustOverride Sub NewUpgradeProcess2(Parameterlist As Parameterlist)
|
||||
Public MustOverride Sub NewFlashGroupUpgrade2(Parameterlist As Parameterlist)
|
||||
'获取固定流程
|
||||
Public Function GetImmobilizationWorkflow(g_WorkflowType As WorkflowType) As Boolean
|
||||
Dim li As New List(Of (number As Integer, Cmdconfig))
|
||||
Dim WorkflowName As String = DataProcessing.GetEnumDescription(g_WorkflowType)
|
||||
If Not m_flowdic.ContainsKey(WorkflowName) Then
|
||||
Select Case g_WorkflowType
|
||||
Case WorkflowType.SearchEquipment
|
||||
li.Add((0, New Cmdconfig({CmdType.SearchCommand, GetSN(), 0, 0, 10, 1})))
|
||||
Case WorkflowType.FlashWrite, WorkflowType.EEPROMWrite
|
||||
li.Add((0, New Cmdconfig({CmdType.SearchCommand, GetSN(), 0, 0, 10, 1})))
|
||||
li.Add((1, New Cmdconfig({CmdType.SearchCommand, GetSN(), 0, 0, 10, 1})))
|
||||
li.Add((2, New Cmdconfig({CmdType.SearchCommand, GetSN(), 0, 0, 10, 1})))
|
||||
li.Add((3, New Cmdconfig({CmdType.SearchCommand, GetSN(), 0, 0, 10, 1})))
|
||||
li.Add((4, New Cmdconfig({CmdType.SearchCommand, GetSN(), 0, 0, 10, 1})))
|
||||
li.Add((5, New Cmdconfig({CmdType.SearchCommand, GetSN(), 0, 0, 10, 1})))
|
||||
li.Add((6, New Cmdconfig({CmdType.SearchCommand, GetSN(), 0, 0, 10, 1})))
|
||||
'Case WorkflowType.EEPROMWrite
|
||||
' li.Add((0, New Cmdconfig({CmdType.SearchCommand, GetSN(), 0, 0, 10, 1})))
|
||||
' li.Add((0, New Cmdconfig({CmdType.SearchCommand, GetSN(), 0, 0, 10, 1})))
|
||||
End Select
|
||||
End If
|
||||
|
||||
End Function
|
||||
'创建Cmdconfig 节点
|
||||
|
||||
|
||||
|
||||
|
||||
'升级流程
|
||||
Public MustOverride Function UpgradeProcess(g_Cmdconfig As List(Of (number As Integer, Cmdconfig)), ParamArray args() As Object) As String
|
||||
|
||||
'搜索流程
|
||||
''' <summary>
|
||||
''' 搜索设备流程
|
||||
''' </summary>
|
||||
''' <param name="args">超时时间、表格控件、打印控件 </param>
|
||||
''' <returns></returns>
|
||||
Public MustOverride Function SearchEquipmentProcess(g_Cmdconfig As Cmdconfig, ParamArray args() As Object) As Boolean
|
||||
'开始时间
|
||||
|
||||
'写入Flash流程
|
||||
|
||||
Public Function FlashWriteProcess(ParamArray args() As String) As Boolean
|
||||
|
||||
End Function
|
||||
'写入EEPROM流程
|
||||
Public Function EEPROMWriteProcess(ParamArray args() As String) As Boolean
|
||||
|
||||
End Function
|
||||
|
||||
Public Overrides Function Runing(Parameterlist As Parameterlist, ByRef isRuning As Boolean) As Boolean
|
||||
Try
|
||||
m_Transmitter.mCommunicationFlow = Me
|
||||
If Parameterlist.CommunicationTypeIndex = 1 Then
|
||||
Select Case Parameterlist.Action
|
||||
Case WorkflowType.SearchEquipment
|
||||
NewSearchEquipmentProcess(Parameterlist) '搜索设备流程 False
|
||||
Case WorkflowType.FlashWrite
|
||||
NewUpgradeProcess(Parameterlist) '群组升级流程
|
||||
Case WorkflowType.EEPROMWrite
|
||||
Case WorkflowType.FlashGroupUpgrade
|
||||
'Console.WriteLine(Parameterlist)
|
||||
NewFlashGroupUpgrade(Parameterlist) 'flash组升级流程
|
||||
Case WorkflowType.BootSearchEquipment
|
||||
NewBootSearchEquipmentProcess(Parameterlist) 'boot搜索流程 true
|
||||
Case WorkflowType.ReadingFlashData
|
||||
OrdinaryOccurrenceCommand(Parameterlist)
|
||||
Case WorkflowType.none
|
||||
WorkflowTypeNone(Parameterlist, isRuning)
|
||||
|
||||
End Select
|
||||
ElseIf Parameterlist.CommunicationTypeIndex = 2 Then
|
||||
Select Case Parameterlist.Action
|
||||
Case WorkflowType.SearchEquipment
|
||||
NewSearchEquipmentProcess2(Parameterlist)
|
||||
Case WorkflowType.FlashWrite
|
||||
NewUpgradeProcess2(Parameterlist)
|
||||
Case WorkflowType.EEPROMWrite
|
||||
Case WorkflowType.FlashGroupUpgrade
|
||||
'Console.WriteLine(Parameterlist)
|
||||
NewFlashGroupUpgrade2(Parameterlist)
|
||||
Case WorkflowType.BootSearchEquipment
|
||||
NewBootSearchEquipmentProcess2(Parameterlist)
|
||||
Case WorkflowType.none
|
||||
WorkflowTypeNone(Parameterlist, isRuning)
|
||||
End Select
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
AddQueue(Parameterlist.RText_OutputText, New RuningLogConfig($"线程运行错误:{ ex.Message }", Color.Red))
|
||||
Return False
|
||||
'OutputLogsToTheControl(Parameterlist.RText_OutputText, New RuningLogConfig($"线程运行错误:{ ex.Message }", Color.Red), 1)
|
||||
End Try
|
||||
|
||||
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Public Class BLV_Bootloaderconfig
|
||||
'搜索设备流程开关
|
||||
Public SearchEquipmentProcessSwitch As Boolean = False
|
||||
'升级流程开关
|
||||
Public UpgradeProcessSwitch As Boolean = False
|
||||
|
||||
'己方地址
|
||||
Public MyAddress As Byte = 0
|
||||
''接受者类型
|
||||
Public ReceiverType As Byte = 0
|
||||
|
||||
'设备类型
|
||||
Public DeviceType As Byte = 0
|
||||
'对方地址
|
||||
Public ReceiverAddress As Byte = 0
|
||||
'单发开关
|
||||
Public SingleSwitch As Boolean = False
|
||||
'重发开关
|
||||
Public ResendSwitch As Boolean = False
|
||||
|
||||
'校验和
|
||||
Sub New()
|
||||
MyAddress = 0
|
||||
ReceiverType = 96
|
||||
DeviceType = 0
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
'''
|
||||
''' </summary>
|
||||
''' <param name="args"></param>
|
||||
''' <returns></returns>
|
||||
Public Function SetProtocolParam(ParamArray args() As String) As String
|
||||
Dim msgstr As String = ""
|
||||
Try
|
||||
MyAddress = CByte(args(0))
|
||||
Dim nbuf() As String = args(1).Split(",")
|
||||
If nbuf.Length < 3 OrElse Not SetReceiverType(nbuf(0), nbuf(1), nbuf(2), msgstr) Then Return False
|
||||
DeviceType = CByte(args(2))
|
||||
ReceiverAddress = CByte(args(3))
|
||||
|
||||
Catch ex As Exception
|
||||
msgstr = " set protocol parameters fail "
|
||||
End Try
|
||||
Return msgstr
|
||||
End Function
|
||||
'
|
||||
|
||||
|
||||
'设置接受者类型数据
|
||||
'addr:1群发,0单发
|
||||
'resend:1重发,0不重发
|
||||
Public Function SetReceiverType(addr As Boolean, resend As Boolean, SN As Integer, ByRef Optional msgstr As String = "") As Boolean
|
||||
Dim nReceiverType As Byte = 0
|
||||
If SN > 15 AndAlso SN < 0 Then
|
||||
msgstr = "The communication protocol SN of the BLV_Bootloader is incorrect:SN=" & SN
|
||||
Return False
|
||||
End If
|
||||
If addr Then
|
||||
nReceiverType = nReceiverType Or (1 << 7)
|
||||
End If
|
||||
If resend Then
|
||||
'SN = ReceiverType
|
||||
nReceiverType = nReceiverType Or (1 << 6)
|
||||
Else
|
||||
ResendSwitch = True
|
||||
End If
|
||||
nReceiverType = nReceiverType Or SN
|
||||
ReceiverType = nReceiverType
|
||||
Return True
|
||||
End Function
|
||||
'设置接受者类型数据
|
||||
'addr:1群发,0单发
|
||||
'resend:1重发,0不重发
|
||||
Public Function SetReceiverType1(addr As Boolean, resend As Boolean, SN As Integer, ByRef Optional msgstr As String = "") As Boolean
|
||||
Dim nReceiverType As Byte = 0
|
||||
If SN > 15 AndAlso SN < 0 Then
|
||||
msgstr = "The communication protocol SN of the BLV_Bootloader is incorrect:SN=" & SN
|
||||
Return False
|
||||
End If
|
||||
If addr Then
|
||||
nReceiverType = nReceiverType Or (1 << 7)
|
||||
End If
|
||||
If resend Then
|
||||
SN = ReceiverType '
|
||||
nReceiverType = nReceiverType Or (1 << 6)
|
||||
Else
|
||||
ResendSwitch = True
|
||||
End If
|
||||
nReceiverType = nReceiverType Or SN
|
||||
ReceiverType = nReceiverType
|
||||
Return True
|
||||
End Function
|
||||
End Class
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
185
CommunicationProtocol/CommunicationProtocol.vb
Normal file
185
CommunicationProtocol/CommunicationProtocol.vb
Normal file
@@ -0,0 +1,185 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Reflection
|
||||
Imports System.Threading
|
||||
Imports _485_BurningTool.CommunicationFlow
|
||||
|
||||
Public MustInherit Class CommunicationProtocol
|
||||
' Inherits CommunicationFlow
|
||||
|
||||
'创建通信协议对象
|
||||
'Public m_CommunicationProtocol As CommunicationProtocol
|
||||
''创建运行线程
|
||||
'Public m_RunThread As Thread
|
||||
'通信发送器对象
|
||||
Public m_Transmitter As Transmitter
|
||||
Public UpdateUIqueue As Queue(Of (Control, RuningLogConfig, lev As Integer))
|
||||
|
||||
Public Shared Function CreateAbstractObject(communicationType As CommunicationType, protocolType As ProtocolEnum) As CommunicationProtocol
|
||||
Select Case protocolType
|
||||
Case ProtocolEnum.BLV_Bootloader
|
||||
Return BLV_Bootloader.CreateProtocol(communicationType)
|
||||
Case Else
|
||||
Return Nothing
|
||||
End Select
|
||||
|
||||
End Function
|
||||
Public Sub AddQueue(c As Control, rl As RuningLogConfig, Optional lev As Integer = 0)
|
||||
If IsNothing(UpdateUIqueue) OrElse IsNothing(c) OrElse IsNothing(rl) Then Return
|
||||
UpdateUIqueue.Enqueue((c, rl, lev))
|
||||
End Sub
|
||||
'组装对应命令数据
|
||||
Public MustOverride Function AssembleCommandData(command As Integer, ParamArray args() As String) As Byte()
|
||||
Public MustOverride Function CheckData(data As Byte()) As Boolean
|
||||
'设置通信协议参数
|
||||
Public MustOverride Sub SetProtocolParam(ParamArray args() As String)
|
||||
Public MustOverride Sub SetSearchEquipmentProcessSwitch(iswitch As Boolean)
|
||||
|
||||
'Public MustOverride Sub SendCommand(command As Cmdconfig)
|
||||
|
||||
Public MustOverride Function MainProcess(g_WorkflowType As Integer, g_Cmdconfig As List(Of (number As Integer, Cmdconfig)), ParamArray args() As Object) As Boolean
|
||||
'解析接收数据
|
||||
Public MustOverride Function ParseReceiveData(gCmdconfig As Cmdconfig, data As Byte()) As Boolean
|
||||
Public MustOverride Function ParseReceiveData2(gCmdconfig As Cmdconfig, data As Byte()) As Boolean
|
||||
Public MustOverride Function Runing(Parameterlist As Parameterlist, ByRef Isruning As Boolean) As Boolean
|
||||
|
||||
'Private Sub Runingthread(ParamArray args() As Object)
|
||||
|
||||
'End Sub
|
||||
|
||||
'Public Function RuningMainProcess(g_WorkflowType As Integer, g_Cmdconfig As List(Of (number As Integer, Cmdconfig)), ParamArray args() As Object) As Boolean
|
||||
' '判断线程是否创建
|
||||
' If m_RunThread Is Nothing Then
|
||||
' '创建线程
|
||||
' m_RunThread = New Thread(New ParameterizedThreadStart(AddressOf Runingthread))
|
||||
' m_RunThread.Start((g_WorkflowType, g_Cmdconfig, args))
|
||||
|
||||
' '启动线程
|
||||
' m_RunThread.Start()
|
||||
' Else
|
||||
' '判断线程是否运行
|
||||
' If m_RunThread.IsAlive Then
|
||||
' ' 关闭线程
|
||||
' m_RunThread.Abort()
|
||||
|
||||
' End If
|
||||
' '创建线程
|
||||
' 'm_RunThread = New Thread(AddressOf MainProcess)
|
||||
' '启动线程
|
||||
' m_RunThread.Start()
|
||||
' End If
|
||||
'End Function
|
||||
'Public Sub StopRuningMainProcess()
|
||||
' If m_RunThread Is Nothing Then
|
||||
' Exit Sub
|
||||
' Else
|
||||
' If m_RunThread.IsAlive Then
|
||||
' m_RunThread.Abort()
|
||||
' End If
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
End Class
|
||||
|
||||
'命令发送信息类
|
||||
Public Class Cmdconfig
|
||||
|
||||
'命令类型
|
||||
Public CmdValue As Integer
|
||||
'命令参数数组
|
||||
Public CmdArgs As List(Of Object)
|
||||
'发送SN号
|
||||
Public CmdSN As Integer
|
||||
'发送重发次数
|
||||
Public CmdSendCount As Integer
|
||||
'发送次数
|
||||
Public CmdSendCountNow As Integer
|
||||
'持续发生时间
|
||||
Public CmdSendcontinueTime As Integer
|
||||
'发送间隔时间
|
||||
Public CmdSendInterval As Integer
|
||||
'发送命令
|
||||
Public CmdSendData As Byte()
|
||||
'接收命令集合 时间+数据
|
||||
Public CmdReceiveData As List(Of (DateTime, Byte()))
|
||||
'接收命令超时 秒
|
||||
Public CmdReceiveTimeout As Integer
|
||||
'接收命令校验
|
||||
Public CmdReceiveCheck As Boolean
|
||||
'接收命令状态
|
||||
Public CmdReceiveStatus As Boolean
|
||||
|
||||
'接收命令错误信息
|
||||
Public CmdReceiveError As String
|
||||
'发送命令时间
|
||||
Public CmdSendTime As DateTime
|
||||
|
||||
'针对升级写入的序号
|
||||
Public CmdWriteIndex As Integer
|
||||
|
||||
'协议对象
|
||||
Public Protocol As CommunicationProtocol
|
||||
'节点创建时间
|
||||
Public NodeCreateTime As DateTime
|
||||
|
||||
'附加其他协议列表
|
||||
Public OtherProtocol As UDPCommunicationnode
|
||||
|
||||
|
||||
|
||||
'创建对象并设置对应类中变量
|
||||
|
||||
Sub New(args() As Integer)
|
||||
CmdValue = Integer.Parse(args(0))
|
||||
CmdSN = Integer.Parse(args(1))
|
||||
CmdSendCount = Integer.Parse(args(2))
|
||||
CmdSendInterval = Integer.Parse(args(3))
|
||||
CmdReceiveData = New List(Of (DateTime, Byte()))
|
||||
CmdReceiveTimeout = Integer.Parse(args(4))
|
||||
CmdArgs = New List(Of Object)
|
||||
CmdSendTime = DateTime.Now
|
||||
NodeCreateTime = DateTime.Now
|
||||
CmdWriteIndex = 0
|
||||
CmdSendcontinueTime = 0
|
||||
CmdSendCountNow = 0
|
||||
OtherProtocol = New UDPCommunicationnode
|
||||
End Sub
|
||||
'设置发送持续时间
|
||||
Public Sub setCmdSendcontinueTime(iswitch As Integer)
|
||||
CmdSendcontinueTime = iswitch
|
||||
End Sub
|
||||
Public Sub setCmdReceiveStatus(iswitch As Boolean)
|
||||
CmdReceiveStatus = iswitch
|
||||
End Sub
|
||||
Public Sub SetProtocol(nProtocol As CommunicationProtocol)
|
||||
Protocol = nProtocol
|
||||
End Sub
|
||||
Sub New()
|
||||
CmdReceiveData = New List(Of (DateTime, Byte()))
|
||||
CmdArgs = New List(Of Object)
|
||||
End Sub
|
||||
|
||||
Public Sub setUDPCommunicationnode()
|
||||
OtherProtocol.UDP_TRANSPARENT_MODE_COMMAND_REPLY_STATUS = 0
|
||||
OtherProtocol.UDP_TRANSPARENT_MODE_COMMAND_REPLY_RESULT = 0
|
||||
OtherProtocol.UDP_QUERY_HOST_CURRENT_MODE_COMMAND_REPLY_STATUS = 0
|
||||
OtherProtocol.UDP_QUERY_HOST_CURRENT_MODE_COMMAND_REPLY_RESULT = 0
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class UDPCommunicationnode
|
||||
'透传模式命令回复状态
|
||||
Public UDP_TRANSPARENT_MODE_COMMAND_REPLY_STATUS As Integer = 0
|
||||
'透传模式命令回复结果
|
||||
Public UDP_TRANSPARENT_MODE_COMMAND_REPLY_RESULT As Integer = 0
|
||||
'查询主机当前模式命令回复状态
|
||||
Public UDP_QUERY_HOST_CURRENT_MODE_COMMAND_REPLY_STATUS As Integer = 0
|
||||
'查询主机当前模式命令回复结果
|
||||
Public UDP_QUERY_HOST_CURRENT_MODE_COMMAND_REPLY_RESULT As Integer = 0
|
||||
Sub New()
|
||||
UDP_TRANSPARENT_MODE_COMMAND_REPLY_STATUS = 0
|
||||
UDP_TRANSPARENT_MODE_COMMAND_REPLY_RESULT = 0
|
||||
UDP_QUERY_HOST_CURRENT_MODE_COMMAND_REPLY_STATUS = 0
|
||||
UDP_QUERY_HOST_CURRENT_MODE_COMMAND_REPLY_RESULT = 0
|
||||
End Sub
|
||||
End Class
|
||||
14
CommunicationProtocol/CommunicationProtocolController.vb
Normal file
14
CommunicationProtocol/CommunicationProtocolController.vb
Normal file
@@ -0,0 +1,14 @@
|
||||
''通信协议基类
|
||||
'通信协议基类只负责
|
||||
'1. 通信协议 命令组包
|
||||
'2. 通信协议 解包
|
||||
'3. 通信协议 命令解析
|
||||
'4. 通信协议 命令执行
|
||||
'5. 通信协议 命令返回
|
||||
|
||||
Public Class CommunicationProtocolController
|
||||
|
||||
Dim m_CommunicationProtocol As CommunicationProtocol
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user