3.3. EC-Master startup
The EC-Master stack has to be initialized once when the application is starting. After this one-time initialization one or more clients may register with the EC-Master. Finally, after all clients are registered the MainDevice can be started. Starting the MainDevice means that all SubDevices will be set into the operational state. Every time the state of the MainDevice has changed the clients are notified about this state-change.
3.3.1. Asynchronous (deferred) startup
Application calls
emInitMaster()(…)Application creates Job Task. See EC-Master lifecycle
Application calls
emConfigureMaster()(…)Application calls
emConfigureNetwork()(…) (See “1” )Application calls
emSetMasterStateReq()(…) with an appropriate timeout value (See “2” )Function
emSetMasterStateReq()(…) returns immediately (See “3” )emSetMasterStateReq()(…) initiated the MainDevice startup procedure (See “4” )The MainDevice initializes all SubDevices until all SubDevices reach OPERATIONAL state
After every state change the application will be notified (See “5” )
After reaching the OPERATIONAL state the system is ready (See “6” )
3.3.2. Synchronous startup
Application calls
emInitMaster()(…)Application creates Job Task. See EC-Master lifecycle.
Application calls
emConfigureNetwork()(…)Application calls
emRegisterClient()(…) (See “1” )Application calls
emSetMasterState()(…) with an appropriate timeout value (See “2” )Inside
emSetMasterState()(…) the MainDevice startup procedure will be initiated (See “3” )The application is blocked until the whole startup has finished (See “7” )
The MainDevice initializes all SubDevices until all SubDevices reach OPERATIONAL state (See “3-6” )
After reaching the OPERATIONAL state the system is ready (See “6” )
emSetMasterState()(…) returns (See “7” )