NET

Start

Start is the first function to call after Create.

Edit "Start" on GitHub

Start

The start method initializes the PAXTrmImp_1 instance and starts the listener if default mode is desired. Whether default mode or client only mode is chosen depends on the SaleCapabilities string in the SaleApplInfo object. If default is desired the correct string is already there. For client only mode the SaleCapabilities string must only contain SaleCapabilities.PrinterReceipt.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
    class PaxImplementation : ISwpTrmCallbackInterface
    {
        public ISwpTrmIf_1 PAX = {get; internal set; } = null;
        public bool ClientOnly {get; set} = false;
        .
        .
        .

            SaleApplInfo si = new SaleApplInfo() { 
                // provider identification is company or brand name
                ProviderIdentification = "The best",
                SoftwareVersion = "1.0",
                ApplicationName = "A Demo",
                POIID = POIID,
            };

            // If ClientOnly is desired, overwrite the default SaleCapabilities
            if (ClientOnly) {
                si.SaleCapabilities = SaleCapabilitiesEnum.PrinterReceipt.ToString();
            }

            // Initialize and start listener unless ClientOnly
            PAX.Start(si);
    .
    .
    .

Closer look at SaleApplInfo

The only default value in SaleApplInfo is SaleCapabilities for default integration

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
namespace SwpTrmLib
{
    //
    // Summary:
    //     SaleApplInfo is information used in the LoginRequest towards the terminal.
    public class SaleApplInfo
    {
        public string ProviderIdentification { get; set; }
        public string ApplicationName { get; set; }
        public string SoftwareVersion { get; set; }
        public string POIID { get; set; }
        // Summary:
        //     Default SaleCapabilities will result in a listener being started on a configured port.
        //     To use Client Only Mode use only the value SaleCapabilitiesEnum.PrinterReceipt.
        public string SaleCapabilities
        public SaleTerminalEnvironment SaleTerminalEnvironment { get; set; }
    }
}