It do nothing.
Change-Id: I0a17b090566172c6b7dc474ae3ca2271f97afa3d
::grpc::Status execute(Command *cmd);
public:
- ::grpc::Status sync(::grpc::ServerContext * context,
- const ::aurum::ReqEmpty *request,
- ::aurum::RspEmpty * response) override;
::grpc::Status killServer(::grpc::ServerContext * context,
const ::aurum::ReqEmpty *request,
::aurum::RspEmpty * response) override;
::grpc::Status dumpObjectTree(::grpc::ServerContext *context,
const ::aurum::ReqDumpObjectTree *request,
::aurum::RspDumpObjectTree * response) override;
-};
\ No newline at end of file
+};
virtual ::grpc::Status execute() = 0;
virtual ::grpc::Status executePost();
virtual ::grpc::Status executePre();
-};
\ No newline at end of file
+};
#pragma once
#include "Commands/KillServerCommand.h"
-#include "Commands/SyncCommand.h"
-
#include "Commands/FindElementCommand.h"
#include "Commands/GetAttributeCommand.h"
+++ /dev/null
-#pragma once
-
-#include <gio/gio.h>
-#include <grpcpp/grpcpp.h>
-#include "Commands/Command.h"
-#include "ObjectMapper.h"
-#include <aurum.grpc.pb.h>
-#include "config.h"
-
-class SyncCommand : public Command {
-private:
- const ::aurum::ReqEmpty* mRequest;
- ::aurum::RspEmpty* mResponse;
-
-public:
- SyncCommand(const ::aurum::ReqEmpty* request, ::aurum::RspEmpty* response);
- ::grpc::Status execute() override;
-};
\ No newline at end of file
files('src/Commands/TouchDownCommand.cc'),
files('src/Commands/TouchMoveCommand.cc'),
files('src/Commands/TouchUpCommand.cc'),
- files('src/Commands/SyncCommand.cc'),
files('src/Commands/KillServerCommand.cc'),
files('src/Commands/TakeScreenshotCommand.cc'),
files('src/Commands/Command.cc'),
}
aurumServiceImpl::~aurumServiceImpl() {}
-::grpc::Status aurumServiceImpl::aurumServiceImpl::sync(
- ::grpc::ServerContext* context, const ::aurum::ReqEmpty* request,
- ::aurum::RspEmpty* response)
-{
- std::unique_ptr<SyncCommand> cmd = std::make_unique<SyncCommand>(request, response);
- return execute(cmd.get());
-}
::grpc::Status aurumServiceImpl::aurumServiceImpl::killServer(
::grpc::ServerContext* context, const ::aurum::ReqEmpty* request,
::aurum::RspEmpty* response)
+++ /dev/null
-#include "SyncCommand.h"
-#include <loguru.hpp>
-
-#include "UiDevice.h"
-
-SyncCommand::SyncCommand(const ::aurum::ReqEmpty *request,
- ::aurum::RspEmpty * response)
- : mRequest{request}, mResponse{response}
-{
-}
-
-::grpc::Status SyncCommand::execute()
-{
- std::shared_ptr<UiDevice> obj = UiDevice::getInstance();
- long long timeMs = obj->getSystemTime(TimeRequestType::WALLCLOCK);
- LOG_SCOPE_F(INFO, "Sync Command @ %f", timeMs/1000.0);
- // do post-command
- return grpc::Status::OK;
-}
\ No newline at end of file
* Here is a page with some descriptions about protocol explained
*/
service Bootstrap {
- rpc sync(ReqEmpty) returns (RspEmpty) {}
rpc killServer(ReqEmpty) returns (RspEmpty) {}
rpc findElement(ReqFindElement) returns (RspFindElement) {}
rpc getValue(ReqGetValue) returns (RspGetValue) {}
message RspDumpObjectTree {
RspStatus status = 1;
repeated Element roots = 2;
-}
\ No newline at end of file
+}
var request = new messages.ReqFindElement();
- client.sync(new messages.ReqEmpty(), function(err, res){console.log(res)});
-
request.setStrategy(proto.aurum.ReqFindElement.RequestType.TEXT);
request.setTextfield("DONE");
rsp = stub.touchUp(aurum_pb2.ReqTouchUp(coordination=aurum_pb2.Point(x=xx,y=yy)))
print(rsp)
-def sync(stub):
- rsp = stub.sync(aurum_pb2.ReqEmpty())
- print(rsp)
-
def run():
with grpc.insecure_channel('127.0.0.1:50051') as channel:
stub = aurum_pb2_grpc.BootstrapStub(channel)
rsp = stub.touchUp(aurum_pb2.ReqTouchUp(coordination=aurum_pb2.Point(x=xx,y=yy)))
print(rsp)
-def sync(stub):
- rsp = stub.sync(aurum_pb2.ReqEmpty())
- print(rsp)
-
-
def new_memo(stub):
touchdown(stub, 630,1140)
time.sleep(0.1)
rsp = stub.touchUp(aurum_pb2.ReqTouchUp(coordination=aurum_pb2.Point(x=xx,y=yy)))
print(rsp)
-def sync(stub):
- rsp = stub.sync(aurum_pb2.ReqEmpty())
- print(rsp)
-
-
def new_memo(stub):
touchdown(stub, 630,1140)
time.sleep(0.1)
rsp = stub.touchUp(aurum_pb2.ReqTouchUp(coordination=aurum_pb2.Point(x=xx,y=yy)))
print(rsp)
-def sync(stub):
- rsp = stub.sync(aurum_pb2.ReqEmpty())
- print(rsp)
-
-
def new_memo(stub):
touchdown(stub, 630,1140)
time.sleep(0.1)
def run():
with grpc.insecure_channel('127.0.0.1:50051') as channel:
stub = aurum_pb2_grpc.BootstrapStub(channel)
-#sync(stub)
foundId = findElementByText(stub, 'Title')
print(foundId)