Skip to article

External handler button

The software supports an external code handler for various code modification and validation workflows, importing firmware into the editor and automatically executing commands when code is imported.

Communication uses HTTP: the application sends a POST request to the server address specified in Tools - General settings - Folders - API Button URL.

Example POST request:

code=0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000&module_type=1&table=A0&offset=00

code contains a 256-character code segment from the application editor;

module_type the selected module type (0 — GBIC, 1 — SFP, 2 — SFP+, 3 — XFP, 4 — QSFP);

table the table address (for example: A0, A2);

offset the offset (for example: 00, 80).

Example server response:

{"status":1,"script":"R1A000007F\r\nW1A000007F{00;7F}\r\n","message":"","code":"0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000","module_type":"1","table":"A0","offset":"00"}

The server response must contain a JSON string with the following parameters:

status processing status: 1 — the application imports code from the server response and executes the commands passed in scripts; 0 — it displays the external handler result from the message field.

script a list of commands according to the SFPTotal protocol

message a text message, displayed by the application when status=0

code code returned by the server; the required length is 256 characters, representing 128 bytes

module_type the selected module type (0 — GBIC, 1 — SFP, 2 — SFP+, 3 — XFP, 4 — QSFP)

table the table address (for example: A0, A2)

offset the code segment offset (for example: 00, 80)

If status=1 the application imports the code from the server response into the editor and executes the commands passed in script.

If status=0 the application displays the text passed in message. Use this mode to validate code with a custom script hosted on an HTTP server and receive a text message with the results.

Updated: