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:17] – 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. | ||
- | You can connect as many devices as you like. | + | 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 // | ||
+ | |||
+ | {{: | ||
+ | |||
+ | == Protocol format == | ||
+ | The protocol is designed for simplicity and is based on a simple request-response pattern where each communication is initiated by the external caller, and all commands result in exactly one reply. | ||
+ | Commands are send in UTF-8 text, and seperated by a newline (\r\n). | ||
+ | |||
+ | Commands and arguments are separated by semicolons. Named arguments are formatted as " | ||
+ | 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 == | ||
+ | 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 " | ||
+ | |||
+ | Example command: | ||
+ | ping | ||
+ | |||
+ | Response: | ||
+ | ping;ok | ||
- | For protocol information, |