CN109491811B - Game testing method, device and storage medium - Google Patents

Game testing method, device and storage medium Download PDF

Info

Publication number
CN109491811B
CN109491811B CN201811385641.8A CN201811385641A CN109491811B CN 109491811 B CN109491811 B CN 109491811B CN 201811385641 A CN201811385641 A CN 201811385641A CN 109491811 B CN109491811 B CN 109491811B
Authority
CN
China
Prior art keywords
host
stepping motor
instruction
api
main control
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811385641.8A
Other languages
Chinese (zh)
Other versions
CN109491811A (en
Inventor
李彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201811385641.8A priority Critical patent/CN109491811B/en
Publication of CN109491811A publication Critical patent/CN109491811A/en
Application granted granted Critical
Publication of CN109491811B publication Critical patent/CN109491811B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02PCONTROL OR REGULATION OF ELECTRIC MOTORS, ELECTRIC GENERATORS OR DYNAMO-ELECTRIC CONVERTERS; CONTROLLING TRANSFORMERS, REACTORS OR CHOKE COILS
    • H02P8/00Arrangements for controlling dynamo-electric motors of the kind having motors rotating step by step
    • H02P8/14Arrangements for controlling speed or speed and torque

Abstract

The invention provides a game testing method, a game testing device and a storage medium, wherein a main control host is connected with at least one first host in a remote communication manner, and a corresponding stepping motor control instruction is sent to the at least one first host through the main control host; the method comprises the steps of generating an analog signal which can be identified by a stepping motor through at least one first host according to a stepping motor control instruction, and sending the analog signal to the stepping motor connected with the first host so as to enable the stepping motor to execute corresponding game test operation. By the method, automatic remote control of different types of stepping motors on a daily operating system is realized, and a stepping motor driver does not need to be customized.

Description

Game testing method, device and storage medium
Technical Field
The embodiment of the invention relates to the technical field of game testing, in particular to a game testing method, a game testing device and a storage medium.
Background
The stepping motor is an open-loop control motor which converts an electric pulse signal into angular displacement or linear displacement, and various modes for controlling the operation of the stepping motor are provided. Fig. 1 is a schematic diagram of a process for controlling a stepping motor in a prior art, which is mainly implemented by connecting an embedded programmable controller manufactured by a manufacturer to a driver of the stepping motor by wire, then inputting a fixed instruction on an operation interface of the controller, analyzing the instruction by the controller and sending a pulse signal according to instruction logic, and converting the pulse signal into an azimuth angle displacement by the driver of the stepping motor, thereby controlling the action of the stepping motor. The technical scheme requires a user to design the execution logic of the stepping motor in advance, and once the stepping motor starts to operate, the execution logic of the stepping motor cannot be changed.
In order to realize that a remote host controls a stepping motor to execute a game test task, those skilled in the art realize that the stepping motor is operated on a host equipped with a daily-use operating system (Windows or Linux) through some customized matching hardware, such as a stepping motor controller capable of supporting COM port transmission instructions. Specifically, the stepping motor controller is connected with a serial port of a PC host according to the guide, and the PC host sends a corresponding operation instruction to control the stepping motor at the far end through a COM port instruction string provided by a manufacturer.
Although the implementation difficulty of the above technical scheme of remote control is low, when facing different stepper motor drivers, it cannot be guaranteed that controllers which can support COM port communication exist on the market and correspond to the drivers, and once the purchased motor controllers cannot support COM port communication, the remote control scheme fails.
Disclosure of Invention
The game testing method, the game testing device and the storage medium realize the automatic remote control of different types of stepping motors on a daily operating system so as to execute corresponding game testing tasks without customizing a stepping motor driver.
A first aspect of the invention provides a game testing method, the method comprising:
establishing remote communication connection between a main control host and at least one first host;
sending a corresponding stepping motor control instruction to the at least one first host through the main control host, wherein the first host is connected with the at least one stepping motor;
and generating an analog signal which can be identified by the stepping motor according to the stepping motor control instruction through the at least one first host, and sending the analog signal to the stepping motor to execute corresponding game test operation.
In a possible implementation manner, the step of sending, by the master host, a corresponding stepping motor control instruction to the at least one first host includes:
sending a calling instruction to the main control host through the remote host;
determining an Application Programming Interface (API) corresponding to the controlled stepping motor according to the calling instruction through the main control host;
providing the API to the remote host, so that the remote host calls the API to send an operation instruction to the master host;
and responding to the operation instruction through the main control host, and sending a corresponding stepping motor control instruction to the at least one first host.
In a possible implementation manner, the step of sending, by the master host, a corresponding stepping motor control instruction to the at least one first host includes:
sending a calling instruction to the main control host through the remote host;
determining an Application Programming Interface (API) corresponding to the controlled stepping motor according to the calling instruction through the main control host;
and providing the API to the remote host, so that the remote host calls the API to send the stepping motor control instruction to the controlled stepping motor.
In one possible implementation manner, the call instruction includes a controlled stepping motor number; the determining, by the master control host, an application programming interface API corresponding to the controlled stepper motor according to the call instruction includes:
determining a first host connected with the stepping motor corresponding to the controlled stepping motor number according to the controlled stepping motor number;
and determining an API corresponding to the controlled stepping motor according to the first host.
In a possible implementation manner, before sending, by the remote host, the call instruction to the master host, the method further includes:
acquiring starting functions corresponding to various basic operations of different types of stepping motors connected with the first host and IP information of the first host;
and encapsulating the starting functions of the different types of stepping motors and the IP information of the first host to generate APIs corresponding to the different types of stepping motors.
In a possible implementation manner, the encapsulating the start function of the different types of stepping motors and the IP information of the first host to generate an API corresponding to control the different types of stepping motors includes:
encapsulating the starting functions of the different types of stepping motors and the IP information of the first host to obtain instruction operation functions corresponding to the different types of stepping motors;
and generating an external API of the instruction operation function so that a remote host calls the API to send the stepping motor control instruction to the controlled stepping motor.
In one possible implementation, the basic operation includes a forward and reverse rotation operation, a mechanical zero-seeking operation, and a rotation speed control operation.
In one possible implementation manner, the operation instruction includes a controlled stepping motor number, a rotation angle parameter, and a rotation speed parameter.
A second aspect of the present invention provides a game testing apparatus comprising:
the establishing module is used for establishing remote communication connection between the main control host and at least one first host;
the sending module is used for sending a corresponding stepping motor control instruction to the at least one first host through the main control host, wherein the first host is connected with the at least one stepping motor;
the generating module is used for generating an analog signal which can be identified by the stepping motor according to the stepping motor control instruction through the at least one first host;
the sending module is further used for sending the analog signal to the stepping motor to execute corresponding game test operation.
A third aspect of the present invention provides a game testing apparatus comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement a game testing method according to any one of the first aspect of the invention.
A fourth aspect of the invention provides a computer readable storage medium having stored thereon a computer program for execution by a processor to implement a game testing method according to any one of the first aspects of the invention.
According to the game testing method, the game testing device and the game testing storage medium, the remote communication connection between the main control host and the at least one first host is established, and the main control host sends the corresponding stepping motor control instruction to the at least one first host; the method comprises the steps of generating an analog signal which can be identified by a stepping motor through at least one first host according to a stepping motor control instruction, and sending the analog signal to the stepping motor connected with the first host so as to enable the stepping motor to execute corresponding game test operation. By the method, automatic remote control of different types of stepping motors on a daily operating system is realized, and a stepping motor driver does not need to be customized.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a schematic flow chart of a prior art solution for controlling a stepper motor;
FIG. 2 is a schematic structural diagram of a game testing system according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating a game testing method according to an embodiment of the present invention;
FIG. 4 is a schematic flow chart illustrating a game testing method according to another embodiment of the present invention;
FIG. 5 is a schematic flow chart illustrating a game testing method according to another embodiment of the present invention;
FIG. 6 is a schematic configuration flow chart of a game testing method according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a game testing apparatus according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of a game testing device according to another embodiment of the present invention;
fig. 9 is a schematic diagram of a hardware structure of a game testing apparatus according to an embodiment of the present invention.
With the above figures, certain embodiments of the invention have been illustrated and described in more detail below. The drawings and the description are not intended to limit the scope of the inventive concept in any way, but rather to illustrate it by those skilled in the art with reference to specific embodiments.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terms "comprising" and "having," and any variations thereof, in the description and claims of this invention are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
The terms "first," "second," and the like in the description and in the claims, and in the drawings described above, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein.
Reference throughout this specification to "one embodiment" or "another embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Thus, the appearances of the phrases "in some embodiments" or "in this embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. It should be noted that the embodiments and features of the embodiments may be combined with each other without conflict.
The game testing method provided by the embodiment of the invention mainly controls at least one stepping motor to execute actions to complete the testing task of the game, and the testing task needs to run an automatically controlled logic program on a PC (Windows system) host which is completely isolated from the stepping motors to realize the simultaneous control of a plurality of stepping motors. The Remote control of the plurality of stepping motors can be realized by Remote Procedure Call (RPC) technology and bus extender GPIO analog pulses. Before describing the game testing method provided in this embodiment, first, the terminology mentioned in this embodiment is briefly described.
A stepping motor: an open-loop control motor for converting an electric pulse signal into angular displacement or linear displacement is a main executive element in a modern digital program control system and is widely applied. In the non-overload condition, the rotation speed and the stop position of the motor only depend on the frequency and the pulse number of the pulse signal and are not influenced by the load change, when the stepping driver receives a pulse signal, the stepping driver drives the stepping motor to rotate by a fixed angle called angular displacement according to the set direction, and the rotation of the stepping motor is operated by one step at the fixed angle. The angular displacement can be controlled by controlling the number of pulses, so that the aim of accurate positioning is fulfilled; meanwhile, the rotating speed and the rotating acceleration of the motor can be controlled by controlling the pulse frequency, so that the aim of speed regulation is fulfilled.
RPC technology: the protocol technology of requesting service from a remote computer program through a network encapsulates some basic operations of the stepping motors through the technology, and registers the method on the master control host, and the master control host encapsulates the corresponding method and provides interfaces (namely Application Programming Interfaces (APIs)) for remotely controlling the stepping motors.
GPIO: the expansion of the I/O port is simplified using industry standard I2C, SMBus, or SPI interfaces. GPIO products can provide additional control and monitoring functions when the microcontroller or chipset does not have sufficient I/O ports, or when the system needs to employ far-end serial communication or control. The GPIO replaces the controller provided by the manufacturer of the stepping motor to be used as the input of the stepping motor, and the purpose of the invention is to enable the input source of the stepping motor to be separated from the controller set by the manufacturer and provide analog pulse signals for drivers of different types of stepping motors.
In the game testing method provided by the embodiment, a daily-used PC is used as an input source of the stepping motor, one general control computer is used as an external packaging server, basic operations corresponding to different types of stepping motors are packaged, and the basic operations are used as a remote API (application program interface) to be called by a remote host or a client. This solution no longer requires the stepper motor controller to be a customized electronic board (the controller described in the background art includes a COM port), and the remote host or client can operate the operation of multiple stepper motors in real time without acquiring the operation details of each stepper motor.
Fig. 2 is a schematic structural diagram of a game testing system according to an embodiment of the present invention, where it should be noted that, in the game testing system according to the embodiment, the numbers of the stepping motors and the first hosts are only exemplary, and the specific numbers may be set according to actual requirements.
As shown in fig. 2, the game test system of the present embodiment includes: 5 different types of stepper motors (1, 2, 3, 4, 5) and 2 primary hosts (A, B), 1 master host and 1 remote host. The specific connection relationship is as follows: the stepping motors 1, 2 and 3 are respectively connected with the first host A, and the stepping motors 4 and 5 are respectively connected with the first host B; the first host A, B is wirelessly connected with the master host through a network, and the master host is wirelessly connected with the remote host through a network.
It should be noted that the first host is connected to different types of stepping motors through the bus extender GPIO, and specifically, the GIPO interface of the first host is connected to the signal connection ports (PUL +: positive and negative pulse interfaces, DIR +: positive and negative direction interfaces) of different types of stepping motor drivers through the dupont line. The kernel interface of the first host operates the output of the GPIO, simulates pulse and direction through different signal combination forms, and then is converted into angular displacement through a driver to drive the stepping motor to operate.
Based on the game testing system, the embodiment of the invention provides a game testing method, which includes that a main control host responds to an operation instruction input by a user, sends a corresponding stepping motor control instruction to a first host, generates an analog signal capable of being recognized by a stepping motor according to the stepping motor control instruction through the first host, and sends the analog signal to the stepping motor to execute corresponding game testing operation. The test process enables the stepping motor to be controlled to execute corresponding game test operation, and the corresponding game test operation can be matched with some automatically controlled logic programs which need to run on a daily operating system (Windows or Linux), so that a stepping motor driver does not need to be customized, and only a plurality of daily used PC hosts with GPIO are needed.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 3 is a flow chart of a game testing method according to an embodiment of the present invention, where the method can be performed by any device that performs the method, and the device can be implemented by software and/or hardware.
As shown in fig. 3, the game testing method provided by this embodiment includes the following steps:
s301, establishing remote communication connection between the main control host and at least one first host;
s302, sending a corresponding stepping motor control instruction to at least one first host through the main control host;
in this embodiment, the game testing device sends a call instruction to the main control host through the remote host; determining an Application Programming Interface (API) corresponding to the controlled stepping motor according to the calling instruction through the main control host; providing the API to the remote host, so that the remote host calls the API to send an operation instruction to the main control host; and responding to the operation instruction through the main control host, and sending a corresponding stepping motor control instruction to at least one first host.
In the present embodiment, the operation instruction input by the user is used to instruct which basic operation is performed on the controlled stepping motor. Specifically, the operation command includes a controlled stepping motor number, a rotation angle parameter, and a rotation speed parameter. Basic operations of the stepping motor include forward and reverse rotation operations, mechanical zero finding operations, rotational speed control operations, and the like.
After receiving an operation instruction input by a user, the game testing device generates a corresponding stepping motor control instruction according to the operation instruction, and sends the stepping motor control instruction to a first host connected with a controlled stepping motor.
It should be noted that the operation command of the present embodiment may simultaneously include an operation control command for a plurality of stepping motors, so as to simultaneously control a plurality of stepping motors to execute corresponding game testing operations.
S303, generating an analog signal which can be identified by the stepping motor according to the stepping motor control instruction through at least one first host;
the game testing device obtains an analog signal of the controlled stepping motor through the first host, wherein the first host generates the analog signal which can be identified by the stepping motor according to a stepping motor control instruction and an instruction operating function prestored in the first host. Different types of stepping motors have different corresponding instruction operating functions when executing the same basic operation.
And S304, sending the analog signal to the stepping motor to execute corresponding game test operation.
The game testing device sends the generated simulation signal which can be identified by the stepping motor to the corresponding stepping motor so as to enable the stepping motor to execute the responding game testing operation. For example, a stepping motor is used for simulating a human hand to automatically test a sound speed game and 'step on a white block', and the stepping motor is controlled to drive a manipulator to simulate and click a game test interface, so that a game test process is realized.
According to the game testing method provided by the embodiment of the invention, the remote communication connection between the main control host and the at least one first host is established, and the main control host sends a corresponding stepping motor control instruction to the at least one first host; the method comprises the steps of generating an analog signal which can be identified by a stepping motor through at least one first host according to a stepping motor control instruction, and sending the analog signal to the stepping motor connected with the first host so as to enable the stepping motor to execute corresponding game test operation. By the method, automatic remote control of different types of stepping motors on a daily operating system is realized, and a stepping motor driver does not need to be customized.
Fig. 4 is a schematic flow chart of a game testing method according to another embodiment of the present invention, and as shown in fig. 4, the game testing method according to this embodiment includes the following steps:
s401, sending a calling instruction to a main control host through a remote host;
in this embodiment, a user sends a call instruction to the master control host through the remote host, where the call instruction is used to instruct to call an API corresponding to a controlled stepping motor, and the call instruction includes a controlled stepping motor number.
S402, determining an Application Programming Interface (API) corresponding to the controlled stepping motor according to the calling instruction through the main control host;
the game testing device obtains the API corresponding to the controlled stepping motor in the calling instruction through the main control host, wherein the main control host determines the API corresponding to the controlled stepping motor from a prestored API list according to the calling instruction and sends the API to the game testing device. The API interface is used for indicating an instruction execution function for executing basic operation on the controlled stepping motor.
It should be noted that the API interfaces of different types of stepping motors are different, and the API interfaces corresponding to different basic operations of the same stepping motor are also different. Therefore, determining the API interface corresponding to the controlled stepping motor in this embodiment specifically means: and determining an API interface corresponding to the basic operation of the controlled stepping motor in the calling instruction.
The API list pre-stored in the main control host is completed in the configuration stage of the game testing method, and includes the stepper motor number and the API corresponding to the stepper motor number, and the specific configuration process may be referred to in the following embodiments.
And S403, providing the API to the remote host, so that the remote host calls the API to send a stepping motor control instruction to the controlled stepping motor.
The game testing device sends the acquired API to the remote host, the remote host sends a stepping motor control instruction input by a user to the controlled stepping motor by calling the API, and the stepping motor control instruction comprises a rotation number, a rotation angle parameter and a rotation speed parameter.
Optionally, the retrieval instruction of this embodiment further includes a rotation number, a rotation angle parameter, and a rotation speed parameter. After the main control host determines the API interface corresponding to the controlled stepping motor, the main control host directly calls the API according to the rotation number, the rotation angle parameter and the rotation speed parameter in the calling instruction to realize the remote control of the controlled stepping motor, so that the stepping motor executes corresponding game test operation. The process does not need to send instructions to a first host connected with the controlled stepping motor and does not need to send an API (application program interface) to a remote host, so that the main control host can directly control the stepping motor.
In the game testing method provided in this embodiment, the remote host implements remote control of the stepping motor by calling the API of the stepping motor, and completes the game testing operation, where the difference between the process and the above embodiment is as follows: the remote host or the main control host directly calls the API corresponding to the stepping motor to control the action of the stepping motor, the main control host does not need to send instructions to the first host, and the first host sends analog signals to the stepping motor, so that the purpose of directly controlling a plurality of stepping motors at a remote terminal is achieved.
On the basis of the above embodiment, the game testing method provided in this embodiment describes in detail how to determine the API interface of the controlled stepper motor, and the number of the first hosts in this embodiment is at least two, for example, the first hosts A, B shown in fig. 2 are included. The game testing method of the present embodiment will be described in detail below with reference to the accompanying drawings.
Fig. 5 is a schematic flow chart of a game testing method according to another embodiment of the present invention, and based on the embodiment shown in fig. 4, as shown in fig. 5, the game testing method provided in this embodiment specifically includes the following steps:
s501, sending a calling instruction to a main control host through a remote host;
in this embodiment, the retrieval command includes a controlled stepping motor number, a rotation number, and a rotation angle parameter. Optionally, the invoking instruction further includes: a rotational speed parameter.
For example, the calling instruction comprises a controlled stepping motor number, a rotation number and a rotation angle, which are specifically represented as 3:2:1, and the calling instruction represents that the motor No. 3 is operated to reversely rotate by 1 angular displacement, wherein a first parameter in the calling instruction is the controlled stepping motor number; the second parameter is a rotation number, wherein the rotation number 1 represents forward rotation, and the rotation number 2 represents reverse rotation; the third parameter is the angle of rotation, which represents the angular displacement of the rotation for this operation.
S502, determining a first host connected with the stepping motor corresponding to the controlled stepping motor number according to the controlled stepping motor number;
in this embodiment, the game testing apparatus determines, through the master control host, the first host connected to the stepping motor corresponding to the controlled stepping motor number in the current call instruction from the pre-stored correspondence table between the stepping motor and the first host according to the controlled stepping motor number in the call instruction.
For example, if the number of the controlled stepping motor in the current fetch instruction is the number 2 stepping motor, as can be seen from fig. 2, the number 2 stepping motor is connected to the first host a, and the first host connected to the stepping motor corresponding to the number of the controlled stepping motor in the current fetch instruction may be determined as the first host a. If the controlled stepping motor number in the current call instruction is the stepping motor number 5, it can be determined that the first host is the first host B.
S503, determining an API corresponding to the controlled stepping motor according to the first host;
according to the embodiment, the API interfaces of different controlled stepping motors are different, and the API interfaces corresponding to different basic operations of the same controlled stepping motor are also different. And the game testing device determines an API interface corresponding to the controlled stepping motor connected with the first host according to the first host through the main control host, and acquires an API corresponding to the calling instruction.
S504, the API is provided for the remote host, so that the remote host calls the API to send a stepping motor control instruction to the controlled stepping motor.
S504 of this embodiment is the same as S403 of the above embodiment, and the implementation principle and technical effect thereof are the same, and are not described herein again.
According to the game testing method provided by the embodiment of the invention, a calling instruction is sent to the main control host through the remote host; determining a first host connected with the stepping motor corresponding to the controlled stepping motor number according to the controlled stepping motor number; determining an API corresponding to the controlled stepping motor according to the first host; and sending the API to a remote host for the remote host to call the API and send a stepping motor control instruction to the controlled stepping motor, so that the stepping motor directly executes corresponding game test operation according to the stepping motor control instruction. The game testing method of the embodiment realizes the automatic remote control of different types of stepping motors on a daily operating system, does not need to customize a stepping motor driver, and can realize the real-time control of a plurality of stepping motors if the calling instruction comprises the control operation of the plurality of stepping motors.
On the basis of the foregoing embodiments, the game testing method provided in the embodiments of the present invention further includes an early configuration process of the game testing system, and the configuration process of the game testing method provided in the embodiments is described in detail below with reference to the accompanying drawings.
Fig. 6 is a schematic configuration flow diagram of a game testing method according to an embodiment of the present invention, and as shown in fig. 6, the configuration process includes the following steps:
s601, acquiring starting functions corresponding to various basic operations of different types of stepping motors connected with a first host and IP information of the first host;
in the present embodiment, the basic operation includes a normal and reverse rotation operation, a mechanical zero-finding operation, a rotation speed control operation, and the like. The forward and reverse rotation operation is the operation for controlling the forward or reverse rotation of the stepping motor; the mechanical zero-seeking operation is an operation for preventing mechanical collision from adjusting the zero position of the stepping motor; the rotation speed control operation is an operation of controlling the rotation speed of the stepping motor.
In the above embodiments, the stepping motor control command input by the user through the remote host is used to remotely control one of the basic operations of the stepping motor.
S602, encapsulating the start functions of the different types of stepping motors and the IP information of the first host to generate APIs corresponding to the control of the different types of stepping motors.
In the step, the starting functions of the different types of stepping motors and the IP information of the first host are encapsulated through the main control host to obtain instruction operation functions corresponding to the different types of stepping motors; and generating an external API of the command operation function so that the remote host calls the API to control different types of stepping motors.
Specifically, after acquiring the start functions corresponding to each basic operation of the stepping motors of different types, the first host of this embodiment starts and registers the start functions in the mode of the RPC server, and sets a first host start-up program, where the program starts the socket client to send the IP information of the first host to the main control host. The socket server of the main control host is used for monitoring the starting condition of each stepping motor for controlling the first host in real time, calling each starting function which is registered by the first host and used as the upper computer of the stepping motor in a mode of an RPC client, and then packaging the starting functions corresponding to the basic operations into instruction execution functions of the basic operations according to IP information of each first host. The main control host correspondingly generates an external API interface of an instruction execution function, the scheme adopts a flash frame of Python, a background service is started after the flash frame is started, and the remote host can call the API to send a stepping motor control instruction to the controlled stepping motor.
In the configuration flow of the game testing method provided in this embodiment, the main control host obtains the start function corresponding to each basic operation of the different types of stepping motors connected to each first host and the IP information of each first host, encapsulates the start function of the different types of stepping motors and the IP information of the first host, and generates API interfaces corresponding to the different types of stepping motors for the remote host to call. Based on the configuration process, the remote host can simultaneously remotely control a plurality of stepping motors on a daily operating system so as to enable the stepping motors to execute corresponding game test operation.
Fig. 7 is a schematic structural diagram of a game testing device according to an embodiment of the present invention, and as shown in fig. 7, a game testing device 70 according to the embodiment includes:
an establishing module 71, configured to establish a remote communication connection between a master host and at least one first host;
a sending module 72, configured to send a corresponding step motor control instruction to the at least one first host through the master host, where the first host is connected to the at least one step motor;
a generating module 73, configured to generate, by the at least one first host, an analog signal that can be recognized by the stepping motor according to the stepping motor control instruction;
the sending module 72 is further configured to send the analog signal to the stepping motor to execute a corresponding game testing operation.
The game testing device provided by the embodiment of the invention comprises an establishing module, a sending module and a generating module, wherein the establishing module is used for establishing remote communication connection between a main control host and at least one first host, and the sending module is used for sending a corresponding stepping motor control instruction to the at least one first host through the main control host; the generating module is used for generating an analog signal which can be identified by the stepping motor through at least one first host according to the stepping motor control instruction, and the sending module is also used for sending the analog signal to the stepping motor connected with the first host so as to enable the stepping motor to execute corresponding game testing operation. The device realizes the automatic remote control of different types of stepping motors on a daily operating system without customizing a stepping motor driver.
Optionally, the sending module 72 is specifically configured to send a call instruction to the master host through a remote host;
determining an Application Programming Interface (API) corresponding to the controlled stepping motor according to the calling instruction through the main control host;
providing the API to the remote host, so that the remote host calls the API to send an operation instruction to the master host;
and responding to the operation instruction through the main control host, and sending a corresponding stepping motor control instruction to the at least one first host.
Optionally, the sending module 72 is specifically configured to send a call instruction to the master host through a remote host;
determining an Application Programming Interface (API) corresponding to the controlled stepping motor according to the calling instruction through the main control host;
and providing the API to the remote host, so that the remote host calls the API to send the stepping motor control instruction to the controlled stepping motor.
Optionally, the call instruction includes a controlled stepping motor number; the determining, by the master control host, an application programming interface API corresponding to the controlled stepper motor according to the call instruction includes:
determining a first host connected with the stepping motor corresponding to the controlled stepping motor number according to the controlled stepping motor number;
and determining an API corresponding to the controlled stepping motor according to the first host.
Fig. 8 is a schematic structural diagram of a game testing device according to another embodiment of the present invention, and based on the device shown in fig. 7, the game testing device 70 according to this embodiment further includes: an acquisition module 74.
The obtaining module 74 is configured to obtain, before the remote host sends the call instruction to the main control host, a start function corresponding to each basic operation of different types of stepping motors connected to the first host, and IP information of the first host;
the generating module 73 is further configured to encapsulate the start functions of the different types of stepping motors and the IP information of the first host, and generate APIs corresponding to control the different types of stepping motors.
Optionally, the generating module 73 is specifically configured to:
encapsulating the starting functions of the different types of stepping motors and the IP information of the first host to obtain instruction operation functions corresponding to the different types of stepping motors;
and generating an external API of the instruction operation function so that a remote host calls the API to send the stepping motor control instruction to the controlled stepping motor.
Optionally, the basic operation includes a forward and reverse rotation operation, a mechanical zero finding operation, and a rotation speed control operation.
Optionally, the operation instruction includes a controlled stepping motor number, a rotation angle parameter, and a rotation speed parameter.
The game testing device provided in this embodiment may implement the technical solutions of the above method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
Fig. 9 shows a game testing device, which is only illustrated in fig. 9, and the embodiment of the present invention is not limited thereto.
Fig. 9 is a schematic diagram of a hardware structure of a game testing device according to an embodiment of the present invention, and as shown in fig. 9, a game testing device 90 according to the embodiment includes:
a memory 91;
a processor 92; and
a computer program;
wherein the computer program is stored in the memory 91 and configured to be executed by the processor 92 to implement the technical solution of any one of the foregoing method embodiments, and the implementation principle and technical effect thereof are similar, and are not described herein again.
Alternatively, the memory 91 may be separate or integrated with the processor 92.
When the memory 91 is a device separate from the processor 92, the game testing apparatus 90 further includes:
a bus 93 for connecting the memory 91 and the processor 92.
Embodiments of the present invention also provide a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor 92 to implement the steps performed by the game testing apparatus 90 in the above embodiments.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor, or in a combination of the hardware and software modules within the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present application are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the storage medium may reside as discrete components in an electronic device or host device.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (9)

1. A game testing method, the method comprising:
establishing remote communication connection between a main control host and at least one first host;
sending a corresponding stepping motor control instruction to the at least one first host through the main control host, wherein the first host is connected with the at least one stepping motor;
generating an analog signal which can be identified by the stepping motor according to the stepping motor control instruction through the at least one first host, and sending the analog signal to the stepping motor to execute corresponding game test operation;
the step of sending a corresponding stepping motor control command to the at least one first host through the master host comprises: sending a calling instruction to the main control host through the remote host; determining an Application Programming Interface (API) corresponding to the basic operation of the controlled stepping motor according to the calling instruction through the main control host; providing the API to the remote host, so that the remote host calls the API to send an operation instruction to the main control host; and responding to the operation instruction through the main control host, and sending a corresponding stepping motor control instruction to the at least one first host.
2. The method of claim 1, wherein the call instruction comprises a controlled stepper motor number; the determining, by the master control host, an application programming interface API corresponding to a basic operation of the controlled stepping motor according to the call instruction includes:
determining a first host connected with the stepping motor corresponding to the controlled stepping motor number according to the controlled stepping motor number;
and determining an API corresponding to the basic operation of the controlled stepping motor according to the first host.
3. The method of claim 1, wherein before sending the call instruction to the master host via the remote host, further comprising:
acquiring starting functions corresponding to various basic operations of different types of stepping motors connected with the first host and IP information of the first host;
and encapsulating the starting functions of the different types of stepping motors and the IP information of the first host to generate APIs corresponding to the different types of stepping motors.
4. The method according to claim 3, wherein the encapsulating the start-up function of the different types of stepping motors and the IP information of the first host to generate an API corresponding to control the different types of stepping motors comprises:
encapsulating the starting functions of the different types of stepping motors and the IP information of the first host to obtain instruction operation functions corresponding to the different types of stepping motors;
and generating an external API of the instruction operation function so that a remote host calls the API to send the stepping motor control instruction to the controlled stepping motor.
5. The method of claim 3, wherein the base operation comprises a positive and negative rotation operation, a mechanical zero-seeking operation, a rotational speed control operation.
6. The method of claim 1, wherein the operation command comprises a controlled stepper motor number, a rotation angle parameter, a rotation speed parameter.
7. A game testing device, comprising:
the establishing module is used for establishing remote communication connection between the main control host and at least one first host;
the sending module is used for sending a corresponding stepping motor control instruction to the at least one first host through the main control host, wherein the first host is connected with the at least one stepping motor;
the generating module is used for generating an analog signal which can be identified by the stepping motor according to the stepping motor control instruction through the at least one first host;
the sending module is also used for sending the analog signal to the stepping motor to execute corresponding game test operation;
the sending module is specifically configured to: sending a calling instruction to the main control host through the remote host; determining an Application Programming Interface (API) corresponding to the basic operation of the controlled stepping motor according to the calling instruction through the main control host; providing the API to the remote host, so that the remote host calls the API to send an operation instruction to the main control host; and responding to the operation instruction through the main control host, and sending a corresponding stepping motor control instruction to the at least one first host.
8. A game testing device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement a game testing method as claimed in any one of claims 1 to 7.
9. A computer-readable storage medium, having stored thereon a computer program for execution by a processor to implement a game testing method according to any one of claims 1 to 7.
CN201811385641.8A 2018-11-20 2018-11-20 Game testing method, device and storage medium Active CN109491811B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811385641.8A CN109491811B (en) 2018-11-20 2018-11-20 Game testing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811385641.8A CN109491811B (en) 2018-11-20 2018-11-20 Game testing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN109491811A CN109491811A (en) 2019-03-19
CN109491811B true CN109491811B (en) 2022-03-08

Family

ID=65697107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811385641.8A Active CN109491811B (en) 2018-11-20 2018-11-20 Game testing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN109491811B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110580119B (en) * 2019-08-28 2021-03-02 深圳市瑞立视多媒体科技有限公司 Control system based on user interface
CN112100076B (en) * 2020-09-24 2022-11-11 腾讯科技(深圳)有限公司 Game testing method, related device, equipment and storage medium
CN112671274A (en) * 2020-12-17 2021-04-16 中国航空工业集团公司成都飞机设计研究所 Universal motor control system and method

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09152912A (en) * 1995-11-30 1997-06-10 Nippon Steel Corp Remote control method for mobile object
CN101467183A (en) * 2006-04-13 2009-06-24 Igt公司 Remote content management and resource sharing on a gaming machine and method of implementing same
CN103151978A (en) * 2013-01-10 2013-06-12 中国科学院上海光学精密机械研究所 Driving controller for Ethernet stepping motor
CN104698950A (en) * 2015-03-25 2015-06-10 广州视源电子科技股份有限公司 Peripheral device control method, microcontroller, upper computer and system
CN105262388A (en) * 2015-10-15 2016-01-20 珠海格力电器股份有限公司 Stepping motor driving device and stepping motor control system
CN106313038A (en) * 2015-06-30 2017-01-11 芋头科技(杭州)有限公司 Real-time control debugging system and debugging method
CN106843304A (en) * 2017-03-31 2017-06-13 深圳诺欧博智能科技有限公司 Motor general-purpose control system and method
CN107315376A (en) * 2016-04-26 2017-11-03 上海安浦鸣志自动化设备有限公司 A kind of step motion system for supporting to may be programmed independent operating mode of operation
CN108762146A (en) * 2018-05-30 2018-11-06 杭州电子科技大学 Stepper motor low latency synchronizes interior networking kinetic control system

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6571141B1 (en) * 1995-05-30 2003-05-27 Roy-G-Biv Corporation Application programs for motion control devices including access limitations
US6915525B2 (en) * 2000-04-14 2005-07-05 Sony Corporation Method and apparatus for controlling set-top box hardware and software functions
US7076332B2 (en) * 2002-01-18 2006-07-11 National Instruments Corporation System and method for invoking execution of a sequence of operations that includes motion control, machine vision, and data acquisition (DAQ) functionality
CN100341238C (en) * 2005-12-26 2007-10-03 北京航空航天大学 Step motor network control apparatus applicable to medical robot
CN101056205A (en) * 2007-04-04 2007-10-17 杭州华为三康技术有限公司 A management method, system and device based on ATCA architecture-based server
KR20150005215A (en) * 2013-07-05 2015-01-14 삼성전자주식회사 Rui system, rui server, rui terminal apparatus and mtehod for providing rui service
CN103645719B (en) * 2013-12-18 2016-12-07 江苏大学 A kind of multi-drive synchronization tele-control system
CN108153667B (en) * 2016-12-06 2023-05-30 三六零科技集团有限公司 Automatic test method, device and system
CN106959672B (en) * 2017-04-28 2020-07-28 深圳市汇川控制技术有限公司 Industrial motion control system and method based on API
CN107350633A (en) * 2017-06-27 2017-11-17 安徽联亚智能装备制造有限公司 A kind of long-range networked control systems based on ZigBee
CN207039655U (en) * 2017-07-14 2018-02-23 北京安天网络安全技术有限公司 It is a kind of can remote assistance operation network security emergency disposal device
CN107301100A (en) * 2017-08-15 2017-10-27 北京悦畅科技有限公司 A kind of parking lot long-range control method, device and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09152912A (en) * 1995-11-30 1997-06-10 Nippon Steel Corp Remote control method for mobile object
CN101467183A (en) * 2006-04-13 2009-06-24 Igt公司 Remote content management and resource sharing on a gaming machine and method of implementing same
CN103151978A (en) * 2013-01-10 2013-06-12 中国科学院上海光学精密机械研究所 Driving controller for Ethernet stepping motor
CN104698950A (en) * 2015-03-25 2015-06-10 广州视源电子科技股份有限公司 Peripheral device control method, microcontroller, upper computer and system
CN106313038A (en) * 2015-06-30 2017-01-11 芋头科技(杭州)有限公司 Real-time control debugging system and debugging method
CN105262388A (en) * 2015-10-15 2016-01-20 珠海格力电器股份有限公司 Stepping motor driving device and stepping motor control system
CN107315376A (en) * 2016-04-26 2017-11-03 上海安浦鸣志自动化设备有限公司 A kind of step motion system for supporting to may be programmed independent operating mode of operation
CN106843304A (en) * 2017-03-31 2017-06-13 深圳诺欧博智能科技有限公司 Motor general-purpose control system and method
CN108762146A (en) * 2018-05-30 2018-11-06 杭州电子科技大学 Stepper motor low latency synchronizes interior networking kinetic control system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于嵌入式LINUX的步进电机远程控制系统研究;胡凯伟;《中国优秀硕士学位论文全文数据库工程科技Ⅱ辑》;20110615;正文第6-7页第1.3.3节、第51-53页第4.2.1节、第47-48页第4.1.3节 *

Also Published As

Publication number Publication date
CN109491811A (en) 2019-03-19

Similar Documents

Publication Publication Date Title
CN109491811B (en) Game testing method, device and storage medium
US6711688B1 (en) Pre-execution logon (PEL)
US7533190B2 (en) Network storage target boot and network connectivity through a common network device
US20070008582A1 (en) Driving method of a driverless perpheral device with a cross platform
JP2000066997A (en) Universal serial bus node for computer peripheral device
JP5997867B2 (en) Device driver registration apparatus and device driver registration method using the same
US11110607B2 (en) Servo output shaft rotational angle calibration method and system and robot using the same
US10850394B2 (en) Driving device
CN113157624B (en) Serial port communication method, device, equipment and storage medium
CN112462661B (en) Industrial data acquisition controller and control method thereof
US10632614B2 (en) Motion-controlling method of robot and the robot thereof
JP6666955B2 (en) Method for grasping space where electronic device is located using charger of electronic device, electronic device and charger
JP2022504761A (en) Equipment control method, equipment, storage medium
WO2017029776A1 (en) Image pickup apparatus
CN109683470A (en) A kind of software and hardware self-adaptive matching method, device and driving device
CN105573817A (en) Virtual input control method, device and system
CN112025716A (en) Control device, data processing method, control apparatus, and computer storage medium
CN108375964B (en) Conversational machine management method and device
KR20210046426A (en) Application optimizing method and electronic device supporting the same
JP7093979B2 (en) Device proxy device and computer system including it
US20190163595A1 (en) System and method for providing network access in the event of a computer system failure
KR20170097897A (en) Eduicating apparatus using arduino and method
Bräunl et al. EyeBot 7 User Guide
CN109656757A (en) The intelligent diagnosing method of USB device redirection problem
US20160350471A1 (en) Circuit information generating apparatus and circuit information generating system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant