I am currently working on an ATM project. The ATM consists of four main devices (dispenser, bill acceptor, card reader, printer). As far as I know, to manage all ATM devices, you need to use the XFS standard. I work in the C# programming language. I found some examples online here and here, but I don't understand them.
My question is: how can I manage the entire device (eg dispenser) of the ATM using the XFS standard?
OK this is not gonna be what you expected but very first things you need to do are:
After you have familiarized to the API through documentation you can use either of the C# API implementation you referenced in your question to actually use the device commands referenced in the documents.
CEN XFS API is a pure c-API so all the commands use a very limited function set. Parameters of these functions are passed to device specific service providers (that you open using XFS manager). Some devices like note recycling devices are in fact compound devices so you need to open them multiple times. Once for each CEN XFS interface that the device supports.
In very high level pseudo code this is the flow how you manage XFS devices:
Open XFS Manager
For each device:
Open device
Register to listen device events
Check device status (and capabilities in case you are working in multi ATM environment so that you know what device you are dealing this time).
Setup device if need be and recover any error conditions reported in device status
Start the service loop (Providing ATM service to customers if ATM is healthy and
maintenance personnel to execute tasks like maintaining faulty
devices and loading cash into the ATM etc.)
This is in no way an easy task to do so I would advice that you do acquire basic knowledge first through courses provided by the ATM manufacturer your software is aimed to work on. I assume all will have their own training programs although I can only say this to be the case for NCR provided ATMs.