Modules / interfaces/siome-api.interface / ISiomeApi
Interface: ISiomeApi
interfaces/siome-api.interface.ISiomeApi
Table of contents
Methods
- activateOpcNode
- activateTypeReference
- activeTypeReferences
- addBasicContextMenu
- addChild
- addMappingContextMenu
- addMethod
- addMethodArgument
- addPubSubAvailablePublishedDataset
- addPubSubConnection
- addPubSubDatasetWriter
- addPubSubPublishedDataset
- addPubSubPublishedDatasetSimple
- addPubSubSubscribedDataset
- addPubSubVariables
- addPubSubWriterGroup
- addReference
- addSimaticServerInterface
- addSimaticServerInterfaceImplicit
- addStructureItem
- browse
- callMethod
- changeMaxNodeLimit
- changeNamespaceOrder
- checkDependencies
- checkNamespaceAvailable
- closeSiOME
- closeTIAProject
- compileTia
- connectImplicit
- connectToTIAImplicit
- countNumberOfNodes
- createLogNode
- createNamespaceImplicit
- createVariableTypeFromDataType
- currentNamespaceIndex
- deleteMethodArgument
- deleteNode
- disconnectImplicit
- editMethodArgument
- exportXML
- findGateway
- getAllBlockNames
- getAllMethodArguments
- getAllPublishedDatasets
- getAllTagTableNames
- getAllUdtNames
- getAttributeData
- getBlockDetails
- getListOfOpenProjectsInTIA
- getMethodArgument
- getNamespace
- getNamespaceArray
- getNodesetAsString
- getOnlineStatusSubscription
- getOpcNode
- getSiOMESettings
- getSiOMEVersion
- getTIAProjectPath
- getTagTableDetails
- getUdtDetails
- importFile
- importFromTIA
- importNodeSet
- isAttachedToTIA
- isConnectedToTIA
- isDescendantFrom
- isNamespaceZeroUpdateNecessary
- jumpToNode
- lockNamespace
- monitorNamespace
- moveNode
- newLogEntry
- openAlertDialog
- openConnectOpcServerDialog
- openDisconnectOpcServerDialog
- openExportXMLDialog
- openSelectDirectoryDialog
- openSelectFileDialog
- openTIAProjectDialog
- read
- removeReference
- saveSiOME
- searchNode
- setAttribute
- setCurrentNamespace
- setMapping
- setModellingRule
- setNamespaceAttribute
- startValueForPlaceholder
- toggleDefaultNodeID
- toggleShowDataTypes
- toggleShowDisplayName
- toggleSortNodesAlphabetically
- unlockNamespace
- unlockOrCreateNamespace
- updateNamespaceZero
- validateMappings
- validateNodeSet
- validateSchema
- validateUANodeSet
- write
Client
browse
▸ browse(nodeId): Promise\<IBrowseResult>
Browse the online information model for a specific nodeId
Parameters
| Name | Type |
|---|---|
nodeId |
string |
Returns
Promise\<IBrowseResult>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:876
callMethod
▸ callMethod(methodNodeId, inputArguments): Promise\<any>
Call a specific online method with given input arguments
Parameters
| Name | Type |
|---|---|
methodNodeId |
string |
inputArguments |
IOnlineMethodArguments[] |
Returns
Promise\<any>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:893
connectImplicit
▸ connectImplicit(connectParams, browseOrAll): Promise\<boolean>
Connect to an opc ua server without showing a dialog
Parameters
| Name | Type | Description |
|---|---|---|
connectParams |
IConnectParams |
|
browseOrAll |
BrowseOrAll |
Example connectParams { address: "opc.tcp://192.168.1.50:4840" allowExpiredTokens: false applicationName: "SIMATIC.S7-1500.OPC-UA.Application:PLC_1" certificateKeyPathClient: "C:\Users\johndoe\Desktop\certificates\SiOME_client_key.pem" certificatePathClient: "C:\Users\johndoe\Desktop\certificates\SiOME_client_cert.der" overrideEndpointUrl: "" password: "mySecretPassword" securityMode: 3 securityPolicy: "http://opcfoundation.org/UA/SecurityPolicy#Basic256Sha256" session: "SiOME_Plugin_Session" username: "myUsername" } |
Returns
Promise\<boolean>
Defined in
interfaces/siome-api.interface.ts:848
disconnectImplicit
▸ disconnectImplicit(): Promise\<void>
Disconnect from current opc ua server without showing a dialog
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:854
findGateway
▸ findGateway(address, certificateFilePath, privateKeyFilePath): Promise\<Map\<string, IEndpoint[]>>
Find an opc ua server through a given address
Parameters
| Name | Type |
|---|---|
address |
string |
certificateFilePath |
string |
privateKeyFilePath |
string |
Returns
Promise\<Map\<string, IEndpoint[]>>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:864
getOnlineStatusSubscription
▸ getOnlineStatusSubscription(): BehaviorSubject\<boolean>
Return a BehaviorSubject to check the current online status
Returns
BehaviorSubject\<boolean>
Defined in
interfaces/siome-api.interface.ts:813
openConnectOpcServerDialog
▸ openConnectOpcServerDialog(): Promise\<void>
Open the default dialog in SiOME to connect to an opc ua server
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:819
openDisconnectOpcServerDialog
▸ openDisconnectOpcServerDialog(): Promise\<void>
Open the default dialog in SiOME to disconnect from current opc ua server
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:825
read
▸ read(nodeId): Promise\<IReadResult>
Read a node in the online information model
Parameters
| Name | Type |
|---|---|
nodeId |
string |
Returns
Promise\<IReadResult>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:884
write
▸ write(nodeId, value): Promise\<void>
Set the value of an online variable
Parameters
| Name | Type | Description |
|---|---|---|
nodeId |
string |
The node which value should be changed. |
value |
any |
The new value |
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:902
General
changeMaxNodeLimit
▸ changeMaxNodeLimit(maxNodeLimit): Promise\<void>
The setting for the maximum allowed nodes in the project.
Parameters
| Name | Type |
|---|---|
maxNodeLimit |
number |
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:595
closeSiOME
▸ closeSiOME(): Promise\<void>
The method closes the SiOME.
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:601
createLogNode
▸ createLogNode(name): Promise\<void>
Create a root log node.
Parameters
| Name | Type | Description |
|---|---|---|
name |
string |
The description for the parent log node. |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:489
exportXML
▸ exportXML(namespaceUris, includeMappings, includeValues, exportPath, exportName): Promise\<void>
Exports the nodeset in xml format
Parameters
| Name | Type | Description |
|---|---|---|
namespaceUris |
string[] |
The namespace uris to export |
includeMappings |
boolean |
Should mappings be exported |
includeValues |
boolean |
Should values be exported |
exportPath |
string |
Path where to export to |
exportName |
string |
Name of the exported file |
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:620
getNodesetAsString
▸ getNodesetAsString(namespaceUris, includeMappings, includeValues): Promise\<string>
Return the nodeset as a string created by the given namespace uris
Parameters
| Name | Type | Description |
|---|---|---|
namespaceUris |
string[] |
The namespace uris to export |
includeMappings |
boolean |
Should mappings be exported |
includeValues |
boolean |
Should values be exported |
Returns
Promise\<string>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:631
getSiOMESettings
▸ getSiOMESettings(): Promise\<any>
The method returns the current SiOME settings
Returns
Promise\<any>
An object containing all current settings
{
actualNodeChildrenAmountOnline: 100,
checkCyclesOnImport: false,
connectedServerAddresses: [],
defaultDelimiterNodeId: ""."",
defaultNodeIdType: 1,
defaultPlaceholder: 0,
defaultPostfixNodeId: """,
defaultPrefixNodeId: """,
defaultStartNodeIds: {
dataType: 3000,
methodInstance: 7000,
objectInstance: 5000,
objectType: 1000,
referenceType: 4000,
variableInstance: 6000,
variableType: 2000
},
defaultValueRank: -1,
isLoggingEnabled: true,
logDebugMessages: false,
logDirectory: "C:\Users\johndoe\Documents\projects\siome\log",
mainWindowSettings: {
height: 1056,
isMaximized: true,
width: 1936,
x: -1928,
y: -224
},
pluginsFolder: "C:\Users\johndoe\Desktop\plugins",
selectedNodeChildrenAmountOffline: 100,
selectedNodeChildrenAmountOnline: 100,
selectedNodeChildrenAmountOnlineDisabled: false,
showDataTypesForVariablesInOpcTree: false,
showDisplayName: true,
sortNodesAlphabeticalInOpcTree: true,
sortOrderStateMachine: "tb",
}
Defined in
interfaces/siome-api.interface.ts:544
getSiOMEVersion
▸ getSiOMEVersion(): Promise\<string>
The method returns the current SiOME version
Returns
Promise\<string>
version string
Defined in
interfaces/siome-api.interface.ts:608
importFile
▸ importFile(fileFormat, supportMultipleFiles): Promise\<IImportFile>
Import one or multiple xml-like files through a dialog.
Parameters
| Name | Type | Description |
|---|---|---|
fileFormat |
SupportedFileFormat |
The file format you want to import. |
supportMultipleFiles |
boolean |
Allow multiple files to import. |
Returns
Promise\<IImportFile>
The retrieved data from the file(s) as concatenated string, or an empty string if an error occurred.
Defined in
interfaces/siome-api.interface.ts:482
importNodeSet
▸ importNodeSet(path): Promise\<boolean>
Load a namespace with a given path but without a dialog
Parameters
| Name | Type |
|---|---|
path |
string |
Returns
Promise\<boolean>
Defined in
interfaces/siome-api.interface.ts:638
newLogEntry
▸ newLogEntry(logEntry, type): Promise\<void>
Add a new entry with the specific type under the current parent log node.
Parameters
| Name | Type | Description |
|---|---|---|
logEntry |
string |
The entry to be added. |
type |
string |
Available types are "info", "error", "warning". |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:497
saveSiOME
▸ saveSiOME(path): Promise\<void>
Save the current state of the application.
Parameters
| Name | Type | Description |
|---|---|---|
path |
string |
The path where to save. |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:82
setCurrentNamespace
▸ setCurrentNamespace(namespace): Promise\<void>
sets the provided namespace index or namespaceUri as current namespace
Parameters
| Name | Type | Description |
|---|---|---|
namespace |
string | number |
namespace index or namespaceUri |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:75
startValueForPlaceholder
▸ startValueForPlaceholder(defaultPlaceholder): Promise\<void>
The setting for selecting default placeholder value at nodes.
Parameters
| Name | Type |
|---|---|
defaultPlaceholder |
number |
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:587
toggleDefaultNodeID
▸ toggleDefaultNodeID(): Promise\<void>
The setting for displaying the nodeID either as string or as numeric.
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:571
toggleShowDataTypes
▸ toggleShowDataTypes(): Promise\<void>
The setting for showing data types of nodes.
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:557
toggleShowDisplayName
▸ toggleShowDisplayName(): Promise\<void>
The setting for showing display or browse name of the nodes.
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:564
toggleSortNodesAlphabetically
▸ toggleSortNodesAlphabetically(): Promise\<void>
The setting for sorting the nodes alphabetically.
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:550
validateUANodeSet
▸ validateUANodeSet(val): Promise\<void>
The setting for validating against the UANodeset.xsd.
Parameters
| Name | Type |
|---|---|
val |
boolean |
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:579
OPC UA
activateTypeReference
▸ activateTypeReference(sourceId, targetBrowseName, referenceType?): Promise\<boolean>
Activates or deactivates the type defined reference
Parameters
| Name | Type | Description |
|---|---|---|
sourceId |
string |
The NodeId of the source of the TypeReference |
targetBrowseName |
string |
|
referenceType? |
string |
The NodeId of the ReferenceType of the TypeReference |
Returns
Promise\<boolean>
the status of the isActivated property
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:47
activeTypeReferences
▸ activeTypeReferences(nodeId): Promise\<IOpcReference[]>
Get all active type references of the given node
Parameters
| Name | Type |
|---|---|
nodeId |
string |
Returns
Promise\<IOpcReference[]>
Defined in
interfaces/siome-api.interface.ts:379
addChild
▸ addChild(parentNodeId, params): Promise\<IOpcReference>
Add a new entry to the current information model.
Parameters
| Name | Type | Description |
|---|---|---|
parentNodeId |
string |
Add the new entry below this parent node. |
params |
IAddVariableParameter | IAddVariableTypeParameter | IAddObjectParameter | IAddObjectTypeParameter | IAddReferenceTypeParameter | IAddDataTypeParameter | IAddEnumeration |
The parameters for the newly created node. |
Returns
Promise\<IOpcReference>
The newly created IOpcReference or SiOMEApiError.
Defined in
interfaces/siome-api.interface.ts:164
addMethod
▸ addMethod(parentNodeId, methodName, namespaceIndex, inputArgs, outputArgs): Promise\<IOpcReference>
Add a new method to the current information model.
Parameters
| Name | Type | Description |
|---|---|---|
parentNodeId |
string |
Add the new method below this parent node. |
methodName |
string |
The new method name. |
namespaceIndex |
number |
The namespace index to be used when creating the method. |
inputArgs |
IMethodArguments[] |
The input parameter for the new method. |
outputArgs |
IMethodArguments[] |
The output parameter for the new method. |
Returns
Promise\<IOpcReference>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:235
addMethodArgument
▸ addMethodArgument(methodNodeId, argumentType, params): Promise\<void>
Add a new argument to the input or output arguments of a method.
Parameters
| Name | Type | Description |
|---|---|---|
methodNodeId |
string |
Add a new argument underneath this method node. |
argumentType |
ArgumentType |
Input or Output argument |
params |
IMethodArguments |
The parameters required for creating new argument. |
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:252
addReference
▸ addReference(sourceId, targetId, referenceTypeId, isForward): Promise\<IOpcReference>
Add a new reference from the sourceNode to the targetNode.
Parameters
| Name | Type | Description |
|---|---|---|
sourceId |
string |
The NodeId of the source node in string representation. |
targetId |
string |
The NodeId of the target node in string representation. |
referenceTypeId |
string |
The NodeId of the reference type in string representation. |
isForward |
boolean |
The direction of the reference. |
Returns
Promise\<IOpcReference>
The newly created IOpcReference.
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:186
addStructureItem
▸ addStructureItem(parentId, params): Promise\<void>
Parameters
| Name | Type | Description |
|---|---|---|
parentId |
string |
The NodeId of the DataType. |
params |
IAddStructurItemParameter |
The definition of the new structure item. |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:129
changeNamespaceOrder
▸ changeNamespaceOrder(newNamespaceOrder): Promise\<void>
Change the order of the namespaces.
Parameters
| Name | Type | Description |
|---|---|---|
newNamespaceOrder |
string |
The uris in the new order seperated by "," (e.g.: "http://ns2, http://ns1") |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:109
checkDependencies
▸ checkDependencies(): Promise\<IProjectNode[]>
Check the dependencies between namespaces.
Returns
Promise\<IProjectNode[]>
Defined in
interfaces/siome-api.interface.ts:115
checkNamespaceAvailable
▸ checkNamespaceAvailable(namespaceUri): Promise\<boolean>
Check whether a specific namespace is available and loaded in SiOME.
Parameters
| Name | Type | Description |
|---|---|---|
namespaceUri |
string |
Entry to be searched for e.g. "http://opcfoundation.org/UA/". |
Returns
Promise\<boolean>
Defined in
interfaces/siome-api.interface.ts:61
countNumberOfNodes
▸ countNumberOfNodes(namespaceUri): Promise\<number>
Show how many nodes a namespace has.
Parameters
| Name | Type |
|---|---|
namespaceUri |
string |
Returns
Promise\<number>
Defined in
interfaces/siome-api.interface.ts:122
createNamespaceImplicit
▸ createNamespaceImplicit(newNs, version): Promise\<void>
Add a new namespace with a given URI and version
Parameters
| Name | Type |
|---|---|
newNs |
string |
version |
string |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:137
createVariableTypeFromDataType
▸ createVariableTypeFromDataType(dataTypeNodeId): Promise\<IOpcNode>
Add a new variable type of a given DataType to the current information model.
Parameters
| Name | Type | Description |
|---|---|---|
dataTypeNodeId |
string |
The NodeId of the DataType from which a VariableType should be created. |
Returns
Promise\<IOpcNode>
The newly created VariableType or SiOMEApiError.
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:223
currentNamespaceIndex
▸ currentNamespaceIndex(): Promise\<number>
Returns the current namespace index.
Returns
Promise\<number>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:68
deleteMethodArgument
▸ deleteMethodArgument(methodNodeId, argumentType, argumentName): Promise\<void>
Delete the input or output argument of the method.
Parameters
| Name | Type | Description |
|---|---|---|
methodNodeId |
string |
The nodeId of the method. |
argumentType |
ArgumentType |
Type of the argument - Input or Output argument |
argumentName |
string |
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:305
deleteNode
▸ deleteNode(nodeId): Promise\<void>
Delete a node.
Parameters
| Name | Type | Description |
|---|---|---|
nodeId |
string |
The NodeId of the node in string representation. |
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:204
editMethodArgument
▸ editMethodArgument(methodNodeId, argumentType, argumentName, params): Promise\<void>
Edit the input or output argument of a method.
Parameters
| Name | Type | Description |
|---|---|---|
methodNodeId |
string |
The nodeId of the method |
argumentType |
ArgumentType |
Type of the argument - Input or Output argument |
argumentName |
string |
The name of the argument which needs to be edited |
params |
IMethodArguments |
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:289
getAllMethodArguments
▸ getAllMethodArguments(methodNodeId, argumentType): Promise\<IMethodArguments[]>
Get all the input or output arguments of the method.
Parameters
| Name | Type | Description |
|---|---|---|
methodNodeId |
string |
The nodeId of the method. |
argumentType |
ArgumentType |
Type of the argument - Input or Output argument |
Returns
Promise\<IMethodArguments[]>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:262
getAttributeData
▸ getAttributeData(nodeId, attributeId): Promise\<IBaseAttributeData>
Get attribute data of a OPC node
Parameters
| Name | Type |
|---|---|
nodeId |
string |
attributeId |
AttributeId |
Returns
Promise\<IBaseAttributeData>
Defined in
interfaces/siome-api.interface.ts:392
getMethodArgument
▸ getMethodArgument(methodNodeId, argumentType, argumentName): Promise\<IMethodArguments>
Get a specific input or output argument of the method.
Parameters
| Name | Type | Description |
|---|---|---|
methodNodeId |
string |
The nodeId of the method. |
argumentType |
ArgumentType |
Type of the argument - Input or Output argument |
argumentName |
string |
Name of the argument |
Returns
Promise\<IMethodArguments>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:273
getNamespace
▸ getNamespace(namespaceUri): Promise\<IProjectNode>
Retrieve the internal IProjectNode belonging to a specific namespace uri.
Parameters
| Name | Type | Description |
|---|---|---|
namespaceUri |
string |
to be searched for e.g. "http://opcfoundation.org/UA/". |
Returns
Promise\<IProjectNode>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:348
getNamespaceArray
▸ getNamespaceArray(): Promise\<string[]>
Return a string array containing the current namespace uris
Returns
Promise\<string[]>
Defined in
interfaces/siome-api.interface.ts:53
getOpcNode
▸ getOpcNode(nodeId): Promise\<IOpcNode>
Search for the given nodeId within all available nodes in the information model.
Parameters
| Name | Type |
|---|---|
nodeId |
string |
Returns
Promise\<IOpcNode>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:155
isDescendantFrom
▸ isDescendantFrom(childNodeId, nodeId): Promise\<boolean>
The method checks if the provided child is a descendant of the provided node
Parameters
| Name | Type |
|---|---|
childNodeId |
string |
nodeId |
string |
Returns
Promise\<boolean>
Defined in
interfaces/siome-api.interface.ts:356
lockNamespace
▸ lockNamespace(namespaceUri): Promise\<void>
Lock a namespace.
Parameters
| Name | Type |
|---|---|
namespaceUri |
string |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:95
monitorNamespace
▸ monitorNamespace(): BehaviorSubject\<INamespaceChange>
Returns
BehaviorSubject\<INamespaceChange>
Defined in
interfaces/siome-api.interface.ts:384
moveNode
▸ moveNode(nodeId, currentParentId, newParentId): Promise\<void>
Move a node to a new parent.
Parameters
| Name | Type | Description |
|---|---|---|
nodeId |
string |
The NodeId of the node in string representation. |
currentParentId |
string |
The NodeId of the current node in string representation. |
newParentId |
string |
The NodeId of the new parent node in string representation. |
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:214
removeReference
▸ removeReference(sourceId, targetId, referenceTypeId): Promise\<void>
Remove a reference. If it is the last hierarchical reference to the target node, the node will be deleted.
Parameters
| Name | Type | Description |
|---|---|---|
sourceId |
string |
The NodeId of the source node in string representation. |
targetId |
string |
The NodeId of the target node in string representation. |
referenceTypeId |
string |
The NodeId of the reference type in string representation. |
Returns
Promise\<void>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:196
searchNode
▸ searchNode(parentId, searchTerm): Promise\<IOpcNode>
The method tries to find a node in the information model using its BrowseName.
Parameters
| Name | Type | Description |
|---|---|---|
parentId |
string |
Search under this parent nodeId inside the information model. |
searchTerm |
string |
The BrowseName with or without its NamespaceIndex (e.g.: "1:BrowseName", "BrowseName"). If the NamespaceIndex is not provided, the method returns the first node with the given BrowseName. |
Returns
Promise\<IOpcNode>
The IOpcNode with this BrowseName or SiOMEApiError.
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:147
setAttribute
▸ setAttribute(attributeId, nodeId, options): Promise\<void>
Set the attributes of a node
Parameters
| Name | Type | Description |
|---|---|---|
attributeId |
AttributeId |
The id of the attribute to be set |
nodeId |
string |
The nodeId whose properties need to be set. |
options |
string | number | boolean | number[] | IQualifiedName | ILocalizedText |
The required options to set the attribute attributeId:1 options: string attributeId:3 options: IQualifiedName | string (e.g. 1:Name) attributeId:4 options: ILocalizedText | string (e.g. en;text) attributeId:5 options: ILocalizedText | string (e.g. en;text) attributeId:10 options: ILocalizedText | string (e.g. en;text) attributeId:13 options: value of the simple dataTypes attributeId:14 options: string (e.g. ns=0;i=1) attributeId:15 options: number (e.g. 1 for Dimension ) | string (e.g. Scalar or Dimension) attributeId:16 options: number[] | string attributeId:17 options: string | number attributeId:18 options: string | number attributeId:19 options: string | number attributeId:20 options: boolean | string |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:327
setMapping
▸ setMapping(nodeId, mapping): Promise\<void>
Set mapping for a given node
Parameters
| Name | Type |
|---|---|
nodeId |
string |
mapping |
string |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:372
setModellingRule
▸ setModellingRule(nodeId, rule): Promise\<void>
Set the modelling rule for a given reference
Parameters
| Name | Type |
|---|---|
nodeId |
string |
rule |
ModellingRules |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:364
setNamespaceAttribute
▸ setNamespaceAttribute(attributeId, namespaceIndex, value): Promise\<void>
Set the namespace attributes
Parameters
| Name | Type | Description |
|---|---|---|
attributeId |
NamespaceAttributeId |
The attribute#s id that needs to be modified |
namespaceIndex |
number |
namespace index. |
value |
string |
The new value |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:340
unlockNamespace
▸ unlockNamespace(namespaceUri): Promise\<void>
Unlock a namespace.
Parameters
| Name | Type |
|---|---|
namespaceUri |
string |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:102
unlockOrCreateNamespace
▸ unlockOrCreateNamespace(): Promise\<void>
Open a dialog to unlock or add a new namespace.
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:88
PubSub
addPubSubAvailablePublishedDataset
▸ addPubSubAvailablePublishedDataset(fileNames): Promise\<void>
Add Pubsub Subscriber Dataset from Published XML Path
Parameters
| Name | Type | Description |
|---|---|---|
fileNames |
string[] |
The XML Path oft teh Published Dataset |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:999
addPubSubConnection
▸ addPubSubConnection(newName, address, network, publisherId): Promise\<IOpcNode>
Create Pubsub connection
Parameters
| Name | Type | Description |
|---|---|---|
newName |
string |
The name of the connection |
address |
string |
The address of the connection |
network |
string |
The network of the connection |
publisherId |
number |
The publisher id of the connection |
Returns
Promise\<IOpcNode>
Defined in
interfaces/siome-api.interface.ts:915
addPubSubDatasetWriter
▸ addPubSubDatasetWriter(datasetName, newPublishedDatasetId): Promise\<IOpcNode>
Create Pubsub Published Dataset Writer
Parameters
| Name | Type | Description |
|---|---|---|
datasetName |
string |
The name of the Dataset Writer |
newPublishedDatasetId |
string |
The nodeId of the Published Dataset |
Returns
Promise\<IOpcNode>
Defined in
interfaces/siome-api.interface.ts:950
addPubSubPublishedDataset
▸ addPubSubPublishedDataset(newName, description): Promise\<IOpcNode>
Create Pubsub connection
Parameters
| Name | Type | Description |
|---|---|---|
newName |
string |
The name of the Published Dataset |
description |
string |
The description of the Published Dataset |
Returns
Promise\<IOpcNode>
Defined in
interfaces/siome-api.interface.ts:942
addPubSubPublishedDatasetSimple
▸ addPubSubPublishedDatasetSimple(datasetName, connectionId, interval, headerLayoutUri, isUnicast, listenPort): Promise\<void>
Create Pubsub Dataset Simple
Parameters
| Name | Type | Description |
|---|---|---|
datasetName |
string |
The name of the Dataset |
connectionId |
string |
The nodeId of the connection |
interval |
number |
The interval in ms |
headerLayoutUri |
string |
|
isUnicast |
boolean |
|
listenPort |
string |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:927
addPubSubSubscribedDataset
▸ addPubSubSubscribedDataset(datasetNodeId, isStandaloneSubscribedDataset, targetNodeIds): Promise\<void>
Add Pubsub Subscribed Dataset
Parameters
| Name | Type | Description |
|---|---|---|
datasetNodeId |
string |
The nodeId of the published dataset |
isStandaloneSubscribedDataset |
boolean |
Is Stand alone Subscribed Dataset |
targetNodeIds |
string[] |
The target nodeIds of the contained variables of the dataset |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:988
addPubSubVariables
▸ addPubSubVariables(pubSubDatasetNodeId, nodeIds): Promise\<void>
Add Variables to a Pubsub Dataset
Parameters
| Name | Type | Description |
|---|---|---|
pubSubDatasetNodeId |
string |
The nodeId of the dataset to add the variables |
nodeIds |
string[] |
The nodeIds of the nodes to add |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:979
addPubSubWriterGroup
▸ addPubSubWriterGroup(datasetName, connectionId, interval, headerLayoutUri, isUnicast, listenPort, newDatasetWriterId): Promise\<IOpcNode>
Create Pubsub Dataset Writer Group
Parameters
| Name | Type | Description |
|---|---|---|
datasetName |
string |
The name of the Dataset Writer Group |
connectionId |
string |
The nodeId of the connection |
interval |
number |
The interval in ms |
headerLayoutUri |
string |
|
isUnicast |
boolean |
|
listenPort |
string |
|
newDatasetWriterId |
string |
The nodeId of the Dataset Writer |
Returns
Promise\<IOpcNode>
Defined in
interfaces/siome-api.interface.ts:963
getAllPublishedDatasets
▸ getAllPublishedDatasets(): Promise\<IOpcNode[]>
Gets all published DataSets
Returns
Promise\<IOpcNode[]>
Defined in
interfaces/siome-api.interface.ts:1005
isNamespaceZeroUpdateNecessary
▸ isNamespaceZeroUpdateNecessary(): Promise\<boolean>
Check if Namespace up to date
Returns
Promise\<boolean>
Defined in
interfaces/siome-api.interface.ts:1011
updateNamespaceZero
▸ updateNamespaceZero(): Promise\<void>
update namespace
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:1017
TIA Portal
addSimaticServerInterface
▸ addSimaticServerInterface(isReferenceNamespace): Promise\<void>
Open a dialog in SiOME to choose the server interface export options to the TIA Portal.
Parameters
| Name | Type |
|---|---|
isReferenceNamespace |
boolean |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:749
addSimaticServerInterfaceImplicit
▸ addSimaticServerInterfaceImplicit(isReferenceNamespace, namespaceIndices, serverInterfaceName): Promise\<void>
Implicitly adds the Simatic server interface to the TIA-Portal.
Parameters
| Name | Type |
|---|---|
isReferenceNamespace |
boolean |
namespaceIndices |
string | number[] |
serverInterfaceName |
string |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:758
closeTIAProject
▸ closeTIAProject(): Promise\<void>
Close the TIA Portal project attached in SiOME
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:697
compileTia
▸ compileTia(): Promise\<void>
Initiate a compile in the TIA Portal.
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:703
connectToTIAImplicit
▸ connectToTIAImplicit(attach, disableTimeout, path?, plcName?, userName?, password?): Promise\<void | IOpenProjectError>
connect to a TIA Portal project.
Parameters
| Name | Type | Description |
|---|---|---|
attach |
boolean |
{boolean} true is attach and false is open by using the path provided |
disableTimeout |
boolean |
|
path? |
string |
{string} required when attach is false and multiple TIA instances are open |
plcName? |
string |
required when multiple PLCs are present in the TIA project |
userName? |
string |
|
password? |
string |
Returns
Promise\<void | IOpenProjectError>
Defined in
interfaces/siome-api.interface.ts:684
getAllBlockNames
▸ getAllBlockNames(): Promise\<string[]>
Retrieve all available db names in current TIA Portal project
Returns
Promise\<string[]>
Defined in
interfaces/siome-api.interface.ts:730
getAllTagTableNames
▸ getAllTagTableNames(): Promise\<string[]>
Retrieve all available tag tables in current TIA Portal project
Returns
Promise\<string[]>
Defined in
interfaces/siome-api.interface.ts:742
getAllUdtNames
▸ getAllUdtNames(): Promise\<string[]>
Retrieve all available udt names in current TIA Portal project
Returns
Promise\<string[]>
Defined in
interfaces/siome-api.interface.ts:736
getBlockDetails
▸ getBlockDetails(blockName): Promise\<ITiaNode>
Retrieve the specific block details from the TIA Portal.
Parameters
| Name | Type |
|---|---|
blockName |
string |
Returns
Promise\<ITiaNode>
Defined in
interfaces/siome-api.interface.ts:710
getListOfOpenProjectsInTIA
▸ getListOfOpenProjectsInTIA(): Promise\<string[]>
Gets a list of open TIA-Portal projects
Returns
Promise\<string[]>
Defined in
interfaces/siome-api.interface.ts:647
getTIAProjectPath
▸ getTIAProjectPath(): Promise\<string>
Get the current TIA Portal project path.
Returns
Promise\<string>
Defined in
interfaces/siome-api.interface.ts:665
getTagTableDetails
▸ getTagTableDetails(tagTableName): Promise\<ITiaNode>
Retrieve the specific tag table details from the TIA Portal.
Parameters
| Name | Type |
|---|---|
tagTableName |
string |
Returns
Promise\<ITiaNode>
Defined in
interfaces/siome-api.interface.ts:724
getUdtDetails
▸ getUdtDetails(udtName): Promise\<ITiaNode>
Retrieve the specific udt details from the TIA Portal.
Parameters
| Name | Type |
|---|---|
udtName |
string |
Returns
Promise\<ITiaNode>
Defined in
interfaces/siome-api.interface.ts:717
importFromTIA
▸ importFromTIA(nodesetName): Promise\<void>
Load a node set from TIA.
Parameters
| Name | Type |
|---|---|
nodesetName |
string |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:769
isAttachedToTIA
▸ isAttachedToTIA(): Promise\<boolean>
Check if SiOME is currently attached to a TIA Portal project.
Returns
Promise\<boolean>
Defined in
interfaces/siome-api.interface.ts:653
isConnectedToTIA
▸ isConnectedToTIA(): Promise\<boolean>
Check if SiOME is currently connected to a TIA Portal project.
Returns
Promise\<boolean>
Defined in
interfaces/siome-api.interface.ts:659
openTIAProjectDialog
▸ openTIAProjectDialog(): Promise\<void>
Open a dialog in SiOME to attach to a TIA Portal project.
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:671
UI
activateOpcNode
▸ activateOpcNode(nodeId): Promise\<void>
Highlight and select the specific node in the information model.
Parameters
| Name | Type |
|---|---|
nodeId |
string |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:470
addBasicContextMenu
▸ addBasicContextMenu(text, execute, disabled?, visible?): Promise\<void>
The method adds a context menu for each node in the information model.
Parameters
| Name | Type | Description |
|---|---|---|
text |
string |
The name of the context menu. |
execute |
(node: IOpcNode) => void |
The callback executed after clicking the context menu. |
disabled? |
(node: IOpcNode) => boolean |
|
visible? |
(node: IOpcNode) => boolean |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:412
addMappingContextMenu
▸ addMappingContextMenu(text, execute, disabled?, visible?): Promise\<void>
The method adds a context menu in the mapping area for each node in the information model.
Parameters
| Name | Type | Description |
|---|---|---|
text |
string |
The name of the context menu. |
execute |
(node: IOpcNode) => void |
The callback executed after clicking the context menu. |
disabled? |
(node: IOpcNode) => boolean |
|
visible? |
(node: IOpcNode) => boolean |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:427
jumpToNode
▸ jumpToNode(nodeId): Promise\<void>
Jump to a specific node in the information model tree
Parameters
| Name | Type |
|---|---|
nodeId |
string |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:457
openAlertDialog
▸ openAlertDialog(headline, message): Promise\<void>
Open an alert dialog in SiOME
Parameters
| Name | Type |
|---|---|
headline |
string |
message |
string |
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:440
openExportXMLDialog
▸ openExportXMLDialog(): Promise\<void>
Open the default dialog in SiOME to export nodesets
Returns
Promise\<void>
Defined in
interfaces/siome-api.interface.ts:463
openSelectDirectoryDialog
▸ openSelectDirectoryDialog(title?): Promise\<string>
Open a dialog in SiOME to select a directory.
Parameters
| Name | Type | Description |
|---|---|---|
title? |
string |
Title of the dialog |
Returns
Promise\<string>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:402
openSelectFileDialog
▸ openSelectFileDialog(defaultPath?, fileExtension?, multiSelect?): Promise\<string[]>
Open a dialog in SiOME to select one or multiple file(s).
Parameters
| Name | Type |
|---|---|
defaultPath? |
string |
fileExtension? |
string |
multiSelect? |
boolean |
Returns
Promise\<string[]>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:450
Validation
validateMappings
▸ validateMappings(nodeId): Promise\<{ conflict: string ; node: IOpcNode }[]>
Validate the mapping for a given node and its children
Parameters
| Name | Type |
|---|---|
nodeId |
string |
Returns
Promise\<{ conflict: string ; node: IOpcNode }[]>
Defined in
interfaces/siome-api.interface.ts:789
validateNodeSet
▸ validateNodeSet(commonRules, mappingRules, addIns, isOnline): Promise\<IValidationConflict[]>
Validate the nodeset with rules.
Parameters
| Name | Type |
|---|---|
commonRules |
boolean |
mappingRules |
boolean |
addIns |
boolean |
isOnline |
boolean |
Returns
Promise\<IValidationConflict[]>
Defined in
interfaces/siome-api.interface.ts:799
validateSchema
▸ validateSchema(filePath, providedSchemas): Promise\<boolean>
Validate the corresponding file with the provided schemas
Parameters
| Name | Type |
|---|---|
filePath |
string |
providedSchemas |
ISchemas[] |
Returns
Promise\<boolean>
Throws
ISiomeApiError
Defined in
interfaces/siome-api.interface.ts:782