
'''
THIS FILE IS AUTOGENERATED, DO NOT EDIT!!!
'''

from datetime import datetime
from enum import IntEnum
import uuid

from opcua import ua


class ChannelType(IntEnum):

    '''
    ChannelType EnumInt autogenerated from xml
    '''

    Universal = 0
    Pressure = 1
    Customizable = 2


class InputSignalCategory(IntEnum):

    '''
    InputSignalCategory EnumInt autogenerated from xml
    '''

    Unassigned = 0
    MeasuringStart = 1
    MeasuringStop = 2
    CycleEnd = 3
    SwitchOverPoint = 4
    CycleEvent = 5


class MoldTypeEnumeration(IntEnum):

    '''
    MoldTypeEnumeration EnumInt autogenerated from xml
    '''

    NormalMold = 0
    MultiComponentMold = 1
    RTMMold = 2


class SetupChangeType(IntEnum):

    '''
    SetupChangeType EnumInt autogenerated from xml
    '''

    SetupLoaded = 0
    SetupChanged = 1
    SetupCreated = 2
    SetupUnloaded = 3
    SetupImported = 4


class StopConditionType(IntEnum):

    '''
    StopConditionType EnumInt autogenerated from xml
    '''

    Time = 0
    StartSignal = 1
    StopSignal = 2


class ChannelIdDataType(object):

    '''
    ChannelIdDataType structure autogenerated from xml
    '''

    ua_types = [
        ('Id', 'Int16'),
        ('Type', 'ChannelType'),
    ]
    def __str__(self):
        vals = [name + ": " + str(val) for name, val in self.__dict__.items()]
        return self.__class__.__name__ + "(" + ", ".join(vals) + ")"

    __repr__ = __str__

    def __init__(self):
        self.Id = 0
        self.Type = ua.ChannelType(2)


class CurveDataType(object):

    '''
    CurveDataType structure autogenerated from xml
    '''

    ua_switches = {
        'Description': ('BitEncoding0', 0), 
    }
    ua_types = [
        ('BitEncoding0', 'UInt32'),
        ('ChannelId', 'ChannelIdDataType'),
        ('Data', 'ListOfCurvePointDataType'),
        ('Description', 'CharArray'),
    ]
    def __str__(self):
        vals = [name + ": " + str(val) for name, val in self.__dict__.items()]
        return self.__class__.__name__ + "(" + ", ".join(vals) + ")"

    __repr__ = __str__

    def __init__(self):
        self.BitEncoding0 = 0
        self.ChannelId = ua.ChannelIdDataType()
        self.Data = []
        self.Description = ''


class CurvePointDataType(object):

    '''
    CurvePointDataType structure autogenerated from xml
    '''

    ua_types = [
        ('Time', 'Double'),
        ('Data', 'Double'),
    ]
    def __str__(self):
        vals = [name + ": " + str(val) for name, val in self.__dict__.items()]
        return self.__class__.__name__ + "(" + ", ".join(vals) + ")"

    __repr__ = __str__

    def __init__(self):
        self.Time = 0
        self.Data = 0


class DigitalSignalChangeDataType(object):

    '''
    DigitalSignalChangeDataType structure autogenerated from xml
    '''

    ua_types = [
        ('Id', 'InputSignalIdDataType'),
        ('Time', 'Double'),
    ]
    def __str__(self):
        vals = [name + ": " + str(val) for name, val in self.__dict__.items()]
        return self.__class__.__name__ + "(" + ", ".join(vals) + ")"

    __repr__ = __str__

    def __init__(self):
        self.Id = ua.InputSignalIdDataType()
        self.Time = 0


class InputSignalIdDataType(object):

    '''
    InputSignalIdDataType structure autogenerated from xml
    '''

    ua_types = [
        ('Category', 'InputSignalCategory'),
        ('SubId', 'SignalSubIdDataType'),
    ]
    def __str__(self):
        vals = [name + ": " + str(val) for name, val in self.__dict__.items()]
        return self.__class__.__name__ + "(" + ", ".join(vals) + ")"

    __repr__ = __str__

    def __init__(self):
        self.Category = ua.InputSignalCategory(5)
        self.SubId = ua.SignalSubIdDataType()


class ProcessValueType(object):

    '''
    ProcessValueType structure autogenerated from xml
    '''

    ua_switches = {
        'cavityId': ('BitEncoding0', 0), 
        'description': ('BitEncoding0', 1), 
    }
    ua_types = [
        ('BitEncoding0', 'UInt32'),
        ('name', 'CharArray'),
        ('value', 'Double'),
        ('assignment', 'UInt32'),
        ('source', 'UInt32'),
        ('cavityId', 'UInt32'),
        ('id', 'CharArray'),
        ('description', 'CharArray'),
    ]
    def __str__(self):
        vals = [name + ": " + str(val) for name, val in self.__dict__.items()]
        return self.__class__.__name__ + "(" + ", ".join(vals) + ")"

    __repr__ = __str__

    def __init__(self):
        self.BitEncoding0 = 0
        self.name = ''
        self.value = 0
        self.assignment = 0
        self.source = 0
        self.cavityId = 0
        self.id = ''
        self.description = ''


class SignalSubIdDataType(object):

    '''
    SignalSubIdDataType structure autogenerated from xml
    '''

    ua_types = [
        ('Number', 'Byte'),
        ('Number2', 'Byte'),
        ('Letter', 'Byte'),
    ]
    def __str__(self):
        vals = [name + ": " + str(val) for name, val in self.__dict__.items()]
        return self.__class__.__name__ + "(" + ", ".join(vals) + ")"

    __repr__ = __str__

    def __init__(self):
        self.Number = 0
        self.Number2 = 0
        self.Letter = 0


ua.register_extension_object('ChannelType', ua.NodeId.from_string('ns=0;i=1'), ChannelType)
ua.register_extension_object('InputSignalCategory', ua.NodeId.from_string('ns=0;i=2'), InputSignalCategory)
ua.register_extension_object('MoldTypeEnumeration', ua.NodeId.from_string('ns=0;i=3'), MoldTypeEnumeration)
ua.register_extension_object('SetupChangeType', ua.NodeId.from_string('ns=0;i=4'), SetupChangeType)
ua.register_extension_object('StopConditionType', ua.NodeId.from_string('ns=0;i=5'), StopConditionType)
ua.register_extension_object('ChannelIdDataType', ua.NodeId.from_string('ns=0;i=6'), ChannelIdDataType)
ua.register_extension_object('CurveDataType', ua.NodeId.from_string('ns=0;i=7'), CurveDataType)
ua.register_extension_object('CurvePointDataType', ua.NodeId.from_string('ns=0;i=8'), CurvePointDataType)
ua.register_extension_object('DigitalSignalChangeDataType', ua.NodeId.from_string('ns=0;i=9'), DigitalSignalChangeDataType)
ua.register_extension_object('InputSignalIdDataType', ua.NodeId.from_string('ns=0;i=10'), InputSignalIdDataType)
ua.register_extension_object('ProcessValueType', ua.NodeId.from_string('ns=0;i=11'), ProcessValueType)
ua.register_extension_object('SignalSubIdDataType', ua.NodeId.from_string('ns=0;i=12'), SignalSubIdDataType)
