Skip to content

Commit

Permalink
Fixed role for IP Output VSGroups
Browse files Browse the repository at this point in the history
  • Loading branch information
VascoCoelhoSkyline committed Oct 3, 2023
1 parent b938f82 commit 7a3b385
Showing 1 changed file with 27 additions and 8 deletions.
35 changes: 27 additions & 8 deletions MO.VSG.EvsNeuron_1/MO.VSG.EvsNeuron_1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ private static void CheckAndRemoveResources(ResourceManagerHelper resourceManage
}
}

private static void CreateOrUpdateDomInstance(DomHelper helper, IEnumerable<DomInstance> currentInstances, DomInstance newInstance, string instanceName)
private static void CreateOrUpdateDomInstance(
DomHelper helper,
IEnumerable<DomInstance> currentInstances,
DomInstance newInstance,
string instanceName)
{
var currentInstance = currentInstances.FirstOrDefault(i => i.Name == instanceName);
if (currentInstance != null)
Expand Down Expand Up @@ -199,7 +203,7 @@ private static DomInstance GenerateVSGroup(string elementName, string key, Role
instance.AddOrUpdateFieldValue(
VirtualSignalGroup.Sections.Info.Definition,
VirtualSignalGroup.Sections.Info.Role,
(int)Role.Destination);
(int)role);
instance.AddOrUpdateFieldValue(
VirtualSignalGroup.Sections.Info.Definition,
VirtualSignalGroup.Sections.Info.OperationalState,
Expand All @@ -208,7 +212,6 @@ private static DomInstance GenerateVSGroup(string elementName, string key, Role
VirtualSignalGroup.Sections.Info.Definition,
VirtualSignalGroup.Sections.Info.AdministrativeState,
(int)AdministrativeState.Up);

instance.AddOrUpdateFieldValue(
VirtualSignalGroup.Sections.Info.Definition,
VirtualSignalGroup.Sections.Info.Type,
Expand Down Expand Up @@ -259,7 +262,10 @@ private static DomInstance GetFlowInstance(TransportType transportType, DmsEleme
return instance;
}

private static DomInstance GetIpAudioPrimaryFlowInstance(NeuronElement neuron, IpOutputStreamTableRow ipAudioTableRow, MacSettingsTableRow macSettingsTableRow)
private static DomInstance GetIpAudioPrimaryFlowInstance(
NeuronElement neuron,
IpOutputStreamTableRow ipAudioTableRow,
MacSettingsTableRow macSettingsTableRow)
{
IDmsElement dmsElement = neuron.DmsElement;
var dcfInterfaceId = neuron.GetDcfInterfaceId(MacSettingsTableDcfParameterGroupId, macSettingsTableRow.Key);
Expand All @@ -274,7 +280,10 @@ private static DomInstance GetIpAudioPrimaryFlowInstance(NeuronElement neuron, I
return instance;
}

private static DomInstance GetIpAudioSecondaryFlowInstance(NeuronElement neuron, IpOutputStreamTableRow ipAudioTableRow, MacSettingsTableRow macSettingsTableRow)
private static DomInstance GetIpAudioSecondaryFlowInstance(
NeuronElement neuron,
IpOutputStreamTableRow ipAudioTableRow,
MacSettingsTableRow macSettingsTableRow)
{
IDmsElement dmsElement = neuron.DmsElement;
var dcfInterfaceId = neuron.GetDcfInterfaceId(MacSettingsTableDcfParameterGroupId, macSettingsTableRow.Key);
Expand All @@ -289,7 +298,10 @@ private static DomInstance GetIpAudioSecondaryFlowInstance(NeuronElement neuron,
return instance;
}

private static DomInstance GetIpVideoPrimaryFlowInstance(NeuronElement neuron, IpOutputStreamTableRow ipVideoTableRow, MacSettingsTableRow macSettingsTableRow)
private static DomInstance GetIpVideoPrimaryFlowInstance(
NeuronElement neuron,
IpOutputStreamTableRow ipVideoTableRow,
MacSettingsTableRow macSettingsTableRow)
{
IDmsElement dmsElement = neuron.DmsElement;
var dcfInterfaceId = neuron.GetDcfInterfaceId(MacSettingsTableDcfParameterGroupId, macSettingsTableRow.Key);
Expand All @@ -304,7 +316,10 @@ private static DomInstance GetIpVideoPrimaryFlowInstance(NeuronElement neuron, I
return instance;
}

private static DomInstance GetIpVideoSecondaryFlowInstance(NeuronElement neuron, IpOutputStreamTableRow ipVideoTableRow, MacSettingsTableRow macSettingsTableRow)
private static DomInstance GetIpVideoSecondaryFlowInstance(
NeuronElement neuron,
IpOutputStreamTableRow ipVideoTableRow,
MacSettingsTableRow macSettingsTableRow)
{
IDmsElement dmsElement = neuron.DmsElement;
var dcfInterfaceId = neuron.GetDcfInterfaceId(MacSettingsTableDcfParameterGroupId, macSettingsTableRow.Key);
Expand Down Expand Up @@ -474,7 +489,11 @@ private Dictionary<string, IpFlow> GetIpVideoFlows(NeuronElement neuron, List<Ma
return flows;
}

private DomInstance GetIpVSGroup(IDmsElement element, Dictionary<string, IpFlow> ipVideoFlows, Dictionary<string, IpFlow> ipAudioFlows, string videoPathKey)
private DomInstance GetIpVSGroup(
IDmsElement element,
Dictionary<string, IpFlow> ipVideoFlows,
Dictionary<string, IpFlow> ipAudioFlows,
string videoPathKey)
{
string key = videoPathKey;
var vsgroup = GenerateVSGroup(element.Name, key, Role.Source);
Expand Down

0 comments on commit 7a3b385

Please sign in to comment.