Emesary: Difference between revisions

Jump to navigation Jump to search
Line 60: Line 60:
emesary_mp_bridge.IncomingMPBridge.startMPBridge(routedNotifications);
emesary_mp_bridge.IncomingMPBridge.startMPBridge(routedNotifications);
var f14_aircraft_notification =  
var f14_aircraft_notification =  
notifications.PropertySyncNotification.new("F-14"~getprop("/sim/multiplay/callsign"));</syntaxhighligt>
notifications.PropertySyncNotification.new("F-14"~getprop("/sim/multiplay/callsign"));</syntaxhighlight>


That's all that is required to ship properties between multiplayer modules via emesary. There is a limit of 128 bytes on a string which limits the amount of outgoing messages. Outgoing notifications are queued and transmitted as space permits. The way the bridge works is to publish the notification, encoded into an MP string, for a period of time to allow for lagging clients and network issues. If a notification IsDistinct then the bridge will transfer just the last message received; otherwise the bridge will transfer all received notifications over MP, to allow for In this sense IsDistinct indicates that the contents of the notification are accurate and definitive (e.g. surface position), so the last value is the most accurate. Other notification (e.g. button 12 pushed will always need to be transferred). Obviously using this technique a variable number of properties can be transmitted, and importantly it's up to the modeller to decide what to transmit. There is a flag that I've temporarily added (sim/multiplay/transmit-only-generics) that doesn't transmit the standard properties, just chat and the generics (to make more space in the packet). There can be different types of notifications sent at a different schedule (so you could have a 10 second update of very slow moving items).<ref>{{cite web
That's all that is required to ship properties between multiplayer modules via emesary. There is a limit of 128 bytes on a string which limits the amount of outgoing messages. Outgoing notifications are queued and transmitted as space permits. The way the bridge works is to publish the notification, encoded into an MP string, for a period of time to allow for lagging clients and network issues. If a notification IsDistinct then the bridge will transfer just the last message received; otherwise the bridge will transfer all received notifications over MP, to allow for In this sense IsDistinct indicates that the contents of the notification are accurate and definitive (e.g. surface position), so the last value is the most accurate. Other notification (e.g. button 12 pushed will always need to be transferred). Obviously using this technique a variable number of properties can be transmitted, and importantly it's up to the modeller to decide what to transmit. There is a flag that I've temporarily added (sim/multiplay/transmit-only-generics) that doesn't transmit the standard properties, just chat and the generics (to make more space in the packet). There can be different types of notifications sent at a different schedule (so you could have a 10 second update of very slow moving items).<ref>{{cite web

Navigation menu