Skip to content
Snippets Groups Projects
ConnectivityNode.ocl 2.32 KiB
Newer Older
Dominique Marcadet's avatar
Dominique Marcadet committed
/**
 *  Copyright (c) 2017 CentraleSupélec & EDF.
 *  All rights reserved. This program and the accompanying materials
 *  are made available under the terms of the Eclipse Public License v1.0
 *  which accompanies this distribution, and is available at
 *  http://www.eclipse.org/legal/epl-v10.html
 * 
 *  This file is part of the RiseClipse tool
 *  
 *  Contributors:
 *      Computer Science Department, CentraleSupélec
 *      EDF R&D
 *  Contacts:
 *      dominique.marcadet@centralesupelec.fr
 *      aurelie.dehouck-neveu@edf.fr
 *  Web site:
 *      http://wdi.supelec.fr/software/RiseClipse/
 */
import scl: 'http://www.iec.ch/61850/2003/SCL'

import '../Helpers/BaseSimpleTypes.ocl'

package scl

context ConnectivityNode

    -- The name attribute is verified in Naming.ocl

    -- The pathName attribute shall be present
    inv ConnectivityNode_pathName_required
        ( 'name attribute shall be present in ConnectivityNode (line ' + self.lineNumber.toString() + ')' )
    :
        self.pathName <> null

    -- The pathName attribute shall be valid
    inv ConnectivityNode_pathName_valid
        ( 'name attribute shall be valid in ConnectivityNode (line ' + self.lineNumber.toString() + '). '
          + 'Current value is ' + self.pathName.toString()
        )
    :
        self.pathName <> null implies self.pathName.validSclRef()

    --  The Bay's name attribute identifies the ConnectivityNode instance within the
    --  bay; its pathName is an absolute reference within the SCL file. The
    --  pathname is build by all higher level references down to the connectivity
    --  nodes name, concatenated with the character “/”
    inv ConnectivityNode_pathName_value
        ( 'pathName of ConnectivityNode shall be its path starting from Substation (line ' + self.lineNumber.toString() + '). '
          + 'Current value is '  + self.pathName + ', '
          + 'expected value is ' + self.Bay.VoltageLevel.Substation.name
                           + '/' + self.Bay.VoltageLevel.name
                           + '/' + self.Bay.name
                           + '/' + self.name
        )
    :
        self.pathName <> null
        implies
        self.pathName = self.Bay.VoltageLevel.Substation.name
                + '/' + self.Bay.VoltageLevel.name
                + '/' + self.Bay.name
                + '/' + self.name

endpackage