Enhanced synchronization framework
Methods, systems, and apparatus, including computer programs encoded on a computer storage medium that provides an enhanced synchronization framework. One of the methods includes a primary and a second device that receive configuration information which identifies one or more actions to be performed by the secondary device when it receives specified pulses of a sequence of pulses from the primary device. The primary device transmits a sequence of pulses. The primary and the secondary device receive a particular pulse from the sequence of pulses. The secondary device determines whether the particular pulse satisfies one or more predetermined criteria and generates an instruction based on the determination.
1. A computer-implemented method comprising:
receiving, by a primary device and a secondary device, configuration information that identifies one or more actions to be performed by the secondary device upon receipt of specified pulses of a sequence of pulses from the primary device;
transmitting, by the primary device, the sequence of pulses;
receiving, by the secondary device and from the primary device, a particular pulse of the sequence of pulses;
determining, by the secondary device, whether the particular pulse satisfies one or more predetermined criteria, comprising:
determining (i) a first time at which the pulse was received, (ii) a second time at which the secondary device predicted it would receive the pulse, and (iii) a duration between the first time and the second time;
determining, by the secondary device, that the duration is greater than a configured threshold; and
in response to determining that the duration is greater than a configured threshold:
generating, by the secondary device, an error value, and
transmitting, by the secondary device, the error value to the primary device.
2. The method of claim 1 wherein the instruction is an indication to illuminate a light source.
3. The method of claim 1 wherein the instruction is an indication to capture at least one image.
4. The method of claim 1 further comprising:
determining, by the secondary device, that the duration is less than a configured threshold; and
in response to determining that the duration is less than a configured threshold, generating the instruction.
5. The method of claim 1 further comprising:
receiving, at the primary device, the error value; and
in response to receiving the error value at the primary device, performing, by the primary device, a reset action.
6. The method of claim 1 wherein the secondary device is fish-illumination device.
7. The method of claim 1 wherein the secondary device is a fish-imaging device.
8. A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:
receiving, by a primary device and a secondary device, configuration information that identifies one or more actions to be performed by the secondary device upon receipt of specified pulses of a sequence of pulses from the primary device;
transmitting, by the primary device, the sequence of pulses;
receiving, by the secondary device and from the primary device, a particular pulse of the sequence of pulses;
determining, by the secondary device, whether the particular pulse satisfies one or more predetermined criteria, comprising:
determining (i) a first time at which the pulse was received, (ii) a second time at which the secondary device predicted it would receive the pulse, and (iii) a duration between the first time and the second time;
determining, by the secondary device, that the duration is greater than a configured threshold; and
in response to determining that the duration is greater than a configured threshold:
generating, by the secondary device, an error value; and
transmitting, by the secondary device, the error value to the primary device.
9. The non-transitory, computer-readable medium of claim 8 further comprising:
determining, by the secondary device, that the duration is less than a configured threshold; and
in response to determining that the duration is less than a configured threshold, generating the instruction.
10. The non-transitory, computer-readable medium of claim 8 further comprising:
receiving, at the primary device, the error value; and
in response to receiving the error value at the primary device, performing, by the primary device, a reset action.
11. A computer-implemented system, comprising:
one or more computers; and
one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations comprising:
receiving, by a primary device and a secondary device, configuration information that identifies one or more actions to be performed by the secondary device upon receipt of specified pulses of a sequence of pulses from the primary device;
transmitting, by the primary device, the sequence of pulses;
receiving, by the secondary device and from the primary device, a particular pulse of the sequence of pulses;
determining, by the secondary device, whether the particular pulse satisfies one or more predetermined criteria, comprising:
determining (i) a first time at which the pulse was received, (ii) a second time at which the secondary device predicted it would receive the pulse, and (iii) a duration between the first time and the second time;
determining, by the secondary device, that the duration is greater than a configured threshold; and
in response to determining that the duration is greater than a configured threshold:
generating, by the secondary device, an error value; and
transmitting, by the secondary device, the error value to the primary device.
12. The computer-implemented system of claim 11 further comprising:
determining, by the secondary device, that the duration is less than a configured threshold; and
in response to determining that the duration is less than a configured threshold, generating the instruction.
13. The computer-implemented system of claim 11 further comprising:
receiving, at the primary device, the error value; and
in response to receiving the error value at the primary device, performing, by the primary device, a reset action.
14. The computer-implemented system of claim 11 wherein the secondary device is fish-illumination device.