Building the SP-Dev Samples
Using the Samples Repository
The C# sample references the Framework NuGet packages available here.
The C++/CLI sample uses a direct reference to the Dlls within DevicesCpp/SampleCardReader/References32
taken from the NuGet packages.
Building the C# sample simulator
- Clone KAL_XFS4IoT_SP-Dev-Samples repository from https://github.com/KAL-ATM-Software/KAL_XFS4IoT_SP-Dev-Samples.
- Install Visual Studio 2022 and .Net8 SDK.
- Make sure online nuget package source is configured. Menu->Tools->NuGet Package Manager->Package Manager Settings->Package Sources has online location https://api.nuget.org/v3/index.json. For offline environment, all XFS4IoT framework NuGet packages need to be downloaded first and point offline location where the downloaded packages are stored locally in the package manager settings. The nuget packages are availble from KAL_XFS4IoT_SP-Dev repositry. https://github.com/KAL-ATM-Software/KAL_XFS4IoT_SP-Dev/releases
- Open the solution
Devices/SPs.sln
in Visual Studio 2022. - Select Solution SPs in the solution explorer and execute Clean Solution.
- Select Solution SPs in the solution explorer and execute Rebuild Solution.
- Build complete both projects without errors.
- Binaries are created under
Devices/bin/Debug/net8.0-windows7.0
orRelease/net8.0-windows7.0
. - The SP executable XFS4IoT.SP.ServerHostSample.exe is created. The executable has dependencies with other DLLs created in the same folder.
- The default IP address is the local host 127.0.0.0. If the SP and client application run on the same machine, no configuration changes are required. If the IP address needs to be changed it can be done so remotely with the client application from different machine as follows:
- Open the configuration file of the SP, XFS4IoT.SP.ServerHostSample.dll.config, in the test file editor, for example VS Code.
- Change value of the
ServerAddress
key.
<add key="ServerAddressUri" value="**http://xxx.xxx.xxx.xxx**" />
- Run XFS4IoT.SP.ServerHostSample.exe.
Building the sample client application
- Clone KAL_XFS4IoT_SP-Dev-Samples repository from https://github.com/KAL-ATM-Software/KAL_XFS4IoT_SP-Dev-Samples.
- Install Visual Studio 2022 and .Net8 SDK or runtime.
- Make sure online nuget package source is configured. Menu->Tools->NuGet Package Manager->Package Manager Settings->Package Sources has online location https://api.nuget.org/v3/index.json. For offline environment, all XFS4IoT framework NuGet packages need to be downloaded first and point offline location where the downloaded packages are stored locally in the package manager settings. The nuget packages are availble from KAL_XFS4IoT_SP-Dev repositry. https://github.com/KAL-ATM-Software/KAL_XFS4IoT_SP-Dev/releases
- Open the solution
ClientTestApp/ClientTestApp.sln
in Visual Studio 2022. - Select ClientTestApp in the solution explorer and execute Clean Solution.
- Select ClientTestApp in the solution explorer and execute Rebuild Solution.
- Build complete both projects without errors.
- Binaries are created under
ClientTestApp/bin/Debug/net8.0-windows
orRelease/net8.0-windows
. - The SP executable TestClientForms.exe is created. The executable has dependencies with other DLLs created in the same folder.
- Run TestClientForms.exe
- The default IP address is the local host 127.0.0.1. If the SP and client application run on the same machine, no configuration changes are required.
If the SP and client application run on the different machines, change the Service URL on the top left of GUI. i.e. ws://xxx.xxx.xxx.xxx where the SP is running. - Click the Service Discovery button.
The CardReader URL is displayed if the connection is established with the SP. - The test application can communicate with the CardReader SP.
Building the C++/CLI sample simulator
- Clone KAL_XFS4IoT_SP-Dev-Samples repository from https://github.com/KAL-ATM-Software/KAL_XFS4IoT_SP-Dev-Samples.
- Install Visual Studio 2019 with C++/CLI component and .Net5 SDK or runtime.
- Open the solution
DevicesCpp/SPsCpp.sln
in Visual Studio 2019. - Select SPsCpp in the solution explorer and execute Clean Solution.
- Select SPsCpp in the solution explorer and execute Rebuild Solution.
- Build complete both projects without errors.
- Binaries are created under
DevicesCpp/bin/Debug/net5.0-windows7.0
orDevicesCpp/bin/Release/net5.0-windows
. - The SP executable XFS4IoT.SP.ServerHostSample.exe is created. The executable has dependencies with other DLLs created in the same folder.
- The default IP address is the local host 127.0.0.0. If the SP and client application run on the same machine, no configuration changes are required. If the IP address needs to be changed it can be done so remotely with the client application from different machine as follows:
- Open the configuration file of the SP, XFS4IoT.SP.ServerHostSample.dll.config, in the test file editor, for example VS Code.
- Change value of the
ServerAddress
key.
<add key="ServerAddressUri" value="**http://xxx.xxx.xxx.xxx**" />
- Run XFS4IoT.SP.ServerHostSample.exe.