Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
software:timingunits:tcpimporter [2024/08/09 11:30] – henrik | software:timingunits:tcpimporter [2024/10/02 07:47] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | === Generic TCP importer === | + | {{indexmenu_n> |
+ | |||
+ | ====== Generic TCP importer | ||
Using a very simple text-based TCP protocol, you can have your own devices or integration component connect into BBT, and import raw time records this way, just like any natively supported box. | Using a very simple text-based TCP protocol, you can have your own devices or integration component connect into BBT, and import raw time records this way, just like any natively supported box. | ||
Line 5: | Line 7: | ||
You can connect as many devices as you like, with each connection representing a device with an identifier of your choice. | You can connect as many devices as you like, with each connection representing a device with an identifier of your choice. | ||
The default port is 12368, but this can be changed via the advanced event setting // | The default port is 12368, but this can be changed via the advanced event setting // | ||
+ | |||
+ | {{: | ||
== Protocol format == | == Protocol format == | ||
Line 12: | Line 16: | ||
Commands and arguments are separated by semicolons. Named arguments are formatted as " | Commands and arguments are separated by semicolons. Named arguments are formatted as " | ||
Each response is an echo of the command followed by either " | Each response is an echo of the command followed by either " | ||
+ | |||
+ | |||
+ | == Handskake == | ||
+ | The first command sent must be " | ||
+ | |||
+ | Example command:\\ | ||
+ | hello; | ||
+ | |||
+ | Response:\\ | ||
+ | hello; | ||
+ | |||
+ | == Sending records == | ||
+ | A timing record can be sent to the software using the record.add command.\\ | ||
+ | Arguments are //tag// (chip code, rfid tag id, race number or similar), //time// (timestamp of the record)//, id//, //antenna// and // | ||
+ | Only // | ||
+ | //id// is a unique 64-bit integer for this record if you wish to update it later, and is optional.\\ | ||
+ | //time// should be in the format yyyy-mm-ddTHH: | ||
+ | |||
+ | Example commands:\\ | ||
+ | record.add; | ||
+ | record.add; | ||
+ | |||
+ | Responses: | ||
+ | record.add; | ||
+ | record.add; | ||
+ | |||
+ | Records can be updated using the record.update command. The arguments are the exact same as for record.add, but id is required. | ||
+ | If a record with the provided id does not exist, it might be created. | ||
+ | |||
+ | == Device status == | ||
+ | It is possible to send periodic device status information, | ||
+ | |||
+ | Example command:\\ | ||
+ | status; | ||
+ | |||
+ | Responses: | ||
+ | record.status; | ||
+ | |||
== Inactivity == | == Inactivity == | ||
At least one command should be sent every 10 seconds. If no data is received for a while, the connection will be terminated. | At least one command should be sent every 10 seconds. If no data is received for a while, the connection will be terminated. | ||
- | You can send the **ping** command (with no parameters) to keep the connection alive. | + | You can send the "ping" |
- | == Handskake == | + | Example command: |
+ | ping | ||
+ | Response:\\ | ||
+ | ping;ok | ||
- | == Sending in records == |