From d382483f0f0736dcc532c8b80fbc122ad615a67b Mon Sep 17 00:00:00 2001 From: firealarmss Date: Sat, 27 Jul 2024 13:36:36 -0500 Subject: [PATCH] Add support to send GRP UNAFFIL network announcement --- Constants.cs | 1 + FnePeer.cs | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/Constants.cs b/Constants.cs index 57bdffa..ad0d79d 100644 --- a/Constants.cs +++ b/Constants.cs @@ -184,6 +184,7 @@ namespace fnecore public const byte NET_ANNC_SUBFUNC_GRP_AFFIL = 0x00; // Announce Group Affiliation public const byte NET_ANNC_SUBFUNC_UNIT_REG = 0x01; // Announce Unit Registration public const byte NET_ANNC_SUBFUNC_UNIT_DEREG = 0x02; // Announce Unit Deregistration + public const byte NET_ANNC_SUBFUNC_GRP_UNAFFIL = 0x03; // Announce Group Affiliation Removal public const byte NET_ANNC_SUBFUNC_AFFILS = 0x90; // Update All Affiliations /* diff --git a/FnePeer.cs b/FnePeer.cs index 931a779..0787a70 100644 --- a/FnePeer.cs +++ b/FnePeer.cs @@ -269,6 +269,21 @@ namespace fnecore FneUtils.Write3Bytes(dstId, ref res, 3); SendMaster(CreateOpcode(Constants.NET_FUNC_ANNOUNCE, Constants.NET_ANNC_SUBFUNC_GRP_AFFIL), res, 0, 0, true); + + } + + /// + /// Helper to send group affiliation removal announcement to the master. + /// + /// + public void SendMasterGroupAffiliationRemoval(uint srcId) + { + // send message to master + byte[] res = new byte[3]; + + FneUtils.Write3Bytes(srcId, ref res, 0); + + SendMaster(CreateOpcode(Constants.NET_FUNC_ANNOUNCE, Constants.NET_ANNC_SUBFUNC_GRP_UNAFFIL), res, 0, 0, true); } ///