|
ContentsSimantics/SCLThis module contains functions closely related to SCL and storing SCL related constructs in the Simantics database. SCL Command Sessiondata CommandResponse The outcome of one command executed in an SCL command session. CommandResponse :: String -> Boolean -> CommandResponse createTextAndErrors :: String -> [CompilationError] -> TextAndErrors
execute :: String -> <SCL,Proc> ()
Everything the commands print, and any syntax error, compilation error or thrown exception, is passed to the reporting handler of the session. Failures are therefore not raised in the caller: a command that does not compile or that throws only produces output and cancels the rest of the command text. isSuccessful :: CommandResponse -> Boolean Returns SCL RealmgetOrCreateSCLRealm :: String -> <Proc> SCLRealm Returns the SCL realm with the given identifier, creating a new empty realm if one does not exist yet. readSCLRealm :: Resource -> <ReadGraph,Proc> SCLRealm Returns the SCL realm whose identifier is the name ( refreshVariables :: SCLRealm -> <Proc> () Discards the cached values of the realm's variables and notifies the listeners that follow them. Returns only after the listeners have been notified. sclRealmById :: String -> <Proc> Maybe SCLRealm Returns syncExec :: SCLRealm -> <SCL,Proc> a -> <Proc> a
Command Session Variable AccesssetVariable :: String -> Type -> a -> <SCL> ()
variableValue :: String -> <SCL> a
SCL ValuescreateSCLValue :: Resource -> Resource -> Resource -> String -> <WriteGraph> Resource
createSCLValueIndependent :: Resource -> String -> <WriteGraph> Resource
setExpression :: Variable -> String -> <WriteGraph> ()
SCL ModulescreateSCLModuleAction :: Resource -> <Proc> () Creates a new empty SCL module with a generated name under the given container in a write transaction of its own. Intended to be used as a user interface action. createSCLModuleDefault :: Resource -> <WriteGraph> () As createSCLModuleR but names the new module with a
fresh name derived from createSCLModule :: Resource -> String -> <WriteGraph> () Use createSCLModuleR instead. createSCLModuleR :: Resource -> String -> <WriteGraph> Resource
createSCLModuleWithDefinition :: Resource -> String -> String -> <WriteGraph> Resource
setSCLModuleDefinition :: Resource -> String -> <WriteGraph> Resource
SCL ScriptscreateSCLScriptAction :: Resource -> <Proc> () Creates a new empty SCL script with a generated name under the given container in a write transaction of its own. Intended to be used as a user interface action. createSCLScriptDefault :: Resource -> <WriteGraph> () As createSCLScriptR but names the new script with a
fresh name derived from createSCLScript :: Resource -> String -> <WriteGraph> () Use createSCLScriptR instead. createSCLScriptR :: Resource -> String -> <WriteGraph> Resource
createSCLScriptWithDefinition :: Resource -> String -> String -> <WriteGraph> Resource
executeSCLScript :: Resource -> <Proc,Exception> () Shorthand for Before Simantics 1.52.0 this function only used to schedule the script execution like
executeSCLScriptF but was changed to wait until the script
execution finishes because the original behavior made no sense in under any real
circumstances. The old behavior can be mimicked using
executeSCLScriptF :: Resource -> <Proc> Future String
The function only schedules the script execution and returns immediately
with a The output of the script will be delegated primarily to the reporting handler attached to the current SCL execution context. Secondarily, if the platform UI workbench is running, output will be pushed to SCL Script Output view. Otherwise output will be pushed to the default logging reporter.
setSCLScriptDefinition :: Resource -> String -> <WriteGraph> Resource
Ontology definitions (PGraphs)PGraph (partial graph) is a textual format for specifying ontologies for Simantics. For more information on the format, see this documentation. createPGraphAction :: Resource -> <Proc> () Creates a new empty ontology definition file (PGraph) with a generated name under the given container in a write transaction of its own. Intended to be used as a user interface action. createPGraphDefault :: Resource -> <WriteGraph> () As createPGraphR but names the new ontology definition
file with a fresh name derived from createPGraph :: Resource -> String -> <WriteGraph> () Use createPGraphR instead. createPGraphR :: Resource -> String -> <WriteGraph> Resource
setPGraphDefinition :: Resource -> String -> <WriteGraph> Resource
|