How could I read the 'Motion Status flag' of a camera at initialization of my plugin ?

I arrive to catch the “Motion Detected” events and now I would like to know the initial value of Motion Status Flag of a given camera on start of plugin execution.

Thanks.

I tried to transmit a message at initialization with function:

// Ask for current state of all Items
m_messageCommunication.TransmitMessage(
new VideoOS.Platform.Messaging.Message(MessageCommunication.ProvideCurrentStateRequest), null, null, null);

but I don’t receive any “Motion Detected” events for cameras with the flag Motion set!!

What’s wrong?