48 lines
1.8 KiB
C#
48 lines
1.8 KiB
C#
///
|
|
/// Copyright (c) 2013-2015 Sensus Metering Systems
|
|
///
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace TBF.BenchControl
|
|
{
|
|
/// <summary>
|
|
/// This interface has to be implemented by each 'operation'. 'operations' are classes
|
|
/// in TBF.BenchControl name space with a class name ending with 'Op' (e.g. TimerOp).
|
|
/// This class name rule is a convention, not a requirement.
|
|
/// </summary>
|
|
public interface IOperation
|
|
{
|
|
/// <summary>
|
|
/// Method is called when a state machine enters a state in which this operation
|
|
/// takes place/ will be executed.
|
|
/// Method is not called when this operation took place also in the previous state.
|
|
/// StateMachine checks whether Start() should be called depending on the previous
|
|
/// and the current state.
|
|
/// </summary>
|
|
/// <returns>true on success</returns>
|
|
void Start();
|
|
|
|
/// <summary>
|
|
/// Method is called in regular time intervals when state machine is
|
|
/// in a state in which this operation takes place.
|
|
/// During operation the IOparation derived object may issue events,
|
|
/// that means Run() method returns a value different from Event.Void (=0).
|
|
/// Examples: Timer expired
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
Event Run();
|
|
|
|
/// <summary>
|
|
/// Method is called when the state machine leaves a state in which
|
|
/// this operation takes place / was executed.
|
|
/// Method is not called when this operation takes place also in the next state.
|
|
/// StateMachine checks whether Start() should be called depending on the previous
|
|
/// and the current state.
|
|
/// </summary>
|
|
void Stop();
|
|
}
|
|
}
|