Hi,
We want to show a dialog if smart client can not acccess to the recording server.
When we playback on the smart client can we handle to detect communication error with the server through the plugin?
Hi,
We want to show a dialog if smart client can not acccess to the recording server.
When we playback on the smart client can we handle to detect communication error with the server through the plugin?
The camera view items automatically displays an error when the camera is not available.
You can see some status information on the servers on the System Monitor workspace (tab) in the Smart Client.
If neither of these are what you want you can develop a plugin to use the methods shown in the StatusViewer sample. It is possible to use the methods from this standalone sample in a Smart Client plugin.
Thank you Bo. We confirmed the status information is appeared when Live and Playback.
Can I get events with this status on the plugin?
If so, how do we code it?
We want to show a black screen when we detect a disconnection.
If you want to use the same methods as the StatusViewer sample does you can do so in a plugin. The most important part of the StatusViewer sample is the NewEventIndication (or NewEventsIndication) you can see this used also in the Smart Client Overlay on Event sample.
The Smart Client does this in in the camera-view-item, it shows a black box and a error message as per default settings. Because it is default behavior I am surprised that you also want to develop it, but there is probably more to it than what you have told or I have understood. If my answer does not fit please try to elaborate on your question. Try to describe in more detail what you want to achieve.
Thank you for your support.
We confirmed the StatusViewer sample.
The sample can detect to reconnect the recording sever but can’t detect the communication error.
Is my understanding correct?
We use the code as the below;
MessageCommunicationManager.Start(EnvironmentManager.Instance.MasterSite.ServerId);
_messageCommunication = MessageCommunicationManager.Get(EnvironmentManager.Instance.MasterSite.ServerId);
_messageCommunication.ConnectionStateChangedEvent += new EventHandler(_messageCommunication_ConnectionStateChangedEvent);
void _messageCommunication_ConnectionStateChangedEvent(object sender, EventArgs e)
{
//To do
}
I want to show a view with black screen if connection error happens
Because of this, I think if the stop image show the view it is hard to grasp for the operator that connection error happens.
The default Smart Client can show message and gray image, it is easy to understand.
I do not think your understanding is correct. Let me explain..
Statusviewer will
It is important to note that if the connection to the event server is broken you cannot rely on the information about recording server or camera status. Maybe the sample should have been implement with blanking of all that information when not connected to the event server.
Thanks for your advices.
As you said, we were not able to detect a disconnection with the recording server because not connect to the event server.
If we disconnect between Smart Client and recording server(event server), we can’t get the information from the plugin. Is my understanding correct?
Yes. The mechanism in the StatusViewer is relying on the Event Server.
In case the Event Server is lost you will not have any information on status of recording servers or cameras.
Note that if you have a setup with one recording server and it shares the same physical server as the Event Server, then it will probably be so that if you cannot get connection with the Event Server you cannot get the recording server either.
Larger installations will have multiple recording servers and probably none on the server that hosts the Event Server service.
It is possible to develop a plugin that understand the status of recording servers and cameras without relying on Event Server, if you want to achieve this explore the samples using Status API (works on c-code): Status Console, Status Session Console, System Status Client Console
Finally, I would like to say that maybe there is no way better to check the status than to request an image and see that you get it..
Thank you for your kind reply.
>Finally, I would like to say that maybe there is no way better to check the status than to request an image and see that you get it..
Thank you for your comment. We’ll confirm it whether we can detect the disconnection from the image we request.