In a custom booking wizard we want to provide a drop down of all the IRD equipment. This will make sure that all the required functionality is done by the same equipment.
We are able to find the eligible resources but we would need the Link element name.
How do we retrieve this?
Keep in mind that the DVE state is not always enabled.
We found that when we set the result of the GetEligibleResources as FunctionResource we can get the DMAId and ElementId of the Main element. Doing an extra looking to get the name feels like adding a lot of overhead on the system.
List<string> irds = new List<string>();
foreach (var matchingIrdResource in matchingDemodResources)
{
var fr = matchingIrdResource as FunctionResource;
var irdMain = _engine.FindElement(fr.MainDVEDmaID, fr.MainDVEElementID);
if (irdMain != null)
{
irds.Add(irdMain.ElementName);
}
}
Hi Mieke,
To make sure that the same equipment is used you'll have to work with capabilities.
In your case the Decoding resource must have a capability with the name of the element to which the selected Demodulator resource is linked. Once the Demodulator resource is assigned, a DTR script must transfer the linked element name as a capability parameter to the Decoding function.
Note: Best practice is to have the element name available as a resource property on your Demodulator resource to avoid having lots of system calls.
Hi Mieke,
If possible, set, like Jens, suggested a property in your resources that will hold the Main Element name, that will save you the extra calls.
If that is not possible, improve your algorithm by storing all the distinct ids and then only make a call for each element.
Hi Mieke,
I'm afraid you have to do with the following:
The object 'Net.ResourceManager.Objects.FunctionResource' has the following properties:
- int DmaID + int ElementID (inherited from Resource)
This is the 'resource element', based on the instance (FunctionEntryPoint)
in the example, this is Switch.1 with ID 66/564506.
- int MainDVEDMAID + int MainDVEDElementID
This is the main DVE element. in the example, this is Switch A.
Example: