let's say that I am working with an IoT device.The device can have many sensors, each of them has an address, i/o direction and a reading method.temperature=d2,input,digitalhumidity=d3,input,digitallcd=a1,output,analogFrom my program, I should read this configuration file and start getting data for example from the temperature sensor, which I know is at address d2 and provides digital input. How can I abstract this? I mean, I can't have something likeif(direction == input) {    if(type == digital) {        readDigital(d2)    } else {        readAnalog(d2)    }} else {    if(type == digital) {        writeDigital(d2)    } else {        writeAanalog(d2)    }}This is absolutely not abstract stuff, and it kinda sucks.How can I connect my configuration to my code?
How to use functions based on configuration?
abstraction;configuration