• Skip to main content
  • Skip to header right navigation
  • Skip to site footer
CDP Studio logo

CDP Studio

The no-code and full-code software development tool for distributed control systems and HMI

  • Doc
  • Why CDP
    • Software developers
    • Automation engineers
    • Managers
  • Product
    • Design UI
    • Develop
    • Analyze and test
    • Deploy
    • Framework and toolbox
    • Compatibility
  • Services
  • Use cases
  • Pricing
  • Try CDP

CDP Studio Documentation

  • Framework - IntelligentEdge
  • LogDataAggregator
  • 4.12.9

UbidotsEdge LogDataDisaggregator

LogDataAggregator

LogDataAggregator

The LogDataAggregator is a sequencer block, that collects value sample events from CDP Logger, aggregates them by Path and sends out compacted value series using Protocol Buffers encoding.

The block can be useful when CDPLogger data needs to be sent over a slow or expensive communication line, to speed up the communication and reduce the bandwidth usage.

Block receives ValueLogReader Data events (i.e. Path plus value sample data like Timestamp, Value and ValueType) and groups them by the Path. When some sample groups become larger than the configured maximum or the ValueType has been changed, then the previously collected value samples for the Path will be encoded and sent to the block output, together with the Path value. The following Protocol Buffers message is used to encode value sample list:

syntax = "proto3";
message AggregatedData {
  string valuetype = 1;
  repeated uint64 timestamp_deltas = 2;
  repeated double d_values = 3;
  repeated float f_values = 4;
  repeated uint64 ui64_values = 5;
  repeated sint64 i64_values = 6;
  repeated uint32 ui32_values = 7;
  repeated sint32 i32_values = 8;
  repeated uint32 us_values = 9;
  repeated sint32 s_values = 10;
  repeated uint32 uc_values = 11;
  repeated int32 c_values = 12;
  repeated bool b_values = 13;
  repeated string str_values = 14;
}

To decode these messages on the receiver end, a companion LogDataDisaggregator block can be used, that can decode these messages back to individual value samples again.

Events

NameInput/OutputDescription
DataInputA single input value sample. The event must have arguments Path, Timestamp, Value, ValueType. Usually to be routed from ValueLogReader sequencer block.
AggregatedOutputAggregated and encoded value samples will be sent out via this event in AggregatedData argument, together with corresponding Path argument
FlushInputWill encode gathered value samples for all Paths and send them out as Path, AggregatedData argument via Aggregated events
FlushedOutputWill be emitted after Flush is done
InitInputWill clear all pending value sample data and reset the aggregator, then will emit Inited
InitedOutputWill be emitted after Init is done

Arguments

NameDescription
PathNode path of the value sample. Must be present in the incoming Data event. Will be sent out with the Aggregated events.
TimestampTimestamp of the node value sample. Must be present in the incoming Data event.
ValueThe value of the node. Must be present in the incoming Data event.
ValueTypeThe value type of the node value sample. Must be present in the incoming Data event.
AggregatedDataAggregated value samples for one Path encoded as Protocol Buffers message. Will be sent out with the Aggregated events.

Properties

NameSpecial flagDescription
MaxCountWhen not zero, sets the maximum value sample count (per Path) to aggregate before sending them all out via Aggregated event
MaxSizeWhen not zero, sets the maximum size (in bytes) for the AggregatedData argument value to grow before it has to be sent out. Set this attribute to equal or less than the maximum message size of the communication protocol, for the messages not to exceed the communication protocol message size limit.
EmptyRead-onlyIs set to true when no value samples are waiting to be aggregated and sent out for any Path

Note: Note, that the encoded message (AggregatedData argument) may contain non-printable characters, therefore the Command attribute of Aggregated event has to be set to any other value than CM_TEXTCOMMAND (`20100_16`) - which will instruct the CDP to send the event data over in binary form. Also, make sure you set the Command attribute to the very same value on the event receiver side.

See also LogDataDisaggregator.

UbidotsEdge LogDataDisaggregator

The content of this document is confidential information not to be published without the consent of CDP Technologies AS.

CDP Technologies AS, www.cdpstudio.com

Get started with CDP Studio today

Let us help you take your great ideas and turn them into the products your customer will love.

Try CDP Studio for free
Why CDP Studio?

CDP Technologies AS
Hundsværgata 8,
P.O. Box 144
6001 Ålesund, Norway

Tel: +47 990 80 900
E-mail: info@cdptech.com

Company

About CDP

Contact us

Services

Partners

Blog

Developers

Get started

User manuals

Support

Document download

Release notes

My account

Follow CDP

  • LinkedIn
  • YouTube
  • GitHub

© Copyright 2024 CDP Technologies. Privacy and cookie policy.

Return to top