Control Functions Development For Distributed Automation Systems Using The Torero Approach