This is a special service which is always present and always enabled.
This service replaces the special commands used in STP/0 (started with an asterix). The only command that is fully compatible with STP/0 is "*services" (OnServices) which is actually sent as STP/0 only, any other special command sent to scope will be ignored. The system takes care of mapping it to the correct format when sending and receiving them. However the payload of these messages is no longer the same: they must now be sent using UMS. This means using either JSON or XML when sending over STP/0.
Connect
This commands is used by the client to initiate connection with the host. The command specifies the global settings for the client. Currently this means setting the format of all events for this client.
Repeated use of this command will result in the host resetting any settings and services that the client used earlier.
If the requested format is not allowed or does not exist, it will respond with the status `"Bad Request"` (3).
command Connect( )
returns ( )
= 3;
Disable
This is used to disable a client's access to one service. Once the client has been removed the from the service it will no longer receive events from it, and it will not be able to send commands to it. The internal "scope" service cannot be disabled since it is always enabled.
Errors:
- If the service is not found it will return with a status of `"Service Not Found"` (6).
- If the service is not yet enabled it will return with a status of `"Service Not Enabled"` (8).
- If the client tries to disable the "scope" service it will return with a status of `"Bad Request"` (3).
command Disable( )
returns ( )
= 6;
Disconnect
This disconnects the client by resetting any settings and disabling any services the client used. This command is primarily meant for proxies which must be sent if a socket connection with an active client closes. If the client is able to do this, then it should send the command itself.
command Disconnect( )
returns ( )
= 4;
Enable
This is used to enable a single service in the host.
Errors:
- If the service is not found it will return with status `"Service Not Found"` (6).
- If the service could not be enabled it will return with status `"Service Not Enabled"` (8).
- If the client tries to enable the "scope" service it will return with status `"Bad Request"` (3).
command Enable( )
returns ( )
= 5;
HostInfo
This commands is used to get information about the host.
The command responds with information on available services, version, and other relevant information.
command HostInfo( )
returns ( )
= 10;
Info
This is used to get information about one specific service.
The command list contains all the commands in the service. Each command is listed with its name and the corresponding command ID (used by STP/1). The event list is similar to the command list, but is listed for the available events.
Errors:
- If the service is not found it will return the message with status set to `"Service Not Found"` (6).
command Info( )
returns ( )
= 7;
MessageInfo
command MessageInfo( )
returns ( )
= 11;
Quit
The quit message is sent to Opera when the proxy or client operation is terminated. No communication with the proxy will be possible once it has sent the quit message. When Opera receives this message it should disable all debugging services that are currently enabled.
Note: This command does not do anything, might be removed in the future.
command Quit( )
returns ( )
= 8;
OnConnectionLost
This is a special event which is used by the proxy (and not by the host) when the connection to the Opera host is unexpectedly lost, for instance if the Opera host crashes.
event OnConnectionLost returns ( )
= 2;
OnError
This is a generic event for sending out error messages which are not tied to a specific command.
event OnError returns ( )
= 9;
OnQuit
This event is sent by Opera to the proxy or client when Opera terminates its operation. No communication with Opera is possible once Opera has sent the event. When the proxy receives this message it broadcasts it to all of its clients.
event OnQuit returns ( )
= 1;
OnServices
This event is the first that is sent from the host (and proxy) and contains all the available services. It is always sent encoded as an STP/0 message.
event OnServices returns ( )
= 0;