When we first designed Connext DDS, deterministic memory allocation was on the top of our priority list. At that time most of our customers used small data types such as sensor and track data. We decided to go with an approach in which we pre-allocated the samples in the DataWriter and DataReader queues to their maximum size. For example:
struct Position {
double latitude;
double longitude;
}
struct VehicleTrack {
string<64> vehicleID; //@key
Position position;
}
In the previous example, a sample of type VehicleTrack was pre-allocated to its maximum size. Even if vehicleID did not have a length of 64 bytes, Connext DDS pre-allocated a string of 64 bytes to store the sample value.
As our customer base increased, the set of use cases expanded, and with that came the need to be more flexible in our memory allocation policies. For example, customers may use Connext DDS to publish and subscribe video and audio. Typically these data types are characterized for having unbounded members. For example:
struct VideoFrame {
boolean keyFrame;
/* The customer does not necessarily know the maximum
size of the data sequence */
sequence<octet> data;
};
Pre-allocating memory for samples like VideoFrame above may become prohibitive and really expensive as the customer will be forced to use an artificial and arbitrarily large bound for the variable size sequence. For example:
struct VideoFrame {
boolean keyFrame;
/* Alternatively the customer can use the code generator
command-line option -sequenceSize to set an implicit
limit for the unbounded sequence */
sequence<octet,1024000> data;
};
In Connext DDS 5.2.0, we have introduced support for unbounded sequences and strings.
To support unbounded sequences and strings, the Code Generator has a new command-line option: -unboundedSupport
. This new option may only be used when generating code for .NET, C, and C++ (that is, the -language
option must be specified for C++/CLI, C#, C, or C++).
With this option, Connext DDS will not pre-allocate the unbounded members to their maximum size. For unbounded members, the generated code will de-serialize the samples by dynamically allocating and de-allocating memory to accommodate the actual size of the unbounded member. Unbounded sequences and strings are also supported with DynamicData and Built-in Types and they integrate with the following tools and services:
- Routing Service
- Queuing Service
- Recording Service on serialized and automatic mode (records in serialized format)
- Replay Service when recorded in serialized mode
- Spy
- Admin Console
- Toolkit for LabVIEW
The integration with Persistence Service, Database Integration Service and Spreadsheet Add-in for Microsoft Excel is not available at this point.
For additional information, check Chapter 3 Data Types and DDS Data Samples and Chapter 20 DDS Sample-Data and Instance-Data Memory Management in the RTI Connext DDS Core Libraries User’s Manual as well as the User’s Manuals for services and tools.
Posts by Tag
- Developers/Engineer (174)
- Connext DDS Suite (77)
- Technology (74)
- News & Events (71)
- 2020 (54)
- Standards & Consortia (51)
- Aerospace & Defense (47)
- 2023 (35)
- Automotive (34)
- 2022 (29)
- IIoT (27)
- Leadership (24)
- 2024 (21)
- 2021 (19)
- Cybersecurity (19)
- Healthcare (19)
- Military Avionics (15)
- Culture & Careers (14)
- FACE (13)
- Connectivity Technology (11)
- Connext DDS Pro (10)
- JADC2 (10)
- ROS 2 (10)
- Connext DDS Tools (7)
- Connext DDS Micro (6)
- Databus (6)
- Transportation (5)
- Case + Code (4)
- Connext DDS (4)
- Connext DDS Cert (4)
- Energy Systems (4)
- FACE Technical Standard (4)
- Oil & Gas (3)
- RTI Labs (3)
- Research (3)
- Robotics (3)
- #A&D (2)
- Connext Conference (2)
- Edge Computing (2)
- MDO (2)
- MS&T (2)
- TSN (2)
- ABMS (1)
- C4ISR (1)
- ISO 26262 (1)
- L3Harris (1)
- LabView (1)
- MathWorks (1)
- National Instruments (1)
- Simulation (1)
- Tech Talks (1)
- UAM (1)
- Videos (1)
- eVTOL (1)