Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Agility
      • Kanban workshop
      • Agile Fundamentals
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • Support
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Flow for smart serial protocol

Solved859 views6th July 2023
1
Dennis Nacorda [DevOps Member]50 17th April 2023 0 Comments

I have a server that sends data using UDP and want to use smart-serial to receive these data.

Since there will be no triggers or timers or command/response pairs, how can I read the data and set param with the data?

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 6th July 2023

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
1
Timothy Van Poucke [SLC] [DevOps Enabler]1.21K Posted 17th April 2023 2 Comments

Hi Dennis,

There are a few ways you could do this. One of them is work with a certain length in which case the connector will split up the data to packages of that length triggering the parameter every time.  You can then check the data if it makes sense, if not, store it in another parameter, wait until the response triggers again, append the saved data with the new and see if it makes sense then and so on. Please find some more info on working with smart serial connectors here: Smart Serial

This ere is also a how-to use case that might interest you, please find it here: How to define serial and smart-serial responses in one and the same protocol

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 6th July 2023
Dennis Nacorda [DevOps Member] commented 17th April 2023

Hi Timothy,

How does the connector work, every time the data is received it will try to match it with the response/s?

Timothy Van Poucke [SLC] [DevOps Enabler] commented 17th April 2023

Hi Dennis, short answer is yes but dojo doesn’t allow me to easily post code here, please find a follow-up answer below.

2
Timothy Van Poucke [SLC] [DevOps Enabler]1.21K Posted 17th April 2023 1 Comment

Hi Dennis,

As stated in the comment Dojo doesn’t allow me to reply nice pieces of XML in comments so here is the answer to your comment:

Yes, actually but actually you would only have 1 response which would look like this:

<Responses>
<Response id=”1″>
<Name>genericResponse</Name>
<Description>GenericResponse</Description>
<Content>
<Param>60</Param>
</Content>
</Response>
</Responses>

And Param 60 would look like this:

<Param id=”60″>
<Name>genericResponseParam</Name>
<Description>GenericResponseParam</Description>
<Type>read</Type>
<Interprete>
<RawType>other</RawType>
<LengthType>next param</LengthType>
<Type>string</Type>
</Interprete>
</Param>

After every response of “GenericResponse” you can trigger a QAction and within this QAction you can get the data from the response, check to see if there is still old data. This is some inspiration on how your Qaction might look like:

byte[] bytesBuffer = GetDataFromParameter(protocol, Parameter.messagebuffer_23);
byte[] responseBytes = GetDataFromParameter(protocol, Parameter.genericresponseparam_60);
bool bUpdateInput;
bool bUpdateOutput;

if (responseBytes.Length == 0)
{
return;
}

byte[] bytes = new byte[bytesBuffer.Length + responseBytes.Length];

// This code will append the old + new data
Buffer.BlockCopy(responseBytes, 0, bytes, bytesBuffer.Length, responseBytes.Length);

// In this method we would try and make messages out of the data.
List<NsBusMessage> messages = GetCandidateMessages(protocol, bytes);

// here we will process these messages
ProcessCandidateMessages(protocol, messages, out bUpdateInput, out bUpdateOutput);

public static byte[] GetDataFromParameter(SLProtocol protocol, int ccspPid)
{
Array byteArray = (Array)protocol.GetData(“PARAMETER”, ccspPid);

if (byteArray != null)
{
byte[] byteCommand = new byte[byteArray.Length];
for (int i = 0; i < byteArray.Length; i++)
{
byteCommand.SetValue(byteArray.GetValue(i), i);
}

return byteCommand;
}

return new byte[] { };
}

Dennis Nacorda [DevOps Member] Posted new comment 17th April 2023
Dennis Nacorda [DevOps Member] commented 17th April 2023

Thanks Timothy, now I understand this connector better and can start writing the protocol.

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs