|
1 | 1 | This section provides an overview of how Ephys Link works. It is intended for users who want to understand the |
2 | 2 | software's architecture and how it interacts with other systems. |
3 | 3 |
|
4 | | -!!! warning "Under Construction" |
| 4 | +## Why Ephys Link? |
5 | 5 |
|
6 | | - This documentation page is still under construction. Please come back later for more information! |
| 6 | +There exists many manipulator platforms in neuroscience research, each with their own API and software. This diversity |
| 7 | +makes it difficult for tool developers to support multiple platforms. Ephys Link aims to solve this problem by providing |
| 8 | +a unified API for interacting with manipulators. This allows developers to write code that works with any manipulator |
| 9 | +supported by Ephys Link. |
7 | 10 |
|
| 11 | +## Ephys Link Architecture |
| 12 | + |
| 13 | +```mermaid |
| 14 | +flowchart LR |
| 15 | + n1["Client Application"] |
| 16 | + n3["Manipulator 1"] |
| 17 | + n4["Manipulator 2"] |
| 18 | + subgraph s1["Ephys Link"] |
| 19 | + n6["Rectangle"] |
| 20 | + n2["Server"] |
| 21 | + end |
| 22 | + n6["Bindings"] ---|" Manipulator 1 API "| n3 |
| 23 | + n1 ---|" Send Request "| n2 |
| 24 | + n2 ---|" Callback Response "| n1 |
| 25 | + n6 ---|" Manipulator 2 API "| n4 |
| 26 | + n3 --- n6 |
| 27 | + n4 --- n6 |
| 28 | + n2 ---|" Parse Request "| n6 |
| 29 | + n6 ---|" Send Response "| n2 |
| 30 | +``` |
| 31 | + |
| 32 | +This diagram shows the high-level architecture of Ephys Link. Ephys Link acts as an intermediary between client |
| 33 | +applications and manipulators. |
| 34 | + |
| 35 | +Within Ephys Link, there is a server component that handled external communication and there are the bindings for each |
| 36 | +proprietary manipulator platform API. The server passes requests from client applications to the appropriate manipulator |
| 37 | +bindings which convert the requests to the appropriate manipulator API calls. |
| 38 | + |
| 39 | +## Example Message Flow |
| 40 | + |
| 41 | +Consider the following example of a request to move a manipulator to a specific position: |
| 42 | + |
| 43 | +```mermaid |
| 44 | +sequenceDiagram |
| 45 | + participant C as Client Application |
| 46 | + box Ephys Link |
| 47 | + participant S as Server |
| 48 | + participant B as Bindings |
| 49 | + end |
| 50 | + participant M as Manipulator Platform |
| 51 | + C ->> S: Move manipulator to position (x, y, z) |
| 52 | + S ->> B: set_position(x, y, z) |
| 53 | + B ->> M: move(a, b, c, d) |
| 54 | + loop Update Position |
| 55 | + C -->> S: Get current position |
| 56 | + S -->> B: get_position() |
| 57 | + B -->> M: position() |
| 58 | + M -->> B: Now at (a, b, c, d) |
| 59 | + B -->> S: Now at (x, y, z) |
| 60 | + S -->> C: Now at (x, y, z) |
| 61 | + end |
| 62 | + M ->> B: Completed move, at (a, b, c, d) |
| 63 | + B ->> S: Completed move, at (x, y, z) |
| 64 | + S ->> C: Completed move, at (x, y, z) |
| 65 | +``` |
| 66 | + |
| 67 | +Some things to notice: |
| 68 | + |
| 69 | +- The client application only ever speaks in (x, y, z) coordinates, never in the native manipulator platform's |
| 70 | + coordinate system. The binding handles the conversion. |
| 71 | +- While one command is being fulfilled, the client application can still query the manipulator's current position. |
| 72 | + Later, the manipulator can report when it is done and complete the movement request. |
| 73 | +- The manipulator often has a different API than Ephys Link (`move` vs `set_position`), but the binding handles the |
| 74 | + translation. |
0 commit comments