1:- module(
    2       da_sdk,
    3       [
    4           da_sdk_response/3,  % da_sdk_response(+Handle, +RequestSeq, +Command)
    5           da_sdk_response/4,  % da_sdk_response(+Handle, +RequestSeq, +Command, +Body)
    6           da_sdk_error/4,     % da_sdk_error(+Handle, +RequestSeq, +Command, +Message)
    7           da_sdk_event/2,     % da_sdk_event(+Handle, +Type)
    8           da_sdk_event/3,     % da_sdk_event(+Handle, +Type, +Body)
    9           da_sdk_request/3,   % da_sdk_request(+Handle, +Type, +Body)
   10           da_sdk_stop/1       % da_sdk_stop(+Handle)
   11       ]
   12   ).

SWI-Prolog Debug Adapter Protocol SDK

Facilities for implementing DAP servers. The predicates in this module are designed to be called during a DAP session to modify the state of the session or to communicate with the DAP client.

See also
- Option on_command of da_server/1. */
   25da_sdk_action(Handle, Action) :-
   26    thread_send_message(Handle, action(Action)).
   27
   28
   29da_sdk_response(Handle, ReqSeq, Command) :-
   30    da_sdk_response(Handle, ReqSeq, Command, null).
   31
   32da_sdk_response(Handle, ReqSeq, Command, Body) :-
   33    da_sdk_action(Handle, response(ReqSeq, Command, Body)).
   34
   35
   36da_sdk_error(Handle, ReqSeq, Command, Message) :-
   37    da_sdk_action(Handle, error(ReqSeq, Command, Message)).
   38
   39
   40da_sdk_event(Handle, Type) :-
   41    da_sdk_event(Handle, Type, null).
   42
   43da_sdk_event(Handle, Type, Body) :-
   44    da_sdk_action(Handle, event(Type, Body)).
   45
   46
   47da_sdk_request(Handle, Type, Body) :-
   48    da_sdk_action(Handle, request(Type, Body)).
   49
   50da_sdk_stop(Handle) :-
   51    da_sdk_action(Handle, stop)