415ae0a39c
Creazione cartela MachLog
62 lines
2.6 KiB
VB.net
62 lines
2.6 KiB
VB.net
Public Class MachLog
|
|
|
|
Private m_CommandType As CommandTypes
|
|
Private m_CommandState As CommandStates
|
|
Private m_ResultType As ResultTypes
|
|
Private m_Description As String
|
|
Private m_AlarmOperation As Integer
|
|
Private m_AlarmType As Integer
|
|
Private m_AlarmMessage As String
|
|
Private m_AlarmCode As String
|
|
Private m_AlarmDateTime As String
|
|
Private m_newOpState As Integer
|
|
Private m_CommandExecutedCorrectly As Boolean
|
|
Private m_VarAddress As String
|
|
Private m_VarValue As String
|
|
|
|
Public Delegate Sub ResultCallbackDlg(CommandType As CommandTypes, CommandState As CommandStates, ResultType As ResultTypes, Description As String)
|
|
Public Delegate Sub AlarmCallbackDlg(AlarmOperation As Integer, AlarmType As Integer, AlarmMessage As String, AlarmCode As String, AlarmDateTime As String)
|
|
Public Delegate Sub OpStateCallbackDlg(newOpState As Integer)
|
|
Public Delegate Sub ReadVarCallbackDlg(CommandExecutedCorrectly As Boolean, VarAddress As String, VarValue As String)
|
|
|
|
Protected Sub New()
|
|
End Sub
|
|
|
|
Friend Shared Function CreateResultLog(CommandType As CommandTypes, CommandState As CommandStates, ResultType As ResultTypes, Description As String)
|
|
Dim NewMachLog As New MachLog
|
|
NewMachLog.m_CommandType = CommandType
|
|
NewMachLog.m_CommandState = CommandState
|
|
NewMachLog.m_ResultType = ResultType
|
|
NewMachLog.m_Description = Description
|
|
Return NewMachLog
|
|
End Function
|
|
|
|
Friend Shared Function CreateAlarmLog(CommandType As CommandTypes, AlarmOperation As Integer, AlarmType As Integer, AlarmMessage As String, AlarmCode As String, AlarmDateTime As String)
|
|
Dim NewMachLog As New MachLog
|
|
NewMachLog.m_CommandType = CommandType
|
|
NewMachLog.m_AlarmOperation = AlarmOperation
|
|
NewMachLog.m_AlarmType = AlarmType
|
|
NewMachLog.m_AlarmMessage = AlarmMessage
|
|
NewMachLog.m_AlarmCode = AlarmCode
|
|
NewMachLog.m_AlarmDateTime = AlarmDateTime
|
|
Return NewMachLog
|
|
End Function
|
|
|
|
Friend Shared Function CreateOPStateLog(CommandType As CommandTypes, newOpState As Integer)
|
|
Dim NewMachLog As New MachLog
|
|
NewMachLog.m_CommandType = CommandType
|
|
NewMachLog.m_newOpState = newOpState
|
|
Return NewMachLog
|
|
End Function
|
|
|
|
Friend Shared Function CreateAlarmLog(CommandType As CommandTypes, CommandExecutedCorrectly As Boolean, VarAddress As String, VarValue As String)
|
|
Dim NewMachLog As New MachLog
|
|
NewMachLog.m_CommandType = CommandType
|
|
NewMachLog.m_AlarmOperation = CommandExecutedCorrectly
|
|
NewMachLog.m_AlarmType = VarAddress
|
|
NewMachLog.m_AlarmMessage = VarValue
|
|
Return NewMachLog
|
|
End Function
|
|
|
|
End Class
|