Fieldpine Logo Documentation Home  

Talk To Fieldpine Interface


TBS. About TTF

Index

Handling Events. Details about receiving and processing events generated by the POS engine. An event occurs in realtime while the sale is being processed and allows you to make adjustments and control the operation. This provides an easy level of advanced customisation in a controlled fashion.

Event List Reference. Reference list of all events in the system. Not all events in the reference list can be processed by TTF.

Objects Commonly used

Saleline Definition of how a single saleline is represented.

Follow these steps to setup and create your first Hello World application to interact with your Fieldpine POS system

Prepare your compiler environment

The TTF interface is a programming interface. You need a programming language that is capable of dynamically loading a DLL and calling functions inside it. In this example we will walk you through using C++, but if you are familiar with other languages and prefer to use them, skip this step. Don't worry, you don't need to know C++

  1. Download and install the "Microsoft Visual Studio Community Edition". This is a few C++ compiler and has all the options you need to create simple interfaces. If you prefer, you can purchase and use use professional or universal versions of the product.
  2. When installing make sure you select the C++ option - it is pre selected, but do not untick it. You may install any other Visual Studio options you wish.

Download SDK

Create Hello World App

  1. Start Visual Studio
  2. Create a new C++ project
  3. Call the program "ttf_helloworld". Tip, always start your TTF projects with 'ttf_' as then the POS will automatically start them.
  4. Add the file(s) .... and .... from the SDK to you the project
  5. Locate the main function inside the HelloWorld project - it looks like this
    void main(int argc, void**argv)
  6. Add the following lines shown in blue -
    void main(int argc, void**argv)
    {
    	
    	HelloWorld();
    	return;
    ...
    

Launch it

Each packet sent from POS to TTF uses the following standard header.

FieldNoNameDetails
f110RequestId A unique token identifying this request
f111Request RVV A sequence identificaiton value that is used to mark the state of the system when this event was generated
f112Flags A series of flags about this request. Stored as bitmask values
Bit 0
0 for live, 1 for test transaction. Test transactions may also use "0" but live transactions will never use "1". A test transaction is where the system is calling you in a testing mode to see how you respond, it does not indicate this is a "test environment". For example, the system may call old and new versions of your handler for regression testing.
Bit 1
0 for primary, 1 for secondary. If a request is sent to the same handler on different machines, one will be marked primary and all others will be marked secondary.