# This file is part of Beremiz
# See COPYING file for copyrights details.
from util.TranslationCatalogs import NoTranslate
"Local": ("localVars", ITEM_VAR_LOCAL),
"Global": ("globalVars", ITEM_VAR_GLOBAL),
"External": ("externalVars", ITEM_VAR_EXTERNAL),
"Temp": ("tempVars", ITEM_VAR_TEMP),
"Input": ("inputVars", ITEM_VAR_INPUT),
"Output": ("outputVars", ITEM_VAR_OUTPUT),
"InOut": ("inOutVars", ITEM_VAR_INOUT)}
"functionBlock": ITEM_FUNCTIONBLOCK,
"function": ITEM_FUNCTION,
"configuration": ITEM_CONFIGURATION,
"resource": ITEM_RESOURCE,
"transition": ITEM_TRANSITION,
LOCATIONS_ITEMS = [LOCATION_CONFNODE,
LOCATION_VAR_MEMORY] = list(range(6))
UNEDITABLE_NAMES = [_("User-defined POUs"), _("Functions"), _("Function Blocks"),
_("Programs"), _("Data Types"), _("Transitions"), _("Actions"),
_("Configurations"), _("Resources"), _("Properties")]
[USER_DEFINED_POUS, FUNCTIONS, FUNCTION_BLOCKS, PROGRAMS,
DATA_TYPES, TRANSITIONS, ACTIONS, CONFIGURATIONS,
RESOURCES, PROPERTIES] = UNEDITABLE_NAMES
# -------------------------------------------------------------------------------
# Project Element tag name computation functions
# -------------------------------------------------------------------------------
# Compute a data type name
def ComputeDataTypeName(datatype):
return "D::%s" % datatype
# Compute a pou transition name
def ComputePouTransitionName(pou, transition):
return "T::%s::%s" % (pou, transition)
# Compute a pou action name
def ComputePouActionName(pou, action):
return "A::%s::%s" % (pou, action)
def ComputeConfigurationName(config):
def ComputeConfigurationResourceName(config, resource):
return "R::%s::%s" % (config, resource)
def GetElementType(tagname):
words = tagname.split("::")
# remove gettext override