Hi Dinakar,
The SimpleCommandHandler is just an example of implemented the underlying interface which is ICommandHandler:
In a real application, you will create your own implementation of this interface to handle incoming control requests. You can create a command handler that does anything you want in response to control messages.
Opendnp3 does not provide a way for you to inspect the current values of measurement data you have loaded into the stack in a general way. If this is required in your application, simply maintain a copy of the data outside of the stack and refer to it whenever a request is received.
The Modify() methods allow you to manipulate the current value in the database using a functor, e.g.:
{
MeasUpdate tx(pOutstation);
auto changeQuality = openpal::Function1<const Binary&, Binary>::Bind([](const Binary& b) { return Binary(b.value, ~0); });
tx.Modify(changeQuality, 1);
}
It is a means to access the value and transform it in some way.