输出<object returned empty description>

本文解释了在使用po打印输出时遇到返回空描述&lt;对象&gt;的情况,并提供了解决方案,建议使用NSLog来检查输出。

出现这种状况应该是和我一样打断点时用po打印输出的结果。

字面上的意思就是  返回空描述<对象>

可以用NSLog来打印输出查看。

我打印的是NSString类型,是一个空字符串@"";

GetSupportedMetadata Description: This method provides a computer readable description of the metadata that the selected analytics modules can generate. The type parameter allows to select a single analytics module. By default the output shall relate to all analytics modules that exist in the device. The response shall provide a sample XML frame. The sample frame shall include all potentially generated elements by the selected analytics modules. Note that this e.g. does not need to include all possible class type enumerations. SOAP action: http://www.onvif.org/ver20/analytics/wsdl/GetSupportedMetadata Input: [GetSupportedMetadata] Type - optional; [QName] Optional reference to an AnalyticsModule Type returned from GetSupportedAnalyticsModules. Output: [GetSupportedMetadataResponse] AnalyticsModule - optional, unbounded; [MetadataInfo] Type - required; [QName] Reference to an AnalyticsModule Type. SampleFrame [Frame] Sample frame content starting with the tt:Frame node. UtcTime - required; [dateTime] Colorspace [string] Default color space of Color definitions in frame. Valid values are "RGB" and "YCbCr". Defaults to "YCbCr". Source [string] Optional name of the analytics module that generated this frame. PTZStatus - optional; [PTZStatus] Transformation - optional; [Transformation] Object - optional, unbounded; [Object] ObjectId [integer] UUID [string] Object unique identifier. Parent [integer] Object ID of the parent object. eg: License plate object has Vehicle object as parent. ParentUUID [string] Object UUID of the parent object. eg: License plate object has Vehicle object as parent. Appearance - optional; [Appearance] Transformation - optional; [Transformation] Shape - optional; [ShapeDescriptor] BoundingBox [Rectangle] CenterOfGravity [Vector] Polygon - optional, unbounded; [Polygon] Extension - optional; [ShapeDescriptorExtension] Color - optional; [ColorDescriptor] Class - optional; [ClassDescriptor] ClassCandidate - optional, unbounded; [ClassCandidate] Type [ClassType] - enum { 'Animal', 'Face', 'Human', 'Vehical', 'Other' } Likelihood [float] Extension - optional; [ClassDescriptorExtension] OtherTypes - unbounded; [OtherType] Type [string] Object Class Type Likelihood [float] A likelihood/probability that the corresponding object belongs to this class. The sum of the likelihoods shall NOT exceed 1 Type - optional, unbounded; [StringLikelihood] For well-defined values see tt:ObjectType. Other type definitions like tt:VehicleType may be applied as well. Extension - optional; [AppearanceExtension] GeoLocation - optional; [GeoLocation] VehicleInfo - optional, unbounded; [VehicleInfo] Type [StringLikelihood] Brand - optional; [StringLikelihood] Model - optional; [StringLikelihood] Color - optional; [ColorDescriptor] LicensePlateInfo - optional; [LicensePlateInfo] PlateNumber [StringLikelihood] A string of vehicle license plate number. PlateType - optional; [StringLikelihood] A description of the vehicle license plate, e.g., "Normal", "Police", "Diplomat" CountryCode - optional; [StringLikelihood] Describe the country of the license plate, in order to avoid the same license plate number. IssuingEntity - optional; [StringLikelihood] State province or authority that issue the license plate. HumanFace - optional; [HumanFace] HumanBody - optional; [HumanBody] ImageRef - optional; [anyURI] Image - optional; [base64Binary] BarcodeInfo - optional; [BarcodeInfo] Data [StringLikelihood] Information encoded in barcode Type - optional; [StringLikelihood] Acceptable values are defined in tt:BarcodeType PPM - optional; [float] Refers to the pixels per module SphericalCoordinate - optional; [SphericalCoordinate] Label - optional, unbounded; [LabelInfo] Likelihood [float] Authority [string] ID Behaviour - optional; [Behaviour] Removed - optional; Idle - optional; Extension - optional; [BehaviourExtension] Speed - optional; [float] Direction - optional; [GeoOrientation] Direction the object is moving. Yaw describes the horizontal direction in the range [-180..180] where 0 is towards the right of the device and 90 is away from the device. Pitch describes the vertical direction in the range [-90..90] where 90 is upwards. Extension - optional; [ObjectExtension] ObjectTree - optional; [ObjectTree] Rename - optional, unbounded; [Rename] from [ObjectId] ObjectId [integer] UUID [string] Object unique identifier. to [ObjectId] ObjectId [integer] UUID [string] Object unique identifier. Split - optional, unbounded; [Split] from [ObjectId] ObjectId [integer] UUID [string] Object unique identifier. to - unbounded; [ObjectId] ObjectId [integer] UUID [string] Object unique identifier. Merge - optional, unbounded; [Merge] from - unbounded; [ObjectId] ObjectId [integer] UUID [string] Object unique identifier. to [ObjectId] ObjectId [integer] UUID [string] Object unique identifier. Delete - optional, unbounded; [ObjectId] ObjectId [integer] UUID [string] Object unique identifier. Extension - optional; [ObjectTreeExtension] Extension - optional; [FrameExtension] MotionInCells - optional; [MotionInCells] Columns - required; [integer] Number of columns of the cell grid (x dimension) Rows - required; [integer] Number of rows of the cell grid (y dimension) Cells - required; [base64Binary] A “1” denotes a cell where motion is detected and a “0” an empty cell. The first cell is in the upper left corner. Then the cell order goes first from left to right and then from up to down. If the number of cells is not a multiple of 8 the last byte is filled with zeros. The information is run length encoded according to Packbit coding in ISO 12369 (TIFF, Revision 6.0). Extension - optional; [FrameExtension2] SceneImageRef - optional; [anyURI] SceneImage - optional; [base64Binary]根据这个说明完善一下int __tan__GetSupportedMetadata(struct soap *soap, struct _tan__GetSupportedMetadata *req, struct _tan__GetSupportedMetadataResponse *res)这个函数,目前只需要输出车辆数据
10-11
根据以下的测试步骤和测试说明文档,请给出onvif server响应getsupportedmetadata的全部流程,给出每个接口输入的请求和返回的内容,各个接口之间的联系便于绘制框架流程图ANALYTICS-4-1-4-v21.06 GET SUPPORTED METADATA STEP 1 - Get Device service address StepStart: 2025-11-03T09:04:32.5671193Z http://192.168.0.240:2020/onvif/device_service STEP PASSED STEP 2 - Check that the DUT returned Device service address StepStart: 2025-11-03T09:04:32.5683188Z STEP PASSED STEP 3 - Get Services StepStart: 2025-11-03T09:04:32.5817984Z Transmit done Receive done STEP PASSED STEP 4 - Get Media2 service address StepStart: 2025-11-03T09:04:32.676164Z http://192.168.0.240:2020/onvif/service STEP PASSED STEP 5 - Check that the DUT returned Media2 service address StepStart: 2025-11-03T09:04:32.6776575Z STEP PASSED STEP 6 - Get Analytics Configurations (Media2) StepStart: 2025-11-03T09:04:32.6950262Z Transmit done Receive done STEP PASSED STEP 7 - Check if GetAnalyticsConfigurations returned at least one Video Analytics Configuration item StepStart: 2025-11-03T09:04:32.8387952Z STEP PASSED STEP 8 - Get AnalyticsEngine service address StepStart: 2025-11-03T09:04:32.8399782Z http://192.168.0.240:2020/onvif/service STEP PASSED STEP 9 - Check that the DUT returned AnalyticsEngine service address StepStart: 2025-11-03T09:04:32.8414817Z STEP PASSED STEP 10 - Get Supported Analytics Modules(Analytics) [ConfigurationToken = video_analytics_2] StepStart: 2025-11-03T09:04:32.8565951Z Transmit done Receive done STEP PASSED STEP 11 - Get Supported Metadata(Analytics) StepStart: 2025-11-03T09:04:32.9569048Z Transmit done Receive done STEP PASSED STEP 12 - Check that MetadataInfo list contains at lest one item StepStart: 2025-11-03T09:04:33.0464978Z STEP PASSED STEP 13 - Check that bounding boxes and shapes of Object with ObjectId='101' in AnalyticsModule Type='http://www.onvif.org/ver10/schema:CellMotionEngine' are located in the top left quarter of the image StepStart: 2025-11-03T09:04:33.0531706Z STEP PASSED STEP 14 - Check that all MetadataInfo items contain different Type values StepStart: 2025-11-03T09:04:33.0625564Z STEP PASSED STEP 15 - Check that MetadataInfo item contains Type value from the following list: http://www.onvif.org/ver10/schema:CellMotionEngine http://www.onvif.org/ver10/schema:TamperEngine http://www.onvif.org/ver10/schema:LineDetector StepStart: 2025-11-03T09:04:33.0711766Z STEP PASSED STEP 16 - Get Supported Metadata(Analytics) StepStart: 2025-11-03T09:04:33.0819798Z Transmit done Receive done STEP PASSED STEP 17 - Check that bounding boxes and shapes of Object with ObjectId='101' in AnalyticsModule Type='http://www.onvif.org/ver10/schema:CellMotionEngine' are located in the top left quarter of the image StepStart: 2025-11-03T09:04:33.1672368Z STEP PASSED STEP 18 - Check that GetSupportedMetadata returned only one MetadataInfo item StepStart: 2025-11-03T09:04:33.1696188Z STEP PASSED STEP 19 - Check that MetadataInfo item contains Type value = 'http://www.onvif.org/ver10/schema:CellMotionEngine' StepStart: 2025-11-03T09:04:33.171436Z STEP PASSED STEP 20 - Compare MetadataInfo items with type = 'http://www.onvif.org/ver10/schema:CellMotionEngine' StepStart: 2025-11-03T09:04:33.1860089Z STEP PASSED STEP 21 - Get Supported Metadata(Analytics) StepStart: 2025-11-03T09:04:33.1880902Z Transmit done Receive done STEP PASSED STEP 22 - Get Supported Metadata(Analytics) StepStart: 2025-11-03T09:04:33.2683673Z Transmit done Receive done STEP PASSED TEST PASSED 5.4.4 GET SUPPORTED METADATA Test Case ID: ANALYTICS-4-1-4 Specification Coverage: GetSupportedMetadata (ONVIF Analytics Service Spec) Feature under test: GetSupportedMetadata (Analytics) WSDL Reference: analytics.wsdl Test Purpose: To verify getting supported metadata using GetSupportedMetadata request. Pre-Requisite: Analytics Service was received from the DUT. Media2 Service was received from the DUT. Analytics Modules is supported by the DUT. Supported Metadata feature is supported by the DUT. Test Configuration: ONVIF Client and DUT Test Procedure: 1.Start an ONVIF Client. 2.Start the DUT. 3.ONVIF Client retrieves full list of supported Analytics Modules by following the procedure mentioned in Annex A.13 with the following input and output parameters •out fullAnalyticsModuleDescriptionList - a list of supported Analytics Module Description 4.Set analyticsModuleTypeList := list of @Name values from fullAnalyticsModuleDescriptionList 5.ONVIF Client retrieves a list of supported metadata by following the procedure mentioned in Annex A.14 with the following input and output parameters •out analyticsModuleList1 - Analytics Module List with Metadata Info 6.If analyticsModuleList1 is empty, FAIL the test and skip other steps. 7.If analyticsModuleList1 contains at least two elements with the same @Type, FAIL the test and skip other steps. 8.For each Analytics Module analyticsModule from analyticsModuleList1 repeat the following steps: 8.1 If analyticsModule.@Type is not equal to at least one Type from analyticsModuleTypeList, FAIL the test and skip other steps. 8.2 ONVIF Client checks that object bounding boxes and shapes are located in the top left quarter of the image by following the procedure mentioned in Annex A.25 with the following input and output parameters •in analyticsModule.SampleFrame - sample frame of analytics module 9.For each Analytics Module Type analyticsModuleType from analyticsModuleTypeList repeat the following steps: 9.1 ONVIF Client invokes GetSupportedMetadata request with parameters •Type := analyticsModuleType 9.2 DUT responds with GetSupportedMetadataResponse message with parameters •AnalyticsModule list =: analyticsModuleList2 9.3 If analyticsModuleList2 contains more than one element, FAIL the test and skip other steps. 9.4 If analyticsModuleList2[0].@Type is not equal to analyticsModuleType, FAIL the test and skip other steps. 9.5 If set of fields in analyticsModuleList2[0] is not equal to set of filels in corresponding AnalyticsModule from analyticsModuleList1 (see Note at the end of the test), FAIL the test and skip other steps. 9.6 ONVIF Client checks that object bounding boxes and shapes are located in the top left quarter of the image by following the procedure mentioned in Annex A.25 with the following input and output parameters •in analyticsModuleList2[0].SampleFrame - sample frame of analytics module Test Result: PASS – • DUT passes all assertions. FAIL – • The DUT did not send GetSupportedMetadataResponse messages. Note: Presence of all fields without their values are compared at step 8.5, @Type value is used as key.
最新发布
11-04
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值