|
<< Click to Display Table of Contents >> Navigation: 3. Script Language > Internet and Network > MCP. - MCP (Model-Context Protocol) server operations > !Server-Operations - Commands for interacting with a running MCP server (signals, actions) > !Listener-Queue - Commands for managing the Listener Mode queue > MCP. - MCP Server Operations |
SPR Script Language
HTP.MCPGetQueueMode
Returns the current operating mode of the Listener server's command queue.
Intention
When the MCP server is in Listener Mode, its command queue can operate in two ways. The HTP.MCPGetQueueMode command allows you to check which mode is currently active. The mode determines the order in which commands are retrieved by HTP.MCPGetNextCommand.
• "QUEUE" (Default): First-In, First-Out (FIFO). Behaves like a waiting line.
• "STACK": Last-In, First-Out (LIFO). Behaves like a stack of plates.
Syntax
HTP.MCPGetQueueMode[|$$ret]
Parameter Explanation
P1 - $$ret - (Variable, Optional)
A variable to store the result string, which will be either "QUEUE" or "STACK". If omitted, the result is pushed to the stack.
Examples
'***********************************
' HTP.MCPGetQueueMode - Sample Usage
'***********************************
' Assume Listener Server is running
' Check the default mode
HTP.MCPGetQueueMode|$$mode
MBX.Initial queue mode is: $$mode
' Change the mode to STACK
MCP.ConfigQue|STACK
' Verify the change
HTP.MCPGetQueueMode|$$mode
MBX.Current queue mode is now: $$mode
Remarks
- This command is only meaningful when the server is running in Listener Mode (started with MCP.Start||1). It has no effect on the Executor Mode server.
- The default mode upon server initialization is always "QUEUE".
See also: