Skip to content

Latest commit

 

History

History
67 lines (43 loc) · 2.21 KB

File metadata and controls

67 lines (43 loc) · 2.21 KB

CSM API

Management API

[!NOTE] CSM Working Modes

  1. Stand-alone: Independent working mode. If no module name is provided, a random ID will be generated to identify the module.
  2. CSM: Regular CSM module.
  3. Action Worker: Worker mode. Add "#" after the module name to mark this module as a worker, sharing the same message queue with other workers of the same name.
  4. Chain Node: Chain node. Add "$" after the module name to mark this module as a chain node. Messages on the same chain will be passed sequentially until a node processes the message.

CSM - Start Async Call.vi

VI snippet for asynchronous call template code

CSM - Synchronized Call.vi

VI snippet for synchronous call template code

CSM - Module VI Reference.vi

Query and obtain the VI reference of the CSM module by sending a "VI Reference" synchronous message.

-- Controls --

  • CSM Name: CSM module name
  • Current Module("" to generate an ID): Identifier of the CSM module to query. If empty, a unique ID will be generated.
  • Response Timeout(5000ms): Timeout for synchronous messages, default is 5000 ms

-- Indicators --

  • CSM Module VIRef: VI reference of the CSM module

CSM - Check If Module Exists.vi

Check if the CSM module exists

-- Controls --

  • CSM Name: CSM module name

-- Indicators --

  • Exist?: Returns whether the module exists
  • CSM Name(dup): Returns CSM Name

CSM - List Modules.vi

List all active CSM modules.

Ref: CSM Working Modes

-- Controls --

  • Exclude Standalone CSM(T): Whether to include modules in standalone working mode

-- Indicators --

  • Module Names: List of CSM module names

CSM - Module Status.vi

Get the status of the CSM module, including: working mode, number of workers, and the number of pending messages in the message queue.

Ref: CSM Working Modes

-- Controls --

  • CSM Name: CSM module name

-- Indicators --

  • Mode: Returns the working mode of the module
  • #As Worker: Number of workers in worker mode for this module
  • #msg to be processed: Number of pending messages in the CSM message queue
  • CSM Name(dup): Returns CSM Name