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:40] – 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 13: | Line 17: | ||
Each response is an echo of the command followed by either " | Each response is an echo of the command followed by either " | ||
- | == 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 " | ||
== Handskake == | == Handskake == | ||
The first command sent must be " | The first command sent must be " | ||
- | Example command: | + | Example command:\\ |
hello; | hello; | ||
- | Response: | + | Response:\\ |
hello; | hello; | ||
== Sending records == | == Sending records == | ||
- | A timing record can be sent to the software using the record.add command. | + | 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 // | + | Arguments are //tag// (chip code, rfid tag id, race number or similar), //time// (timestamp of the record)//, id//, //antenna// and //signal//.\\ |
- | Only // | + | Only // |
- | //id// is a unique 64-bit integer for this record if you wish to update it later, and is optional. | + | //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: | //time// should be in the format yyyy-mm-ddTHH: | ||
- | Example commands: | + | Example commands:\\ |
- | record.add; | + | record.add; |
record.add; | record.add; | ||
- | Responses: | + | Responses:\\ |
- | record.add; | + | record.add; |
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 optional. | + | 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. | 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 | ||
+ |