|
Subscription module documentationSubscriptionSubscription represents an Item instance in Simantics ontology ( addSubscription :: Variable -> <WriteGraph> Resource Creates new Subscription with the given Variable to the Variables models default SubscriptionFolder. Input 1: Wanted module attribute from which subscription is to be created as Variable Output: The newly created subscription as Resource Example: create a subscription of module PO01 attribute PO11_PRESSURE to the default subscription folder with default options.
addSubscriptionInFolder :: Resource -> Variable -> <WriteGraph> Resource Creates new Subscription with the given Variable under the given SubscriptionFolder. Input 1: Subscription folder in which subscription is wanbted to be created as Resource Input 2: Wanted module attribute from which subscription is to be created as Variable Output: The newly created subscription as Resource Example: Model contains two subscription folders called Default and Pressure subscriptions of the model. Let's fetch them and add one new subscription of module PO01 attribute PO11_PRESSURE to the latter folder.
newSubscription :: Resource -> Variable -> Double -> Double -> Double -> Double -> String -> String -> <WriteGraph> Resource Creates new Subscription with advanced options for user to define non-default parameters. Input 1: Wanted subscription folder as Resource Input 2: Wanted variable from which the subscription is done as Variable Input 3: Sampling interval as Double Input 4: Deadband as Double Input 5: Gain as Double Input 6: Bias as Double Input 7: Unit as String Input 8: Label as String Output: The newly created subscription as Resource Example: Let's add a subscription of module PO01 attribute PO11_PRESSURE to the default subscription folder. This point is located on diagram NewGenericDiagram in a model called Model. We want to have unit to be shown as bars, so lets define gain as 10. Also lets define sampling interval to be 5 seconds and label as Pressure at point PO01
getSubscriptionLabel :: Resource -> <ReadGraph> String SubscriptionFolderaddSubscriptionFolder :: Resource -> String -> <WriteGraph> Resource Creates new SubscriptionFolder under the given Model. Parameter String defines the name of the folder. Input 1: Model in which new subscription folder is wanted to be created as Model Input 2: Wanted name for the new subscription folder as String Output: The newly created subscription folder as Resource Example:
defaultSubscriptionFolder :: Resource -> <ReadGraph> Resource Browses the given Model for its default SubscriptionFolder with name "Default" and then returns it. If folder is not found, returns a random SubscriptionFolder Input 1: Model which default subscription folder is wanted to be obtained as Model Output: The default subscription folder as Resource Example:
subscriptionFoldersOf :: Resource -> <ReadGraph> [Resource] Browses the given Model for its SubscriptionFolders and then returns them in a list. Input 1: Model which subscription folders are wanted as Model Output: List which elements are subscription folder Resources Example: Model contains two subscription folders called Default and Pressure subscriptions of the model. Let's fetch them and print out their names.
Undocumented entities |