d8d1e1e761
testcases: 1. test_single(): single instance, advertise then subscribe. 2. test_multi_inst10(): 10 instance, each 1 subscriber. 3. test_multi(): 2 instances, 2 advertisers, 2 subscribers. 4. test_multi_reversed(): same as test_multi(), but subsribe before advertise. 5. test_unadvertise(): unadvertise upper 4 advertisers. 6. test_multi2(): same as tset_multi(). but multi-thread. 7, test_queue(): topic queue_size = 16. Signed-off-by: jihandong <jihandong@xiaomi.com> Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
75 lines
2.4 KiB
C
75 lines
2.4 KiB
C
/****************************************************************************
|
|
* apps/system/uorb/test/utility.h
|
|
*
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
* this work for additional information regarding copyright ownership. The
|
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
|
* "License"); you may not use this file except in compliance with the
|
|
* License. You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
* License for the specific language governing permissions and limitations
|
|
* under the License.
|
|
*
|
|
****************************************************************************/
|
|
|
|
#ifndef __APP_SYSTEM_UORB_UORB_TEST_UTILITY_H
|
|
#define __APP_SYSTEM_UORB_UORB_TEST_UTILITY_H
|
|
|
|
/****************************************************************************
|
|
* Included Files
|
|
****************************************************************************/
|
|
|
|
#include "uORB/uORB.h"
|
|
|
|
/****************************************************************************
|
|
* Public Types
|
|
****************************************************************************/
|
|
|
|
struct orb_test_s
|
|
{
|
|
uint64_t timestamp;
|
|
int32_t val;
|
|
};
|
|
|
|
struct orb_test_medium_s
|
|
{
|
|
uint64_t timestamp;
|
|
int32_t val;
|
|
};
|
|
|
|
struct orb_test_large_s
|
|
{
|
|
uint64_t timestamp;
|
|
int32_t val;
|
|
};
|
|
|
|
/****************************************************************************
|
|
* Public Data
|
|
****************************************************************************/
|
|
|
|
/* register this as object request broker structure */
|
|
|
|
ORB_DECLARE(orb_test);
|
|
ORB_DECLARE(orb_multitest);
|
|
ORB_DECLARE(orb_test_large);
|
|
ORB_DECLARE(orb_test_medium);
|
|
ORB_DECLARE(orb_test_medium_multi);
|
|
ORB_DECLARE(orb_test_medium_wrap_around);
|
|
ORB_DECLARE(orb_test_medium_queue);
|
|
ORB_DECLARE(orb_test_medium_queue_poll);
|
|
|
|
/****************************************************************************
|
|
* Public Function Prototypes
|
|
****************************************************************************/
|
|
|
|
int test_note(FAR const char *fmt, ...);
|
|
int test_fail(FAR const char *fmt, ...);
|
|
|
|
#endif /* __APP_SYSTEM_UORB_TEST_UTILITY_H */
|