Setup Configuration
Once a Terminal-instance has been created with a TerminalSettings-instance, the settings can not be changed anymore. Changes to the TerminalSettings-instance will be ignored.
The network and guides configuration are explained in the following chapters. For further information refer toTerminalSettings.
Network Configuration
Depending on the platform used, the TIM API module can communicate with the Terminal over different communication channels.
The default communication is over TCP/IP connection. Default port used is 7784.
On mobile devices also a Bluetooth connection is possible.
For TCP/IP connection there are two possible ways to connect to the terminal:
* **Broadcast-Mode:**
* Terminal ID (TID) is known.
* The TIM API starts broadcasting on the default interface and connects to the connection information sent by the matching terminal.
* **Direct Connect:**
* IP address of the terminal is known.
* Connection is established directly via IP.
Guides Configuration
There are various Guides covering different use case scenarios. The guide Retailis the basic guide and is activated as default. With .guides the guides can be configured. Important: the configuration needs to include all desired guides (including the retail guide).
Code-example for creating a terminal including settings with activated guides retail and hospitality:
// Create settings with Terminal-ID of terminal to connect to
let terminalSettings = try TerminalSettings()
terminalSettings.terminalId = "12345678"
// add wanted guides (with insert)
terminalSettings.guides.insert(CGuides.retail)
terminalSettings.guides.insert(CGuides.hospitality)
// Create terminal
var terminal = try Terminal(settings: terminalSettings)
//...
// Disconnect from terminal and clean up properly
terminal.dispose()