classdef Processor < target.compatibility.HardwareImplementationComponent

    properties (Dependent)
        InstructionSetArchitecture target.InstructionSetArchitecture {mustBeScalarOrEmpty}
        LanguageImplementations target.LanguageImplementation {mustBeVector(LanguageImplementations, "allow-all-empties")}
        NumberOfCores (1, 1) uint16
        NumberOfLogicalCores (1, 1) uint32
        NumberOfThreadsPerCore (1, 1) uint32
        Overheads target.Overhead {mustBeVector(Overheads, "allow-all-empties")}
        Timers target.Counter {mustBeVector(Timers, "allow-all-empties")}
    end

    methods

        function value = get.InstructionSetArchitecture(this)
            value = this.wrapValue(this.InnerInstance.InstructionSetArchitecture);
        end

        function set.InstructionSetArchitecture(this, value)
            this.InnerInstance.InstructionSetArchitecture = this.unwrapValue(value, this.InnerInstance.InstructionSetArchitecture);
        end

        function value = get.LanguageImplementations(this)
            value = this.wrapValue(this.InnerInstance.LanguageImplementations);
        end

        function set.LanguageImplementations(this, value)
            this.InnerInstance.LanguageImplementations = this.unwrapValue(value, this.InnerInstance.LanguageImplementations);
        end

        function value = get.NumberOfCores(this)
            value = this.InnerInstance.NumberOfCores;
        end

        function set.NumberOfCores(this, value)
            this.InnerInstance.NumberOfCores = value;
        end

        function value = get.NumberOfLogicalCores(this)
            value = this.InnerInstance.NumberOfLogicalCores;
        end

        function value = get.NumberOfThreadsPerCore(this)
            value = this.InnerInstance.NumberOfThreadsPerCore;
        end

        function set.NumberOfThreadsPerCore(this, value)
            this.InnerInstance.NumberOfThreadsPerCore = value;
        end

        function value = get.Overheads(this)
            value = this.wrapValue(this.InnerInstance.Overheads);
        end

        function set.Overheads(this, value)
            this.InnerInstance.Overheads = this.unwrapValue(value, this.InnerInstance.Overheads);
        end

        function value = get.Timers(this)
            value = this.wrapValue(this.InnerInstance.Timers);
        end

        function set.Timers(this, value)
            this.InnerInstance.Timers = this.unwrapValue(value, this.InnerInstance.Timers);
        end
    end

    methods (Static, Access = protected)

        function name = getQualifiedName()
            name = "target.Processor";
        end

        function name = getQualifiedInnerName()
            name = "target.internal.Processor";
        end
    end
end

%   Copyright 2021-2023 The MathWorks, Inc.