-
Notifications
You must be signed in to change notification settings - Fork 380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sequence type indirection support #1047
base: master
Are you sure you want to change the base?
Conversation
be98f81
to
f540208
Compare
f540208
to
04c9b18
Compare
…th CI tests Add array type indirection support
8d8dc82
to
1a61712
Compare
WalkthroughThe changes enhance the handling of recursive TypeCodes during demarshaling by adding support for sequence types. In the C++ extraction file, the Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Test Client
participant Input as TAO_InputCDR
participant Demarshal as tc_demarshal_indirection
participant Factory as tc_sequence_factory
participant Event as StructuredEvent
Client->>Input: Initialize stream (big-endian, IIOP 1.2)
Input->>Demarshal: Send binary data for demarshaling
alt Type is tk_sequence or tk_array
Demarshal->>Factory: Call tc_sequence_factory
Factory-->>Demarshal: Return processed sequence data
else Other types
Demarshal-->>Demarshal: Process normally
end
Demarshal-->>Event: Return StructuredEvent object
Event-->>Client: Event received successfully
Poem
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp (1)
1404-1411
: Consider enhancing recursion handling and complex type support.The TODO comment indicates areas for improvement:
- Verify if recursion is properly handled for sequences
- Evaluate the need for handling other complex types
Consider:
- Adding explicit recursion detection for sequences
- Documenting which other complex types might need similar handling
- Adding test cases for recursive sequences
TAO/tests/Any/Indirected/client.cpp (1)
235-244
: Consider enhancing error reporting.While the error handling is correct, the error message could be more descriptive.
Consider enhancing the error message to include more details:
- "ERROR: Failed to demarshal indirected sequence\n")); + "ERROR: Failed to demarshal indirected sequence. Stream position: %d\n"), + strm.length()));
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp
(2 hunks)TAO/tests/Any/Indirected/client.cpp
(2 hunks)TAO/tests/Any/Indirected/seq_indirection_bin.h
(1 hunks)TAO/tests/Any/Indirected/test.idl
(1 hunks)
🔇 Additional comments (5)
TAO/tests/Any/Indirected/test.idl (2)
18-19
: LGTM! Well-defined exception for sequence indirection testing.The exception
Sequence_Indirection_Test_Failed
is appropriately defined for error handling during sequence indirection tests.
21-54
: LGTM! Well-structured event definitions with proper sequence usage.The event-related structures are well-designed with:
- Clear type aliases for property names and values
- Proper sequence definitions (PropertySeq, OptionalHeaderFields)
- Comprehensive event structure with header and body
TAO/tao/AnyTypeCode/TypeCode_CDR_Extraction.cpp (1)
1395-1395
: LGTM! Added sequence type support in kind checking.The addition of
tk_sequence
to the kind check properly enables sequence type indirection support.TAO/tests/Any/Indirected/seq_indirection_bin.h (1)
1-431
: LGTM! Well-structured binary test data.The binary test data is:
- Well-commented with hex values for readability
- Properly formatted for CORBA CDR encoding
- Correctly sized with accurate length calculation
TAO/tests/Any/Indirected/client.cpp (1)
231-234
: LGTM! Clear test section for sequence indirection.The test setup is well-documented and properly separated from other tests.
In CORBA standard there is no any limitation to support indirection for sequence type.
Our customer's unknown ORB sends sequence type with indirection.
So I have implemented support indirection for sequence type.
This code is already working in production and
it is related to issue: During demarshaling CORBA sequence type indirection is not supported #879
Summary by CodeRabbit
New Features
Tests