I had noticed and thought of that, so I modified the Chat sample to set Security to SecurityLevel.Low (I tried both before and after MessageCommunicationManager.Start. No effect.
My suspicion is either my target FQID is wrong in some way, or the Smart Client simply isn’t listening (filter-enabled) for the messages. Presently I am having difficulty determining which it would be.
Perhaps to help, I will post the relevant code snippets:
MessageCommunicationManager.Start(EnvironmentManager.Instance.MasterSite.ServerId);
_messageCommunication = MessageCommunicationManager.Get(EnvironmentManager.Instance.MasterSite.ServerId);
filter_who=_messageCommunication.RegisterCommunicationFilter(WhoHandler,new CommunicationIdFilter(MessageCommunication.WhoAreOnlineResponse));
Console.WriteLine(“Sending: WhoAreOnlineRequest [ConnectionStateChanged]”);
_messageCommunication.TransmitMessage(
new VideoOS.Platform.Messaging.Message(MessageCommunication.WhoAreOnlineRequest), null, null,
null);
//WhoHandler---------
Collection result = message.Data as Collection;
if (result==null)
return(null);
foreach(EndPointIdentityData ep in result) {
if (ep.EndPointFQID.ServerId.ServerHostname==“viewer-name”)
viewer=ep.EndPointFQID;
}
//Get Cameras
cam_servs=VideoOS.Platform.Configuration.Instance.GetItemsByKind(Kind.Camera,ItemHierarchy.SystemDefined);
(note: the following is recursive searching down the tree for cameras)
foreach(Item itm in c_list) {
if (itm.FQID.Kind==Kind.Camera)
cam_list.Add(itm.FQID);
//Switching routine
p_data=new SetCameraInViewCommandData();
p_data.CameraFQID=cam_list[1]; //0 is the group in this demo test
p_data.Index=0;
p_data.StreamId=Guid.Empty;
//EnvironmentManager.Instance.PostMessage(new Message(MessageId.SmartClient.SetCameraInViewCommand,p_data),viewer);
_messageCommunication.TransmitMessage(
new Message(MessageId.SmartClient.SetCameraInViewCommand,p_data), viewer, viewer,null);
In the above switching routine, I also tried PostMessage (presently commented out), and also varied either of the “viewer” parameters with null.
Hopefully this will help someone point out where I have made a wrong turn.