Added HIDScript background jobs to CLI; Added test scripts for HIDScript

This commit is contained in:
mame82 2018-06-29 20:42:55 +00:00
parent 1c7389f77f
commit ae87064ae9
16 changed files with 454 additions and 188 deletions

11
HIDScripts/cosmouse.js Normal file
View File

@ -0,0 +1,11 @@
step = Math.PI / 90.0;
scale = 6.0
alpha = 0.0
horizontal = false;
while(true) {
v = Math.cos(alpha) * scale;
alpha += step;
if (horizontal) moveStepped(v,0);
else moveStepped(0,v);
delay(10);
}

17
HIDScripts/mousejiggle.js Normal file
View File

@ -0,0 +1,17 @@
//Creds to Rogan Dawes
//
// Moves the mouse slightly from time, to simulate user activity (supress screensaver/lockscreen)
// Meant to run as background job
// With extrem settings, it could be use to prank users
scale = 2.0; //if not stepped, 127 is vali max
sleeptime = 3000;
stepped = true;
while (true) {
x = (Math.random() * 2.0 - 1.0) * scale;
y = (Math.random() * 2.0 - 1.0) * scale;
if (stepped) moveStepped(x,y);
else move(x,y);
delay(sleeptime);
}

60
HIDScripts/ms_snake.js Normal file
View File

@ -0,0 +1,60 @@
button(BTNONE);
//Log something to internal console
console.log("HID testscript");
layout("US"); //set US layout
//Natural typing speed (100 ms between keys + additional jitter up to 200 ms)
typingSpeed(100,200);
type("Typing in natural speed");
layout("DE"); //Switching language layout, while script still running
//Fastest typing speed (no delays)
typingSpeed(0,0);
type("Typing fast, including unicode: üÜöÖäÄ");
//Do some relative mouse movement
for (var i = 0; i<10; i++) {
x = Math.random() * 256 - 128; //x, scaled between -128 and 127
y = Math.random() * 256 - 128; //y, scaled between -128 and 127
move(x,y);
delay(500); //wait a half a second
}
//Do some relative mouse movement, but divide it into 1 DPI substeps (pixel perfect mouse move, but slow)
for (var i = 0; i<10; i++) {
x = Math.random() * 256 - 128; //x, scaled between -128 and 127
y = Math.random() * 256 - 128; //y, scaled between -128 and 127
moveStepped(x,y);
delay(500); //wait a half a second
}
//Do some absolute Mouse positioning (not stepped, mouse moves immediately, thus delays are added)
moveTo(0.2,0.2);
delay(1000);
moveTo(0.8,0.2);
delay(1000);
moveTo(0.8,0.8);
delay(1000);
moveTo(0.2,0.8);
delay(1000);
//press button 1, move mouse stepped, release button 1
console.log("Moving mouse with button 1 pressed");
button(BT1);
moveStepped(20,0);
button(BTNONE);
delay(500);
//Click button 2
console.log("Click button 2");
click(BT2);
//Doubleclick button 1
console.log("Double click button 2");
doubleClick(BT1);
//release all buttons
button(BTNONE);

11
HIDScripts/sinmouse.js Normal file
View File

@ -0,0 +1,11 @@
step = Math.PI / 90.0;
scale = 6.0
alpha = 0.0
horizontal = true;
while(true) {
v = Math.sin(alpha) * scale;
alpha += step;
if (horizontal) moveStepped(v,0);
else moveStepped(0,v);
delay(10);
}

8
HIDScripts/test1.js Normal file
View File

@ -0,0 +1,8 @@
//Endless looping script moving mouse, used to test interrupts and timeouts
while(true) {
moveStepped(200,0);
moveStepped(0,-200);
moveStepped(-200,0);
moveStepped(0,200);
delay(1000);
}

8
HIDScripts/test2.js Normal file
View File

@ -0,0 +1,8 @@
//Endless looping script moving mouse, used to test interrupts and timeouts
while(true) {
moveStepped(200,0);
moveStepped(0,-200);
moveStepped(-200,0);
moveStepped(0,200);
delay(1000);
}

View File

@ -1,30 +1,55 @@
CLI
- add config caps for missing USB settings (serial, vid, pid ...)
- PARTIALY: add functionality to issue HIDScripts
- run async scripts
- proper job management and cancelation
- retrieve log output of scripts
- DONE: add functionality to issue HIDScripts
- DEONE: run async scripts
- DONE: proper job management and cancelation
- retrieve log output of scripts - !LOGGING HAS TO BE REWORKED COMPLETELY, TONS OF DEBUG OUT RIGHT NOW, MIXED
USE OF STDOUT/STDERR!!
- function to retrieve running HIDScript background jobs + function to interrupt all jobs
BOOT
- deploy a default boot payload (Post Run in systemd service ??, config via /etc/P4wnP1/settings)
- deploy a default boot payload/configuration (Post Run in systemd service ??, config via /etc/P4wnP1/settings)
USB
- DONE: add functionality to fetch target devices for HID (e.g. keyboard could be at /dev/hidg0..n depending on USB config)
- init HIDController
- DONE: init HIDController
HID
- add additional keyboard layouts (not for first release)
- add function to retrieve LED state (currently changes only)
- DONE: fix absolute mouse movement
- DONE: avoid memory leak on reinit of HIDController
- DONE: avoid memory leak on re-init of HIDController (re-use of memory leaking VMs + limited VM pool size, to keep
impact reasonable)
- DONE: implement job management
- DONE: implement context for cancellation and cancellation propagation
- DONE: blocking JavaScript to go callbacks (waitLED, delay, waitLEDRepeated) have to consume the otto.Otto.Interrupt channel
to be able to be aborted when Otto is interrupted
- DONE: interrupt blocking JavaScript to Go callbacks (waitLED, delay, waitLEDRepeated) by consuming VM IRQ channel
WIFI
- implement connection to OPEN-AUTH network as STA
- implement nexmon firmware support (not for first release)
BLUETOOTH:
- configuration cpabilities for BNEP/NAP on server, keep in mind BLE use cases (idea of stand-alone proxy)
- gRPC implementation
- CLI client support
FILESYSTEM (not for first release)
- remote pwd, cd, download, upload (up and download already implemented for HID script transfer)
DOCUMENTATION (not on first release ... yes, I know, anyway)
- HIDScript docu (basically ES5 with some additional commands)
- CLI docu (let's rely on the built-in help screens, for now. They need to be reworked themselves)
- folder structure of resources/configuration files
- language map format
--> Lesson learned: Documenting, by providing example payloads didn't worked out for the P4wnP1 community (nearly no
external payload contributions)
OTHER:
- extend installer to movee HIDScripts to a fixed absolute path
TO FIX:
- debug out of HIDScript puts way to much CPU load on journaling daemon (floods logs)
- allow gRPC server to abort Running HID scripts on context.DONE
- allow gRPC server to abort Running HID scripts on context.Done() -> possible, testing needed
- jobs aren't deleted from global job list, unless result is fetched with waitResult. This affects interrupted
jobs (f.e. timeout) and jobs run as background job --> cancelled jobs need a way to communicate back to the controller,
that they could be deleted (Solution: goroutine listening for context.Done() per job in controller)

View File

@ -9,12 +9,13 @@ import (
"os"
"errors"
"log"
"strconv"
)
var (
tmpHidCommands = ""
tmpRunFromServerPath = ""
tmpHidTimeout = -1 // values < 0 = endless
tmpHidTimeout = uint32(0) // values < 0 = endless
)
var hidCmd = &cobra.Command{
@ -36,6 +37,12 @@ var hidJobCmd = &cobra.Command{
Run: cobraHidJob,
}
var hidJobCancelCmd = &cobra.Command{
Use: "cancel",
Short: "Cancel background job given by its ID",
Run: cobraHidJobCancel,
}
// Decision on how to run scripts (terms "local"/"remote" from perspective of gRPC server):
//
// 1) `P4wnP1_cli HID run` (no host flag, no additional args)
@ -174,8 +181,7 @@ func cobraHidRun(cmd *cobra.Command, args []string) {
serverScriptFilePath, err := parseHIDRunScripCmd(cmd,args)
if err != nil { log.Fatal(err)}
//ToDo: retrieve result and print it
res,err := ClientHIDRunScript(StrRemoteHost, StrRemotePort, serverScriptFilePath)
res,err := ClientHIDRunScript(StrRemoteHost, StrRemotePort, serverScriptFilePath, tmpHidTimeout)
if err != nil { log.Fatal(err) }
fmt.Println(res.ResultJson)
@ -184,26 +190,25 @@ func cobraHidRun(cmd *cobra.Command, args []string) {
func cobraHidJob(cmd *cobra.Command, args []string) {
parseHIDRunScripCmd(cmd,args)
/*
settings, err := createWifiAPSettings(tmpWifiStrChannel, tmpWifiStrReg, tmpWifiSSID, tmpWifiPSK, tmpWifiHideSSID, tmpWifiDisableNexmon, tmpWifiDisabled)
if err != nil {
fmt.Printf("Error: %v\n", err)
os.Exit(-1) //exit with error
return
}
serverScriptFilePath, err := parseHIDRunScripCmd(cmd,args)
if err != nil { log.Fatal(err)}
fmt.Printf("Deploying WiFi inteface settings:\n\t%v\n", settings)
job,err := ClientHIDRunScriptJob(StrRemoteHost, StrRemotePort, serverScriptFilePath, tmpHidTimeout)
if err != nil { log.Fatal(err) }
err = ClientDeployWifiSettings(StrRemoteHost, StrRemotePort, settings)
if err != nil {
fmt.Println(status.Convert(err).Message())
os.Exit(-1) //exit with error
}
fmt.Printf("Job ID: %d\n", job.Id)
return
}
func cobraHidJobCancel(cmd *cobra.Command, args []string) {
if len(args) < 1 { log.Fatal("Job ID to cancel has to be given as argument\n")}
jobID,err := strconv.ParseUint(args[0], 10, 32)
if err != nil { log.Fatalf("Error parsing job ID '%s' ton integer\n", args[0])}
err = ClientHIDCancelScriptJob(StrRemoteHost, StrRemotePort, uint32(jobID))
if err != nil { log.Fatal(err) }
*/
return
}
@ -213,12 +218,13 @@ func init() {
rootCmd.AddCommand(hidCmd)
hidCmd.AddCommand(hidRunCmd)
hidCmd.AddCommand(hidJobCmd)
hidJobCmd.AddCommand(hidJobCancelCmd)
hidRunCmd.Flags().StringVarP(&tmpHidCommands, "commands","c", "", "HIDScript commands to run, given as string")
hidRunCmd.Flags().StringVarP(&tmpRunFromServerPath, "server-path","r", "", "Load HIDScript from given path on P4wnP1 server")
hidRunCmd.Flags().IntVarP(&tmpHidTimeout, "timeout","t", -1, "Abort waiting for HIDScript result after this timeout (seconds)")
hidRunCmd.Flags().Uint32VarP(&tmpHidTimeout, "timeout","t", 0, "Interrupt HIDScript after this timeout (seconds)")
hidJobCmd.Flags().StringVarP(&tmpHidCommands, "commands","c", "", "HIDScript commands to run, given as string")
hidJobCmd.Flags().StringVarP(&tmpRunFromServerPath, "server-path","r", "", "Load HIDScript from given path on P4wnP1 server")
hidJobCmd.Flags().Uint32VarP(&tmpHidTimeout, "timeout","t", 0, "Interrupt HIDScript after this timeout (seconds)")
}

View File

@ -260,9 +260,10 @@ func ClientDeployWifiSettings(host string, port string, settings *pb.WiFiSetting
return err
}
func ClientHIDRunScript(host string, port string, scriptPath string) (scriptRes *pb.HIDScriptResult, err error) {
func ClientHIDRunScript(host string, port string, scriptPath string, timeoutSeconds uint32) (scriptRes *pb.HIDScriptResult, err error) {
scriptReq := &pb.HIDScriptRequest{
ScriptPath: scriptPath,
TimeoutSeconds: timeoutSeconds,
}
address := host + ":" + port
@ -278,9 +279,10 @@ func ClientHIDRunScript(host string, port string, scriptPath string) (scriptRes
return
}
func ClientHIDRunScriptJob(host string, port string, scriptPath string) (sctipJob *pb.HIDScriptJob, err error) {
func ClientHIDRunScriptJob(host string, port string, scriptPath string, timeoutSeconds uint32) (scriptJob *pb.HIDScriptJob, err error) {
scriptReq := &pb.HIDScriptRequest{
ScriptPath: scriptPath,
TimeoutSeconds: timeoutSeconds,
}
address := host + ":" + port
@ -292,6 +294,43 @@ func ClientHIDRunScriptJob(host string, port string, scriptPath string) (sctipJo
ctx, cancel := context.WithTimeout(context.Background(), time.Second * 30)
defer cancel()
sctipJob,err = rpcClient.HIDRunScriptJob(ctx, scriptReq)
scriptJob,err = rpcClient.HIDRunScriptJob(ctx, scriptReq)
return
}
func ClientHIDCancelScriptJob(host string, port string, jobID uint32) (err error) {
cancelReq := &pb.HIDScriptJob{
Id: jobID,
}
address := host + ":" + port
connection, err := grpc.Dial(address, grpc.WithInsecure())
if err != nil { log.Fatalf("Could not connect to P4wnP1 RPC server: %v", err) }
defer connection.Close()
rpcClient := pb.NewP4WNP1Client(connection)
ctx, cancel := context.WithTimeout(context.Background(), time.Second * 30)
defer cancel()
_,err = rpcClient.HIDCancelScriptJob(ctx, cancelReq)
return
}
func ClientHIDGetScriptJobResult(host string, port string, jobID uint32) (scriptRes *pb.HIDScriptResult, err error) {
req := &pb.HIDScriptJob{
Id: jobID,
}
address := host + ":" + port
connection, err := grpc.Dial(address, grpc.WithInsecure())
if err != nil { log.Fatalf("Could not connect to P4wnP1 RPC server: %v", err) }
defer connection.Close()
rpcClient := pb.NewP4WNP1Client(connection)
// ctx, cancel := context.WithTimeout(context.Background(), time.Second * 30)
// defer cancel()
scriptRes,err = rpcClient.HIDGetScriptJobResult(context.Background(), req)
return
}

View File

@ -53,14 +53,14 @@ var (
type HIDController struct {
Keyboard *HIDKeyboard
Mouse *Mouse
vmPool [MAX_VM]*AsyncOttoVM //ToDo: check if this could be changed to sync.Pool
vmPool [MAX_VM]*AsyncOttoVM
vmMaster *otto.Otto
ctx context.Context
cancel context.CancelFunc
}
func NewHIDController(ctx context.Context, keyboardDevicePath string, keyboardMapPath string, mouseDevicePath string) (ctl *HIDController, err error) {
//ToDo: check if hidcontroller could work with a context whith cancellation, which then could be cancelled on reuse of the object
//ToDo: check if hidcontroller could work with a context with cancellation, which then could be cancelled on reuse of the object
if hidControllerReuse == nil {
hidControllerReuse = &HIDController{}
@ -126,11 +126,19 @@ func (ctl *HIDController) NextUnusedVM() (vm *AsyncOttoVM, err error) {
}
func (ctl *HIDController) RunScript(ctx context.Context, script string) (val otto.Value, err error) {
/*
//fetch next free vm from pool
avm,err := ctl.NextUnusedVM()
if err != nil { return otto.Value{}, err }
val, err = avm.Run(ctx, script)
*/
// use backround job and wait, to force keeping track of job in joblist, in case the result is never fetched due to
// remote CLI abort after running endless script (wouldn't cancel the script)
job,err := ctl.StartScriptAsBackgroundJob(ctx, script)
if err != nil { return val,err }
val,err = ctl.WaitBackgroundJobResult(ctx, job)
return
}
@ -168,7 +176,7 @@ func (ctl *HIDController) StartScriptAsBackgroundJob(ctx context.Context,script
return
}
func (ctl *HIDController) WaitBackgroundJobResult(job *AsyncOttoJob) (val otto.Value, err error) {
func (ctl *HIDController) WaitBackgroundJobResult(ctx context.Context, job *AsyncOttoJob) (val otto.Value, err error) {
globalJobListMutex.Lock()
if !globalJobList[job] {
err = errors.New(fmt.Sprintf("Tried to retrieve results of job with id %d failed, because it is not in the list of background jobs", job.Id))
@ -176,6 +184,15 @@ func (ctl *HIDController) WaitBackgroundJobResult(job *AsyncOttoJob) (val otto.V
globalJobListMutex.Unlock()
if err != nil {return}
//cancel job when provided context is done
// ToDo: do profiling to check if this go routine stays open, in case ctx is never done
go func(ctx context.Context, job *AsyncOttoJob) {
select {
case <- ctx.Done():
job.Cancel()
}
}(ctx,job)
val,err = job.WaitResult() //Blocking result wait
//remove job from global list after result has been retrieved
@ -291,8 +308,7 @@ func (ctl *HIDController) jsDelay(call otto.FunctionCall) (res otto.Value) {
return
}
delay := int(fDelay)
log.Printf("HIDScript delay: Sleeping `%v` milliseconds\n", delay)
//time.Sleep(time.Millisecond * time.Duration(int(delay)))
// log.Printf("HIDScript delay: Sleeping `%v` milliseconds\n", delay)
select {
case <- time.After(time.Millisecond * time.Duration(int(delay))):
@ -686,7 +702,7 @@ func (ctl *HIDController) initVM(vm *otto.Otto) (err error) {
if err != nil { return err }
err = vm.Set("waitLEDRepeat", ctl.jsWaitLEDRepeat)
if err != nil { return err }
err = vm.Set("layout", ctl.jsLayout)
err = vm.Set("layout", ctl.jsLayout) // this influences all scripts
if err != nil { return err }
err = vm.Set("move", ctl.jsMove)

View File

@ -719,7 +719,8 @@ func (m *FileInfoResponse) Unmarshal(rawBytes []byte) (*FileInfoResponse, error)
// HID
type HIDScriptRequest struct {
ScriptPath string
ScriptPath string
TimeoutSeconds uint32
}
// GetScriptPath gets the ScriptPath of the HIDScriptRequest.
@ -730,6 +731,14 @@ func (m *HIDScriptRequest) GetScriptPath() (x string) {
return m.ScriptPath
}
// GetTimeoutSeconds gets the TimeoutSeconds of the HIDScriptRequest.
func (m *HIDScriptRequest) GetTimeoutSeconds() (x uint32) {
if m == nil {
return x
}
return m.TimeoutSeconds
}
// MarshalToWriter marshals HIDScriptRequest to the provided writer.
func (m *HIDScriptRequest) MarshalToWriter(writer jspb.Writer) {
if m == nil {
@ -740,6 +749,10 @@ func (m *HIDScriptRequest) MarshalToWriter(writer jspb.Writer) {
writer.WriteString(1, m.ScriptPath)
}
if m.TimeoutSeconds != 0 {
writer.WriteUint32(2, m.TimeoutSeconds)
}
return
}
@ -760,6 +773,8 @@ func (m *HIDScriptRequest) UnmarshalFromReader(reader jspb.Reader) *HIDScriptReq
switch reader.GetFieldNumber() {
case 1:
m.ScriptPath = reader.ReadString()
case 2:
m.TimeoutSeconds = reader.ReadUint32()
default:
reader.SkipField()
}
@ -2330,8 +2345,8 @@ type P4WNP1Client interface {
DeployWifiSettings(ctx context.Context, in *WiFiSettings, opts ...grpcweb.CallOption) (*Empty, error)
HIDRunScript(ctx context.Context, in *HIDScriptRequest, opts ...grpcweb.CallOption) (*HIDScriptResult, error)
HIDRunScriptJob(ctx context.Context, in *HIDScriptRequest, opts ...grpcweb.CallOption) (*HIDScriptJob, error)
HIDRGetScriptJobResult(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*HIDScriptResult, error)
HIDRCancelScriptJob(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*Empty, error)
HIDGetScriptJobResult(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*HIDScriptResult, error)
HIDCancelScriptJob(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*Empty, error)
FSWriteFile(ctx context.Context, in *WriteFileRequest, opts ...grpcweb.CallOption) (*Empty, error)
FSReadFile(ctx context.Context, in *ReadFileRequest, opts ...grpcweb.CallOption) (*ReadFileResponse, error)
FSGetFileInfo(ctx context.Context, in *FileInfoRequest, opts ...grpcweb.CallOption) (*FileInfoResponse, error)
@ -2448,8 +2463,8 @@ func (c *p4WNP1Client) HIDRunScriptJob(ctx context.Context, in *HIDScriptRequest
return new(HIDScriptJob).Unmarshal(resp)
}
func (c *p4WNP1Client) HIDRGetScriptJobResult(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*HIDScriptResult, error) {
resp, err := c.client.RPCCall(ctx, "HIDRGetScriptJobResult", in.Marshal(), opts...)
func (c *p4WNP1Client) HIDGetScriptJobResult(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*HIDScriptResult, error) {
resp, err := c.client.RPCCall(ctx, "HIDGetScriptJobResult", in.Marshal(), opts...)
if err != nil {
return nil, err
}
@ -2457,8 +2472,8 @@ func (c *p4WNP1Client) HIDRGetScriptJobResult(ctx context.Context, in *HIDScript
return new(HIDScriptResult).Unmarshal(resp)
}
func (c *p4WNP1Client) HIDRCancelScriptJob(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "HIDRCancelScriptJob", in.Marshal(), opts...)
func (c *p4WNP1Client) HIDCancelScriptJob(ctx context.Context, in *HIDScriptJob, opts ...grpcweb.CallOption) (*Empty, error) {
resp, err := c.client.RPCCall(ctx, "HIDCancelScriptJob", in.Marshal(), opts...)
if err != nil {
return nil, err
}

View File

@ -326,7 +326,8 @@ func (m *FileInfoResponse) GetIsDir() bool {
// HID
type HIDScriptRequest struct {
ScriptPath string `protobuf:"bytes,1,opt,name=scriptPath" json:"scriptPath,omitempty"`
ScriptPath string `protobuf:"bytes,1,opt,name=scriptPath" json:"scriptPath,omitempty"`
TimeoutSeconds uint32 `protobuf:"varint,2,opt,name=timeoutSeconds" json:"timeoutSeconds,omitempty"`
}
func (m *HIDScriptRequest) Reset() { *m = HIDScriptRequest{} }
@ -341,6 +342,13 @@ func (m *HIDScriptRequest) GetScriptPath() string {
return ""
}
func (m *HIDScriptRequest) GetTimeoutSeconds() uint32 {
if m != nil {
return m.TimeoutSeconds
}
return 0
}
type HIDScriptJob struct {
Id uint32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}
@ -949,8 +957,8 @@ type P4WNP1Client interface {
DeployWifiSettings(ctx context.Context, in *WiFiSettings, opts ...grpc.CallOption) (*Empty, error)
HIDRunScript(ctx context.Context, in *HIDScriptRequest, opts ...grpc.CallOption) (*HIDScriptResult, error)
HIDRunScriptJob(ctx context.Context, in *HIDScriptRequest, opts ...grpc.CallOption) (*HIDScriptJob, error)
HIDRGetScriptJobResult(ctx context.Context, in *HIDScriptJob, opts ...grpc.CallOption) (*HIDScriptResult, error)
HIDRCancelScriptJob(ctx context.Context, in *HIDScriptJob, opts ...grpc.CallOption) (*Empty, error)
HIDGetScriptJobResult(ctx context.Context, in *HIDScriptJob, opts ...grpc.CallOption) (*HIDScriptResult, error)
HIDCancelScriptJob(ctx context.Context, in *HIDScriptJob, opts ...grpc.CallOption) (*Empty, error)
FSWriteFile(ctx context.Context, in *WriteFileRequest, opts ...grpc.CallOption) (*Empty, error)
FSReadFile(ctx context.Context, in *ReadFileRequest, opts ...grpc.CallOption) (*ReadFileResponse, error)
FSGetFileInfo(ctx context.Context, in *FileInfoRequest, opts ...grpc.CallOption) (*FileInfoResponse, error)
@ -1064,18 +1072,18 @@ func (c *p4WNP1Client) HIDRunScriptJob(ctx context.Context, in *HIDScriptRequest
return out, nil
}
func (c *p4WNP1Client) HIDRGetScriptJobResult(ctx context.Context, in *HIDScriptJob, opts ...grpc.CallOption) (*HIDScriptResult, error) {
func (c *p4WNP1Client) HIDGetScriptJobResult(ctx context.Context, in *HIDScriptJob, opts ...grpc.CallOption) (*HIDScriptResult, error) {
out := new(HIDScriptResult)
err := grpc.Invoke(ctx, "/P4wnP1_grpc.P4WNP1/HIDRGetScriptJobResult", in, out, c.cc, opts...)
err := grpc.Invoke(ctx, "/P4wnP1_grpc.P4WNP1/HIDGetScriptJobResult", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *p4WNP1Client) HIDRCancelScriptJob(ctx context.Context, in *HIDScriptJob, opts ...grpc.CallOption) (*Empty, error) {
func (c *p4WNP1Client) HIDCancelScriptJob(ctx context.Context, in *HIDScriptJob, opts ...grpc.CallOption) (*Empty, error) {
out := new(Empty)
err := grpc.Invoke(ctx, "/P4wnP1_grpc.P4WNP1/HIDRCancelScriptJob", in, out, c.cc, opts...)
err := grpc.Invoke(ctx, "/P4wnP1_grpc.P4WNP1/HIDCancelScriptJob", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
@ -1132,8 +1140,8 @@ type P4WNP1Server interface {
DeployWifiSettings(context.Context, *WiFiSettings) (*Empty, error)
HIDRunScript(context.Context, *HIDScriptRequest) (*HIDScriptResult, error)
HIDRunScriptJob(context.Context, *HIDScriptRequest) (*HIDScriptJob, error)
HIDRGetScriptJobResult(context.Context, *HIDScriptJob) (*HIDScriptResult, error)
HIDRCancelScriptJob(context.Context, *HIDScriptJob) (*Empty, error)
HIDGetScriptJobResult(context.Context, *HIDScriptJob) (*HIDScriptResult, error)
HIDCancelScriptJob(context.Context, *HIDScriptJob) (*Empty, error)
FSWriteFile(context.Context, *WriteFileRequest) (*Empty, error)
FSReadFile(context.Context, *ReadFileRequest) (*ReadFileResponse, error)
FSGetFileInfo(context.Context, *FileInfoRequest) (*FileInfoResponse, error)
@ -1342,38 +1350,38 @@ func _P4WNP1_HIDRunScriptJob_Handler(srv interface{}, ctx context.Context, dec f
return interceptor(ctx, in, info, handler)
}
func _P4WNP1_HIDRGetScriptJobResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
func _P4WNP1_HIDGetScriptJobResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HIDScriptJob)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(P4WNP1Server).HIDRGetScriptJobResult(ctx, in)
return srv.(P4WNP1Server).HIDGetScriptJobResult(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/P4wnP1_grpc.P4WNP1/HIDRGetScriptJobResult",
FullMethod: "/P4wnP1_grpc.P4WNP1/HIDGetScriptJobResult",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(P4WNP1Server).HIDRGetScriptJobResult(ctx, req.(*HIDScriptJob))
return srv.(P4WNP1Server).HIDGetScriptJobResult(ctx, req.(*HIDScriptJob))
}
return interceptor(ctx, in, info, handler)
}
func _P4WNP1_HIDRCancelScriptJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
func _P4WNP1_HIDCancelScriptJob_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HIDScriptJob)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(P4WNP1Server).HIDRCancelScriptJob(ctx, in)
return srv.(P4WNP1Server).HIDCancelScriptJob(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/P4wnP1_grpc.P4WNP1/HIDRCancelScriptJob",
FullMethod: "/P4wnP1_grpc.P4WNP1/HIDCancelScriptJob",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(P4WNP1Server).HIDRCancelScriptJob(ctx, req.(*HIDScriptJob))
return srv.(P4WNP1Server).HIDCancelScriptJob(ctx, req.(*HIDScriptJob))
}
return interceptor(ctx, in, info, handler)
}
@ -1499,12 +1507,12 @@ var _P4WNP1_serviceDesc = grpc.ServiceDesc{
Handler: _P4WNP1_HIDRunScriptJob_Handler,
},
{
MethodName: "HIDRGetScriptJobResult",
Handler: _P4WNP1_HIDRGetScriptJobResult_Handler,
MethodName: "HIDGetScriptJobResult",
Handler: _P4WNP1_HIDGetScriptJobResult_Handler,
},
{
MethodName: "HIDRCancelScriptJob",
Handler: _P4WNP1_HIDRCancelScriptJob_Handler,
MethodName: "HIDCancelScriptJob",
Handler: _P4WNP1_HIDCancelScriptJob_Handler,
},
{
MethodName: "FSWriteFile",
@ -1530,114 +1538,116 @@ var _P4WNP1_serviceDesc = grpc.ServiceDesc{
func init() { proto.RegisterFile("grpc.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 1741 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0xeb, 0x72, 0xdc, 0xb6,
0x15, 0x96, 0x76, 0xe5, 0xbd, 0x9c, 0xbd, 0x1a, 0x76, 0x5c, 0x5a, 0xb1, 0x65, 0x97, 0x4d, 0x32,
0x9a, 0x26, 0xa3, 0x36, 0xaa, 0x66, 0x92, 0xc9, 0x4c, 0xa7, 0xa5, 0xf6, 0x22, 0xad, 0xa5, 0xbd,
0x0c, 0x28, 0x45, 0xd3, 0x5f, 0x0c, 0x45, 0x40, 0x5a, 0xd4, 0x5c, 0x92, 0x25, 0x40, 0xc5, 0xea,
0x8f, 0x3c, 0x50, 0xdf, 0xa5, 0x0f, 0xd0, 0x07, 0xe8, 0x73, 0xb4, 0x03, 0xf0, 0xb2, 0xe4, 0x7a,
0x57, 0xf2, 0xb4, 0xff, 0x80, 0x0f, 0xe7, 0x7c, 0x38, 0xc0, 0xc1, 0x39, 0x87, 0x87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0xca, 0x29, 0x57, 0xfb, 0xea, 0x0d, 0x1c, 0xa7, 0x00, 0x3d, 0x2b, 0xed, 0xda,
0xd1, 0xb2, 0xe1, 0x2b, 0x7f, 0x07, 0x76, 0xdf, 0x6c, 0x58, 0x8d, 0x3b, 0x63, 0x7d, 0x0b, 0x8d,
0xa0, 0xd1, 0xb3, 0x4e, 0xa8, 0x48, 0x9b, 0xe6, 0x15, 0xbe, 0x95, 0x96, 0x7b, 0x85, 0x6f, 0xb5,
0xd3, 0xd6, 0xb7, 0xd0, 0x8f, 0xf0, 0xa2, 0x67, 0x75, 0x42, 0xea, 0x08, 0xba, 0xf4, 0x8b, 0x03,
0x2d, 0x7f, 0x0d, 0xac, 0xfb, 0xc1, 0xb2, 0xab, 0x3f, 0x24, 0x92, 0xee, 0x70, 0x55, 0x52, 0xbf,
0x6c, 0xfe, 0xf0, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2d, 0x94, 0x19, 0x23, 0xc0, 0x11, 0x00,
0x00,
}

View File

@ -17,8 +17,8 @@ service P4WNP1 {
rpc HIDRunScript(HIDScriptRequest) returns (HIDScriptResult) {}
rpc HIDRunScriptJob(HIDScriptRequest) returns (HIDScriptJob) {}
rpc HIDRGetScriptJobResult(HIDScriptJob) returns (HIDScriptResult) {}
rpc HIDRCancelScriptJob(HIDScriptJob) returns (Empty) {}
rpc HIDGetScriptJobResult(HIDScriptJob) returns (HIDScriptResult) {}
rpc HIDCancelScriptJob(HIDScriptJob) returns (Empty) {}
rpc FSWriteFile(WriteFileRequest) returns (Empty) {}
rpc FSReadFile(ReadFileRequest) returns (ReadFileResponse) {}
@ -68,7 +68,8 @@ message FileInfoResponse {
/* HID */
message HIDScriptRequest {
string scriptPath = 1; //for scripts hosted on the device
string scriptPath = 1;
uint32 timeoutSeconds = 2; //a timeout > 0 interrupts the HIDScript when reached, meassurement in seconds
}
message HIDScriptJob {

View File

@ -68,10 +68,15 @@ func (s *server) FSCreateTempDirOrFile(ctx context.Context, req *pb.TempDirOrFil
}
}
func (s *server) HIDRCancelScriptJob(ctx context.Context, job *pb.HIDScriptJob) (empty *pb.Empty, err error) {
func (s *server) HIDCancelScriptJob(ctx context.Context, sJob *pb.HIDScriptJob) (empty *pb.Empty, err error) {
empty = &pb.Empty{}
if HidCtl == nil { return empty, rpcErrNoHid}
// Try to find script
job,err := HidCtl.GetBackgroundJobByID(int(sJob.Id))
if err != nil { return empty, err }
job.Cancel()
return
}
@ -81,8 +86,10 @@ func (s *server) HIDRunScript(ctx context.Context, scriptReq *pb.HIDScriptReques
if scriptFile, err := ioutil.ReadFile(scriptReq.ScriptPath); err != nil {
return nil, errors.New(fmt.Sprintf("Couldn't load HIDScript '%s': %v\n", scriptReq.ScriptPath, err))
} else {
//ToDo: check influence of request context
scriptVal,err := HidCtl.RunScript(ctx, string(scriptFile))
jobCtx := context.Background()
// ToDo: we don't retrieve the cancelFunc which should be called to free resources. Solution: use withCancel context and call cancel by go routine on timeout
if scriptReq.TimeoutSeconds > 0 { jobCtx,_ = context.WithTimeout(jobCtx, time.Second * time.Duration(scriptReq.TimeoutSeconds))}
scriptVal,err := HidCtl.RunScript(jobCtx, string(scriptFile))
if err != nil { return nil,err }
val,_ := scriptVal.Export() //Convert to Go representation, error is always nil
jsonVal,err := json.Marshal(val)
@ -98,15 +105,49 @@ func (s *server) HIDRunScript(ctx context.Context, scriptReq *pb.HIDScriptReques
}
}
func (s *server) HIDRunScriptJob(ctx context.Context, scriptReq *pb.HIDScriptRequest) (job *pb.HIDScriptJob, err error) {
func (s *server) HIDRunScriptJob(ctx context.Context, scriptReq *pb.HIDScriptRequest) (rJob *pb.HIDScriptJob, err error) {
if HidCtl == nil { return nil, rpcErrNoHid}
if scriptFile, err := ioutil.ReadFile(scriptReq.ScriptPath); err != nil {
return nil, errors.New(fmt.Sprintf("Couldn't load HIDScript '%s': %v\n", scriptReq.ScriptPath, err))
} else {
//Note: Don't use the gRPC context, it would cancel after this call and thus interrupt the job immediately
jobCtx := context.Background()
// ToDo: we don't retrieve the cancelFunc which should be called to free resources. Solution: use withCancel context and call cancel by go routine on timeout
if scriptReq.TimeoutSeconds > 0 { jobCtx,_ = context.WithTimeout(jobCtx, time.Second * time.Duration(scriptReq.TimeoutSeconds))}
job,err := HidCtl.StartScriptAsBackgroundJob(jobCtx, string(scriptFile))
if err != nil { return nil,err }
rJob = &pb.HIDScriptJob{
Id: uint32(job.Id),
}
return rJob,nil
}
return
}
func (s *server) HIDRGetScriptJobResult(ctx context.Context,job *pb.HIDScriptJob) (scriptRes *pb.HIDScriptResult, err error) {
func (s *server) HIDGetScriptJobResult(ctx context.Context, sJob *pb.HIDScriptJob) (scriptRes *pb.HIDScriptResult, err error) {
if HidCtl == nil { return nil, rpcErrNoHid}
// Try to find script
job,err := HidCtl.GetBackgroundJobByID(int(sJob.Id))
if err != nil { return scriptRes, err }
//ToDo: check impact/behavior, because ctx is provided by gRPC server
scriptVal,err := HidCtl.WaitBackgroundJobResult(ctx, job)
if err != nil { return nil,err }
val,_ := scriptVal.Export() //Convert to Go representation, error is always nil
jsonVal,err := json.Marshal(val)
if err != nil {
return nil, errors.New(fmt.Sprintf("Script seems to have succeeded but result couldn't be converted to JSON: %v\n", err))
}
scriptRes = &pb.HIDScriptResult{
IsFinished: true,
Job: &pb.HIDScriptJob{Id:0},
ResultJson: string(jsonVal),
}
return scriptRes,nil
return
}

View File

@ -1 +0,0 @@
package main

View File

@ -1 +0,0 @@
package main