-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new demo scripts for join and unjoin commands
- Loading branch information
1 parent
30795cf
commit e1b4a02
Showing
31 changed files
with
426 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<DMSScript options="272" xmlns="http://www.skyline.be/automation"> | ||
<Name>VBProbe-InterAppDemo-StreamEthJoin</Name> | ||
<Description></Description> | ||
<Type>Automation</Type> | ||
<Author>SKYLINE2\DBO</Author> | ||
<CheckSets>FALSE</CheckSets> | ||
<Folder>BT VB Probe Series - InterApp Demo</Folder> | ||
|
||
<Protocols> | ||
</Protocols> | ||
|
||
<Memory> | ||
</Memory> | ||
|
||
<Parameters> | ||
<ScriptParameter id="101" type="string" values=""> | ||
<Description>Element Name</Description> | ||
</ScriptParameter> | ||
<ScriptParameter id="102" type="string" values=""> | ||
<Description>Stream Keys</Description> | ||
</ScriptParameter> | ||
</Parameters> | ||
|
||
<Script> | ||
<Exe id="2" type="csharp"> | ||
<Value><![CDATA[[Project:StreamEthJoin_1]]]></Value> | ||
<!--<Param type="debug">true</Param>--> | ||
<Message></Message> | ||
</Exe> | ||
</Script> | ||
</DMSScript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
/* | ||
**************************************************************************** | ||
* Copyright (c) 2023, Skyline Communications NV All Rights Reserved. * | ||
**************************************************************************** | ||
By using this script, you expressly agree with the usage terms and | ||
conditions set out below. | ||
This script and all related materials are protected by copyrights and | ||
other intellectual property rights that exclusively belong | ||
to Skyline Communications. | ||
A user license granted for this script is strictly for personal use only. | ||
This script may not be used in any way by anyone without the prior | ||
written consent of Skyline Communications. Any sublicensing of this | ||
script is forbidden. | ||
Any modifications to this script by the user are only allowed for | ||
personal use and within the intended purpose of the script, | ||
and will remain the sole responsibility of the user. | ||
Skyline Communications will not be responsible for any damages or | ||
malfunctions whatsoever of the script resulting from a modification | ||
or adaptation by the user. | ||
The content of this script is confidential information. | ||
The user hereby agrees to keep this confidential information strictly | ||
secret and confidential and not to disclose or reveal it, in whole | ||
or in part, directly or indirectly to any person, entity, organization | ||
or administration without the prior written consent of | ||
Skyline Communications. | ||
Any inquiries can be addressed to: | ||
Skyline Communications NV | ||
Ambachtenstraat 33 | ||
B-8870 Izegem | ||
Belgium | ||
Tel. : +32 51 31 35 69 | ||
Fax. : +32 51 31 01 29 | ||
E-mail : [email protected] | ||
Web : www.skyline.be | ||
Contact : Ben Vandenberghe | ||
**************************************************************************** | ||
Revision History: | ||
DATE VERSION AUTHOR COMMENTS | ||
06/01/2025 1.0.0.1 DBO, Skyline Initial version | ||
**************************************************************************** | ||
*/ | ||
|
||
namespace JoinEthStreams | ||
{ | ||
using System; | ||
|
||
using Skyline.DataMiner.Automation; | ||
using Skyline.DataMiner.ConnectorAPI.BridgeTechnologies.VBProbeSeries; | ||
using Skyline.DataMiner.ConnectorAPI.BridgeTechnologies.VBProbeSeries.Ethernet; | ||
using Skyline.DataMiner.Core.InterAppCalls.Common.CallBulk; | ||
using Skyline.DataMiner.Core.InterAppCalls.Common.Shared; | ||
|
||
/// <summary> | ||
/// Represents a DataMiner Automation script. | ||
/// </summary> | ||
public class Script | ||
{ | ||
/// <summary> | ||
/// The script entry point. | ||
/// </summary> | ||
/// <param name="engine">Link with SLAutomation process.</param> | ||
public void Run(IEngine engine) | ||
{ | ||
// Get user input | ||
string elementName = engine.GetScriptParam("Element Name").Value; | ||
string streamKeys = engine.GetScriptParam("Stream Keys").Value; | ||
|
||
// Find Element | ||
var element = engine.FindElement(elementName); | ||
if (element == null) | ||
{ | ||
engine.GenerateInformation($"Could not find element with name '{elementName}'."); | ||
return; | ||
} | ||
else | ||
{ | ||
engine.GenerateInformation($"Found element with name '{elementName}' - elementID '{element.DmaId}/{element.ElementId}'"); | ||
} | ||
|
||
// Build InterApp Message | ||
var command = InterAppCallFactory.CreateNew(); | ||
command.Source = new Source("BT VB Series - Streams - Eth - Join"); | ||
command.ReturnAddress = new ReturnAddress(element.DmaId, element.ElementId, 9000001); | ||
|
||
var message = new JoinUnjoinEthStreams | ||
{ | ||
////StreamKeys = new[] { "100.529", "100.530", "100.531" }, | ||
StreamKeys = streamKeys.Split(';'), | ||
IsJoinMethod = true, | ||
Source = new Source("BT VB Series - Streams - Eth - Join"), | ||
}; | ||
|
||
command.Messages.Add(message); | ||
|
||
// Process InterApp Message | ||
foreach (var responseMessage in command.Send(Engine.SLNetRaw, element.DmaId, element.ElementId, 9000000, new TimeSpan(0, 0, 10), InterApp.KnownTypes)) | ||
{ | ||
if (responseMessage != null) | ||
{ | ||
if (responseMessage is JoinUnjoinEthStreamsResult result) | ||
{ | ||
engine.GenerateInformation(result.Description); | ||
} | ||
else | ||
{ | ||
engine.GenerateInformation($"{nameof(responseMessage)} is not of expected type '{nameof(JoinUnjoinEthStreamsResult)}'.{Environment.NewLine}{responseMessage}"); | ||
} | ||
} | ||
else | ||
{ | ||
engine.GenerateInformation($"{nameof(responseMessage)} is null."); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net48</TargetFramework> | ||
<Company>Skyline Communications</Company> | ||
<Copyright>© Skyline Communications</Copyright> | ||
<GenerateDocumentationFile>True</GenerateDocumentationFile> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | ||
<DebugType>full</DebugType> | ||
<CodeAnalysisRuleSet>..\Internal\Code Analysis\qaction-debug.ruleset</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | ||
<DebugType>pdbonly</DebugType> | ||
<CodeAnalysisRuleSet>..\Internal\Code Analysis\qaction-release.ruleset</CodeAnalysisRuleSet> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<DefineConstants>$(DefineConstants);DCFv1;DBInfo;ALARM_SQUASHING</DefineConstants> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<PackageReference Include="Skyline.DataMiner.ConnectorAPI.BridgeTechnologies.VBProbeSeries" Version="1.0.0.2-prerelease.1" /> | ||
<PackageReference Include="Skyline.DataMiner.Dev.Automation" Version="10.1.0.6" /> | ||
</ItemGroup> | ||
<ProjectExtensions> | ||
<VisualStudio> | ||
<UserProperties DisLinkedXmlFile="..\StreamEthJoin.xml" DisProjectType="automationScriptProject" DisLinkId="1" /> | ||
</VisualStudio> | ||
</ProjectExtensions> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<DMSScript options="272" xmlns="http://www.skyline.be/automation"> | ||
<Name>VBProbe-InterAppDemo-StreamEthUnjoin</Name> | ||
<Description></Description> | ||
<Type>Automation</Type> | ||
<Author>SKYLINE2\DBO</Author> | ||
<CheckSets>FALSE</CheckSets> | ||
<Folder>BT VB Probe Series - InterApp Demo</Folder> | ||
|
||
<Protocols> | ||
</Protocols> | ||
|
||
<Memory> | ||
</Memory> | ||
|
||
<Parameters> | ||
<ScriptParameter id="101" type="string" values=""> | ||
<Description>Element Name</Description> | ||
</ScriptParameter> | ||
<ScriptParameter id="102" type="string" values=""> | ||
<Description>Stream Keys</Description> | ||
</ScriptParameter> | ||
</Parameters> | ||
|
||
<Script> | ||
<Exe id="2" type="csharp"> | ||
<Value><![CDATA[[Project:StreamEthUnjoin_1]]]></Value> | ||
<!--<Param type="debug">true</Param>--> | ||
<Message></Message> | ||
</Exe> | ||
</Script> | ||
</DMSScript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
/* | ||
**************************************************************************** | ||
* Copyright (c) 2023, Skyline Communications NV All Rights Reserved. * | ||
**************************************************************************** | ||
By using this script, you expressly agree with the usage terms and | ||
conditions set out below. | ||
This script and all related materials are protected by copyrights and | ||
other intellectual property rights that exclusively belong | ||
to Skyline Communications. | ||
A user license granted for this script is strictly for personal use only. | ||
This script may not be used in any way by anyone without the prior | ||
written consent of Skyline Communications. Any sublicensing of this | ||
script is forbidden. | ||
Any modifications to this script by the user are only allowed for | ||
personal use and within the intended purpose of the script, | ||
and will remain the sole responsibility of the user. | ||
Skyline Communications will not be responsible for any damages or | ||
malfunctions whatsoever of the script resulting from a modification | ||
or adaptation by the user. | ||
The content of this script is confidential information. | ||
The user hereby agrees to keep this confidential information strictly | ||
secret and confidential and not to disclose or reveal it, in whole | ||
or in part, directly or indirectly to any person, entity, organization | ||
or administration without the prior written consent of | ||
Skyline Communications. | ||
Any inquiries can be addressed to: | ||
Skyline Communications NV | ||
Ambachtenstraat 33 | ||
B-8870 Izegem | ||
Belgium | ||
Tel. : +32 51 31 35 69 | ||
Fax. : +32 51 31 01 29 | ||
E-mail : [email protected] | ||
Web : www.skyline.be | ||
Contact : Ben Vandenberghe | ||
**************************************************************************** | ||
Revision History: | ||
DATE VERSION AUTHOR COMMENTS | ||
06/01/2025 1.0.0.1 DBO, Skyline Initial version | ||
**************************************************************************** | ||
*/ | ||
|
||
namespace UnjoinEthStreams | ||
{ | ||
using System; | ||
|
||
using Skyline.DataMiner.Automation; | ||
using Skyline.DataMiner.ConnectorAPI.BridgeTechnologies.VBProbeSeries; | ||
using Skyline.DataMiner.ConnectorAPI.BridgeTechnologies.VBProbeSeries.Ethernet; | ||
using Skyline.DataMiner.Core.InterAppCalls.Common.CallBulk; | ||
using Skyline.DataMiner.Core.InterAppCalls.Common.Shared; | ||
|
||
/// <summary> | ||
/// Represents a DataMiner Automation script. | ||
/// </summary> | ||
public class Script | ||
{ | ||
/// <summary> | ||
/// The script entry point. | ||
/// </summary> | ||
/// <param name="engine">Link with SLAutomation process.</param> | ||
public void Run(IEngine engine) | ||
{ | ||
// Get user input | ||
string elementName = engine.GetScriptParam("Element Name").Value; | ||
string streamKeys = engine.GetScriptParam("Stream Keys").Value; | ||
|
||
// Find Element | ||
var element = engine.FindElement(elementName); | ||
if (element == null) | ||
{ | ||
engine.GenerateInformation($"Could not find element with name '{elementName}'."); | ||
return; | ||
} | ||
else | ||
{ | ||
engine.GenerateInformation($"Found element with name '{elementName}' - elementID '{element.DmaId}/{element.ElementId}'"); | ||
} | ||
|
||
// Build InterApp Message | ||
var command = InterAppCallFactory.CreateNew(); | ||
command.Source = new Source("BT VB Series - Streams - Eth - Unjoin"); | ||
command.ReturnAddress = new ReturnAddress(element.DmaId, element.ElementId, 9000001); | ||
|
||
var message = new JoinUnjoinEthStreams | ||
{ | ||
////StreamKeys = new[] { "100.529", "100.530", "100.531" }, | ||
StreamKeys = streamKeys.Split(';'), | ||
IsJoinMethod = false, | ||
Source = new Source("BT VB Series - Streams - Eth - Unjoin"), | ||
}; | ||
|
||
command.Messages.Add(message); | ||
|
||
// Process InterApp Message | ||
foreach (var responseMessage in command.Send(Engine.SLNetRaw, element.DmaId, element.ElementId, 9000000, new TimeSpan(0, 0, 10), InterApp.KnownTypes)) | ||
{ | ||
if (responseMessage != null) | ||
{ | ||
if (responseMessage is JoinUnjoinEthStreamsResult result) | ||
{ | ||
engine.GenerateInformation(result.Description); | ||
} | ||
else | ||
{ | ||
engine.GenerateInformation($"{nameof(responseMessage)} is not of expected type '{nameof(JoinUnjoinEthStreamsResult)}'.{Environment.NewLine}{responseMessage}"); | ||
} | ||
} | ||
else | ||
{ | ||
engine.GenerateInformation($"{nameof(responseMessage)} is null."); | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.