@@ -33,31 +33,67 @@ pub fn determine_type(
3333 // determine if we're in the uStreamer use-case of capturing all point-to-point messages
3434 trace ! ( "source_filter: {source_filter:?}" ) ;
3535 trace ! ( "sink_filter: {sink_filter:?}" ) ;
36+
37+ // Log each condition separately to identify which one(s) are failing
38+ let source_wildcard_authority = !source_filter. has_wildcard_authority ( ) ;
39+ trace ! ( "source_non_wildcard_authority: {source_wildcard_authority}" ) ;
40+
41+ let source_wildcard_entity_type = source_filter. has_wildcard_entity_type ( ) ;
42+ trace ! ( "source_wildcard_entity_type: {source_wildcard_entity_type}" ) ;
43+
44+ let source_wildcard_entity_instance = source_filter. has_wildcard_entity_instance ( ) ;
45+ trace ! ( "source_wildcard_entity_instance: {source_wildcard_entity_instance}" ) ;
46+
47+ let source_wildcard_version = source_filter. has_wildcard_version ( ) ;
48+ trace ! ( "source_wildcard_version: {source_wildcard_version}" ) ;
49+
50+ let source_wildcard_resource_id = source_filter. has_wildcard_resource_id ( ) ;
51+ trace ! ( "source_wildcard_resource_id: {source_wildcard_resource_id}" ) ;
52+
53+ let sink_non_wildcard_authority = !sink_filter. has_wildcard_authority ( ) ;
54+ trace ! ( "sink_non_wildcard_authority: {sink_non_wildcard_authority}" ) ;
55+
56+ let sink_wildcard_entity_type = sink_filter. has_wildcard_entity_type ( ) ;
57+ trace ! ( "sink_wildcard_entity_type: {sink_wildcard_entity_type}" ) ;
58+
59+ let sink_wildcard_entity_instance = sink_filter. has_wildcard_entity_instance ( ) ;
60+ trace ! ( "sink_wildcard_entity_instance: {sink_wildcard_entity_instance}" ) ;
61+
62+ let sink_wildcard_version = sink_filter. has_wildcard_version ( ) ;
63+ trace ! ( "sink_wildcard_version: {sink_wildcard_version}" ) ;
64+
65+ let sink_wildcard_resource_id = sink_filter. has_wildcard_resource_id ( ) ;
66+ trace ! ( "sink_wildcard_resource_id: {sink_wildcard_resource_id}" ) ;
67+
3668 let streamer_use_case = {
37- source_filter . has_wildcard_authority ( )
38- && source_filter . has_wildcard_entity_type ( )
39- && source_filter . has_wildcard_entity_instance ( )
40- && source_filter . has_wildcard_version ( )
41- && source_filter . has_wildcard_resource_id ( )
42- && !sink_filter . has_wildcard_authority ( )
43- && sink_filter . has_wildcard_entity_type ( )
44- && sink_filter . has_wildcard_entity_instance ( )
45- && sink_filter . has_wildcard_version ( )
46- && sink_filter . has_wildcard_resource_id ( )
69+ source_wildcard_authority
70+ && source_wildcard_entity_type
71+ && source_wildcard_entity_instance
72+ && source_wildcard_version
73+ && source_wildcard_resource_id
74+ && sink_non_wildcard_authority
75+ && sink_wildcard_entity_type
76+ && sink_wildcard_entity_instance
77+ && sink_wildcard_version
78+ && sink_wildcard_resource_id
4779 } ;
80+ trace ! ( "streamer_use_case final result: {streamer_use_case}" ) ;
4881
4982 if streamer_use_case {
83+ trace ! ( "Matched streamer use case - returning AllPointToPoint" ) ;
5084 return Ok ( RegistrationType :: AllPointToPoint ) ;
5185 }
5286
87+ // Log which case we're falling through to
5388 if sink_filter. resource_id == 0 {
89+ trace ! ( "sink_filter.resource_id == 0 - returning Response" ) ;
5490 Ok ( RegistrationType :: Response )
5591 } else {
92+ trace ! ( "sink_filter.resource_id != 0 - returning Request" ) ;
5693 Ok ( RegistrationType :: Request )
5794 }
5895 } else {
96+ trace ! ( "No sink_filter provided - returning Publish" ) ;
5997 Ok ( RegistrationType :: Publish )
6098 }
6199}
62-
63- // TODO: Add unit tests
0 commit comments