Custom adoptations for SOEM library