Public Class Axis
   Inherits VMBase

   Private m_Name As String
   Public ReadOnly Property sName As String
      Get
         Return m_Name
      End Get
   End Property

   Private m_Value As Double
   Public ReadOnly Property sValue As Double
      Get
         Return m_Value
      End Get
   End Property

   Friend Sub SetValue(value As Double)
      m_Value = value
      NotifyPropertyChanged(NameOf(sValue))
   End Sub

   Public Sub New(Name As String)
      m_Name = Name
   End Sub

End Class

Class Alarm

   Private m_sCode As String
   Public ReadOnly Property sCode As String
      Get
         Return m_sCode
      End Get
   End Property

   Private m_sMessage As String
   Public ReadOnly Property sMessage As String
      Get
         Return m_sMessage
      End Get
   End Property

   Protected Sub New()
   End Sub

   Public Shared Function CreateAlarm(Code As String, Message As String) As Alarm
      Dim NewAlarm As New Alarm
      NewAlarm.m_sCode = Code
      NewAlarm.m_sMessage = Message
      Return NewAlarm
   End Function

End Class