Send message to SensorMonitor Sample from ComponentIntegration

// SensorMonitor Sample has uses this listener: 
public override void Init()
{
     msgRef = EnvironmentManager.Instance.RegisterReceiver(TriggerReceiver, new 
            MessageIdFilter(MessageId.Control.TriggerCommand));
}

HOW DO I … send or post this message, to change the Icon:

to be received by SensorMonitor’s TriggerReceiver() ? Do I need to knwo the FQID dest, or FQID sender?

TriggerReceiver(VideoOS.Platform.Messaging.Message message, FQID dest, FQID sender)

{ … }

“message”: {

“MessageId”: “Control.TriggerCommand”,

“RelatedFQID”: {

“ServerId”: {

"Type": "XPCO",

"Hostname": "easynvr-01",

"Port": 443,

"Id": "9d51cc29-4f28-4522-b85e-61457a17b532",

"Scheme": "https"

},

“ParentId”: “b9412d8a-a00d-484b-9693-3c1a2ed41ded”,

“ObjectId”: “6c341472-ab91-4630-a015-a8e940dfdbb4”,

“FolderType”: 0,

“Kind”: “0375137e-3136-445d-add1-f855d4be1b44”

},

“Data”: “PH_MASKNOTDETECTED”,

“Reason”: “UserAction”,

“ExternalMessageSourceEndPoint”: null

}

“dest”: {

“ServerId”: {

“Type”: “XPCO”,

“Hostname”: “easynvr-01”,

“Port”: 443,

“Id”: “9d51cc29-4f28-4522-b85e-61457a17b532”,

“Scheme”: “https”

},

“ParentId”: “b9412d8a-a00d-484b-9693-3c1a2ed41ded”,

“ObjectId”: “6c341472-ab91-4630-a015-a8e940dfdbb4”,

“FolderType”: 0,

“Kind”: “0375137e-3136-445d-add1-f855d4be1b44”

}

“sender”: {

“ServerId”: {

“Type”: “XPCO”,

“Hostname”: “easynvr-01”,

“Port”: 80,

“Id”: “9d51cc29-4f28-4522-b85e-61457a17b532”,

“Scheme”: “http”

},

“ObjectIdString”: “S-1-9-2374562217-701256093-676274757-3093193029-2048374066-1-4107724087-1800141127-2739864504-80127112”,

“FolderType”: 0,

“Kind”: “e18c7649-3d38-45dc-9ce1-b0dd06e77b24”

}

Currently SensorMonitor sample only listens for messages sent locally in the Event Server (using EnvironmentManager.Instance.RegisterReceiver). I know those messages are coming from map/smart map in Smart Client, but that communication is done by a non-public API and then retransmitted internally in the Event Server.

To be able to send similar messages from a component integration you should use MessageCommunication, which means that the plug-in also needs to be extended to listen using this in addition to the local listening. Have a look at the Chat sample for an example on how to use MessageCommunication: https://doc.developer.milestonesys.com/html/index.html?base=samples/pluginsamples/chat/readme.html&tree=tree_1.html