2 * Copyright (C) 2017-2018 "IoT.bzh"
3 * Author Sebastien Douheret <sebastien@iot.bzh>
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
21 // ExecArgs JSON parameters of /exec command
23 ID string `json:"id" binding:"required"`
24 SdkID string `json:"sdkID"` // sdk ID to use for setting env
25 CmdID string `json:"cmdID"` // command unique ID
26 Cmd string `json:"cmd" binding:"required"`
27 Args []string `json:"args"`
28 Env []string `json:"env"`
29 RPath string `json:"rpath"` // relative path into project
30 TTY bool `json:"tty"` // Use a tty, specific to gdb --tty option
31 TTYGdbserverFix bool `json:"ttyGdbserverFix"` // Set to true to activate gdbserver workaround about inferior output
32 LdLibPathNoReset bool `json:"ldLibPathNoReset"` // Set to true to not reset LD_LIBRARY_PATH when sourcing environment file
33 ExitImmediate bool `json:"exitImmediate"` // when true, exit event sent immediately when command exited (IOW, don't wait file synchronization)
34 CmdTimeout int `json:"timeout"` // command completion timeout in Second
37 // ExecResult JSON result of /exec command
39 Status string `json:"status"` // status OK
40 CmdID string `json:"cmdID"` // command unique ID
43 // ExecSigResult JSON result of /signal command
44 ExecSigResult struct {
45 Status string `json:"status"` // status OK
46 CmdID string `json:"cmdID"` // command unique ID
49 // ExecInMsg Message used to received input characters (stdin)
51 CmdID string `json:"cmdID"`
52 Timestamp string `json:"timestamp"`
53 Stdin string `json:"stdin"`
56 // ExecOutMsg Message used to send output characters (stdout+stderr)
58 CmdID string `json:"cmdID"`
59 Timestamp string `json:"timestamp"`
60 Stdout string `json:"stdout"`
61 Stderr string `json:"stderr"`
64 // ExecExitMsg Message sent when executed command exited
66 CmdID string `json:"cmdID"`
67 Timestamp string `json:"timestamp"`
68 Code int `json:"code"`
69 Error error `json:"error"`
72 // ExecSignalArgs JSON parameters of /exec/signal command
73 ExecSignalArgs struct {
74 CmdID string `json:"cmdID" binding:"required"` // command id
75 Signal string `json:"signal" binding:"required"` // signal number
80 // ExecInEvent Event send in WS when characters are sent (stdin)
81 ExecInEvent = "exec:input"
83 // ExecOutEvent Event send in WS when characters are received (stdout or stderr)
84 ExecOutEvent = "exec:output"
86 // ExecExitEvent Event send in WS when program exited
87 ExecExitEvent = "exec:exit"
89 // ExecInferiorInEvent Event send in WS when characters are sent to an inferior (used by gdb inferior/tty)
90 ExecInferiorInEvent = "exec:inferior-input"
92 // ExecInferiorOutEvent Event send in WS when characters are received by an inferior
93 ExecInferiorOutEvent = "exec:inferior-output"