Workswell Remote Protocol (WRP)ΒΆ
State diagram of WRP is following:
Black arrows are events trigggered by the client, red ones comes from the server. Message is composed of header, that specifies message type, payload length and payload. Messages are:
| Type | Type value | Payload size | Payload |
|---|---|---|---|
| INVALID | 0 | 0 | |
| OK | 1 | 0 | |
| ERROR | 2 | 1 | Error code |
| GET_CAMERA_LIST | 3 | 0 | |
| CAMERA_LIST | 4 | variable | XML with listed cameras |
| OPEN_CAMERA | 5 | variable | Serial no. of camera |
| CLOSE_CAMERA | 6 | 0 | |
| GET_FRAME | 7 | 0 | |
| FRAME | 8 | variable | Frame no., Timestamp, Height, Width, Frame |
| START_CONTINUOUS_GRABBING | 9 | 0 | |
| STOP_CONTINUOUS_GRABBING | 10 | 0 | |
| ACK_CONTINUOUS_GRABBING | 11 | 5 | Frame no. |
Payload content datatypes:
| Name | Datatype |
|---|---|
| Error code | uint8 |
| XML with listed cameras | string |
| Serial no. of cameras | string |
| Camera ID | uint8 |
| Frame no. | uint32 |
| Timestamp | uint64 |
| Height | uint16 |
| Width | uint16 |
| Frame | array of 32-bit float |
Error codes are:
| Code | Code value |
|---|---|
| UNEXPECTED_MESSAGE | 0 |
| CAMERA_NOT_FOUND | 1 |
| CAMERA_NOT_RESPONDING | 2 |
| CAMERA_NOT_OPEN | 3 |
| CAMERA_NOT_CONNECTED | 4 |
| CAMERA_NOT_ACQUIRING | 5 |