Commands

What are Commands

Commands are functions, whose scope is bound by an owning Information Model, like the methods of a class in object-oriented programming. Commands within an Information Model are typically invoked by an external IT system (e.g., an equipment) that triggers the command. In addition, commands of a target Information Model (e.g., an MES) can be triggered by the SMARTUNIFIER through a Mapping. A command contains one or multiple simple or structured Variables. Also a command has a return parameter that likewise can be a simple or complex data type.

The lifetime of the command invocation instance begins when the client calls the command and ends when the result is returned. While commands may affect the state of the owning model, they have no explicit state of their own. In this sense, they are stateless. Each command defined in an Information Model has a command type

How to create a Command

  • Enter an ID (1)

  • Click the “Apply” button (2)

AddNewCommandInformationModel

The main two parts of a Command are the Request, referred to as Parameters within the SMARTUNIFIER, and the Reply. Variables, Arrays and Lists can be added to both of these command parts. Follow the steps below to add a Variable to Parameters :

  • Select the Parameters node from the tree

  • Enter a Member Type (3)

  • Click the “Apply” button (4)

AddNewCommandRequestInformationModel
  • Select the Reply node from the tree (5)

  • Enter a Member Type (6)

  • Click the “Apply” button (7)

AddNewCommandReplyInformationModel

Follow the steps below to add nodes under the Parameter and Reply node:

  • Right click the Parameter node, select “Add Node” and choose a Definition Type (8)

AddNewCommandReplyInformationModel
  • Enter an ID (9)

  • Enter a Member Type (10)

  • Click the “Apply” button (11)

  • Click the “Save” button (12) to save the Information Model

AddNewCommandReplyInformationModel