Scope1.1

back

Commands

Events

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(ClientInfo)
{
}
returns (Default)
{
}
= 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:

command Disable(ServiceSelection)
{
}
returns (ServiceResult)
{
}
= 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(Default)
{
}
returns (Default)
{
}
= 4;

Enable

This is used to enable a single service in the host.

Errors:

command Enable(ServiceSelection)
{
}
returns (ServiceResult)
{
}
= 5;

EnumInfo

Returns information on enums in a given service.

Added in version 1.1

command EnumInfo(EnumArg)
{
}
returns (EnumList)
{
}
= 12;

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(Default)
{
}
returns (HostInfo)
{
}
= 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:

command Info(ServiceSelection)
{
}
returns (ServiceInfo)
{
}
= 7;

MessageInfo

command MessageInfo(MessageSelection)
{
}
returns (MessageInfoList)
{
}
= 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(Default)
{
}
returns (Default)
{
}
= 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 (Default)
{
}
= 2;

OnError

This is a generic event for sending out error messages which are not tied to a specific command.

event OnError returns (ErrorInfo)
{
}
= 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 (Default)
{
}
= 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 (ServiceList)
{
}
= 0;